Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornickboldt2017-12-13 14:42:12 +0000
committernickboldt2017-12-13 14:42:12 +0000
commitd00a5f778a16964ab35ed1c7033d6eb01fbef423 (patch)
tree836e8f746ad662b3895ee39375447a43b7ac2542
parent33f530715b372971e9b6611ea00806bff6bfc8a2 (diff)
parent22a49618b81c2eafc9143b898dd6f02e34fd8340 (diff)
downloadwebtools.jsf-d00a5f778a16964ab35ed1c7033d6eb01fbef423.tar.gz
webtools.jsf-d00a5f778a16964ab35ed1c7033d6eb01fbef423.tar.xz
webtools.jsf-d00a5f778a16964ab35ed1c7033d6eb01fbef423.zip
Merge ../webtools.jsf.tests
-rw-r--r--jsf/features/org.eclipse.jst.jsf.tests.feature/.cvsignore1
-rw-r--r--jsf/features/org.eclipse.jst.jsf.tests.feature/.project17
-rw-r--r--jsf/features/org.eclipse.jst.jsf.tests.feature/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--jsf/features/org.eclipse.jst.jsf.tests.feature/build.properties17
-rw-r--r--jsf/features/org.eclipse.jst.jsf.tests.feature/eclipse_update_120.jpgbin0 -> 21695 bytes
-rw-r--r--jsf/features/org.eclipse.jst.jsf.tests.feature/feature.properties40
-rw-r--r--jsf/features/org.eclipse.jst.jsf.tests.feature/feature.xml103
-rw-r--r--jsf/features/org.eclipse.jst.jsf.tests.feature/pom.xml27
-rw-r--r--jsf/tests/jsfRuntimeJarsDirectory/V1.1/commons-beanutils.jarbin0 -> 118757 bytes
-rw-r--r--jsf/tests/jsfRuntimeJarsDirectory/V1.1/commons-collections.jarbin0 -> 170902 bytes
-rw-r--r--jsf/tests/jsfRuntimeJarsDirectory/V1.1/commons-digester.jarbin0 -> 109131 bytes
-rw-r--r--jsf/tests/jsfRuntimeJarsDirectory/V1.1/commons-logging.jarbin0 -> 31638 bytes
-rw-r--r--jsf/tests/jsfRuntimeJarsDirectory/V1.1/jsf-api.jarbin0 -> 364344 bytes
-rw-r--r--jsf/tests/jsfRuntimeJarsDirectory/V1.1/jsf-impl.jarbin0 -> 695507 bytes
-rw-r--r--jsf/tests/jsfRuntimeJarsDirectory/V1.1/jstl.jarbin0 -> 20682 bytes
-rw-r--r--jsf/tests/jsfRuntimeJarsDirectory/V1.1/standard.jarbin0 -> 393259 bytes
-rw-r--r--jsf/tests/jsfRuntimeJarsDirectory/V1.2/glassfish.jstl_1.2.0.1.jarbin0 -> 376639 bytes
-rw-r--r--jsf/tests/jsfRuntimeJarsDirectory/V1.2/jsf-api.jarbin0 -> 358295 bytes
-rw-r--r--jsf/tests/jsfRuntimeJarsDirectory/V1.2/jsf-impl.jarbin0 -> 835478 bytes
-rw-r--r--jsf/tests/jsfRuntimeJarsDirectory/V2.0/jsf-api.jarbin0 -> 593926 bytes
-rw-r--r--jsf/tests/jsfRuntimeJarsDirectory/V2.0/jsf-impl.jarbin0 -> 1832382 bytes
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/.classpath7
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/.project28
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/META-INF/MANIFEST.MF15
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/about.html22
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/build.properties15
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/launch/AllRuntimeTests.launch42
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/plugin.properties11
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/pom.xml43
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/AllRuntimeTests.java57
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/RuntimeTestPlugin.java60
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/debug/TestRenderNode.java96
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/RuntimeTestUtil.java890
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/TestViewObject.java572
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/bean/TestDataModelInfo.java85
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/behavioural/TestActionSource2Info.java56
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/behavioural/TestValueHolderInfo.java65
-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.MF28
-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/launch/AllContentAssistTests.launch42
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/plugin.properties13
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.contentassist.tests/pom.xml51
-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/launch/AllContextSymbolTests.launch42
-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/pom.xml50
-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.MF57
-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/launch/AllJSFCoreTests.launch42
-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/pom.xml56
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/AllTests.java127
-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.java190
-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/JsfDownloadableLibraryLocationTests.java227
-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.java44
-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.jarbin0 -> 3966 bytes
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/commons-collections-bogus.jarbin0 -> 3966 bytes
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/commons-digester-bogus.jarbin0 -> 3966 bytes
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/commons-logging-bogus.jarbin0 -> 3966 bytes
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/jsf-api-bogus.jarbin0 -> 3966 bytes
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/jsf-impl-bogus.jarbin0 -> 3966 bytes
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/jstl-bogus.jarbin0 -> 3966 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.jarbin0 -> 3966 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.jarbin0 -> 1152 bytes
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/appconfig/fail2_nofacesconfig.jarbin0 -> 781 bytes
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/appconfig/noextdata.jarbin0 -> 672 bytes
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/appconfig/withextdata.jarbin0 -> 687 bytes
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/faces-all-bogus.jarbin0 -> 3966 bytes
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/faces-api-bogus.jarbin0 -> 3966 bytes
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/faces-impl-bogus.jarbin0 -> 3966 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/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.jarbin0 -> 3966 bytes
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/signatures.jarbin0 -> 2493 bytes
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/TLDTests.zipbin0 -> 30338 bytes
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/TLDTests2.zipbin0 -> 21570 bytes
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/Test2Project.zipbin0 -> 7871 bytes
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/TestProject.zipbin0 -> 7979 bytes
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/TestProject1.zipbin0 -> 7320 bytes
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/ValidationTestProject1.zipbin0 -> 9305 bytes
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/ValidationTestProject2.zipbin0 -> 10455 bytes
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/valueHolderTest11.zipbin0 -> 12693 bytes
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/tomahawk-bogus.jarbin0 -> 3966 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/launch/AllDesignTimeTests.launch41
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/plugin.properties13
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.designtime.tests/pom.xml56
-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.java853
-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.java261
-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.zipbin0 -> 11943 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.jarbin0 -> 24874 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/launch/AllFacesConfigTests.launch42
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/plugin.properties11
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/pom.xml50
-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/launch/AllFacesConfigUITests.launch41
-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/pom.xml44
-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.java133
-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.zipbin0 -> 6407583 bytes
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/test-file/emptyjsfproject.zipbin0 -> 4226 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.MF41
-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/launch/AllMetadataTests.launch42
-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.xml94
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/pom.xml51
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/AbstractBaseMetaDataTestCase.java161
-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.java118
-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.java171
-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.java234
-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.java99
-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.java74
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/TraitValueHelperTests.java271
-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.java125
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/pagedesigner/QuickEditSectionsTests.java72
-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.java183
-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.gifbin0 -> 124 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/FileIncludeExternalModel2.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/pom.xml27
-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/pom.xml27
-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/ObjectHacker.java45
-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.java918
-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.java123
-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/FileSpec.java77
-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.java97
-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.java193
-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/MockContentDescription.java59
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockContentType.java286
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockContentTypeManager.java151
-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.java256
-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.java219
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockResource.java603
-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.java394
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockWorkspaceContext.java619
-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.java471
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockPackageFragmentRoot.java213
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/osgi/BundleHacker.java70
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/smodel/TestableStructuredModelFactory.java332
-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/launch/JSFUIAllTests.launch41
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.ui.tests/plugin.properties13
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.ui.tests/pom.xml51
-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/launch/AllValidationELTests_1_1.launch42
-rw-r--r--jsf/tests/org.eclipse.jst.jsf.validation.el.tests/launch/AllValidationELTests_1_2.launch42
-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/pom.xml58
-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.java199
-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.java142
-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.java180
-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.MF35
-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/launch/AllPageDesignerTests_Part1.launch41
-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/pom.xml53
-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.java382
-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
944 files changed, 102926 insertions, 0 deletions
diff --git a/jsf/features/org.eclipse.jst.jsf.tests.feature/.cvsignore b/jsf/features/org.eclipse.jst.jsf.tests.feature/.cvsignore
new file mode 100644
index 000000000..c14487cea
--- /dev/null
+++ b/jsf/features/org.eclipse.jst.jsf.tests.feature/.cvsignore
@@ -0,0 +1 @@
+build.xml
diff --git a/jsf/features/org.eclipse.jst.jsf.tests.feature/.project b/jsf/features/org.eclipse.jst.jsf.tests.feature/.project
new file mode 100644
index 000000000..589d8463b
--- /dev/null
+++ b/jsf/features/org.eclipse.jst.jsf.tests.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jst.jsf.tests.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/jsf/features/org.eclipse.jst.jsf.tests.feature/.settings/org.eclipse.core.resources.prefs b/jsf/features/org.eclipse.jst.jsf.tests.feature/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 000000000..e6a2792ad
--- /dev/null
+++ b/jsf/features/org.eclipse.jst.jsf.tests.feature/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Sun May 27 16:04:27 EDT 2007
+eclipse.preferences.version=1
+encoding/<project>=ISO-8859-1
diff --git a/jsf/features/org.eclipse.jst.jsf.tests.feature/build.properties b/jsf/features/org.eclipse.jst.jsf.tests.feature/build.properties
new file mode 100644
index 000000000..2ec23e5f0
--- /dev/null
+++ b/jsf/features/org.eclipse.jst.jsf.tests.feature/build.properties
@@ -0,0 +1,17 @@
+###############################################################################
+# Copyright (c) 2001, 2007, 2017 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
+# Nick Boldt (Red Hat) - additional conribution
+###############################################################################
+bin.includes = feature.xml,\
+ eclipse_update_120.jpg,\
+ feature.properties
+src.includes = feature.xml,\
+ eclipse_update_120.jpg,\
+ build.properties
diff --git a/jsf/features/org.eclipse.jst.jsf.tests.feature/eclipse_update_120.jpg b/jsf/features/org.eclipse.jst.jsf.tests.feature/eclipse_update_120.jpg
new file mode 100644
index 000000000..bfdf708ad
--- /dev/null
+++ b/jsf/features/org.eclipse.jst.jsf.tests.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/jsf/features/org.eclipse.jst.jsf.tests.feature/feature.properties b/jsf/features/org.eclipse.jst.jsf.tests.feature/feature.properties
new file mode 100644
index 000000000..27985e9d7
--- /dev/null
+++ b/jsf/features/org.eclipse.jst.jsf.tests.feature/feature.properties
@@ -0,0 +1,40 @@
+###############################################################################
+# Copyright (c) 2005-2017 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
+# Nick Boldt (Red Hat) - additional conribution
+###############################################################################
+featureName=JSF Tools - Tests
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Web Tools Platform
+description=Eclipse Web Tools Platform JavaServer Faces Tools - Tests
+# license and licenseURL properties were removed as a result to migrating to new PDE license support.
+# Those properties are now added at build time. See http://wiki.eclipse.org/Equinox/p2/License_Mechanism.
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2006-2017 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\
+\n\
+Contributors:\n\
+ Oracle Corporation - initial API and implementation\n
+ Nick Boldt (Red Hat) - additional conribution\n
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+# license and licenseURL properties were removed as a result to migrating to new PDE license support.
+# Those properties are now added at build time. See http://wiki.eclipse.org/Equinox/p2/License_Mechanism.
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+# license and licenseURL properties were removed as a result to migrating to new PDE license support.
+# Those properties are now added at build time. See http://wiki.eclipse.org/Equinox/p2/License_Mechanism.
+########### end of license property ##########################################
diff --git a/jsf/features/org.eclipse.jst.jsf.tests.feature/feature.xml b/jsf/features/org.eclipse.jst.jsf.tests.feature/feature.xml
new file mode 100644
index 000000000..1783f4730
--- /dev/null
+++ b/jsf/features/org.eclipse.jst.jsf.tests.feature/feature.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.jst.jsf.tests.feature"
+ label="%featureName"
+ version="3.5.100.qualifier"
+ provider-name="%providerName"
+ image="eclipse_update_120.jpg"
+ license-feature="org.eclipse.license"
+ license-feature-version="1.0.1.qualifier">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <plugin
+ id="org.eclipse.jst.jsf.core.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.eclipse.jst.jsf.ui.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.eclipse.jst.jsf.metadata.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.eclipse.jst.jsf.contentassist.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.eclipse.jst.jsf.metadataprocessingtests2"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.eclipse.jst.jsf.designtime.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.eclipse.jst.jsf.context.symbol.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.eclipse.jst.jsf.test.util"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.eclipse.jst.jsf.facesconfig.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.eclipse.jst.jsf.validation.el.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.eclipse.jst.jsf.facesconfig.ui.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"/>
+
+ <plugin
+ id="org.eclipse.jst.pagedesigner.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.eclipse.jst.jsf.common.runtime.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/jsf/features/org.eclipse.jst.jsf.tests.feature/pom.xml b/jsf/features/org.eclipse.jst.jsf.tests.feature/pom.xml
new file mode 100644
index 000000000..ae6c40670
--- /dev/null
+++ b/jsf/features/org.eclipse.jst.jsf.tests.feature/pom.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012, 2013 Eclipse Foundation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Distribution License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/org/documents/edl-v10.php
+
+ Contributors:
+ Thanh Ha (Eclipse Foundation) - initial implementation
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.webtools.jsf</groupId>
+ <artifactId>org.eclipse.webtools.jsf.tests</artifactId>
+ <version>3.6.0-SNAPSHOT</version>
+ <relativePath>../../../</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.webtools.jsf</groupId>
+ <artifactId>org.eclipse.jst.jsf.tests.feature</artifactId>
+ <version>3.5.100-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+</project>
diff --git a/jsf/tests/jsfRuntimeJarsDirectory/V1.1/commons-beanutils.jar b/jsf/tests/jsfRuntimeJarsDirectory/V1.1/commons-beanutils.jar
new file mode 100644
index 000000000..98bfbb7d4
--- /dev/null
+++ b/jsf/tests/jsfRuntimeJarsDirectory/V1.1/commons-beanutils.jar
Binary files differ
diff --git a/jsf/tests/jsfRuntimeJarsDirectory/V1.1/commons-collections.jar b/jsf/tests/jsfRuntimeJarsDirectory/V1.1/commons-collections.jar
new file mode 100644
index 000000000..bf8bcd026
--- /dev/null
+++ b/jsf/tests/jsfRuntimeJarsDirectory/V1.1/commons-collections.jar
Binary files differ
diff --git a/jsf/tests/jsfRuntimeJarsDirectory/V1.1/commons-digester.jar b/jsf/tests/jsfRuntimeJarsDirectory/V1.1/commons-digester.jar
new file mode 100644
index 000000000..3656eb93f
--- /dev/null
+++ b/jsf/tests/jsfRuntimeJarsDirectory/V1.1/commons-digester.jar
Binary files differ
diff --git a/jsf/tests/jsfRuntimeJarsDirectory/V1.1/commons-logging.jar b/jsf/tests/jsfRuntimeJarsDirectory/V1.1/commons-logging.jar
new file mode 100644
index 000000000..ef43682b1
--- /dev/null
+++ b/jsf/tests/jsfRuntimeJarsDirectory/V1.1/commons-logging.jar
Binary files differ
diff --git a/jsf/tests/jsfRuntimeJarsDirectory/V1.1/jsf-api.jar b/jsf/tests/jsfRuntimeJarsDirectory/V1.1/jsf-api.jar
new file mode 100644
index 000000000..5396f23b0
--- /dev/null
+++ b/jsf/tests/jsfRuntimeJarsDirectory/V1.1/jsf-api.jar
Binary files differ
diff --git a/jsf/tests/jsfRuntimeJarsDirectory/V1.1/jsf-impl.jar b/jsf/tests/jsfRuntimeJarsDirectory/V1.1/jsf-impl.jar
new file mode 100644
index 000000000..40b7c05f3
--- /dev/null
+++ b/jsf/tests/jsfRuntimeJarsDirectory/V1.1/jsf-impl.jar
Binary files differ
diff --git a/jsf/tests/jsfRuntimeJarsDirectory/V1.1/jstl.jar b/jsf/tests/jsfRuntimeJarsDirectory/V1.1/jstl.jar
new file mode 100644
index 000000000..a02abecc8
--- /dev/null
+++ b/jsf/tests/jsfRuntimeJarsDirectory/V1.1/jstl.jar
Binary files differ
diff --git a/jsf/tests/jsfRuntimeJarsDirectory/V1.1/standard.jar b/jsf/tests/jsfRuntimeJarsDirectory/V1.1/standard.jar
new file mode 100644
index 000000000..bc528acb9
--- /dev/null
+++ b/jsf/tests/jsfRuntimeJarsDirectory/V1.1/standard.jar
Binary files differ
diff --git a/jsf/tests/jsfRuntimeJarsDirectory/V1.2/glassfish.jstl_1.2.0.1.jar b/jsf/tests/jsfRuntimeJarsDirectory/V1.2/glassfish.jstl_1.2.0.1.jar
new file mode 100644
index 000000000..c0fa0bfae
--- /dev/null
+++ b/jsf/tests/jsfRuntimeJarsDirectory/V1.2/glassfish.jstl_1.2.0.1.jar
Binary files differ
diff --git a/jsf/tests/jsfRuntimeJarsDirectory/V1.2/jsf-api.jar b/jsf/tests/jsfRuntimeJarsDirectory/V1.2/jsf-api.jar
new file mode 100644
index 000000000..4b69d4f64
--- /dev/null
+++ b/jsf/tests/jsfRuntimeJarsDirectory/V1.2/jsf-api.jar
Binary files differ
diff --git a/jsf/tests/jsfRuntimeJarsDirectory/V1.2/jsf-impl.jar b/jsf/tests/jsfRuntimeJarsDirectory/V1.2/jsf-impl.jar
new file mode 100644
index 000000000..bcf6a00ad
--- /dev/null
+++ b/jsf/tests/jsfRuntimeJarsDirectory/V1.2/jsf-impl.jar
Binary files differ
diff --git a/jsf/tests/jsfRuntimeJarsDirectory/V2.0/jsf-api.jar b/jsf/tests/jsfRuntimeJarsDirectory/V2.0/jsf-api.jar
new file mode 100644
index 000000000..e667fdd4c
--- /dev/null
+++ b/jsf/tests/jsfRuntimeJarsDirectory/V2.0/jsf-api.jar
Binary files differ
diff --git a/jsf/tests/jsfRuntimeJarsDirectory/V2.0/jsf-impl.jar b/jsf/tests/jsfRuntimeJarsDirectory/V2.0/jsf-impl.jar
new file mode 100644
index 000000000..cb603e602
--- /dev/null
+++ b/jsf/tests/jsfRuntimeJarsDirectory/V2.0/jsf-impl.jar
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/.classpath b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/.classpath
new file mode 100644
index 000000000..304e86186
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.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
new file mode 100644
index 000000000..970c00a24
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/.project
@@ -0,0 +1,28 @@
+<?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
new file mode 100644
index 000000000..335f5cab8
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#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
new file mode 100644
index 000000000..3220b0aa6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name.0
+Bundle-SymbolicName: org.eclipse.jst.jsf.common.runtime.tests
+Bundle-Version: 1.4.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
+Bundle-Vendor: %Bundle-Vendor.0
+Bundle-Localization: plugin
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
new file mode 100644
index 000000000..90bd74d4d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/about.html
@@ -0,0 +1,22 @@
+<!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
new file mode 100644
index 000000000..bfaab6e3f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/build.properties
@@ -0,0 +1,15 @@
+###############################################################################
+# 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/launch/AllRuntimeTests.launch b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/launch/AllRuntimeTests.launch
new file mode 100644
index 000000000..47be5294c
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/launch/AllRuntimeTests.launch
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/AllRuntimeTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.jst.jsf.common.runtime.tests.AllRuntimeTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jst.jsf.common.runtime.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx512m -XX:MaxPermSize=512M"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="false"/>
+</launchConfiguration>
diff --git a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/plugin.properties b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/plugin.properties
new file mode 100644
index 000000000..cd74c2246
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/plugin.properties
@@ -0,0 +1,11 @@
+###############################################################################
+# 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
+#
+###############################################################################
+#Properties file for org.eclipse.jst.jsf.common.runtime.tests
+Bundle-Name.0=JSF Tools - Common Runtime Tests
+Bundle-Vendor.0=Eclipse Web Tools Platform
diff --git a/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/pom.xml b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/pom.xml
new file mode 100644
index 000000000..78498ca7d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/pom.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012, 2013 Eclipse Foundation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Distribution License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/org/documents/edl-v10.php
+
+ Contributors:
+ Thanh Ha (Eclipse Foundation) - initial implementation
+ Ian Trimble (Oracle) - initial tests configuration
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.webtools.jsf</groupId>
+ <artifactId>org.eclipse.webtools.jsf.tests</artifactId>
+ <version>3.6.0-SNAPSHOT</version>
+ <relativePath>../../../</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.webtools.jsf</groupId>
+ <artifactId>org.eclipse.jst.jsf.common.runtime.tests</artifactId>
+ <version>1.4.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <configuration>
+ <useUIHarness>true</useUIHarness>
+ <testSuite>${project.artifactId}</testSuite>
+ <testClass>org.eclipse.jst.jsf.common.runtime.tests.AllRuntimeTests</testClass>
+ <argLine>-DjsfRuntimeJarsDirectoryV1.1=${project.basedir}/../jsfRuntimeJarsDirectory/V1.1 -DjsfRuntimeJarsDirectoryV1.2=${project.basedir}/../jsfRuntimeJarsDirectory/V1.2 -DjsfRuntimeJarsDirectoryV2.0=${project.basedir}/../jsfRuntimeJarsDirectory/V2.0</argLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
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
new file mode 100644
index 000000000..5892995b3
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/AllRuntimeTests.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..617254975
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/RuntimeTestPlugin.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..5f5b2e596
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/debug/TestRenderNode.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..ddfb348e1
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/RuntimeTestUtil.java
@@ -0,0 +1,890 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..74a8197b9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/TestViewObject.java
@@ -0,0 +1,572 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..6ceaf0baa
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/bean/TestDataModelInfo.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..530e240ae
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/behavioural/TestActionSource2Info.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..2d265d8ce
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/behavioural/TestValueHolderInfo.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..ce8c87d01
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/ComponentTestCase.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..cf01e707f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestComponentInfo.java
@@ -0,0 +1,128 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..9495e0446
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestComponentTypeInfo.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..b801cee4e
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestUICommandInfo.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..e6ffc8866
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestUIDataInfo.java
@@ -0,0 +1,152 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..63152674f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestUIFormInfo.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..fda91ffc9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestUIInputInfo.java
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..21feb0844
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/component/TestUIOutputInfo.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..068752503
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.common.runtime.tests/src/org/eclipse/jst/jsf/common/runtime/tests/model/decorator/TestComponentDecorator.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..304e86186
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.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
new file mode 100644
index 000000000..5e903f802
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/.cvsignore
@@ -0,0 +1,4 @@
+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
new file mode 100644
index 000000000..2e0c667da
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/.project
@@ -0,0 +1,28 @@
+<?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
new file mode 100644
index 000000000..0a53ff74e
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#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
new file mode 100644
index 000000000..467e19972
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,61 @@
+#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
new file mode 100644
index 000000000..68c863d32
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,28 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name.0
+Bundle-SymbolicName: org.eclipse.jst.jsf.contentassist.tests
+Bundle-Version: 1.5.100.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.3.0)",
+ org.eclipse.jdt.core;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.emf.ecore,
+ org.eclipse.wst.common.project.facet.core;bundle-version="[1.4.0,1.5.0)"
+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
new file mode 100644
index 000000000..04d4782f4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/about.html
@@ -0,0 +1,22 @@
+<!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
new file mode 100644
index 000000000..6afa53ad5
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/build.properties
@@ -0,0 +1,21 @@
+###############################################################################
+# 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/launch/AllContentAssistTests.launch b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/launch/AllContentAssistTests.launch
new file mode 100644
index 000000000..398fe248d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/launch/AllContentAssistTests.launch
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/AllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.jst.jsf.contentassist.tests.AllTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jst.jsf.contentassist.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx512m -XX:MaxPermSize=512M"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="false"/>
+</launchConfiguration>
diff --git a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/plugin.properties b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/plugin.properties
new file mode 100644
index 000000000..eb795cc10
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/plugin.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# 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=JSF Tools - Content Assist Tests
+Bundle-Vendor.0=Eclipse Web Tools Platform
diff --git a/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/pom.xml b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/pom.xml
new file mode 100644
index 000000000..123ff2c7a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/pom.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012, 2013 Eclipse Foundation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Distribution License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/org/documents/edl-v10.php
+
+ Contributors:
+ Thanh Ha (Eclipse Foundation) - initial implementation
+ Ian Trimble (Oracle) - initial tests configuration
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.webtools.jsf</groupId>
+ <artifactId>org.eclipse.webtools.jsf.tests</artifactId>
+ <version>3.6.0-SNAPSHOT</version>
+ <relativePath>../../../</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.webtools.jsf</groupId>
+ <artifactId>org.eclipse.jst.jsf.contentassist.tests</artifactId>
+ <version>1.5.100-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ <useUIHarness>true</useUIHarness>
+ <testSuite>${project.artifactId}</testSuite>
+ <testClass>org.eclipse.jst.jsf.contentassist.tests.AllTests</testClass>
+ <dependencies>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.jst.j2ee.ejb</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ </dependencies>
+ <argLine>-DjsfRuntimeJarsDirectoryV1.1=${project.basedir}/../jsfRuntimeJarsDirectory/V1.1 -DjsfRuntimeJarsDirectoryV1.2=${project.basedir}/../jsfRuntimeJarsDirectory/V1.2 -DjsfRuntimeJarsDirectoryV2.0=${project.basedir}/../jsfRuntimeJarsDirectory/V2.0</argLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
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
new file mode 100644
index 000000000..6bd740594
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/AllTests.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..a9b181439
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/BaseTestClass.java
@@ -0,0 +1,130 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..f596e8267
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/CompletionPrefixTest.java
@@ -0,0 +1,671 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..4bda03048
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/ContentAssistTestsPlugin.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..a7d941cd7
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/TestContentAssistParser.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..fc9677aca
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/TestFunctionCompletionStrategy.java
@@ -0,0 +1,128 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..3ca76eeed
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/TestIdCompletionStrategy.java
@@ -0,0 +1,130 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..0d98cd50c
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/Test_bug_149224.java
@@ -0,0 +1,175 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..3d5c5d8cc
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/src/org/eclipse/jst/jsf/contentassist/tests/Test_bug_149743.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..e59e084be
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/test.xml
@@ -0,0 +1,49 @@
+<?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
new file mode 100644
index 000000000..7de17721b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/MyBean.java.data
@@ -0,0 +1,13 @@
+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
new file mode 100644
index 000000000..7edb245b6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/MyBeanSettable.java.data
@@ -0,0 +1,171 @@
+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
new file mode 100644
index 000000000..aba8370b4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/basicELExpressions.jsp.data
@@ -0,0 +1,28 @@
+<%@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
new file mode 100644
index 000000000..d29c89a30
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/bug_149224.properties.data
@@ -0,0 +1,4 @@
+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
new file mode 100644
index 000000000..aba64ef99
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/bug_149224_1.jsp.data
@@ -0,0 +1,25 @@
+<%@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
new file mode 100644
index 000000000..5a68a6cae
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/bug_149743.jsp.data
@@ -0,0 +1,23 @@
+<%@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
new file mode 100644
index 000000000..e4a475b2c
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/faces-config_basic.xml.data
@@ -0,0 +1,17 @@
+<?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
new file mode 100644
index 000000000..5db9cf57e
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.contentassist.tests/testdata/faces-config_bug149743.xml.data
@@ -0,0 +1,17 @@
+<?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
new file mode 100644
index 000000000..304e86186
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.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
new file mode 100644
index 000000000..392746722
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/.cvsignore
@@ -0,0 +1,5 @@
+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
new file mode 100644
index 000000000..28a184226
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/.project
@@ -0,0 +1,28 @@
+<?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
new file mode 100644
index 000000000..9c7d20e0d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#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
new file mode 100644
index 000000000..444ca5c55
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,62 @@
+#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
new file mode 100644
index 000000000..fa3000459
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,24 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.jst.jsf.context.symbol.tests; singleton:=true
+Bundle-Version: 1.5.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
new file mode 100644
index 000000000..04d4782f4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/about.html
@@ -0,0 +1,22 @@
+<!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
new file mode 100644
index 000000000..e5db9e144
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/build.properties
@@ -0,0 +1,22 @@
+###############################################################################
+# 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/launch/AllContextSymbolTests.launch b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/launch/AllContextSymbolTests.launch
new file mode 100644
index 000000000..7d8743ca9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/launch/AllContextSymbolTests.launch
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/AllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.jst.jsf.context.symbol.tests.AllTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jst.jsf.context.symbol.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx512m -XX:MaxPermSize=512M"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="false"/>
+</launchConfiguration>
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
new file mode 100644
index 000000000..f09a2f877
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/plugin.properties
@@ -0,0 +1,27 @@
+###############################################################################
+# 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=JSF Tools - Context Symbol Tests
+providerName=Eclipse Web Tools Platform
+
diff --git a/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/pom.xml b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/pom.xml
new file mode 100644
index 000000000..bff9c179a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/pom.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012, 2013 Eclipse Foundation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Distribution License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/org/documents/edl-v10.php
+
+ Contributors:
+ Thanh Ha (Eclipse Foundation) - initial implementation
+ Ian Trimble (Oracle) - initial tests configuration
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.webtools.jsf</groupId>
+ <artifactId>org.eclipse.webtools.jsf.tests</artifactId>
+ <version>3.6.0-SNAPSHOT</version>
+ <relativePath>../../../</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.webtools.jsf</groupId>
+ <artifactId>org.eclipse.jst.jsf.context.symbol.tests</artifactId>
+ <version>1.5.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <configuration>
+ <useUIHarness>true</useUIHarness>
+ <testSuite>${project.artifactId}</testSuite>
+ <testClass>org.eclipse.jst.jsf.context.symbol.tests.AllTests</testClass>
+ <dependencies>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.jst.j2ee.ejb</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ </dependencies>
+ <argLine>-DjsfRuntimeJarsDirectoryV1.1=${project.basedir}/../jsfRuntimeJarsDirectory/V1.1 -DjsfRuntimeJarsDirectoryV1.2=${project.basedir}/../jsfRuntimeJarsDirectory/V1.2 -DjsfRuntimeJarsDirectoryV2.0=${project.basedir}/../jsfRuntimeJarsDirectory/V2.0</argLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
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
new file mode 100644
index 000000000..4246a4bef
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/AllTests.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..51f59d2ef
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/ContextSymbolTestPlugin.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..f91472f74
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/ModelBaseTestCase.java
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..20707a356
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestIJavaTypeDescriptor2.java
@@ -0,0 +1,1099 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..d268c51d2
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestIJavaTypeDescriptor2_ChangeStability.java
@@ -0,0 +1,519 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..c59b321bf
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestIMapTypeDescriptor.java
@@ -0,0 +1,141 @@
+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
new file mode 100644
index 000000000..48738545b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestIPropertySymbolItemProvider.java
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..cea4f3584
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/src/org/eclipse/jst/jsf/context/symbol/tests/TestTypeCoercion.java
@@ -0,0 +1,193 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..67d632080
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/test.xml
@@ -0,0 +1,49 @@
+<?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
new file mode 100644
index 000000000..e837d6508
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/ITestBean2.java.data
@@ -0,0 +1,5 @@
+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
new file mode 100644
index 000000000..95da5d5f7
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/MyListBean.java.data
@@ -0,0 +1,29 @@
+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
new file mode 100644
index 000000000..34d25e968
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/TestBean2.java.data
@@ -0,0 +1,37 @@
+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
new file mode 100644
index 000000000..cbe22245e
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/TestBean2Subclass.java.data
@@ -0,0 +1,8 @@
+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
new file mode 100644
index 000000000..1dcf3565d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/TestBeanMap.java.data
@@ -0,0 +1,19 @@
+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
new file mode 100644
index 000000000..733c55780
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/TestBeanWithGenericProperties.java.data
@@ -0,0 +1,34 @@
+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
new file mode 100644
index 000000000..02979fdcb
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/bundle.properties.data
@@ -0,0 +1,3 @@
+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
new file mode 100644
index 000000000..38989d971
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.context.symbol.tests/testdata/bundle2.properties.data
@@ -0,0 +1,4 @@
+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
new file mode 100644
index 000000000..304e86186
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.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
new file mode 100644
index 000000000..3bb4cae81
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/.cvsignore
@@ -0,0 +1,5 @@
+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
new file mode 100644
index 000000000..bcb360973
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/.project
@@ -0,0 +1,28 @@
+<?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
new file mode 100644
index 000000000..efa5488ab
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#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
new file mode 100644
index 000000000..fe5af647b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,61 @@
+#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
new file mode 100644
index 000000000..f43479b32
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,57 @@
+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.5.110.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.3.0)",
+ org.eclipse.emf.ecore.xmi;bundle-version="[2.2.0,3.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
new file mode 100644
index 000000000..7c80c6cde
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/about.html
@@ -0,0 +1,22 @@
+<!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
new file mode 100644
index 000000000..e9e65fe78
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/build.properties
@@ -0,0 +1,22 @@
+###############################################################################
+# 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/launch/AllJSFCoreTests.launch b/jsf/tests/org.eclipse.jst.jsf.core.tests/launch/AllJSFCoreTests.launch
new file mode 100644
index 000000000..4c6548237
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/launch/AllJSFCoreTests.launch
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/AllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.jst.jsf.core.tests.AllTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jst.jsf.core.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx512m -XX:MaxPermSize=512M"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="false"/>
+</launchConfiguration>
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/plugin.properties b/jsf/tests/org.eclipse.jst.jsf.core.tests/plugin.properties
new file mode 100644
index 000000000..777c7fb52
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/plugin.properties
@@ -0,0 +1,15 @@
+###############################################################################
+# 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=JSF Tools - Core Tests
+Bundle-Vendor.0=Eclipse Web Tools Platform
+
+jsfLibrary.label.0 = FAKE LIB FROM jsf.core.tests (1)
+jsfLibrary.label.1 = FAKE LIB FROM jsf.core.tests (2)
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/plugin.xml b/jsf/tests/org.eclipse.jst.jsf.core.tests/plugin.xml
new file mode 100644
index 000000000..315af5ac3
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/plugin.xml
@@ -0,0 +1,39 @@
+<?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/pom.xml b/jsf/tests/org.eclipse.jst.jsf.core.tests/pom.xml
new file mode 100644
index 000000000..2b8e341a6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/pom.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012, 2013 Eclipse Foundation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Distribution License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/org/documents/edl-v10.php
+
+ Contributors:
+ Thanh Ha (Eclipse Foundation) - initial implementation
+ Ian Trimble (Oracle) - initial tests configuration
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.webtools.jsf</groupId>
+ <artifactId>org.eclipse.webtools.jsf.tests</artifactId>
+ <version>3.6.0-SNAPSHOT</version>
+ <relativePath>../../../</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.webtools.jsf</groupId>
+ <artifactId>org.eclipse.jst.jsf.core.tests</artifactId>
+ <version>1.5.110-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ <useUIHarness>true</useUIHarness>
+ <testSuite>${project.artifactId}</testSuite>
+ <testClass>org.eclipse.jst.jsf.core.tests.AllTests</testClass>
+ <dependencies>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.jst.j2ee.ejb</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.jst.jee.web</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ </dependencies>
+ <argLine>-DjsfRuntimeJarsDirectoryV1.1=${project.basedir}/../jsfRuntimeJarsDirectory/V1.1 -DjsfRuntimeJarsDirectoryV1.2=${project.basedir}/../jsfRuntimeJarsDirectory/V1.2 -DjsfRuntimeJarsDirectoryV2.0=${project.basedir}/../jsfRuntimeJarsDirectory/V2.0</argLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
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
new file mode 100644
index 000000000..908783c61
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/AllTests.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * 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.JsfDownloadableLibraryLocationTests;
+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(JsfDownloadableLibraryLocationTests.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
new file mode 100644
index 000000000..7823c5ff3
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/DualModeCoreTests.java
@@ -0,0 +1,27 @@
+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
new file mode 100644
index 000000000..479cd21b5
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/JSFCoreFastTests.java
@@ -0,0 +1,23 @@
+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
new file mode 100644
index 000000000..bbddf88b9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/TestsPlugin.java
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..2cf52a04f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/CompositeJSFAppConfigLocatorProviderStrategyTests.java
@@ -0,0 +1,78 @@
+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(6, 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(6, 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(5, 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
new file mode 100644
index 000000000..90ba9b259
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/JSFAppConfigManagerFactoryTests.java
@@ -0,0 +1,86 @@
+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
new file mode 100644
index 000000000..4c068ff2f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/TestJSFAppConfigManager.java
@@ -0,0 +1,190 @@
+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<String> getELResolvers() {
+ return getManager().getELResolvers();
+ }
+
+ 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
new file mode 100644
index 000000000..c14fcdb9c
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/TestJSFAppConfigManagerFactory.java
@@ -0,0 +1,38 @@
+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
new file mode 100644
index 000000000..eb3206ea5
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/TestJSFAppConfigManagerFactoryFromExtension.java
@@ -0,0 +1,29 @@
+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
new file mode 100644
index 000000000..288e90911
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/TestJSFAppConfigManagerFromExtension.java
@@ -0,0 +1,14 @@
+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
new file mode 100644
index 000000000..50d5c9d92
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/TestLocatorProvider.java
@@ -0,0 +1,117 @@
+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
new file mode 100644
index 000000000..554de1db1
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/provider/TestJARFileJSFAppConfigProvider.java
@@ -0,0 +1,302 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..b119d3780
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/appconfig/validation/AppConfigValidationUtilTestCase.java
@@ -0,0 +1,152 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..5ac1f5534
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/contenttype/TestContentTypes.java
@@ -0,0 +1,148 @@
+/*******************************************************************************
+ * 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/JsfDownloadableLibraryLocationTests.java b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/JsfDownloadableLibraryLocationTests.java
new file mode 100644
index 000000000..c1929c0e8
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/JsfDownloadableLibraryLocationTests.java
@@ -0,0 +1,227 @@
+/******************************************************************************
+ * Copyright (c) 2001, 2011 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 java.io.IOException;
+import java.io.InputStream;
+import java.net.HttpURLConnection;
+import java.net.InetSocketAddress;
+import java.net.MalformedURLException;
+import java.net.Proxy;
+import java.net.Proxy.Type;
+import java.net.SocketException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpression;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+
+import junit.framework.TestCase;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+
+/**
+ * Tests for JSF downloadable-library locations.
+ *
+ * @author Debajit Adhikary
+ *
+ */
+public class JsfDownloadableLibraryLocationTests extends TestCase
+{
+ private static final String CATALOG_URL_PREFIX = "http://www.eclipse.org/webtools/jsf/jsf-library";
+ private static final String[] CATALOG_URLS =
+ {
+ CATALOG_URL_PREFIX + "/jsf-2.1-downloadable-libraries.xml",
+ CATALOG_URL_PREFIX + "/jsf-2.0-downloadable-libraries.xml",
+ CATALOG_URL_PREFIX + "/jsf-1.2-downloadable-libraries.xml",
+ CATALOG_URL_PREFIX + "/jsf-1.1-downloadable-libraries.xml"
+ };
+
+ private Proxy httpProxy = Proxy.NO_PROXY;
+ private final List<String> downloadUrls;
+
+
+ /**
+ * @param name
+ */
+ public JsfDownloadableLibraryLocationTests (final String name)
+ {
+ super(name);
+ downloadUrls = new ArrayList<String>();
+ }
+
+
+ /**
+ * Extracts the downloadable library URL's from the catalog files and adds
+ * them to the downloadUrls list.
+ *
+ * @see junit.framework.TestCase#setUp()
+ */
+ @Override
+ protected void setUp () throws Exception
+ {
+ super.setUp();
+
+ setProxy();
+
+ for (final String catalog : CATALOG_URLS)
+ {
+ // Extract the download-library url
+ final Document document = getXmlDocument(catalog);
+ final NodeList nodes = evaluateXpathQuery(document, "//download-url/text()");
+ for (int i = 0; i < nodes.getLength(); ++i)
+ {
+ final String downloadUrl = nodes.item(i).getNodeValue();
+ downloadUrls.add(downloadUrl);
+ System.out.println("JSF library download URL (extracted from catalog): " + downloadUrl);
+ }
+ }
+ }
+
+
+ private void setProxy() throws IOException
+ {
+ final String PROXY_TEST_URL = "http://www.eclipse.org/";
+ final List<Proxy> possibleProxies = new ArrayList<Proxy>();
+ //add direct (no proxy)
+ possibleProxies.add(Proxy.NO_PROXY);
+ //add system-specified proxy (if any)
+ final String sysProxyHost = System.getProperty("http.proxyHost");
+ if (sysProxyHost != null)
+ {
+ final String sysProxyPort = System.getProperty("http.proxyPort");
+ if (sysProxyPort != null)
+ {
+ int proxyPort = -1;
+ try
+ {
+ proxyPort = Integer.parseInt(sysProxyPort);
+ }
+ catch (NumberFormatException nfex)
+ {
+ //do nothing - proxyPort remains an invalid value
+ }
+ if (proxyPort > -1)
+ {
+ possibleProxies.add(new Proxy(Type.HTTP, new InetSocketAddress(sysProxyHost, proxyPort)));
+ }
+ }
+ }
+ //add Oracle-specific proxy
+ possibleProxies.add(new Proxy(Type.HTTP, new InetSocketAddress("www-proxy.us.oracle.com", 80)));
+ final URL proxyTestURL = new URL(PROXY_TEST_URL);
+ for (final Proxy proxy: possibleProxies)
+ {
+ InputStream is = null;
+ try
+ {
+ final URLConnection connection = proxyTestURL.openConnection(proxy);
+ is = connection.getInputStream();
+ //if we get to here, the current proxy is viable
+ httpProxy = proxy;
+ break;
+ }
+ catch (IOException ioex)
+ {
+ //do nothing - current proxy is not viable and was not set
+ }
+ finally
+ {
+ if (is != null)
+ {
+ try
+ {
+ is.close();
+ }
+ catch (IOException ioex)
+ {
+ //do nothing
+ }
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Validates all the downloadable-library URL's extracted from the catalog
+ * file.
+ *
+ * @throws IOException
+ */
+ public void testDownloadLibraryUrls () throws IOException
+ {
+ for (final String url : downloadUrls)
+ {
+ assertTrue("Cannot download library from: " + url, isValidUrl(url));
+ }
+ }
+
+
+ private Document getXmlDocument (final String url)
+ throws ParserConfigurationException, MalformedURLException, IOException, SAXException
+ {
+ final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ factory.setNamespaceAware(true);
+ final DocumentBuilder builder = factory.newDocumentBuilder();
+ final URL catalogUrl = new URL(url);
+ final URLConnection catalogUrlConnection = catalogUrl.openConnection(httpProxy);
+ return builder.parse(catalogUrlConnection.getInputStream());
+ }
+
+
+ private NodeList evaluateXpathQuery (final Document xmlDocument,
+ final String xpathQuery)
+ throws XPathExpressionException
+ {
+ final XPath xpath = XPathFactory.newInstance().newXPath();
+ final XPathExpression expr = xpath.compile(xpathQuery);
+ return (NodeList) expr.evaluate(xmlDocument, XPathConstants.NODESET);
+ }
+
+
+ /**
+ * Validates a URL by connecting to it and checking the HTTP response code.
+ *
+ * @param urlString
+ * URL to check.
+ *
+ * @return True if the HTTP response code indicates success (Response code
+ * 2xx. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html)
+ *
+ * @throws IOException
+ */
+ private boolean isValidUrl (final String urlString) throws IOException
+ {
+ final URL url = new URL(urlString);
+ final HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection(httpProxy);
+ urlConnection.connect();
+ int responseCode = -1;
+ try {
+ responseCode = urlConnection.getResponseCode();
+ } catch(SocketException sockEx) {
+ //ignore and proceed with response code == -1
+ }
+ return 200 <= responseCode && responseCode <= 299;
+ }
+}
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
new file mode 100644
index 000000000..c497a6aef
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/JsfLibraryProviderTests.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..5754f7054
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/JsfLibraryValidatorTest.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..d18ef400c
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/LibraryValidatorTest.java
@@ -0,0 +1,166 @@
+/*******************************************************************************
+ * 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 junit.framework.TestCase;
+
+import org.eclipse.core.runtime.IStatus;
+
+
+/**
+ * @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
new file mode 100644
index 000000000..0db855260
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/UserLibraryVersionValidatorProxy.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..218e203ff
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/VendorSpecificWebXmlConfigurationForJ2EETest.java
@@ -0,0 +1,185 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..05b2f8042
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/facet/VendorSpecificWebXmlConfigurationForJavaEETest.java
@@ -0,0 +1,183 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..ce3a6a3f6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfig/JSFLibraryConfigDialogSettingDataTestCases.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..3a7dca0d5
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfig/JSFLibraryConfigModelTestCases.java
@@ -0,0 +1,179 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..c0e850819
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfig/JSFLibraryRegistryUtilTestCases.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..d4caaff9a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfig/JSFProjectLibraryReferenceTestCases.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..3281543ef
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfiguration/JSFLibraryReferenceTestCases.java
@@ -0,0 +1,199 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..601b8396b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryconfiguration/JSFLibraryServerSuppliedReferenceTestCases.java
@@ -0,0 +1,133 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..4361c7979
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/ArchiveFileTestCases.java
@@ -0,0 +1,227 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..294334531
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/JSFLibraryRegistryPackageTestCases.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..5f13b271d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/JSFLibraryRegistryTestCases.java
@@ -0,0 +1,244 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..6e3e19ca6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/JSFLibraryTestCases.java
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..e1d269345
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/MaintainDefaultImplementationAdapterTestCases.java
@@ -0,0 +1,123 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..c71a7a2a7
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/TEST_PP_LIBArchiveFilesDelegate.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..3b7ce71b8
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/TEST_PP_LIB_EMPTYArchiveFilesDelegate.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..1b06db6a9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/jsflibraryregistry/migration/MigrationV1toV2Test.java
@@ -0,0 +1,327 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..35e50ffc7
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/mock/MockCMAttributeDeclaration.java
@@ -0,0 +1,46 @@
+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
new file mode 100644
index 000000000..f8b38a355
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/mock/MockCMNode.java
@@ -0,0 +1,52 @@
+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
new file mode 100644
index 000000000..5e2509e13
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/mock/MockJSPTagRegistry.java
@@ -0,0 +1,204 @@
+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
new file mode 100644
index 000000000..502f881f8
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/mock/MockTLDAttributeDeclaration.java
@@ -0,0 +1,63 @@
+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
new file mode 100644
index 000000000..eba1bbf4c
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/JSFFacetInstallDataModelProviderTestCases.java
@@ -0,0 +1,151 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..d0e3e7ea7
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestJSFUtils.java
@@ -0,0 +1,876 @@
+/*******************************************************************************
+ * 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._30_LITERAL, javaEEWebApp.getVersion());
+ assertTrue(_jsfUtils.isJavaEE(javaEEWebApp));
+ javaEEWebApp.setVersion(WebAppVersionType._25_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()
+ {
+ assertFalse(_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("jspf")); //$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("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
new file mode 100644
index 000000000..35d23638f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestJSFUtils11.java
@@ -0,0 +1,315 @@
+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
new file mode 100644
index 000000000..4c55f7bb9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestJSFUtils12.java
@@ -0,0 +1,435 @@
+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
new file mode 100644
index 000000000..7826aa574
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestJSFUtils20.java
@@ -0,0 +1,51 @@
+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
new file mode 100644
index 000000000..8474f9f1a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestUtilSuite.java
@@ -0,0 +1,17 @@
+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
new file mode 100644
index 000000000..71e2ca80d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/project/facet/TestableJSFUtils.java
@@ -0,0 +1,82 @@
+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
new file mode 100644
index 000000000..9f869c72b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/region/TestRegion2ElementAdapter.java
@@ -0,0 +1,526 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..7b808b830
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/AbstractTestListener.java
@@ -0,0 +1,12 @@
+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
new file mode 100644
index 000000000..0eded2f06
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/AllLifecycleListenerTests.java
@@ -0,0 +1,16 @@
+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
new file mode 100644
index 000000000..d6ddd43e1
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/ClasspathTestListener.java
@@ -0,0 +1,121 @@
+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
new file mode 100644
index 000000000..558a98666
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/FastClasspathEntryLifecycleTests.java
@@ -0,0 +1,73 @@
+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
new file mode 100644
index 000000000..7499bf87f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/FastLifecycleListenerTests.java
@@ -0,0 +1,269 @@
+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
new file mode 100644
index 000000000..06c2f9ffc
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/FastLifecycleListenerTests_Scenario.java
@@ -0,0 +1,344 @@
+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
new file mode 100644
index 000000000..4f647dc0a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/LifecycleStressTest.java
@@ -0,0 +1,222 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..f7899cf18
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/MockListener.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..a49ac97b4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/MyTestListener.java
@@ -0,0 +1,136 @@
+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
new file mode 100644
index 000000000..71aac8485
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/TestDefaultJarLocator.java
@@ -0,0 +1,142 @@
+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
new file mode 100644
index 000000000..54b6eeac5
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/TestLifecycleListener.java
@@ -0,0 +1,372 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..4211006d8
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/resource/TestResourceTracker.java
@@ -0,0 +1,197 @@
+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
new file mode 100644
index 000000000..13d081260
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/sanity/TestJSFFacetedTestEnvironment.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..ba2e9f988
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/serialization/TLDAttributeSerializationTests.java
@@ -0,0 +1,52 @@
+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
new file mode 100644
index 000000000..3c4ee0a61
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/set/ConcreteAxiomaticSetTest.java
@@ -0,0 +1,164 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..96ed6abe4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/set/NodeSetTest.java
@@ -0,0 +1,141 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..2c6438e55
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/set/TestElementToTagIdentifierMapping.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..e4ca15751
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/set/TestMemberConstraint.java
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..7dfdc65e1
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/set/TestXPathValidation.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..14a5b9062
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/strategy/ConcatStrategy.java
@@ -0,0 +1,44 @@
+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
new file mode 100644
index 000000000..67eb0b841
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/strategy/StrategyCompositeTests.java
@@ -0,0 +1,56 @@
+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
new file mode 100644
index 000000000..4e7d89d53
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/tagmatcher/BaseTagMatcherTestCase.java
@@ -0,0 +1,134 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..6e8dfbe4e
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/tagmatcher/TestXPathTagMatcher.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..3f76745c7
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/types/TypeComparatorTests.java
@@ -0,0 +1,533 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..faed0c601
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/types/TypeTransformerTests.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..042f72146
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/JSFCoreUtilHelper.java
@@ -0,0 +1,623 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..bae76d6b6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/JSFFacetedTestEnvironment.java
@@ -0,0 +1,157 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..9b0a3f852
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/TestCMUtil.java
@@ -0,0 +1,97 @@
+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
new file mode 100644
index 000000000..34ab6a989
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/TestJDTBeanIntrospector.java
@@ -0,0 +1,671 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..652145bda
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/TestJDTBeanPropertyWorkingCopy.java
@@ -0,0 +1,519 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..3f3cdf01a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/TestJSFAppConfigUtils.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..4b53ce736
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/TestTypeUtil.java
@@ -0,0 +1,444 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..6876e95e6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/util/UtilSuite.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..8559c84a9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/MockIReporter.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..8d35d34cc
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/MockIValidationContext.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..1825e6ef4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/MockValidationReporter.java
@@ -0,0 +1,201 @@
+/*******************************************************************************
+ * 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, (code == null ? "" : ", with errorCode "+code), length, 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
new file mode 100644
index 000000000..aba04d97d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/TestJSPSemanticValidation_AttrValueConverter.java
@@ -0,0 +1,171 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..86bcab1fc
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/TestJSPSemanticsValidator_AttributeValues.java
@@ -0,0 +1,158 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..4ae6ba843
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/TestJSPSemanticsValidator_Containment.java
@@ -0,0 +1,219 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..5dba2d371
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/src/org/eclipse/jst/jsf/core/tests/validation/XMLViewDefnValidatorTests.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 000000000..c1b2c7c8d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/test.xml
@@ -0,0 +1,49 @@
+<?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
new file mode 100644
index 000000000..0fc24edb4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/AnotherBean.java.data
@@ -0,0 +1,13 @@
+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
new file mode 100644
index 000000000..3759441bc
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/IBeanInterface.java.data
@@ -0,0 +1,7 @@
+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
new file mode 100644
index 000000000..de4b03795
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/commons-beanutils-bogus.jar
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
new file mode 100644
index 000000000..de4b03795
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/commons-collections-bogus.jar
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
new file mode 100644
index 000000000..de4b03795
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/commons-digester-bogus.jar
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
new file mode 100644
index 000000000..de4b03795
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/commons-logging-bogus.jar
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
new file mode 100644
index 000000000..de4b03795
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/jsf-api-bogus.jar
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
new file mode 100644
index 000000000..de4b03795
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/jsf-impl-bogus.jar
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
new file mode 100644
index 000000000..de4b03795
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/jstl-bogus.jar
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
new file mode 100644
index 000000000..8a525668f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/registryFiles/EmptyJSFLibraryRegistryV1.xml.data
@@ -0,0 +1,2 @@
+<?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
new file mode 100644
index 000000000..c5891571d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/registryFiles/ValidNonEmptyJSFLibraryRegistryV1.xml.data
@@ -0,0 +1,27 @@
+<?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
new file mode 100644
index 000000000..b0277be0e
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/registryFiles/ValidNonEmptyJSFLibraryRegistryV1_expectedMigrationResult.xml.data
@@ -0,0 +1,27 @@
+<?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
new file mode 100644
index 000000000..065ad6b54
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/registryFiles/ValidNonEmptyJSFLibraryRegistryV2.xml.data
@@ -0,0 +1,27 @@
+<?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
new file mode 100644
index 000000000..de4b03795
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/JSFLib/standard-bogus.jar
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
new file mode 100644
index 000000000..e3a5304c6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/TestBean1.java.data
@@ -0,0 +1,141 @@
+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
new file mode 100644
index 000000000..866203351
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/TestBean1Subclass.java.data
@@ -0,0 +1,10 @@
+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
new file mode 100644
index 000000000..ace022566
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/TestBeanGeneric.java.data
@@ -0,0 +1,34 @@
+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
new file mode 100644
index 000000000..203499c5e
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/TestEnum1.java.data
@@ -0,0 +1,6 @@
+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
new file mode 100644
index 000000000..7e369c618
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/appconfig/fail2.jar
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
new file mode 100644
index 000000000..1f3a81438
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/appconfig/fail2_nofacesconfig.jar
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
new file mode 100644
index 000000000..380fe7f80
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/appconfig/noextdata.jar
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
new file mode 100644
index 000000000..2cf0da5c6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/appconfig/withextdata.jar
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
new file mode 100644
index 000000000..de4b03795
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/faces-all-bogus.jar
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
new file mode 100644
index 000000000..de4b03795
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/faces-api-bogus.jar
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
new file mode 100644
index 000000000..de4b03795
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/faces-impl-bogus.jar
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
new file mode 100644
index 000000000..fbc7d0fc8
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/facet/expected-faces-config-1_1.xml
@@ -0,0 +1,9 @@
+<?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
new file mode 100644
index 000000000..ddd61c745
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/facet/expected-faces-config-1_2.xml
@@ -0,0 +1,9 @@
+<?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
new file mode 100644
index 000000000..f711d930f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/facet/expected-faces-config-2_0.xml
@@ -0,0 +1,9 @@
+<?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/jsf-core.tld.data b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/jsf-core.tld.data
new file mode 100644
index 000000000..b54e2ea4b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/jsf-core.tld.data
@@ -0,0 +1,30 @@
+<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
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/jsps/NonELAttributeValues.jsp.data
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
new file mode 100644
index 000000000..810575e8c
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/jsps/testContainment.jsp.data
@@ -0,0 +1,19 @@
+<%@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
new file mode 100644
index 000000000..ad170d342
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/jsps/testdata1.jsp.data
@@ -0,0 +1,40 @@
+
+<%@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
new file mode 100644
index 000000000..606a584bf
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/CaseInsensitive.xml
@@ -0,0 +1,17 @@
+<?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
new file mode 100644
index 000000000..54b984445
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/FileA.xml
@@ -0,0 +1,13 @@
+<?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
new file mode 100644
index 000000000..60cf5fa22
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/FileB.xml
@@ -0,0 +1,13 @@
+<?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
new file mode 100644
index 000000000..ea290ee6f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/jsf_test.properties
@@ -0,0 +1,15 @@
+###############################################################################
+# 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
new file mode 100644
index 000000000..73c8ea8e8
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/jsf_test.xml
@@ -0,0 +1,101 @@
+<?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
new file mode 100644
index 000000000..64915235b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/metadata/jsf_test_en_US.properties
@@ -0,0 +1,15 @@
+###############################################################################
+# 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
new file mode 100644
index 000000000..9e547d2d9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/myfaces_core.tld.data
@@ -0,0 +1,781 @@
+<?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
new file mode 100644
index 000000000..386e895f3
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/myfaces_html.tld.data
@@ -0,0 +1,6200 @@
+<?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</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>
+ <!-- GridRenderer attributes -->
+ <attribute>
+ <name>columns</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>Specifies the number of columns in the grid.</description>
+ </attribute>
+ </tag>
+ <tag>
+ <name>panelGroup</name>
+ <tag-class>org.apache.myfaces.taglib.html.HtmlPanelGroupTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ This element is used to group other components where the
+ specification requires one child element. If any of the HTML or
+ CSS attributes are set, its content is rendered within a span element.
+
+ Unless otherwise specified, all attributes accept static values
+ or EL expressions.
+ </description>
+ <!-- all standard attributes of the panelGroup 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>
+ <!-- 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>
+ <tag>
+ <name>selectBooleanCheckbox</name>
+ <tag-class>org.apache.myfaces.taglib.html.HtmlSelectBooleanCheckboxTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Allow the user to choose a "true" or "false" value, presented as a
+ checkbox.
+ &lt;p&gt;
+ Renders as an HTML input tag with its type set to "checkbox", and
+ its name attribute set to the id. The "checked" attribute is rendered
+ if the value of this component is true.
+ &lt;p&gt;
+ Unless otherwise specified, all attributes accept static values
+ or EL expressions.
+
+ </description>
+ <!-- UISelectBoolean attributes -->
+ <!-- "selected" attribute is covered by HTML "checked" attribute -->
+ <!-- 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 for type "checkbox" -->
+ <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>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>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>
+ </tag>
+ <tag>
+ <name>selectManyCheckbox</name>
+ <tag-class>org.apache.myfaces.taglib.html.HtmlSelectManyCheckboxTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Allow the user to select zero or more items from a set of
+ available options. This is presented as a table with one cell per
+ available option; each cell contains a checkbox and the option's
+ label. The "layout" attribute determines whether the checkboxes
+ are laid out horizontally or vertically.
+ &lt;p&gt;
+ The set of available options is defined by adding child
+ f:selectItem or f:selectItems components to this component.
+ &lt;p&gt;
+ The value attribute must be a value-binding expression to a
+ property of type List, Object array or primitive array. That
+ "collection" is expected to contain objects of the same type as
+ SelectItem.getValue() returns for the child SelectItem objects.
+ On rendering, any child whose value is in the list will be
+ selected initially. During the update phase, the property setter
+ is called to replace the original collection with a completely
+ new collection object of the appropriate type. The new collection
+ object contains the value of each child SelectItem object that
+ is currently selected.
+ &lt;p&gt;
+ Unless otherwise specified, all attributes accept static values
+ or EL expressions.
+
+ </description>
+ <!-- all standard attributes of the selectManyCheckbox tag -->
+ <!-- UISelectMany attributes -->
+ <!-- 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 for type "checkbox" -->
+ <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>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>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>
+ <!-- CheckboxListRenderer attributes -->
+ <attribute>
+ <name>layout</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>java.lang.String</type>
+ <description>Controls the layout direction of the child elements. Values include:
+ lineDirection (vertical) and pageDirection (horzontal).</description>
+ </attribute>
+ <!--TODO: disabledClass, enabledClass -->
+ <attribute>
+ <name>enabledClass</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>The CSS class assigned to the label element for enabled choices.</description>
+ </attribute>
+ <attribute>
+ <name>disabledClass</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>The CSS class assigned to the label element for enabled choices.</description>
+ </attribute>
+ </tag>
+ <tag>
+ <name>selectManyListbox</name>
+ <tag-class>org.apache.myfaces.taglib.html.HtmlSelectManyListboxTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Allow the user to select zero or more items from a set of
+ available options. This is presented as a listbox which allows
+ multiple rows in the list to be selected simultaneously.
+ &lt;p&gt;
+ The set of available options is defined by adding child
+ f:selectItem or f:selectItems components to this component.
+ &lt;p&gt;
+ The list is rendered as an HTML select element. The "multiple"
+ attribute is set on the element and the size attribute is set to
+ the provided value, defaulting to the number of items in the list
+ if no value is provided. If the size is set to 1, then a
+ "drop-down" list (aka "combo-box") is presented, though if this is
+ the intention then a selectManyMenu should be used instead.
+ &lt;p&gt;
+ The value attribute must be a value-binding expression to a
+ property of type List, Object array or primitive array. That
+ "collection" is expected to contain objects of the same type as
+ SelectItem.getValue() returns for the child SelectItem objects.
+ On rendering, any child whose value is in the list will be
+ selected initially. During the update phase, the property is set
+ to contain a "collection" of values for those child SelectItem
+ objects that are currently selected.
+ &lt;p&gt;
+ Unless otherwise specified, all attributes accept static values
+ or EL expressions.
+
+ </description>
+ <!-- UISelectMany attributes -->
+ <!-- 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 select attributes -->
+ <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>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>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>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>
+ <!-- "multiple" cannot be set manually -->
+ <!-- "name" cannot be set manually -->
+ <!-- "size" cannot be set directly for it is a MenuRenderer specific attribute -->
+ <!-- ListboxRenderer attributes -->
+ <attribute>
+ <name>size</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>java.lang.String</type>
+ <description>see JSF Spec.</description>
+ </attribute>
+ <attribute>
+ <name>enabledClass</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>disabledClass</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+ <tag>
+ <name>selectManyMenu</name>
+ <tag-class>org.apache.myfaces.taglib.html.HtmlSelectManyMenuTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Allow the user to select zero or more items from a set of available
+ options. This is presented as a drop-down "combo-box" which allows
+ multiple rows in the list to be selected simultaneously.
+ &lt;p&gt;
+ The set of available options is defined by adding child
+ f:selectItem or f:selectItems components to this component.
+ &lt;p&gt;
+ Renders as an HTML select element, with the choices made up of
+ child f:selectItem or f:selectItems elements. The multiple
+ attribute is set and the size attribute is set to 1.
+ &lt;p&gt;
+ The value attribute must be a value-binding expression to a
+ property of type List, Object array or primitive array. That
+ "collection" is expected to contain objects of the same type as
+ SelectItem.getValue() returns for the child SelectItem objects.
+ On rendering, any child whose value is in the list will be
+ selected initially. During the update phase, the property is set
+ to contain a "collection" of values for those child SelectItem
+ objects that are currently selected.
+ &lt;p&gt;
+ Unless otherwise specified, all attributes accept static values
+ or EL expressions.
+
+ </description>
+ <!-- UISelectMany attributes -->
+ <!-- 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 select attributes -->
+ <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>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>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>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>
+ <!-- "multiple" cannot be set manually -->
+ <!-- "name" cannot be set manually -->
+ <!-- "size" cannot be set directly for it is a MenuRenderer specific attribute -->
+ <attribute>
+ <name>enabledClass</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>disabledClass</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+ <tag>
+ <name>selectOneListbox</name>
+ <tag-class>org.apache.myfaces.taglib.html.HtmlSelectOneListboxTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Allow the user to choose one option from a set of options.
+ &lt;p&gt;
+ Rendered as a listbox with the MULTIPLE attribute set to false.
+ &lt;p&gt;
+ The available choices are defined via child f:selectItem or
+ f:selectItems elements. The size of the listbox defaults to the
+ number of available choices; if size is explicitly set to a
+ smaller value, then scrollbars will be rendered. If size is set
+ to 1 then a "drop-down menu" (aka "combo-box") is rendered, though
+ if this is the intent then selectOneMenu should be used instead.
+ &lt;p&gt;
+ The value attribute of this component is read to determine
+ which of the available options is initially selected; its value
+ should match the "value" property of one of the child SelectItem
+ objects.
+ &lt;p&gt;
+ On submit of the enclosing form, the value attribute's bound
+ property is updated to contain the "value" property from the
+ chosen SelectItem.
+ &lt;p&gt;
+ Unless otherwise specified, all attributes accept static values
+ or EL expressions.
+
+ </description>
+ <!-- UISelectOne attributes -->
+ <!-- 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 select attributes -->
+ <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>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>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>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>
+ <!-- "multiple" cannot be set manually -->
+ <!-- "name" cannot be set manually -->
+ <!-- "size" cannot be set directly for it is a MenuRenderer specific attribute -->
+ <!-- ListboxRenderer attributes -->
+ <attribute>
+ <name>size</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>java.lang.String</type>
+ <description>see JSF Spec.</description>
+ </attribute>
+ <attribute>
+ <name>enabledClass</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>disabledClass</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+ <!-- selectOneMenu -->
+ <tag>
+ <name>selectOneMenu</name>
+ <tag-class>org.apache.myfaces.taglib.html.HtmlSelectOneMenuTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Allow the user to choose one option from a set of options.
+ &lt;p&gt;
+ Renders a drop-down menu (aka "combo-box") containing a set of
+ choices, of which only one can be chosen at a time. The available
+ choices are defined via child f:selectItem or f:selectItems
+ elements.
+ &lt;p&gt;
+ The value attribute of this component is read to determine
+ which of the available options is initially selected; its value
+ should match the "value" property of one of the child SelectItem
+ objects.
+ &lt;p&gt;
+ On submit of the enclosing form, the value attribute's bound property
+ is updated to contain the "value" property from the chosen SelectItem.
+ &lt;p&gt;
+ Unless otherwise specified, all attributes accept static values
+ or EL expressions.
+
+ </description>
+ <!-- all standard attributes of the selectOneMenu tag -->
+ <!-- UISelectOne attributes -->
+ <!-- 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 select attributes -->
+ <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>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>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>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>
+ <!-- "multiple" cannot be set manually -->
+ <!-- "name" cannot be set manually -->
+ <!-- "size" cannot be set directly for it is a MenuRenderer specific attribute -->
+ <attribute>
+ <name>enabledClass</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>disabledClass</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+ <!-- selectOneRadio -->
+ <tag>
+ <name>selectOneRadio</name>
+ <tag-class>org.apache.myfaces.taglib.html.HtmlSelectOneRadioTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Allow the user to choose one option from a set of options.
+ &lt;p&gt;
+ Renders as an HTML table element, containing an input element for
+ each child f:selectItem or f:selectItems elements. The input
+ elements are rendered as type radio.
+ &lt;p&gt;
+ The value attribute of this component is read to determine
+ which of the available options is initially selected; its value should
+ match the "value" property of one of the child SelectItem objects.
+ &lt;p&gt;
+ On submit of the enclosing form, the value attribute's bound property
+ is updated to contain the "value" property from the chosen SelectItem.
+ &lt;p&gt;
+ Unless otherwise specified, all attributes accept static values
+ or EL expressions.
+
+ </description>
+ <!-- all standard attributes of the selectOneRadio tag -->
+ <!-- UISelectOne attributes -->
+ <!-- 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 for type "radio" -->
+ <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>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>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>
+ <!-- RadioRenderer attributes -->
+ <attribute>
+ <name>layout</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>java.lang.String</type>
+ <description>
+ Orientation of the options list. Valid values are
+ "pageDirection" for a vertical layout, or "lineDirection" for
+ horizontal. The default value is "lineDirection".
+ </description>
+ </attribute>
+ <attribute>
+ <name>border</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>java.lang.String</type>
+ <description>Width in pixels of the border to be drawn around the table containing the options list.</description>
+ </attribute>
+ <attribute>
+ <name>enabledClass</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>disabledClass</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+</taglib>
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/sandbox-bogus.jar b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/sandbox-bogus.jar
new file mode 100644
index 000000000..de4b03795
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/sandbox-bogus.jar
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/signatures.jar b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/signatures.jar
new file mode 100644
index 000000000..c3465e509
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/signatures.jar
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/TLDTests.zip b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/TLDTests.zip
new file mode 100644
index 000000000..e29d509e7
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/TLDTests.zip
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/TLDTests2.zip b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/TLDTests2.zip
new file mode 100644
index 000000000..bf19aa52c
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/TLDTests2.zip
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/Test2Project.zip b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/Test2Project.zip
new file mode 100644
index 000000000..17e57beca
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/Test2Project.zip
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/TestProject.zip b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/TestProject.zip
new file mode 100644
index 000000000..f60f39dad
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/TestProject.zip
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/TestProject1.zip b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/TestProject1.zip
new file mode 100644
index 000000000..54c86450f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/TestProject1.zip
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/ValidationTestProject1.zip b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/ValidationTestProject1.zip
new file mode 100644
index 000000000..b77bb26eb
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/ValidationTestProject1.zip
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/ValidationTestProject2.zip b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/ValidationTestProject2.zip
new file mode 100644
index 000000000..e7af962b9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/ValidationTestProject2.zip
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/valueHolderTest11.zip b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/valueHolderTest11.zip
new file mode 100644
index 000000000..d0b78f5bc
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/testzips/valueHolderTest11.zip
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/tomahawk-bogus.jar b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/tomahawk-bogus.jar
new file mode 100644
index 000000000..de4b03795
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.core.tests/testfiles/tomahawk-bogus.jar
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/.classpath b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/.classpath
new file mode 100644
index 000000000..304e86186
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.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.designtime.tests/.cvsignore b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/.cvsignore
new file mode 100644
index 000000000..d04a6858c
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/.cvsignore
@@ -0,0 +1,5 @@
+bin
+temp.folder
+@dot
+javaCompiler...args
+build.xml
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/.project b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/.project
new file mode 100644
index 000000000..b9c0cfc25
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jst.jsf.designtime.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.designtime.tests/.settings/org.eclipse.core.resources.prefs b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 000000000..ab9b786cb
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Sun May 27 16:02:31 EDT 2007
+eclipse.preferences.version=1
+encoding/<project>=ISO-8859-1
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/.settings/org.eclipse.jdt.core.prefs b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..daddec601
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,61 @@
+#Fri Jul 13 13:50:02 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.designtime.tests/META-INF/MANIFEST.MF b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..8fe9eb38b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,38 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name.0
+Bundle-SymbolicName: org.eclipse.jst.jsf.designtime.tests
+Bundle-Version: 1.15.0.qualifier
+Bundle-Activator: org.eclipse.jst.jsf.designtime.tests.DesignTimeTestsPlugin
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui.ide;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.core.resources;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.jst.jsf.test.util;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.jst.jsf.core.tests;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.jst.jsf.core;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.jst.jsf.common;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.jdt.core;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.emf.ecore;bundle-version="[2.2.0,3.0.0)",
+ org.eclipse.core.commands;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.ui;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.jst.jsf.facesconfig;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.wst.common.modulecore,
+ org.eclipse.wst.sse.core,
+ org.eclipse.jface.text,
+ org.eclipse.ui.editors,
+ org.eclipse.jst.common.project.facet.core,
+ org.eclipse.wst.common.project.facet.core,
+ org.eclipse.jst.common.frameworks,
+ org.eclipse.jdt.ui,
+ org.eclipse.jst.jsf.common.runtime;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.jst.jsp.core,
+ org.eclipse.wst.xml.core,
+ org.eclipse.jst.jsf.common.runtime.tests;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.jdt.core.manipulation;bundle-version="[1.3.0,2.0.0)"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.jst.jsf.designtime.tests;x-internal:=true,
+ org.eclipse.jst.jsf.designtime.tests.resources
+Bundle-Vendor: %Bundle-Vendor.0
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/about.html b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/about.html
new file mode 100644
index 000000000..04d4782f4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/about.html
@@ -0,0 +1,22 @@
+<!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.designtime.tests/build.properties b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/build.properties
new file mode 100644
index 000000000..a7373eef4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/build.properties
@@ -0,0 +1,20 @@
+###############################################################################
+# Copyright (c) 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
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ test.xml,\
+ testdata/,\
+ plugin.properties,\
+ about.html
+javacSource=1.5
+javacTarget=1.5
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/launch/AllDesignTimeTests.launch b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/launch/AllDesignTimeTests.launch
new file mode 100644
index 000000000..bd6f80603
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/launch/AllDesignTimeTests.launch
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/AllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.jst.jsf.designtime.tests.AllTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jst.jsf.designtime.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx512m -XX:MaxPermSize=512M"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/plugin.properties b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/plugin.properties
new file mode 100644
index 000000000..16384dc6f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/plugin.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# 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=JSF Tools - Design-Time Tests
+Bundle-Vendor.0=Eclipse Web Tools Platform
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/pom.xml b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/pom.xml
new file mode 100644
index 000000000..9bc6f00e5
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/pom.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012, 2013 Eclipse Foundation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Distribution License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/org/documents/edl-v10.php
+
+ Contributors:
+ Thanh Ha (Eclipse Foundation) - initial implementation
+ Ian Trimble (Oracle) - initial tests configuration
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.webtools.jsf</groupId>
+ <artifactId>org.eclipse.webtools.jsf.tests</artifactId>
+ <version>3.6.0-SNAPSHOT</version>
+ <relativePath>../../../</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.webtools.jsf</groupId>
+ <artifactId>org.eclipse.jst.jsf.designtime.tests</artifactId>
+ <version>1.15.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ <useUIHarness>true</useUIHarness>
+ <testSuite>${project.artifactId}</testSuite>
+ <testClass>org.eclipse.jst.jsf.designtime.tests.AllTests</testClass>
+ <dependencies>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.jst.j2ee.ejb</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.jst.jee.web</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ </dependencies>
+ <argLine>-DjsfRuntimeJarsDirectoryV1.1=${project.basedir}/../jsfRuntimeJarsDirectory/V1.1 -DjsfRuntimeJarsDirectoryV1.2=${project.basedir}/../jsfRuntimeJarsDirectory/V1.2 -DjsfRuntimeJarsDirectoryV2.0=${project.basedir}/../jsfRuntimeJarsDirectory/V2.0</argLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/AllTests.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/AllTests.java
new file mode 100644
index 000000000..5afd188d9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/AllTests.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * 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.designtime.tests;
+
+import org.eclipse.jst.jsf.designtime.tests.views.TestJSPViewDefnAdapter;
+import org.eclipse.jst.jsf.designtime.tests.views.persistence.TestSerializableTLDTagElement;
+import org.eclipse.jst.jsf.test.util.JSFTestUtil;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * The test suite for all tests on jsf.designtime
+ *
+ * @author cbateman
+ *
+ */
+public class AllTests {
+// private static boolean _inited;
+// private static boolean _jsfRuntimePresentV11;
+// private static boolean _jsfRuntimePresentV12;
+
+ /**
+ * @return the all tests suite
+ */
+ public static Test suite() {
+ // tests tied to runtimes
+// if (!_inited) {
+// _jsfRuntimePresentV11 = JSFCoreUtilHelper
+// .isJSFRuntimeJarsDirectoryPropertySet(JSFVersion.V1_1);
+// _jsfRuntimePresentV12 = JSFCoreUtilHelper
+// .isJSFRuntimeJarsDirectoryPropertySet(JSFVersion.V1_2);
+// final boolean oneIsPresent =
+// (_jsfRuntimePresentV11 || _jsfRuntimePresentV12);
+// final boolean bothArePresent =
+// (_jsfRuntimePresentV11 && _jsfRuntimePresentV12);
+//
+// if (!oneIsPresent) {
+// final TestSuite suite = new TestSuite(
+// "Error: JSF runtimes not found");
+//
+// suite.addTestSuite(ErrorTestCase.class);
+//
+// return suite;
+// }
+//
+// if (!bothArePresent) {
+// System.err.println
+// ("Warning: only one of JSF 1.1 and 1.2 runtimes are present");
+// }
+// _inited = true;
+// }
+
+ final TestSuite suite = new TestSuite(
+ "Test for org.eclipse.jst.jsf.designtime.tests");
+ // $JUnit-BEGIN$
+ suite.addTestSuite(JSFTestUtil.getPreventJavaScriptJobsTestCase());
+
+ suite.addTestSuite(TestStartupHandler.class);
+ suite.addTestSuite(TestDefaultBeanSymbolSourceProvider.class);
+ suite.addTestSuite(TestResourceBundleMapSource.class);
+ suite.addTestSuite(TestDefaultPropertyResolver.class);
+ suite.addTestSuite(TestAbstractDataModelVariableFactory.class);
+ suite.addTestSuite(TestDefaultDTMethodResolver.class);
+ suite.addTestSuite(TestDefaultDTVariableResolver.class);
+ suite.addTestSuite(TestDTJSPExternalContext.class);
+ suite.addTestSuite(TestJSPDefaultSymbolFactory.class);
+ // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=219215
+ // suite.addTestSuite(TestJSPModelProcessor.class);
+ suite.addTestSuite(TestDesignTimeApplicationManager.class);
+ suite.addTestSuite(TestJSPViewDefnAdapter.class);
+ suite.addTestSuite(TestSerializableTLDTagElement.class);
+ suite.addTestSuite(TestJSF20ImplicitVariables.class);
+ suite.addTestSuite(TestJSF20DefaultBeanSymbolSourceProvider.class);
+ //addTestSuite(suite, JSPViewSuite.class);
+
+ suite.addTestSuite(JSFTestUtil.getAllowJavaScriptJobsTestCase());
+ // $JUnit-END$
+ return suite;
+ }
+
+// private static void addTestSuite(final TestSuite suite, final Class<?> klass) {
+// if (_jsfRuntimePresentV11) {
+// suite.addTestSuite(klass);
+// }
+// if (_jsfRuntimePresentV12) {
+// suite.addTestSuite(klass);
+// }
+// }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/DesignTimeFastTests.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/DesignTimeFastTests.java
new file mode 100644
index 000000000..6f9d5080f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/DesignTimeFastTests.java
@@ -0,0 +1,17 @@
+package org.eclipse.jst.jsf.designtime.tests;
+
+import org.eclipse.jst.jsf.designtime.tests.resources.FastResourceLocatorSuite;
+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(
+{ FastResourceLocatorSuite.class})
+public class DesignTimeFastTests
+{
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/DesignTimeTestsPlugin.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/DesignTimeTestsPlugin.java
new file mode 100644
index 000000000..8815c4904
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/DesignTimeTestsPlugin.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * 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.designtime.tests;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class DesignTimeTestsPlugin extends AbstractUIPlugin {
+
+ /**
+ * The plug-in ID
+ */
+ public static final String PLUGIN_ID = "org.eclipse.jst.jsf.designtime.tests";
+
+ // The shared instance
+ private static DesignTimeTestsPlugin plugin;
+
+ /**
+ * The constructor
+ */
+ public DesignTimeTestsPlugin() {
+ 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 DesignTimeTestsPlugin getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestAbstractDataModelVariableFactory.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestAbstractDataModelVariableFactory.java
new file mode 100644
index 000000000..966407f8f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestAbstractDataModelVariableFactory.java
@@ -0,0 +1,246 @@
+/*******************************************************************************
+ * 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.designtime.tests;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jst.jsf.common.internal.types.IAssignable;
+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.ERuntimeSource;
+import org.eclipse.jst.jsf.context.symbol.IBoundedMapTypeDescriptor;
+import org.eclipse.jst.jsf.context.symbol.IComponentSymbol;
+import org.eclipse.jst.jsf.context.symbol.IInstanceSymbol;
+import org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2;
+import org.eclipse.jst.jsf.context.symbol.ISymbol;
+import org.eclipse.jst.jsf.context.symbol.internal.util.IObjectSymbolBasedValueType;
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
+import org.eclipse.jst.jsf.designtime.internal.symbols.DataModelVariableTestFacade;
+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 TestAbstractDataModelVariableFactory extends TestCase
+{
+ private JSFFacetedTestEnvironment _jsfFacetedTestEnvironment;
+ private JDTTestEnvironment _jdtTestEnvironment;
+
+
+ @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("TestAbstractDataModelVariableFactory_"+getName());
+ projectTestEnvironment.createProject(false);
+
+ _jsfFacetedTestEnvironment = new JSFFacetedTestEnvironment(projectTestEnvironment);
+ _jsfFacetedTestEnvironment.initialize(IJSFCoreConstants.FACET_VERSION_1_1);
+
+ _jdtTestEnvironment = new JDTTestEnvironment(projectTestEnvironment);
+
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+
+ try
+ {
+ final IProject project = _jdtTestEnvironment.getJavaProject().getProject();
+ project.close(null);
+ project.delete(true, null);
+ }
+ catch (CoreException ce)
+ {
+ ce.printStackTrace(System.err);
+ }
+ }
+
+ public final void testCreateArraySymbol()
+ {
+ // test array of int. Should yield a scalar symbol for int
+ createAndVerifyArraySymbol("intArray", Signature.SIG_INT, 1, Signature.SIG_INT, 0);
+ // test array of String. Should yield a string
+ createAndVerifyArraySymbol("stringArray", TypeConstants.TYPE_STRING, 1, TypeConstants.TYPE_STRING, 0);
+ // test an array of array of strings. Should yield an array of Strings
+ createAndVerifyArraySymbol("stringArrayArray", TypeConstants.TYPE_STRING, 2, TypeConstants.TYPE_STRING, 1);
+ }
+
+ private ISymbol createAndVerifyArraySymbol(final String name, final String typeSignature, final int arrayCount, final String expectedResultSignature, final int expectedArrayCount)
+ {
+ final DataModelVariableTestFacade testFacade = new DataModelVariableTestFacade();
+
+ final ISymbol symbol = testFacade.testCreateArraySymbol(name, Signature.createArraySignature(typeSignature, arrayCount), _jdtTestEnvironment.getJavaProject());
+ assertTrue(symbol instanceof IInstanceSymbol);
+ final IInstanceSymbol instanceSymbol = (IInstanceSymbol) symbol;
+ assertTrue(instanceSymbol.getTypeDescriptor() instanceof IJavaTypeDescriptor2);
+ final IJavaTypeDescriptor2 typeDesc = (IJavaTypeDescriptor2) instanceSymbol.getTypeDescriptor();
+ assertEquals(name, symbol.getName());
+ assertEquals(Signature.createArraySignature(expectedResultSignature,expectedArrayCount),typeDesc.getTypeSignature());
+ assertEquals(expectedArrayCount, typeDesc.getArrayCount());
+
+ return symbol;
+ }
+
+
+ public final void testCreateFromList()
+ {
+ final String[] stringArgType = new String[] {TypeConstants.TYPE_STRING};
+ final String[] listOfStringArgType =
+ new String[] {"Ljava.util.List<Ljava.lang.String;>;"};
+
+ final DataModelVariableTestFacade testFacade = new DataModelVariableTestFacade();
+
+ // test non-parameterized list
+ ValueType valueType = new ValueType(TypeConstants.TYPE_LIST, new String[0], new String[0], new String[0],false, IAssignable.ASSIGNMENT_TYPE_RHS);
+ ISymbol symbol = testFacade.testCreateFromList("rawList", valueType, _jdtTestEnvironment.getJavaProject());
+ {
+ // should create the same as passing directly to default
+ final ISymbol compareSymbol = testFacade.getSymbolFactory()
+ .createDefaultSymbol("rawListDefault",
+ ERuntimeSource.TAG_INSTANTIATED_SYMBOL_LITERAL,
+ null);
+ assertTrue(symbol instanceof IComponentSymbol);
+ assertTrue(compareSymbol instanceof IComponentSymbol);
+
+ final IComponentSymbol s1 = (IComponentSymbol) symbol;
+ final IComponentSymbol s2 = (IComponentSymbol) compareSymbol;
+ assertSame(s1, s2);
+ }
+
+ // test list of strings
+ valueType = new ValueType(TypeConstants.TYPE_LIST, stringArgType, new String[0], new String[0], false, IAssignable.ASSIGNMENT_TYPE_RHS);
+ symbol = testFacade.testCreateFromList("string", valueType, _jdtTestEnvironment.getJavaProject());
+ assertTrue(symbol instanceof IComponentSymbol);
+ assertEquals(ERuntimeSource.TAG_INSTANTIATED_SYMBOL_LITERAL, ((IComponentSymbol)symbol).getRuntimeSource());
+ assertEquals(TypeConstants.TYPE_STRING, ((IComponentSymbol)symbol).getTypeDescriptor().getTypeSignature());
+ assertEquals(0, ((IComponentSymbol)symbol).getTypeDescriptor().getTypeParameterSignatures().size());
+
+ // test list of list of strings
+ valueType = new ValueType(TypeConstants.TYPE_LIST, listOfStringArgType, new String[0], new String[0], false, IAssignable.ASSIGNMENT_TYPE_RHS);
+ symbol = testFacade.testCreateFromList("listOfString", valueType, _jdtTestEnvironment.getJavaProject());
+ assertTrue(symbol instanceof IComponentSymbol);
+ assertEquals(ERuntimeSource.TAG_INSTANTIATED_SYMBOL_LITERAL, ((IComponentSymbol)symbol).getRuntimeSource());
+ assertEquals(TypeConstants.TYPE_LIST, ((IComponentSymbol)symbol).getTypeDescriptor().getTypeSignature());
+ assertEquals(1, ((IComponentSymbol)symbol).getTypeDescriptor().getTypeParameterSignatures().size());
+ assertEquals("Ljava.lang.String;", ((IComponentSymbol)symbol).getTypeDescriptor().getTypeParameterSignatures().get(0));
+ // next level: get the nested string in the list
+ valueType = IObjectSymbolBasedValueType.getInstance(symbol);
+ symbol = testFacade.testCreateFromList("subListOfString", valueType, _jdtTestEnvironment.getJavaProject());
+ assertTrue(symbol instanceof IComponentSymbol);
+ assertEquals(ERuntimeSource.TAG_INSTANTIATED_SYMBOL_LITERAL, ((IComponentSymbol)symbol).getRuntimeSource());
+ assertEquals(TypeConstants.TYPE_STRING, ((IComponentSymbol)symbol).getTypeDescriptor().getTypeSignature());
+ assertEquals(0, ((IComponentSymbol)symbol).getTypeDescriptor().getTypeParameterSignatures().size());
+ }
+
+ private void assertSame(final IComponentSymbol s1, final IComponentSymbol s2)
+ {
+ // ensure we don't pass the same ref twice by accident
+ assertFalse(s1 == s2);
+ assertEquals(s1.getRuntimeSource(), s2.getRuntimeSource());
+ assertEquals(s1.getDetailedDescription(), s2.getDetailedDescription());
+ assertEquals(s1.getTypeDescriptor().getTypeSignature(), s2.getTypeDescriptor().getTypeSignature());
+ }
+
+ public final void testCreateScalarSymbol()
+ {
+ createAndVerifyScalar("String", TypeConstants.TYPE_STRING);
+ createAndVerifyScalar("List", TypeConstants.TYPE_LIST);
+ createAndVerifyScalar("ListOfString", "Ljava.util.List<Ljava.lang.String;>;");
+ createAndVerifyScalar("ArrayOfInteger", Signature.createArraySignature(TypeConstants.TYPE_BOXED_INTEGER, 1));
+ }
+
+ private void createAndVerifyScalar(final String name, final String signature)
+ {
+ final DataModelVariableTestFacade testFacade = new DataModelVariableTestFacade();
+ final ISymbol symbol = testFacade.testCreateScalarSymbol("", signature, _jdtTestEnvironment.getJavaProject());
+ assertTrue(symbol instanceof IComponentSymbol);
+ final IComponentSymbol compSymbol = (IComponentSymbol) symbol;
+ assertEquals(ERuntimeSource.TAG_INSTANTIATED_SYMBOL_LITERAL, ((IComponentSymbol)symbol).getRuntimeSource());
+ assertEquals(Signature.getTypeErasure(signature), compSymbol.getTypeDescriptor().getTypeSignature());
+
+ final String[] typeArgs = Signature.getTypeArguments(signature);
+ for (int i = 0; i < typeArgs.length; i++)
+ {
+ assertEquals(typeArgs[i], compSymbol.getTypeDescriptor().getTypeParameterSignatures().get(i));
+ }
+ }
+
+ public final void testCreateDefaultSymbol()
+ {
+ final DataModelVariableTestFacade testFacade = new DataModelVariableTestFacade();
+ final ISymbol defaultSymbol = testFacade.getSymbolFactory()
+ .createDefaultSymbol("foo",
+ ERuntimeSource.TAG_INSTANTIATED_SYMBOL_LITERAL,
+ "Test raw list dataTableVariable");
+ assertNotNull(defaultSymbol);
+ assertEquals("foo", defaultSymbol.getName());
+ assertTrue(defaultSymbol instanceof IComponentSymbol);
+ final IComponentSymbol symbol = (IComponentSymbol) defaultSymbol;
+ assert(symbol.getTypeDescriptor() instanceof IBoundedMapTypeDescriptor);
+ assertEquals(ERuntimeSource.TAG_INSTANTIATED_SYMBOL_LITERAL, symbol.getRuntimeSource());
+ assertNotNull(symbol.getDetailedDescription());
+ }
+
+ public final void testCreateFromType()
+ {
+ final DataModelVariableTestFacade testFacade = new DataModelVariableTestFacade();
+ // test each of known branches against the construction method that's expected to be called
+
+ // an array of something should yield the same thing as createArraySymbol
+ {
+ final String arraySig = "[Ljava.lang.String;";
+ final ValueType valueType = new ValueType(arraySig, new String[0], new String[0], new String[0], false, IAssignable.ASSIGNMENT_TYPE_RHS);
+ final ISymbol array1 = testFacade.createFromType("array", valueType, _jdtTestEnvironment.getJavaProject());
+ final ISymbol array2 = testFacade.testCreateArraySymbol("array2", arraySig, _jdtTestEnvironment.getJavaProject());
+ assertSame((IComponentSymbol)array1, (IComponentSymbol)array2);
+ }
+
+ // if it's a list should be the same as createFromList
+ {
+ final String listSig = TypeConstants.TYPE_LIST;
+ final ValueType valueType = new ValueType(listSig, new String[0], new String[0], new String[0], false, IAssignable.ASSIGNMENT_TYPE_RHS);
+ final ISymbol list1 = testFacade.createFromType("list", valueType, _jdtTestEnvironment.getJavaProject());
+ final ISymbol list2 = testFacade.testCreateFromList("list2", valueType, _jdtTestEnvironment.getJavaProject());
+ assertSame((IComponentSymbol)list1, (IComponentSymbol)list2);
+ }
+
+ // if it's a DataModel, should be the same as default
+ {
+ final String dataModelSig = TypeConstants.TYPE_DATA_MODEL;
+ final ValueType valueType = new ValueType(dataModelSig, new String[0], new String[0], new String[0], false, IAssignable.ASSIGNMENT_TYPE_RHS);
+ final ISymbol dataModel1 = testFacade.createFromType("dataModel", valueType, _jdtTestEnvironment.getJavaProject());
+ final ISymbol dataModel2 = testFacade.getSymbolFactory()
+ .createDefaultSymbol("dataModel2",
+ ERuntimeSource.TAG_INSTANTIATED_SYMBOL_LITERAL,
+ "Row variable for dataTable");
+ assertSame((IComponentSymbol)dataModel1, (IComponentSymbol)dataModel2);
+ }
+
+ // if it's just some non-special object, like a String, then should be same as scalar
+ {
+ final String stringSig = TypeConstants.TYPE_STRING;
+ final ValueType valueType = new ValueType(stringSig, new String[0], new String[0], new String[0], false, IAssignable.ASSIGNMENT_TYPE_RHS);
+ final ISymbol scalar1 = testFacade.createFromType("scalar1", valueType, _jdtTestEnvironment.getJavaProject());
+ final ISymbol scalar2 = testFacade.testCreateScalarSymbol("scalar2", stringSig, _jdtTestEnvironment.getJavaProject());
+ assertSame((IComponentSymbol)scalar1, (IComponentSymbol)scalar2);
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestDTFacesContext.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestDTFacesContext.java
new file mode 100644
index 000000000..00909b309
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestDTFacesContext.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * 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.designtime.tests;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jst.common.project.facet.core.JavaFacet;
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
+import org.eclipse.jst.jsf.designtime.DesignTimeApplicationManager;
+import org.eclipse.jst.jsf.designtime.context.DTFacesContext;
+import org.eclipse.jst.jsf.designtime.context.IDTExternalContext;
+import org.eclipse.jst.jsf.designtime.internal.view.DTUIViewRoot;
+import org.eclipse.jst.jsf.designtime.internal.view.IViewRootHandle;
+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.project.facet.core.ProjectFacetsManager;
+
+public class TestDTFacesContext extends TestCase
+{
+ private JSFFacetedTestEnvironment _jsfFactedTestEnvironment;
+ private WebProjectTestEnvironment _webProjectTestEnv;
+ private IFile _testJSP;
+
+
+ private final static String TESTJSP1_PATH = "testdata1.jsp";
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ JSFTestUtil.setValidationEnabled(false);
+ JSFTestUtil.setInternetProxyPreferences(true,
+ "www-proxy.us.oracle.com", "80");
+
+ _webProjectTestEnv= new WebProjectTestEnvironment(getProjectName(), JavaFacet.VERSION_1_5, ProjectFacetsManager.getProjectFacet( "jst.web" ).getVersion("2.5"));
+ _webProjectTestEnv.createProject(false);
+
+ _webProjectTestEnv.
+ loadResourceInWebRoot(DesignTimeTestsPlugin.getDefault().getBundle(),
+ "/testdata/faces-config_2_0.xml.data",
+ "/WEB-INF/faces-config.xml");
+ final IResource res = _webProjectTestEnv.loadResourceInWebRoot(
+ DesignTimeTestsPlugin.getDefault().getBundle(),
+ "/testdata/testdata1.jsp.data", TESTJSP1_PATH);
+ _testJSP = (IFile) res;
+
+ new JDTTestEnvironment(_webProjectTestEnv);
+
+ _jsfFactedTestEnvironment = new JSFFacetedTestEnvironment(
+ _webProjectTestEnv);
+ _jsfFactedTestEnvironment
+ .initialize(IJSFCoreConstants.FACET_VERSION_2_0);
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ public void testGetDTExternalContext()
+ {
+ final DTFacesContext facesContext = getFacesContext(_testJSP);
+ assertNotNull(facesContext);
+ final IDTExternalContext externalContext = facesContext.getDTExternalContext(_testJSP);
+ assertNotNull(externalContext);
+ assertEquals(0, externalContext.getNoneMap().size());
+ // the JSP page define a variable for a dataTable and a loadBundle
+ assertEquals(2, externalContext.getRequestMap().size());
+ assertEquals(0, externalContext.getSessionMap().size());
+ assertEquals(0, externalContext.getApplicationMap().size());
+
+ // verify the context path
+ assertEquals(getProjectName(), externalContext.getRequestContextPath());
+ }
+
+ public void testGetViewRoot()
+ {
+ // other tests on viewroot in view.*
+ final DTFacesContext facesContext = getFacesContext(_testJSP);
+ IViewRootHandle handle = facesContext.getViewRootHandle();
+ final DTUIViewRoot viewRoot = handle.updateViewRoot();
+ assertNotNull(viewRoot);
+ assertEquals("/"+TESTJSP1_PATH, viewRoot.getViewId());
+
+ assertNotNull(viewRoot.getViewMap());
+ }
+
+ public void _testAdaptContextObject() {
+ final DTFacesContext facesContext = getFacesContext(_testJSP);
+ final IResource res = facesContext.adaptContextObject();
+ assertEquals(_testJSP, res);
+ }
+
+ private DTFacesContext getFacesContext(final IFile jspFile)
+ {
+ final IProject project = _webProjectTestEnv.getTestProject();
+ final DesignTimeApplicationManager manager =
+ DesignTimeApplicationManager.getInstance(project);
+
+ return manager.getFacesContext(jspFile);
+
+ }
+
+ private String getProjectName()
+ {
+ return "TestDesignTimeApplicationManager_" + getName();
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestDTJSPExternalContext.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestDTJSPExternalContext.java
new file mode 100644
index 000000000..a6f25406b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestDTJSPExternalContext.java
@@ -0,0 +1,245 @@
+/*******************************************************************************
+ * 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.designtime.tests;
+
+import java.io.ByteArrayInputStream;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jst.jsf.context.symbol.IInstanceSymbol;
+import org.eclipse.jst.jsf.context.symbol.ISymbol;
+import org.eclipse.jst.jsf.context.symbol.SymbolFactory;
+import org.eclipse.jst.jsf.context.symbol.source.ISymbolConstants;
+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.designtime.DesignTimeApplicationManager;
+import org.eclipse.jst.jsf.designtime.context.DTJSPExternalContext;
+import org.eclipse.jst.jsf.designtime.context.IDTExternalContext;
+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 TestDTJSPExternalContext extends TestCase
+{
+ private IFile _testJSP1;
+ private JSFFacetedTestEnvironment _jsfFactedTestEnvironment;
+
+ @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(getProjectName());
+ projectTestEnvironment.createProject(false);
+
+ final JDTTestEnvironment jdtTestEnvironment =
+ new JDTTestEnvironment(projectTestEnvironment);
+
+ final TestFileResource input = new TestFileResource();
+ input.load(DesignTimeTestsPlugin.getDefault().getBundle(),
+ "/testdata/bundle1.resources.data");
+ jdtTestEnvironment.addResourceFile("src"
+ , new ByteArrayInputStream(input.toBytes())
+ , "bundles", "bundle1.properties");
+
+ final IResource res = projectTestEnvironment.loadResourceInWebRoot(DesignTimeTestsPlugin.getDefault().getBundle()
+ , "/testdata/testdata1.jsp.data", "testdata1.jsp");
+ _testJSP1 = (IFile) res;
+
+ _jsfFactedTestEnvironment = new JSFFacetedTestEnvironment(projectTestEnvironment);
+ _jsfFactedTestEnvironment.initialize(IJSFCoreConstants.FACET_VERSION_1_1);
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(JSFCoreUtilHelper.createSimpleRegistryFactory());
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(null);
+ }
+
+ public void testDefaultDoGetMapForScopeInt()
+ {
+ final DesignTimeApplicationManager manager =
+ DesignTimeApplicationManager.getInstance(_testJSP1.getProject());
+
+ {
+ final IDTExternalContext externalContext =
+ manager.getFacesContext(_testJSP1).getDTExternalContext(_testJSP1);
+
+ final Map<String, ISymbol> requestMap = externalContext.getRequestMap();
+ final Collection<ISymbol> symbols = requestMap.values();
+ // there is a bundle defined in the test JSP
+ // also a data table row variable
+ assertEquals(2, symbols.size());
+ assertContainsVariable(symbols,"bundle");
+ assertContainsVariable(symbols,"row");
+ }
+
+ {
+ final TestableDTJSPExternalContext externalContext =
+ new TestableDTJSPExternalContext(_testJSP1);
+
+ final Map<String, ISymbol> requestMap = externalContext.getRequestMap();
+ Collection<ISymbol> symbols = requestMap.values();
+ assertEquals(1, symbols.size());
+ assertContainsVariable(symbols,"requestSymbol");
+
+ final Map<String, ISymbol> sessionMap = externalContext.getSessionMap();
+ symbols = sessionMap.values();
+ assertEquals(1, symbols.size());
+ assertContainsVariable(symbols,"sessionSymbol");
+
+ final Map<String, ISymbol> applicationMap = externalContext.getApplicationMap();
+ symbols = applicationMap.values();
+ assertEquals(1, symbols.size());
+ assertContainsVariable(symbols,"applicationSymbol");
+
+ final Map<String, ISymbol> noneMap = externalContext.getNoneMap();
+ symbols = noneMap.values();
+ assertEquals(1, symbols.size());
+ assertContainsVariable(symbols,"noneSymbol");
+
+// final Map<String, ISymbol> viewMap = externalContext.getFlashMap();
+// symbols = viewMap.values();
+// assertEquals(1, symbols.size());
+// assertContainsVariable(symbols,"flashSymbol");
+
+ externalContext.trace(System.out);
+ }
+ }
+
+ public void testGetRequestContextPath()
+ {
+ final DesignTimeApplicationManager manager =
+ DesignTimeApplicationManager.getInstance(_testJSP1.getProject());
+ final IDTExternalContext externalContext =
+ manager.getFacesContext(_testJSP1).getDTExternalContext(_testJSP1);
+ assertTrue(externalContext instanceof DTJSPExternalContext);
+ assertEquals(getProjectName(), externalContext.getRequestContextPath());
+ }
+ private void assertContainsVariable(final Collection<ISymbol> variables, final String name)
+ {
+ for (final ISymbol variable : variables)
+ {
+ if (name.equals(variable.getName()))
+ {
+ assertTrue(variable instanceof IInstanceSymbol);
+ return;
+ }
+ }
+
+ fail("Expected variable not found: "+name);
+ }
+
+ private String getProjectName()
+ {
+ return "TestDTJSPExternalContext"+getName();
+ }
+
+ private class TestableDTJSPExternalContext extends DTJSPExternalContext
+ {
+ protected TestableDTJSPExternalContext(final IAdaptable jspFile)
+ {
+ super(jspFile);
+ }
+
+ @Override
+ protected Map<String, ISymbol> doGetMapForScope(final int scopeMask)
+ {
+ switch(scopeMask)
+ {
+ case ISymbolConstants.SYMBOL_SCOPE_REQUEST:
+ return initRequestMap();
+
+ case ISymbolConstants.SYMBOL_SCOPE_SESSION:
+ return initSessionMap();
+
+ case ISymbolConstants.SYMBOL_SCOPE_APPLICATION:
+ return initApplicationMap();
+
+ case ISymbolConstants.SYMBOL_SCOPE_NONE:
+ return initNoneMap();
+
+// case ISymbolConstants.SYMBOL_SCOPE_FLASH:
+// return initFlashMap();
+//
+ }
+
+ throw new IllegalArgumentException();
+ }
+
+ private Map<String, ISymbol> initRequestMap()
+ {
+ final Map<String, ISymbol> map = new HashMap<String, ISymbol>();
+ final ISymbol symbol = SymbolFactory.eINSTANCE.createIComponentSymbol();
+ symbol.setName("requestSymbol");
+ map.put("requestSymbol", symbol);
+
+ return map;
+ }
+
+ private Map<String, ISymbol> initSessionMap()
+ {
+ final Map<String, ISymbol> map = new HashMap<String, ISymbol>();
+
+ final ISymbol symbol = SymbolFactory.eINSTANCE.createIComponentSymbol();
+ symbol.setName("sessionSymbol");
+ map.put("sessionSymbol", symbol);
+
+ return map;
+ }
+
+ private Map<String, ISymbol> initApplicationMap()
+ {
+ final Map<String, ISymbol> map = new HashMap<String, ISymbol>();
+
+ final ISymbol symbol = SymbolFactory.eINSTANCE.createIComponentSymbol();
+ symbol.setName("applicationSymbol");
+ map.put("applicationSymbol", symbol);
+
+ return map;
+ }
+
+ private Map<String, ISymbol> initNoneMap()
+ {
+ final Map<String, ISymbol> map = new HashMap<String, ISymbol>();
+
+ final ISymbol symbol = SymbolFactory.eINSTANCE.createIComponentSymbol();
+ symbol.setName("noneSymbol");
+ map.put("noneSymbol", symbol);
+
+ return map;
+ }
+
+// private Map<String, ISymbol> initFlashMap()
+// {
+// final Map<String, ISymbol> map = new HashMap<String, ISymbol>();
+//
+// final ISymbol symbol = SymbolFactory.eINSTANCE.createIComponentSymbol();
+// symbol.setName("flashSymbol");
+// map.put("flashSymbol", symbol);
+//
+// return map;
+// }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestDefaultBeanSymbolSourceProvider.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestDefaultBeanSymbolSourceProvider.java
new file mode 100644
index 000000000..b6cf1435a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestDefaultBeanSymbolSourceProvider.java
@@ -0,0 +1,200 @@
+/*******************************************************************************
+ * 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.designtime.tests;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jst.jsf.context.symbol.ISymbol;
+import org.eclipse.jst.jsf.context.symbol.source.ISymbolConstants;
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.core.tests.TestsPlugin;
+import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
+import org.eclipse.jst.jsf.designtime.symbols.DefaultBeanSymbolSourceProvider;
+import org.eclipse.jst.jsf.test.util.JDTTestEnvironment;
+import org.eclipse.jst.jsf.test.util.JSFTestUtil;
+import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
+
+/**
+ * JUnit tests for org.eclipse.jst.jsf.designtime.DefaultBeanSymbolSourceProvider
+ *
+ * @author cbateman
+ *
+ */
+public class TestDefaultBeanSymbolSourceProvider extends TestCase
+{
+ private JDTTestEnvironment _jdtTestEnvironment;
+ private JSFFacetedTestEnvironment _jsfFactedTestEnvironment;
+ private IFile _facesConfigFile;
+
+ private final static String SRC_FOLDER_NAME = "src";
+ private final static String PACKAGE_NAME = "com.test";
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ JSFTestUtil.setValidationEnabled(false);
+ JSFTestUtil.setInternetProxyPreferences(true, "www-proxy.uk.oracle.com","80");
+
+ final WebProjectTestEnvironment projectTestEnvironment =
+ new WebProjectTestEnvironment("TestDefaultBeanSymbolSourceProvider_"+getName());
+ projectTestEnvironment.createProject(false);
+ _facesConfigFile = (IFile) projectTestEnvironment.
+ loadResourceInWebRoot(DesignTimeTestsPlugin.getDefault().getBundle(),
+ "/testdata/faces-config.xml.data",
+ "/WEB-INF/faces-config.xml");
+
+ _jsfFactedTestEnvironment = new JSFFacetedTestEnvironment(projectTestEnvironment);
+ _jsfFactedTestEnvironment.initialize(IJSFCoreConstants.FACET_VERSION_1_1);
+
+ _jdtTestEnvironment = new JDTTestEnvironment(projectTestEnvironment);
+
+ JSFTestUtil.loadSourceClass(
+ TestsPlugin.getDefault().getBundle(),
+ "/testfiles/TestBean1.java.data", "TestBean1", SRC_FOLDER_NAME, PACKAGE_NAME, _jdtTestEnvironment);
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ }
+
+ /**
+ * Test the external sanity of the suite (i.e. that the test data is in sync)
+ */
+ public void testSanity()
+ {
+ final DefaultBeanSymbolSourceProvider provider =
+ DefaultBeanSymbolSourceProvider.getInstance();
+
+ final ISymbol[] symbol =
+ provider.getSymbols(_facesConfigFile, ISymbolConstants.SYMBOL_SCOPE_ALL);
+
+ assertNotNull(symbol);
+ assertEquals("Check that test suite is in sync with setup()", symbol.length, 4);
+ }
+
+ /**
+ *
+ */
+ public void testAllScopes()
+ {
+ final String[] names = new String[]{"myBean_request", "myBean_session", "myBean_application", "myBean_none"};
+ testScopeBeans(ISymbolConstants.SYMBOL_SCOPE_ALL, names.length, names);
+ }
+
+ /**
+ * Check mask by request scope
+ */
+ public void testOnlyRequestBeans()
+ {
+ final String[] names = new String[]{"myBean_request"};
+ testScopeBeans(ISymbolConstants.SYMBOL_SCOPE_REQUEST, names.length, names);
+ }
+
+ /**
+ * Check mask by Session scope
+ */
+ public void testOnlySessionBeans()
+ {
+ final String[] names = new String[]{"myBean_session"};
+ testScopeBeans(ISymbolConstants.SYMBOL_SCOPE_SESSION, names.length, names);
+ }
+
+ /**
+ * Check mask by Application scope
+ */
+ public void testOnlyApplicationBeans()
+ {
+ final String[] names = new String[]{"myBean_application"};
+ testScopeBeans(ISymbolConstants.SYMBOL_SCOPE_APPLICATION, names.length, names);
+ }
+ /**
+ * Check mask by None scope
+ */
+ public void testOnlyNoneBeans()
+ {
+ final String[] names = new String[]{"myBean_none"};
+ testScopeBeans(ISymbolConstants.SYMBOL_SCOPE_NONE, names.length, names);
+ }
+
+ private void testScopeBeans(final int scope, final int expectedSize, final String[] expectedNames)
+ {
+ final DefaultBeanSymbolSourceProvider provider =
+ DefaultBeanSymbolSourceProvider.getInstance();
+
+ final ISymbol[] symbols =
+ provider.getSymbols(_facesConfigFile, scope);
+
+ assertEquals(expectedSize, symbols.length);
+
+ for (int j = 0; j < expectedNames.length; j++)
+ {
+ final String expectedName = expectedNames[j];
+ assertNotNull(expectedName);
+ boolean found = false;
+
+ FIND_IN_SYMBOLS:
+ for (int i = 0; i < symbols.length; i++)
+ {
+ if (expectedName.equals(symbols[i].getName()))
+ {
+ found = true;
+ break FIND_IN_SYMBOLS;
+ }
+ }
+
+ assertTrue(found);
+ }
+ }
+
+ /**
+ * Test the get symbol by prefix
+ */
+ public void testPrefixSearch()
+ {
+ final DefaultBeanSymbolSourceProvider provider =
+ DefaultBeanSymbolSourceProvider.getInstance();
+
+ final ISymbol[] symbols =
+ provider.getSymbols("myBean_n", _facesConfigFile, ISymbolConstants.SYMBOL_SCOPE_ALL);
+
+ assertEquals(1, symbols.length);
+ assertEquals("myBean_none", symbols[0].getName());
+ }
+
+ /**
+ * Test getting a symbol it's name
+ */
+ public void testGetSymbolByName()
+ {
+ testGetSymbolByName("myBean_none");
+ testGetSymbolByName("myBean_application");
+ testGetSymbolByName("myBean_session");
+ testGetSymbolByName("myBean_request");
+ }
+
+ private void testGetSymbolByName(final String expectedName)
+ {
+ final DefaultBeanSymbolSourceProvider provider =
+ DefaultBeanSymbolSourceProvider.getInstance();
+
+ final ISymbol symbol =
+ provider.getSymbol(expectedName, _facesConfigFile,
+ ISymbolConstants.SYMBOL_SCOPE_ALL);
+
+ assertNotNull(symbol);
+ assertEquals(expectedName, symbol.getName());
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestDefaultDTMethodResolver.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestDefaultDTMethodResolver.java
new file mode 100644
index 000000000..9cf4776c1
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestDefaultDTMethodResolver.java
@@ -0,0 +1,159 @@
+/*******************************************************************************
+ * 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.designtime.tests;
+
+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.jst.jsf.context.symbol.IBeanInstanceSymbol;
+import org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2;
+import org.eclipse.jst.jsf.context.symbol.IMethodSymbol;
+import org.eclipse.jst.jsf.context.symbol.ISymbol;
+import org.eclipse.jst.jsf.context.symbol.SymbolFactory;
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
+import org.eclipse.jst.jsf.designtime.el.DefaultDTMethodResolver;
+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 TestDefaultDTMethodResolver extends TestCase
+{
+ private JDTTestEnvironment _jdtTestEnvironment;
+ private JSFFacetedTestEnvironment _jsfFactedTestEnvironment;
+
+ private IType _methodBeanType;
+
+ private final static String SRC_FOLDER_NAME = "src";
+ private final static String PACKAGE_NAME = "com.test";
+ private final static String TESTBEAN1_NAME = "MethodBean";
+
+ @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("TestDefaultMethodResolver_"
+ + getName());
+ projectTestEnvironment.createProject(false);
+
+ _jsfFactedTestEnvironment =
+ new JSFFacetedTestEnvironment(projectTestEnvironment);
+ _jsfFactedTestEnvironment
+ .initialize(IJSFCoreConstants.FACET_VERSION_1_1);
+
+ _jdtTestEnvironment = new JDTTestEnvironment(projectTestEnvironment);
+
+ JSFTestUtil.loadSourceClass(DesignTimeTestsPlugin.getDefault()
+ .getBundle(), "/testdata/MethodBean.java.data", TESTBEAN1_NAME,
+ SRC_FOLDER_NAME, PACKAGE_NAME, _jdtTestEnvironment);
+ _methodBeanType =
+ _jdtTestEnvironment.getJavaProject().findType(
+ PACKAGE_NAME + "." + TESTBEAN1_NAME);
+ assertNotNull(_methodBeanType);
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+
+ try
+ {
+ final IProject project =
+ _jdtTestEnvironment.getJavaProject().getProject();
+ project.close(null);
+ project.delete(true, null);
+ }
+ catch (final CoreException ce)
+ {
+ ce.printStackTrace(System.err);
+ }
+ }
+
+ public void testGetMethod()
+ {
+ final IBeanInstanceSymbol symbol =
+ SymbolFactory.eINSTANCE.createIBeanInstanceSymbol();
+ symbol.setName("myBean2");
+ final IJavaTypeDescriptor2 typeDesc =
+ SymbolFactory.eINSTANCE.createIJavaTypeDescriptor2();
+ typeDesc.setType(_methodBeanType);
+ symbol.setTypeDescriptor(typeDesc);
+
+ final DefaultDTMethodResolver methodResolver =
+ new DefaultDTMethodResolver();
+
+ IMethodSymbol methodSymbol =
+ methodResolver.getMethod(symbol, "actionMethod");
+ assertNotNull(methodSymbol);
+ assertEquals("actionMethod", methodSymbol.getName());
+ assertEquals("()Ljava.lang.String;", methodSymbol.getSignature());
+
+ methodSymbol =
+ methodResolver.getMethod(symbol, "actionMethodWithParam");
+ assertNotNull(methodSymbol);
+ assertEquals("actionMethodWithParam", methodSymbol.getName());
+ assertEquals("(Ljava.lang.String;)Ljava.lang.String;", methodSymbol
+ .getSignature());
+
+ // method not found
+ methodSymbol = methodResolver.getMethod(symbol, "notAMethod");
+ assertNull(methodSymbol);
+ }
+
+ public void testGetMethods()
+ {
+ final IBeanInstanceSymbol symbol =
+ SymbolFactory.eINSTANCE.createIBeanInstanceSymbol();
+ symbol.setName("myBean2");
+ final IJavaTypeDescriptor2 typeDesc =
+ SymbolFactory.eINSTANCE.createIJavaTypeDescriptor2();
+ typeDesc.setType(_methodBeanType);
+ symbol.setTypeDescriptor(typeDesc);
+
+ final DefaultDTMethodResolver methodResolver =
+ new DefaultDTMethodResolver();
+
+ final ISymbol[] symbols = methodResolver.getMethods(symbol);
+ assertNotNull(symbols);
+ assertEquals(11, symbols.length);
+ assertContains(symbols, "actionMethod", "()Ljava.lang.String;");
+ assertContains(symbols, "actionMethodWithParam",
+ "(Ljava.lang.String;)Ljava.lang.String;");
+ }
+
+ private void assertContains(final ISymbol[] methods, final String name,
+ final String signature)
+ {
+ IMethodSymbol methodSymbol = null;
+
+ for (final ISymbol symbol : methods)
+ {
+ if (name.equals(symbol.getName()))
+ {
+ assertTrue(symbol instanceof IMethodSymbol);
+ if (((IMethodSymbol) symbol).getSignature().equals(signature))
+ {
+ methodSymbol = (IMethodSymbol) symbol;
+ }
+ }
+ }
+
+ assertNotNull(methodSymbol);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestDefaultDTVariableResolver.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestDefaultDTVariableResolver.java
new file mode 100644
index 000000000..a42dd50f0
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestDefaultDTVariableResolver.java
@@ -0,0 +1,250 @@
+/*******************************************************************************
+ * 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.designtime.tests;
+
+import java.io.ByteArrayInputStream;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jst.jsf.context.symbol.IBeanInstanceSymbol;
+import org.eclipse.jst.jsf.context.symbol.IComponentSymbol;
+import org.eclipse.jst.jsf.context.symbol.IInstanceSymbol;
+import org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2;
+import org.eclipse.jst.jsf.context.symbol.IMapTypeDescriptor;
+import org.eclipse.jst.jsf.context.symbol.ISymbol;
+import org.eclipse.jst.jsf.context.symbol.ITypeDescriptor;
+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.designtime.DesignTimeApplicationManager;
+import org.eclipse.jst.jsf.designtime.el.DefaultDTVariableResolver;
+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.ManagedBeanScopeType;
+import org.eclipse.jst.jsf.facesconfig.emf.ManagedBeanType;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+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 TestDefaultDTVariableResolver extends TestCase
+{
+ private IType _testBean1Type;
+ private JSFFacetedTestEnvironment _jsfFactedTestEnvironment;
+ private JDTTestEnvironment _jdtTestEnvironment;
+ private IFile _testJSP1;
+
+ private final static String SRC_FOLDER_NAME = "src";
+ private final static String PACKAGE_NAME = "com.test";
+ private final static String TESTBEAN1_NAME = "TestBean1";
+
+
+ @Override
+ @SuppressWarnings("unchecked")
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ JSFTestUtil.setValidationEnabled(false);
+ JSFTestUtil.setInternetProxyPreferences(true, "www-proxy.us.oracle.com","80");
+
+ final WebProjectTestEnvironment projectTestEnvironment =
+ new WebProjectTestEnvironment("TestDefaultPropertyResolver_"+getName());
+ projectTestEnvironment.createProject(false);
+
+ final IResource res = projectTestEnvironment.loadResourceInWebRoot(DesignTimeTestsPlugin.getDefault().getBundle()
+ , "/testdata/testdata1.jsp.data", "testdata1.jsp");
+ _testJSP1 = (IFile) res;
+
+ _jsfFactedTestEnvironment = new JSFFacetedTestEnvironment(projectTestEnvironment);
+ _jsfFactedTestEnvironment.initialize(IJSFCoreConstants.FACET_VERSION_1_1);
+
+ final IProject project = projectTestEnvironment.getTestProject();
+
+ FacesConfigArtifactEdit edit = null;
+
+ try
+ {
+ edit = FacesConfigArtifactEdit.getFacesConfigArtifactEditForWrite(project, null);
+
+ final FacesConfigType model = edit.getFacesConfig();
+ final ManagedBeanClassType beanClass = FacesConfigFactory.eINSTANCE.createManagedBeanClassType();
+ beanClass.setTextContent("com.test.TestBean1");
+
+ final ManagedBeanNameType beanName = FacesConfigFactory.eINSTANCE.createManagedBeanNameType();
+ beanName.setTextContent("testBean1");
+
+ final ManagedBeanScopeType beanScope = FacesConfigFactory.eINSTANCE.createManagedBeanScopeType();
+ beanScope.setTextContent("session");
+
+ final ManagedBeanType bean = FacesConfigFactory.eINSTANCE.createManagedBeanType();
+ bean.setManagedBeanClass(beanClass);
+ bean.setManagedBeanName(beanName);
+ bean.setManagedBeanScope(beanScope);
+
+ model.getManagedBean().add(bean);
+
+ edit.save(null);
+ }
+ finally
+ {
+ if (edit != null)
+ {
+ edit.dispose();
+ }
+ }
+
+ _jdtTestEnvironment = new JDTTestEnvironment(projectTestEnvironment);
+
+ final TestFileResource input = new TestFileResource();
+ input.load(DesignTimeTestsPlugin.getDefault().getBundle(),
+ "/testdata/bundle1.resources.data");
+ _jdtTestEnvironment.addResourceFile("src"
+ , new ByteArrayInputStream(input.toBytes())
+ , "bundles", "bundle1.properties");
+
+ JSFTestUtil.loadSourceClass(
+ DesignTimeTestsPlugin.getDefault().getBundle(),
+ "/testdata/TestBean1.java.data", TESTBEAN1_NAME, SRC_FOLDER_NAME, PACKAGE_NAME, _jdtTestEnvironment);
+ _testBean1Type = _jdtTestEnvironment.getJavaProject().findType(PACKAGE_NAME+"."+TESTBEAN1_NAME);
+ assertNotNull(_testBean1Type);
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(JSFCoreUtilHelper.createSimpleRegistryFactory());
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(null);
+ }
+
+ public void testResolveVariable()
+ {
+ checkBuiltinVariables();
+ checkSymbolMaps();
+ checkManagedBeanVariable();
+ }
+
+ private void checkBuiltinVariables()
+ {
+ final DesignTimeApplicationManager manager =
+ DesignTimeApplicationManager.getInstance
+ (_jdtTestEnvironment.getProjectEnvironment().getTestProject());
+
+ final DefaultDTVariableResolver variableResolver = new DefaultDTVariableResolver();
+ final ISymbol symbol = variableResolver.resolveVariable
+ (manager.getFacesContext(_testJSP1), "applicationScope", _testJSP1);
+ assertNotNull(symbol);
+ }
+
+ private void checkSymbolMaps()
+ {
+ final DesignTimeApplicationManager manager =
+ DesignTimeApplicationManager.getInstance
+ (_jdtTestEnvironment.getProjectEnvironment().getTestProject());
+
+ final DefaultDTVariableResolver variableResolver = new DefaultDTVariableResolver();
+ final ISymbol symbol = variableResolver.resolveVariable
+ (manager.getFacesContext(_testJSP1), "bundle", _testJSP1);
+ assertNotNull(symbol);
+ assertTrue(symbol instanceof IComponentSymbol);
+
+ final IComponentSymbol compSymbol = (IComponentSymbol) symbol;
+ assertEquals("bundle", compSymbol.getName());
+ final ITypeDescriptor typeDesc = compSymbol.getTypeDescriptor();
+ assertTrue(typeDesc instanceof IMapTypeDescriptor);
+ }
+
+ private void checkManagedBeanVariable()
+ {
+ final DesignTimeApplicationManager manager =
+ DesignTimeApplicationManager.getInstance
+ (_jdtTestEnvironment.getProjectEnvironment().getTestProject());
+
+ final DefaultDTVariableResolver variableResolver = new DefaultDTVariableResolver();
+ final ISymbol symbol = variableResolver.resolveVariable
+ (manager.getFacesContext(_testJSP1), "testBean1", _testJSP1);
+ assertNotNull(symbol);
+ assertTrue(symbol instanceof IBeanInstanceSymbol);
+
+ final IBeanInstanceSymbol compSymbol = (IBeanInstanceSymbol) symbol;
+ assertEquals("testBean1", compSymbol.getName());
+ final ITypeDescriptor typeDesc = compSymbol.getTypeDescriptor();
+ assertTrue(typeDesc instanceof IJavaTypeDescriptor2);
+ assertEquals("Lcom.test.TestBean1;", typeDesc.getTypeSignature());
+ }
+
+ public void testGetAllVariables()
+ {
+ final DesignTimeApplicationManager manager =
+ DesignTimeApplicationManager.getInstance
+ (_jdtTestEnvironment.getProjectEnvironment().getTestProject());
+
+ final DefaultDTVariableResolver variableResolver = new DefaultDTVariableResolver();
+
+ final ISymbol[] variables = variableResolver.getAllVariables
+ (manager.getFacesContext(_testJSP1), _testJSP1);
+
+ assertContainsVariable(variables, "applicationScope");
+ assertContainsVariable(variables, "sessionScope");
+ assertContainsVariable(variables, "requestScope");
+ assertContainsVariable(variables, "cookie");
+ assertContainsVariable(variables, "facesContext");
+ assertContainsVariable(variables, "header");
+ assertContainsVariable(variables, "headerValues");
+ assertContainsVariable(variables, "initParam");
+ assertContainsVariable(variables, "param");
+ assertContainsVariable(variables, "paramValues");
+ assertContainsVariable(variables, "view");
+ assertContainsVariable(variables, "testBean1");
+ assertContainsVariable(variables, "bundle");
+
+ //this is a JSF1.x context... there should be no JSF2.0 implicit variables
+ assertDoesNotContainVariable(variables, "viewScope");
+ assertDoesNotContainVariable(variables, "flash");
+ assertDoesNotContainVariable(variables, "cc");
+ assertDoesNotContainVariable(variables, "component");
+ assertDoesNotContainVariable(variables, "resource");
+ }
+
+ private void assertContainsVariable(final ISymbol[] variables, final String name)
+ {
+ for (final ISymbol variable : variables)
+ {
+ if (name.equals(variable.getName()))
+ {
+ assertTrue(variable instanceof IInstanceSymbol);
+ return;
+ }
+ }
+
+ fail("Expected variable not found: "+name);
+ }
+
+ private void assertDoesNotContainVariable(final ISymbol[] variables, final String name)
+ {
+ for (final ISymbol variable : variables)
+ {
+ if (name.equals(variable.getName()))
+ {
+ fail("Variable was not expected to be found: "+name);
+ return;
+ }
+ }
+
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestDefaultPropertyResolver.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestDefaultPropertyResolver.java
new file mode 100644
index 000000000..cb600f7f0
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestDefaultPropertyResolver.java
@@ -0,0 +1,853 @@
+/*******************************************************************************
+ * 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.designtime.tests;
+
+import java.io.ByteArrayInputStream;
+import java.util.HashMap;
+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.context.symbol.IBeanInstanceSymbol;
+import org.eclipse.jst.jsf.context.symbol.IBoundedMapTypeDescriptor;
+import org.eclipse.jst.jsf.context.symbol.IComponentSymbol;
+import org.eclipse.jst.jsf.context.symbol.IJavaTypeDescriptor2;
+import org.eclipse.jst.jsf.context.symbol.IMapTypeDescriptor;
+import org.eclipse.jst.jsf.context.symbol.IObjectSymbol;
+import org.eclipse.jst.jsf.context.symbol.IPropertySymbol;
+import org.eclipse.jst.jsf.context.symbol.ISymbol;
+import org.eclipse.jst.jsf.context.symbol.SymbolFactory;
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
+import org.eclipse.jst.jsf.designtime.el.DefaultDTPropertyResolver;
+import org.eclipse.jst.jsf.designtime.internal.symbols.ResourceBundleMapSourceFactory;
+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;
+
+/**
+ * Unit tests for the default property resolver
+ *
+ * @author cbateman
+ *
+ */
+public class TestDefaultPropertyResolver extends TestCase
+{
+ private static final int NUM_PROPERTIES_TEST_BEAN_1 = 6; // includes
+ // java.lang.Object.getClass()
+ private JDTTestEnvironment _jdtTestEnvironment;
+ private JSFFacetedTestEnvironment _jsfFactedTestEnvironment;
+
+ private IType _testBean1Type;
+ private IType _testMapBean1Type;
+ private IType _testBean2Type;
+ private IType _testBean3Type;
+ private IType _testBeanWithMapProp;
+ private IType _testListBeanType;
+ private IType _testBeanWithListPropType;
+ private IType _testBeanWithGenericProperties;
+
+ private final static String SRC_FOLDER_NAME = "src";
+ private final static String PACKAGE_NAME = "com.test";
+ private final static String TESTBEAN1_NAME = "TestBean1";
+ private final static String TESTBEAN2_NAME = "TestBean2";
+ private final static String TESTBEAN3_NAME = "TestBean3";
+ private final static String MAPBEAN_NAME = "MapBean";
+ private final static String BEANWITHMAPPROP_NAME =
+ "BeanWithMapProp";
+ private final static String LISTBEAN_NAME = "ListBean";
+ private final static String BEANWITHLISTPROP_NAME =
+ "BeanWithListProp";
+ private final static String BEANWITHGENERICPROP_NAME =
+ "TestBeanWithGenericProperties";
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ JSFTestUtil.setValidationEnabled(false);
+ JSFTestUtil.setInternetProxyPreferences(true,
+ "www-proxy.uk.oracle.com", "80");
+
+ final WebProjectTestEnvironment projectTestEnvironment =
+ new WebProjectTestEnvironment("TestDefaultPropertyResolver_"
+ + getName());
+ projectTestEnvironment.createProject(false);
+
+ _jsfFactedTestEnvironment =
+ new JSFFacetedTestEnvironment(projectTestEnvironment);
+ _jsfFactedTestEnvironment
+ .initialize(IJSFCoreConstants.FACET_VERSION_1_1);
+
+ _jdtTestEnvironment = new JDTTestEnvironment(projectTestEnvironment);
+
+ final TestFileResource input = new TestFileResource();
+ input.load(DesignTimeTestsPlugin.getDefault().getBundle(),
+ "/testdata/bundle1.resources.data");
+ _jdtTestEnvironment.addResourceFile(SRC_FOLDER_NAME,
+ new ByteArrayInputStream(input.toBytes()), "bundles",
+ "bundle1.properties");
+
+ JSFTestUtil.loadSourceClass(DesignTimeTestsPlugin.getDefault()
+ .getBundle(), "/testdata/TestBean1.java.data", TESTBEAN1_NAME,
+ SRC_FOLDER_NAME, PACKAGE_NAME, _jdtTestEnvironment);
+ _testBean1Type =
+ _jdtTestEnvironment.getJavaProject().findType(
+ PACKAGE_NAME + "." + TESTBEAN1_NAME);
+ assertNotNull(_testBean1Type);
+
+ JSFTestUtil.loadSourceClass(DesignTimeTestsPlugin.getDefault()
+ .getBundle(), "/testdata/MapBean.java.data", MAPBEAN_NAME,
+ SRC_FOLDER_NAME, PACKAGE_NAME, _jdtTestEnvironment);
+ _testMapBean1Type =
+ _jdtTestEnvironment.getJavaProject().findType(
+ PACKAGE_NAME + "." + MAPBEAN_NAME);
+ assertNotNull(_testMapBean1Type);
+
+ JSFTestUtil.loadSourceClass(DesignTimeTestsPlugin.getDefault()
+ .getBundle(), "/testdata/TestBean2.java.data", TESTBEAN2_NAME,
+ SRC_FOLDER_NAME, PACKAGE_NAME, _jdtTestEnvironment);
+ _testBean2Type =
+ _jdtTestEnvironment.getJavaProject().findType(
+ PACKAGE_NAME + "." + TESTBEAN2_NAME);
+ assertNotNull(_testBean2Type);
+
+ JSFTestUtil.loadSourceClass(DesignTimeTestsPlugin.getDefault()
+ .getBundle(), "/testdata/TestBean3.java.data", TESTBEAN3_NAME,
+ SRC_FOLDER_NAME, PACKAGE_NAME, _jdtTestEnvironment);
+ _testBean3Type =
+ _jdtTestEnvironment.getJavaProject().findType(
+ PACKAGE_NAME + "." + TESTBEAN3_NAME);
+ assertNotNull(_testBean3Type);
+
+ JSFTestUtil.loadSourceClass(DesignTimeTestsPlugin.getDefault()
+ .getBundle(), "/testdata/BeanWithMapProp.java.data",
+ BEANWITHMAPPROP_NAME, SRC_FOLDER_NAME, PACKAGE_NAME,
+ _jdtTestEnvironment);
+ _testBeanWithMapProp =
+ _jdtTestEnvironment.getJavaProject().findType(
+ PACKAGE_NAME + "." + BEANWITHMAPPROP_NAME);
+ assertNotNull(_testBeanWithMapProp);
+
+ JSFTestUtil.loadSourceClass(DesignTimeTestsPlugin.getDefault()
+ .getBundle(), "/testdata/ListBean.java.data", LISTBEAN_NAME,
+ SRC_FOLDER_NAME, PACKAGE_NAME, _jdtTestEnvironment);
+ _testListBeanType =
+ _jdtTestEnvironment.getJavaProject().findType(
+ PACKAGE_NAME + "." + LISTBEAN_NAME);
+ assertNotNull(_testListBeanType);
+
+ JSFTestUtil.loadSourceClass(DesignTimeTestsPlugin.getDefault()
+ .getBundle(), "/testdata/BeanWithListProp.java.data",
+ BEANWITHLISTPROP_NAME, SRC_FOLDER_NAME, PACKAGE_NAME,
+ _jdtTestEnvironment);
+ _testBeanWithListPropType =
+ _jdtTestEnvironment.getJavaProject().findType(
+ PACKAGE_NAME + "." + BEANWITHLISTPROP_NAME);
+ assertNotNull(_testBeanWithListPropType);
+
+ JSFTestUtil.loadSourceClass(DesignTimeTestsPlugin.getDefault()
+ .getBundle(),
+ "/testdata/TestBeanWithGenericProperties.java.data",
+ BEANWITHGENERICPROP_NAME, SRC_FOLDER_NAME, PACKAGE_NAME,
+ _jdtTestEnvironment);
+ _testBeanWithGenericProperties =
+ _jdtTestEnvironment.getJavaProject().findType(
+ PACKAGE_NAME + "." + BEANWITHGENERICPROP_NAME);
+ assertNotNull(_testBeanWithGenericProperties);
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+
+ try
+ {
+ final IProject project =
+ _jdtTestEnvironment.getJavaProject().getProject();
+ project.close(null);
+ project.delete(true, null);
+ }
+ catch (final CoreException ce)
+ {
+ ce.printStackTrace(System.err);
+ }
+ }
+
+ /**
+ * Test precondition sanity
+ */
+ public void testSanity()
+ {
+ JDTBeanIntrospector beanIntrospector =
+ new JDTBeanIntrospector(_testBean1Type);
+ Map<String, JDTBeanProperty> props = beanIntrospector.getProperties();
+ assertEquals(NUM_PROPERTIES_TEST_BEAN_1, props.size());
+ assertTrue(props.containsKey("stringProp1"));
+ assertTrue(props.containsKey("booleanIsProp1"));
+
+ beanIntrospector = new JDTBeanIntrospector(_testMapBean1Type);
+ props = beanIntrospector.getProperties();
+ // has 2 as a bean: isEmpty -> empty property + class
+ assertEquals(2, props.size());
+
+ beanIntrospector = new JDTBeanIntrospector(_testBean2Type);
+ props = beanIntrospector.getProperties();
+ // two props: myBean3, class
+ assertEquals(2, props.size());
+
+ beanIntrospector = new JDTBeanIntrospector(_testBean3Type);
+ props = beanIntrospector.getProperties();
+ // two props: one of type TestBean2 + class
+ assertEquals(2, props.size());
+
+ beanIntrospector = new JDTBeanIntrospector(_testBeanWithMapProp);
+ props = beanIntrospector.getProperties();
+ // two props: one of type Map + class
+ assertEquals(2, props.size());
+
+ beanIntrospector = new JDTBeanIntrospector(_testListBeanType);
+ props = beanIntrospector.getProperties();
+ // includes isEmpty and class
+ assertEquals(3, props.size());
+
+ beanIntrospector = new JDTBeanIntrospector(_testBeanWithListPropType);
+ props = beanIntrospector.getProperties();
+ assertEquals(2, props.size());
+
+ beanIntrospector =
+ new JDTBeanIntrospector(_testBeanWithGenericProperties);
+ props = beanIntrospector.getProperties();
+ assertEquals(3, props.size());
+ }
+
+ /**
+ * Test a basic simple bean symbol to see if we resolve properties correctly
+ */
+ public void testBeanInstanceSymbol()
+ {
+ final IBeanInstanceSymbol symbol =
+ SymbolFactory.eINSTANCE.createIBeanInstanceSymbol();
+ symbol.setName("myBean");
+ final IJavaTypeDescriptor2 typeDesc =
+ SymbolFactory.eINSTANCE.createIJavaTypeDescriptor2();
+ typeDesc.setType(_testBean1Type);
+ symbol.setTypeDescriptor(typeDesc);
+
+ final DefaultDTPropertyResolver propResolver =
+ new DefaultDTPropertyResolver();
+ propResolver.setProject(_jdtTestEnvironment.getProjectEnvironment().getTestProject());
+ final ISymbol[] properties = propResolver.getAllProperties(symbol);
+ assertEquals(NUM_PROPERTIES_TEST_BEAN_1, properties.length);
+ final Map<String, ISymbol> checkProps = new HashMap<String, ISymbol>();
+ for (final ISymbol propSymbol : properties)
+ {
+ checkProps.put(propSymbol.getName(), propSymbol);
+ }
+
+ assertTrue(checkProps.containsKey("stringProp1"));
+ assertTrue(checkProps.containsKey("booleanIsProp1"));
+
+ {
+ final ISymbol stringProp1 =
+ propResolver.getProperty(symbol, "stringProp1");
+ assertNotNull(stringProp1);
+ assertTrue(stringProp1 instanceof IPropertySymbol);
+ assertTrue(((IPropertySymbol) stringProp1).getTypeDescriptor()
+ .getTypeSignature().equals(TypeConstants.TYPE_STRING));
+ final IPropertySymbol mapStringProp1 =
+ (IPropertySymbol) checkProps.get("stringProp1");
+ assertEquals(((IPropertySymbol) stringProp1).getTypeDescriptor()
+ .getTypeSignature(), mapStringProp1.getTypeDescriptor()
+ .getTypeSignature());
+ }
+
+ {
+ final ISymbol booleanIsProp =
+ propResolver.getProperty(symbol, "booleanIsProp1");
+ assertNotNull(booleanIsProp);
+ assertTrue(booleanIsProp instanceof IPropertySymbol);
+ assertTrue(((IPropertySymbol) booleanIsProp).getTypeDescriptor()
+ .getTypeSignature().equals(Signature.SIG_BOOLEAN));
+ final IPropertySymbol mapBooleanProp =
+ (IPropertySymbol) checkProps.get("booleanIsProp1");
+ assertEquals(((IPropertySymbol) booleanIsProp).getTypeDescriptor()
+ .getTypeSignature(), mapBooleanProp.getTypeDescriptor()
+ .getTypeSignature());
+ }
+ }
+
+ /**
+ * Test an unconstrained Map bean
+ */
+ public void testMapBeanInstanceSymbol()
+ {
+ final IBeanInstanceSymbol symbol =
+ SymbolFactory.eINSTANCE.createIBeanInstanceSymbol();
+ symbol.setName("myMapBean");
+ final IJavaTypeDescriptor2 typeDesc =
+ SymbolFactory.eINSTANCE.createIJavaTypeDescriptor2();
+ typeDesc.setType(_testMapBean1Type);
+ symbol.setTypeDescriptor(typeDesc);
+
+ final DefaultDTPropertyResolver propResolver =
+ new DefaultDTPropertyResolver();
+ propResolver.setProject(_jdtTestEnvironment.getProjectEnvironment().getTestProject());
+ final ISymbol[] properties = propResolver.getAllProperties(symbol);
+ // there no design-time identifiable properties
+ // note that this is different that what JDTBeanIntrospector returns
+ // since the default property resolver first coerces to a Map
+ // so there are no propeties
+ assertEquals(0, properties.length);
+
+ // but being that it's an unbounded Map, it may have any number
+ // of arbitrary "unconstrained" properties
+ for (int i = 0; i < 25; i++)
+ {
+ final String unconstrainedPropName =
+ "someName" + i * 7 + "withNonSequentialNumber" + i * 11;
+ final ISymbol someProperty1 =
+ propResolver.getProperty(symbol, unconstrainedPropName);
+ assertNotNull(someProperty1);
+ assertEquals(unconstrainedPropName, someProperty1.getName());
+ assertTrue(someProperty1 instanceof IPropertySymbol);
+ // completely unconstrained properties should come back as java
+ // object
+ assertEquals(TypeConstants.TYPE_JAVAOBJECT,
+ ((IPropertySymbol) someProperty1).getTypeDescriptor()
+ .getTypeSignature());
+ }
+ }
+
+ /**
+ * Test a component with map source
+ */
+ public void testComponentBeanInstanceSymbol()
+ {
+ final IComponentSymbol symbol =
+ SymbolFactory.eINSTANCE.createIComponentSymbol();
+ symbol.setName("myComponentSymbol");
+ final IMapTypeDescriptor typeDesc =
+ SymbolFactory.eINSTANCE.createIMapTypeDescriptor();
+ final Map<String, String> mapSource = new HashMap<String, String>();
+ mapSource.put("prop1", "propValue1");
+ mapSource.put("prop2", "propValue2");
+ mapSource.put("dotted.property", "dottedPropertyValue");
+ typeDesc.setMapSource(mapSource);
+ symbol.setTypeDescriptor(typeDesc);
+
+ final DefaultDTPropertyResolver propResolver =
+ new DefaultDTPropertyResolver();
+ propResolver.setProject(_jdtTestEnvironment.getProjectEnvironment().getTestProject());
+ final ISymbol[] properties = propResolver.getAllProperties(symbol);
+
+ // should have three properties
+ assertEquals(3, properties.length);
+
+ // loop 10 times through the inner loop assertions to
+ // verify that getAllProperties and getProperties are
+ // idempotent
+ for (int j = 0; j < 10; j++)
+ {
+ // should have properties from mapSource above
+ // these should all be equivalent to those returned by getProperty
+ // since the object is a map first and foremost (e.g. not a bean
+ // cast to a Map)
+ for (final ISymbol propertie : properties)
+ {
+ // make sure the property's name matches a value in map source
+ // for the dotted one, we make an exception
+ assertTrue(mapSource.containsKey(propertie.getName())
+ || (propertie.getName().startsWith("dotted")));
+ // should be a property symbol
+ assertTrue(propertie instanceof IPropertySymbol);
+ final IPropertySymbol propSymbol = (IPropertySymbol) propertie;
+
+ // get the symbol by name
+ final ISymbol symbolById =
+ propResolver.getProperty(symbol, propSymbol.getName());
+ // should have the same name whether in getAll or get
+ assertEquals(propSymbol.getName(), symbolById.getName());
+ // we don't have an absolute "equals" for symbols, but can at
+ // least
+ // verify type equivalence
+ assertEquals(propSymbol.getTypeDescriptor().getTypeSignature(),
+ ((IObjectSymbol) symbolById).getTypeDescriptor()
+ .getTypeSignature());
+ }
+ }
+
+ // verify that the dotted property is intermediate and that
+ // dotted.property is there
+ final ISymbol symbolById = propResolver.getProperty(symbol, "dotted");
+ assertNotNull(symbolById);
+ assertTrue(((IPropertySymbol) symbolById).isIntermediate());
+ final ISymbol dottedProp =
+ propResolver.getProperty(symbolById, "property");
+ assertTrue(dottedProp instanceof IPropertySymbol);
+ assertEquals(TypeConstants.TYPE_STRING, ((IPropertySymbol) dottedProp)
+ .getTypeDescriptor().getTypeSignature());
+ }
+
+ /**
+ * Tests a property of property for a bean instance i.e. var.prop1.prop2
+ */
+ public void testBeanPropertyOnBeanProperty()
+ {
+ final IBeanInstanceSymbol symbol =
+ SymbolFactory.eINSTANCE.createIBeanInstanceSymbol();
+ symbol.setName("myBean2");
+ final IJavaTypeDescriptor2 typeDesc =
+ SymbolFactory.eINSTANCE.createIJavaTypeDescriptor2();
+ typeDesc.setType(_testBean2Type);
+ symbol.setTypeDescriptor(typeDesc);
+
+ final DefaultDTPropertyResolver propResolver =
+ new DefaultDTPropertyResolver();
+ propResolver.setProject(_jdtTestEnvironment.getProjectEnvironment().getTestProject());
+ {
+ final ISymbol[] properties = propResolver.getAllProperties(symbol);
+ assertEquals(2, properties.length); // should have defined property
+ // plus class
+
+ // check props
+ final Map<String, IPropertySymbol> gotProps =
+ new HashMap<String, IPropertySymbol>();
+
+ for (final ISymbol propertie : properties)
+ {
+ final IPropertySymbol propSymbol = (IPropertySymbol) propertie;
+ assertEquals(propSymbol.getTypeDescriptor().getTypeSignature(),
+ ((IObjectSymbol) propResolver.getProperty(symbol,
+ propSymbol.getName())).getTypeDescriptor()
+ .getTypeSignature());
+ gotProps.put(propSymbol.getName(), propSymbol);
+ }
+
+ assertTrue(gotProps.containsKey("myBean3"));
+ assertTrue(gotProps.containsKey("class"));
+ }
+ // next run recursively on myBean3 10 props deep
+ ISymbol curBase = symbol;
+ // note, when i is even, the property is myBean3 on TestBean2
+ // when i is odd, the property is myBean2 on TestBean3
+ for (int i = 0; i < 10; i++)
+ {
+ final ISymbol[] properties = propResolver.getAllProperties(curBase);
+ assertEquals(2, properties.length); // has class property as well as
+ // expected in it
+ final IPropertySymbol propSymbol =
+ (IPropertySymbol) findSymbol(i % 2 == 0 ? "myBean3"
+ : "myBean2", properties);
+
+ // i is even
+ if (i % 2 == 0)
+ {
+ assertEquals("myBean3", propSymbol.getName());
+ assertEquals("Lcom.test.TestBean3;", propSymbol
+ .getTypeDescriptor().getTypeSignature());
+ curBase = propSymbol;
+ }
+ // i is odd
+ else
+ {
+ assertEquals("myBean2", propSymbol.getName());
+ assertEquals("Lcom.test.TestBean2;", propSymbol
+ .getTypeDescriptor().getTypeSignature());
+ curBase = propSymbol;
+ }
+ curBase = propSymbol;
+ }
+ }
+
+ /**
+ * Test the case where a bean property is of type Map
+ */
+ public void testBeanWithMapProperty()
+ {
+ final IBeanInstanceSymbol symbol =
+ SymbolFactory.eINSTANCE.createIBeanInstanceSymbol();
+ symbol.setName("BeanWithMapProp");
+ final IJavaTypeDescriptor2 typeDesc =
+ SymbolFactory.eINSTANCE.createIJavaTypeDescriptor2();
+ typeDesc.setType(_testBeanWithMapProp);
+ symbol.setTypeDescriptor(typeDesc);
+
+ final DefaultDTPropertyResolver propResolver =
+ new DefaultDTPropertyResolver();
+ propResolver.setProject(_jdtTestEnvironment.getProjectEnvironment().getTestProject());
+ ISymbol[] properties = propResolver.getAllProperties(symbol);
+
+ // should be two properties: mapProp and class
+ assertEquals(2, properties.length);
+ assertNotNull(findSymbol("mapProp", properties));
+ assertEquals(findSymbol("mapProp", properties).getName(), propResolver
+ .getProperty(symbol, "mapProp").getName());
+
+ final IPropertySymbol mapProp =
+ (IPropertySymbol) propResolver.getProperty(symbol, "mapProp");
+ assertEquals("Lcom.test.MapBean;", mapProp.getTypeDescriptor()
+ .getTypeSignature());
+
+ properties = propResolver.getAllProperties(mapProp);
+ assertEquals(0, properties.length);
+
+ final IPropertySymbol unboundedProp =
+ (IPropertySymbol) propResolver.getProperty(mapProp, "foo");
+ assertEquals(TypeConstants.TYPE_JAVAOBJECT, unboundedProp
+ .getTypeDescriptor().getTypeSignature());
+ }
+
+ /**
+ * Verify that bean properties of type array are resolved properly using the
+ * getProperty(base, offset) method.
+ */
+ public void testBeanWithArrayProperty()
+ {
+ final IBeanInstanceSymbol symbol =
+ SymbolFactory.eINSTANCE.createIBeanInstanceSymbol();
+ symbol.setName("BeanWithArrayProp");
+ final IJavaTypeDescriptor2 typeDesc =
+ SymbolFactory.eINSTANCE.createIJavaTypeDescriptor2();
+ typeDesc.setType(_testBean1Type);
+ symbol.setTypeDescriptor(typeDesc);
+
+ final DefaultDTPropertyResolver propResolver =
+ new DefaultDTPropertyResolver();
+ propResolver.setProject(_jdtTestEnvironment.getProjectEnvironment().getTestProject());
+
+ // test array of strings property
+ {
+ final ISymbol arrayOfStringsProperty =
+ propResolver.getProperty(symbol, "stringArrayProperty");
+
+ assertTrue(arrayOfStringsProperty instanceof IPropertySymbol);
+ final IPropertySymbol arrayOfStringsPropertySymbol =
+ (IPropertySymbol) arrayOfStringsProperty;
+ assertEquals(Signature.createArraySignature(
+ TypeConstants.TYPE_STRING, 1), arrayOfStringsPropertySymbol
+ .getTypeDescriptor().getTypeSignature());
+ assertTrue(arrayOfStringsPropertySymbol.getTypeDescriptor()
+ .isArray());
+ assertEquals(TypeConstants.TYPE_STRING,
+ arrayOfStringsPropertySymbol.getTypeDescriptor()
+ .getArrayElement().getTypeDescriptor()
+ .getTypeSignature());
+
+ // now the real property resolver test
+ // get an array element
+ final ISymbol arrayElement =
+ propResolver.getProperty(arrayOfStringsPropertySymbol, 0);
+ assertTrue(arrayElement instanceof IObjectSymbol);
+ final IObjectSymbol arrayElementSymbol =
+ (IObjectSymbol) arrayElement;
+ assertNotNull(((IJavaTypeDescriptor2) arrayElementSymbol
+ .getTypeDescriptor()).getType());
+ assertEquals(TypeConstants.TYPE_STRING, arrayElementSymbol
+ .getTypeDescriptor().getTypeSignature());
+ }
+
+ // test array of int property
+ {
+ final ISymbol arrayOfIntProperty =
+ propResolver.getProperty(symbol, "intArrayProperty");
+
+ assertTrue(arrayOfIntProperty instanceof IPropertySymbol);
+ final IPropertySymbol arrayOfIntPropertySymbol =
+ (IPropertySymbol) arrayOfIntProperty;
+ assertEquals(Signature.createArraySignature(Signature.SIG_INT, 1),
+ arrayOfIntPropertySymbol.getTypeDescriptor()
+ .getTypeSignature());
+ assertTrue(arrayOfIntPropertySymbol.getTypeDescriptor().isArray());
+ assertEquals(Signature.SIG_INT, arrayOfIntPropertySymbol
+ .getTypeDescriptor().getArrayElement().getTypeDescriptor()
+ .getTypeSignature());
+
+ // now the real property resolver test
+ // get an array element
+ final ISymbol arrayElement =
+ propResolver.getProperty(arrayOfIntPropertySymbol, 0);
+ assertTrue(arrayElement instanceof IObjectSymbol);
+ final IObjectSymbol arrayElementSymbol =
+ (IObjectSymbol) arrayElement;
+ // type will be null since int has no corresponding IType (not an
+ // object)
+ assertNull(((IJavaTypeDescriptor2) arrayElementSymbol
+ .getTypeDescriptor()).getType());
+ assertEquals(Signature.SIG_INT, arrayElementSymbol
+ .getTypeDescriptor().getTypeSignature());
+ }
+
+ // test array of array of strings
+ {
+ final ISymbol arrayOfIntProperty =
+ propResolver.getProperty(symbol,
+ "arrayOfArrayOfStringProperty");
+
+ assertTrue(arrayOfIntProperty instanceof IPropertySymbol);
+ final IPropertySymbol arrayOfIntPropertySymbol =
+ (IPropertySymbol) arrayOfIntProperty;
+ assertEquals(Signature.createArraySignature(
+ TypeConstants.TYPE_STRING, 2), arrayOfIntPropertySymbol
+ .getTypeDescriptor().getTypeSignature());
+ assertTrue(arrayOfIntPropertySymbol.getTypeDescriptor().isArray());
+ assertEquals(Signature.createArraySignature(
+ TypeConstants.TYPE_STRING, 1), arrayOfIntPropertySymbol
+ .getTypeDescriptor().getArrayElement().getTypeDescriptor()
+ .getTypeSignature());
+
+ // now the real property resolver test
+ // get an array element
+ final ISymbol arrayElement =
+ propResolver.getProperty(arrayOfIntPropertySymbol, 0);
+ assertTrue(arrayElement instanceof IObjectSymbol);
+ final IObjectSymbol arrayElementSymbol =
+ (IObjectSymbol) arrayElement;
+ assertNotNull(((IJavaTypeDescriptor2) arrayElementSymbol
+ .getTypeDescriptor()).getType());
+ assertEquals(Signature.createArraySignature(
+ TypeConstants.TYPE_STRING, 1), arrayElementSymbol
+ .getTypeDescriptor().getTypeSignature());
+
+ // the elements of the array are arrays themselves
+ assertTrue(arrayElementSymbol.getTypeDescriptor().isArray());
+ final ISymbol arrayElementElement =
+ propResolver.getProperty(arrayElementSymbol, 0);
+ assertTrue(arrayElementElement instanceof IObjectSymbol);
+ final IObjectSymbol arrayElementElementSymbol =
+ (IObjectSymbol) arrayElementElement;
+ assertNotNull(((IJavaTypeDescriptor2) arrayElementElementSymbol
+ .getTypeDescriptor()).getType());
+ assertEquals(TypeConstants.TYPE_STRING, arrayElementElementSymbol
+ .getTypeDescriptor().getTypeSignature());
+ }
+ }
+
+ /**
+ * Test an unconstrained Map bean
+ */
+ public void testListBeanInstanceSymbol()
+ {
+ final IBeanInstanceSymbol symbol =
+ SymbolFactory.eINSTANCE.createIBeanInstanceSymbol();
+ symbol.setName("myListBean");
+ final IJavaTypeDescriptor2 typeDesc =
+ SymbolFactory.eINSTANCE.createIJavaTypeDescriptor2();
+ typeDesc.setType(_testListBeanType);
+ symbol.setTypeDescriptor(typeDesc);
+
+ final DefaultDTPropertyResolver propResolver =
+ new DefaultDTPropertyResolver();
+ propResolver.setProject(_jdtTestEnvironment.getProjectEnvironment().getTestProject());
+ final ISymbol[] properties = propResolver.getAllProperties(symbol);
+
+ // should have no properties since a list won't be treated like
+ // anything but a list
+ assertEquals(0, properties.length);
+
+ // but being that it's an unbounded List, it may have any number
+ // of arbitrary "unconstrained" properties a different indices
+ for (int i = 0; i < 25; i++)
+ {
+ final ISymbol someProperty1 = propResolver.getProperty(symbol, i);
+ assertNotNull(someProperty1);
+ assertTrue(someProperty1 instanceof IPropertySymbol);
+ // completely unconstrained properties should come back as java
+ // object
+ assertEquals(TypeConstants.TYPE_JAVAOBJECT,
+ ((IPropertySymbol) someProperty1).getTypeDescriptor()
+ .getTypeSignature());
+ }
+ }
+
+ /**
+ * Test a property on a bean that is a list
+ */
+ public void testBeanWithListProperty()
+ {
+ final IBeanInstanceSymbol symbol =
+ SymbolFactory.eINSTANCE.createIBeanInstanceSymbol();
+ symbol.setName("beanWithListProp");
+ final IJavaTypeDescriptor2 typeDesc =
+ SymbolFactory.eINSTANCE.createIJavaTypeDescriptor2();
+ typeDesc.setType(_testBeanWithListPropType);
+ symbol.setTypeDescriptor(typeDesc);
+
+ final DefaultDTPropertyResolver propResolver =
+ new DefaultDTPropertyResolver();
+ propResolver.setProject(_jdtTestEnvironment.getProjectEnvironment().getTestProject());
+ ISymbol[] properties = propResolver.getAllProperties(symbol);
+
+ // should be just one property plus Object.class
+ assertEquals(2, properties.length);
+ assertNotNull(findSymbol("listProp", properties));
+ assertEquals(findSymbol("listProp", properties).getName(), propResolver
+ .getProperty(symbol, "listProp").getName());
+
+ final IPropertySymbol listProp =
+ (IPropertySymbol) propResolver.getProperty(symbol, "listProp");
+ assertEquals("Lcom.test.ListBean;", listProp.getTypeDescriptor()
+ .getTypeSignature());
+
+ properties = propResolver.getAllProperties(listProp);
+
+ // has isEmpty and one bean props
+ assertEquals(0, properties.length);
+
+ final IPropertySymbol unboundedProp =
+ (IPropertySymbol) propResolver.getProperty(listProp, 0);
+ assertEquals(TypeConstants.TYPE_JAVAOBJECT, unboundedProp
+ .getTypeDescriptor().getTypeSignature());
+
+ // list base symbols do not have non-numeric keys
+ assertNull(propResolver.getProperty(listProp, "anyKey"));
+ }
+
+ public void testGenericListProperty()
+ {
+ final IBeanInstanceSymbol symbol =
+ SymbolFactory.eINSTANCE.createIBeanInstanceSymbol();
+ symbol.setName("beanWithListProp");
+ final IJavaTypeDescriptor2 typeDesc =
+ SymbolFactory.eINSTANCE.createIJavaTypeDescriptor2();
+ typeDesc.setType(_testBeanWithGenericProperties);
+ symbol.setTypeDescriptor(typeDesc);
+
+ final DefaultDTPropertyResolver propResolver =
+ new DefaultDTPropertyResolver();
+ propResolver.setProject(_jdtTestEnvironment.getProjectEnvironment().getTestProject());
+ ISymbol[] properties = propResolver.getAllProperties(symbol);
+
+ // should be just one property plus Object.class
+ assertEquals(3, properties.length);
+ assertNotNull(findSymbol("listOfStrings", properties));
+ assertEquals(findSymbol("listOfStrings", properties).getName(),
+ propResolver.getProperty(symbol, "listOfStrings").getName());
+
+ final IPropertySymbol listProp =
+ (IPropertySymbol) propResolver.getProperty(symbol,
+ "listOfStrings");
+ assertEquals(TypeConstants.TYPE_LIST, listProp.getTypeDescriptor()
+ .getTypeSignature());
+
+ properties = propResolver.getAllProperties(listProp);
+
+ // has isEmpty and one bean props
+ assertEquals(0, properties.length);
+
+ final IPropertySymbol unboundedProp =
+ (IPropertySymbol) propResolver.getProperty(listProp, 0);
+ assertEquals(TypeConstants.TYPE_STRING, unboundedProp
+ .getTypeDescriptor().getTypeSignature());
+ }
+
+ public void testBoundedTypeDescriptor()
+ {
+ final IComponentSymbol symbol =
+ SymbolFactory.eINSTANCE.createIComponentSymbol();
+ symbol.setName("componentSymbol");
+ final IBoundedMapTypeDescriptor typeDesc =
+ SymbolFactory.eINSTANCE.createIBoundedMapTypeDescriptor();
+ typeDesc.setMapSource(new HashMap<String, String>());
+ symbol.setTypeDescriptor(typeDesc);
+
+ final DefaultDTPropertyResolver propResolver =
+ new DefaultDTPropertyResolver();
+ propResolver.setProject(_jdtTestEnvironment.getProjectEnvironment().getTestProject());
+ final ISymbol propSymbol = propResolver.getProperty(symbol, "anyProp");
+
+ assertNotNull(propSymbol);
+ assertTrue(propSymbol instanceof IPropertySymbol);
+ assertEquals(TypeConstants.TYPE_JAVAOBJECT,
+ ((IPropertySymbol) propSymbol).getTypeDescriptor()
+ .getTypeSignature());
+ }
+
+ public void testDottedPropertyNames() throws Exception
+ {
+ checkDottedBundleNames();
+ // TODO: should add coverage for dotted, non-bundles...
+ }
+
+ private void checkDottedBundleNames() throws Exception
+ {
+ final Map<?, ?> map =
+ ResourceBundleMapSourceFactory.getResourceBundleMapSource(
+ _jdtTestEnvironment.getProjectEnvironment()
+ .getTestProject(), "bundles.bundle1");
+ assertNotNull(map);
+ assertEquals(3, map.size());
+
+ final IMapTypeDescriptor typeDesc =
+ SymbolFactory.eINSTANCE.createIMapTypeDescriptor();
+ typeDesc.setMapSource(map);
+ final IComponentSymbol symbol =
+ SymbolFactory.eINSTANCE.createIComponentSymbol();
+ symbol.setName("dottedMapSource");
+ symbol.setTypeDescriptor(typeDesc);
+
+ final DefaultDTPropertyResolver propResolver =
+ new DefaultDTPropertyResolver();
+ propResolver.setProject(_jdtTestEnvironment.getProjectEnvironment().getTestProject());
+ {
+ ISymbol oneDot = propResolver.getProperty(symbol, "one");
+ assertNotNull(oneDot);
+ assertTrue(oneDot instanceof IPropertySymbol);
+ assertTrue(((IPropertySymbol) oneDot).isIntermediate());
+
+ oneDot = propResolver.getProperty(symbol, "one.dot");
+ assertNotNull(oneDot);
+ assertTrue(oneDot instanceof IPropertySymbol);
+ assertFalse(((IPropertySymbol) oneDot).isIntermediate());
+ }
+
+ {
+ ISymbol twoDots = propResolver.getProperty(symbol, "two");
+ assertNotNull(twoDots);
+ assertTrue(twoDots instanceof IPropertySymbol);
+ assertTrue(((IPropertySymbol) twoDots).isIntermediate());
+
+ twoDots = propResolver.getProperty(symbol, "two.dot");
+ assertNotNull(twoDots);
+ assertTrue(twoDots instanceof IPropertySymbol);
+ assertTrue(((IPropertySymbol) twoDots).isIntermediate());
+
+ twoDots = propResolver.getProperty(symbol, "two.dot.property");
+ assertNotNull(twoDots);
+ assertTrue(twoDots instanceof IPropertySymbol);
+ assertFalse(((IPropertySymbol) twoDots).isIntermediate());
+
+ }
+ }
+
+ private ISymbol findSymbol(final String name, final ISymbol[] symbols)
+ {
+ for (final ISymbol symbol : symbols)
+ {
+ if (symbol.getName().equals(name))
+ {
+ return symbol;
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestDesignTimeApplicationManager.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestDesignTimeApplicationManager.java
new file mode 100644
index 000000000..370676ba9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestDesignTimeApplicationManager.java
@@ -0,0 +1,394 @@
+/*******************************************************************************
+ * 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.designtime.tests;
+
+import java.io.ByteArrayInputStream;
+import java.util.Properties;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.ui.refactoring.RenameSupport;
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
+import org.eclipse.jst.jsf.designtime.DesignTimeApplicationManager;
+import org.eclipse.jst.jsf.designtime.context.DTFacesContext;
+import org.eclipse.jst.jsf.designtime.context.DTJSPExternalContext;
+import org.eclipse.jst.jsf.designtime.context.IDTExternalContext;
+import org.eclipse.jst.jsf.designtime.el.AbstractDTMethodResolver;
+import org.eclipse.jst.jsf.designtime.el.AbstractDTPropertyResolver;
+import org.eclipse.jst.jsf.designtime.el.AbstractDTVariableResolver;
+import org.eclipse.jst.jsf.designtime.el.DefaultDTPropertyResolver;
+import org.eclipse.jst.jsf.designtime.internal.view.DefaultDTViewHandler;
+import org.eclipse.jst.jsf.designtime.internal.view.IDTViewHandler;
+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.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+
+public class TestDesignTimeApplicationManager extends TestCase {
+ private IFile _testJSP;
+ private JSFFacetedTestEnvironment _jsfFactedTestEnvironment;
+ private WebProjectTestEnvironment _webProjectTestEnv;
+ private JDTTestEnvironment _jdtTestEnv;
+
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ JSFTestUtil.setValidationEnabled(false);
+ JSFTestUtil.setInternetProxyPreferences(true,
+ "www-proxy.us.oracle.com", "80");
+
+ _webProjectTestEnv= new WebProjectTestEnvironment(
+ "TestDesignTimeApplicationManager" + getName());
+ _webProjectTestEnv.createProject(false);
+
+ _jdtTestEnv = new JDTTestEnvironment(_webProjectTestEnv);
+
+ final TestFileResource input = new TestFileResource();
+ input.load(DesignTimeTestsPlugin.getDefault().getBundle(),
+ "/testdata/bundle1.resources.data");
+ _jdtTestEnv.addResourceFile("src", new ByteArrayInputStream(
+ input.toBytes()), "bundles", "bundle1.properties");
+
+ final IResource res = _webProjectTestEnv.loadResourceInWebRoot(
+ DesignTimeTestsPlugin.getDefault().getBundle(),
+ "/testdata/testdata1.jsp.data", "testdata1.jsp");
+ _testJSP = (IFile) res;
+
+ _jsfFactedTestEnvironment = new JSFFacetedTestEnvironment(
+ _webProjectTestEnv);
+ _jsfFactedTestEnvironment
+ .initialize(IJSFCoreConstants.FACET_VERSION_1_1);
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ public void testGetFacesContext()
+ {
+ final DesignTimeApplicationManager manager = DesignTimeApplicationManager
+ .getInstance(_testJSP.getProject());
+
+ final DTFacesContext facesContext = manager.getFacesContext(_testJSP);
+ assertNotNull(facesContext);
+
+ // exercise the default locator
+ final IDTExternalContext externalContext =
+ facesContext.getDTExternalContext(_testJSP);
+ assertNotNull(externalContext);
+ assertEquals(_testJSP, facesContext.adaptContextObject());
+ }
+
+ public void testBug147729() throws Exception
+ {
+ // if the project is renamed, it is actually moved. This causes
+ // the IProject to have it's persistent props seemlessly copied,
+ // but the DesignTimeApplicationManager was not being correctly
+ // updated
+ DesignTimeApplicationManager manager =
+ DesignTimeApplicationManager.getInstance(_webProjectTestEnv.getTestProject());
+ assertNotNull(manager.getPropertyResolver());
+
+ manager.setPropertyResolverProvider("my.test.blah");
+ assertEquals("my.test.blah", manager.getPropertyResolverProvider());
+
+ final RenameSupport renameSupport =
+ RenameSupport.create(_jdtTestEnv.getJavaProject(), "RenamedProject"+getName(), RenameSupport.UPDATE_REFERENCES);
+ renameSupport.perform(new Shell(), PlatformUI.getWorkbench().getActiveWorkbenchWindow());
+
+ assertFalse(_jdtTestEnv.getJavaProject().getProject().isAccessible());
+ final IProject project =
+ ResourcesPlugin.getWorkspace().getRoot().getProject("RenamedProject"+getName());
+
+ assertTrue(project.isAccessible());
+
+ manager = DesignTimeApplicationManager.getInstance(project);
+ assertNotNull(manager);
+ // ensure that the resolver provider persistent key gets
+ // transferred after the rename
+ assertEquals("my.test.blah", manager.getPropertyResolverProvider());
+ }
+
+ public void testGetVariableResolver()
+ {
+ final DesignTimeApplicationManager manager = DesignTimeApplicationManager
+ .getInstance(_testJSP.getProject());
+ final AbstractDTVariableResolver variableResolver =
+ manager.getVariableResolver();
+ assertNotNull(variableResolver);
+ }
+
+ public void testGetPropertyResolver()
+ {
+ final DesignTimeApplicationManager manager = DesignTimeApplicationManager
+ .getInstance(_testJSP.getProject());
+ final AbstractDTPropertyResolver propertyResolver = manager
+ .getPropertyResolver();
+ assertNotNull(propertyResolver);
+ }
+
+ public void testGetMethodResolver()
+ {
+ final DesignTimeApplicationManager manager = DesignTimeApplicationManager
+ .getInstance(_testJSP.getProject());
+ final AbstractDTMethodResolver methodResolver = manager
+ .getMethodResolver();
+ assertNotNull(methodResolver);
+ }
+
+ public void testFileWithNoDT()
+ {
+ final DesignTimeApplicationManager manager = DesignTimeApplicationManager
+ .getInstance(_testJSP.getProject());
+ assertNotNull(manager);
+
+ final IFile file1 = _testJSP.getProject().getFile(new Path("fakefile1"));
+ // file object exists but underlying IResource is not
+ assertNotNull(file1);
+ assertFalse(file1.isAccessible());
+
+ // therefore, there will be no dt for this file
+ assertFalse(manager.hasDTFacesContext(file1));
+ assertNull(manager.getFacesContext(file1));
+ }
+
+ public void testGetDefaultPropertyResolver()
+ {
+ final DesignTimeApplicationManager manager = DesignTimeApplicationManager
+ .getInstance(_testJSP.getProject());
+ assertNotNull(manager);
+
+ final AbstractDTPropertyResolver defaultPropertyResolver =
+ manager.getDefaultPropertyResolver();
+ assertNotNull(defaultPropertyResolver);
+ assertTrue(defaultPropertyResolver instanceof DefaultDTPropertyResolver);
+ }
+
+ public void testGetExternalContextProvider()
+ {
+ final DesignTimeApplicationManager manager = DesignTimeApplicationManager
+ .getInstance(_testJSP.getProject());
+ assertNotNull(manager);
+
+ // default value
+ assertEquals("org.eclipse.jst.jsf.core.externalcontext.default"
+ , manager.getExternalContextProvider());
+ }
+
+ public void testGetMethodResolverProvider()
+ {
+ final DesignTimeApplicationManager manager = DesignTimeApplicationManager
+ .getInstance(_testJSP.getProject());
+ assertNotNull(manager);
+
+ // default value
+ assertEquals("org.eclipse.jst.jsf.core.methodresolver.default",
+ manager.getMethodResolverProvider());
+ }
+
+ public void testGetVariableResolverProvider()
+ {
+ final DesignTimeApplicationManager manager = DesignTimeApplicationManager
+ .getInstance(_testJSP.getProject());
+ assertNotNull(manager);
+
+ // default value
+ assertEquals("org.eclipse.jst.jsf.core.variableresolver.default.decorative",
+ manager.getVariableResolverProvider());
+ }
+
+ public void testSetVariableResolverProvider() throws Exception
+ {
+ final DesignTimeApplicationManager manager = DesignTimeApplicationManager
+ .getInstance(_testJSP.getProject());
+ assertNotNull(manager);
+
+ // get the default variable resolver
+ final AbstractDTVariableResolver variableResolver = manager.getVariableResolver();
+
+ manager.setVariableResolverProvider("foo.bar.variableResolver");
+ // default value
+ assertEquals("foo.bar.variableResolver"
+ , manager.getVariableResolverProvider());
+
+ // this should return the same var resolver, since the id is false
+ // and an alternative won't be found
+ assertEquals(variableResolver, manager.getVariableResolver());
+ }
+
+ public void testSetPropertyResolverProvider() throws Exception
+ {
+ final DesignTimeApplicationManager manager = DesignTimeApplicationManager
+ .getInstance(_testJSP.getProject());
+ assertNotNull(manager);
+
+ // get the default property resolver
+ final AbstractDTPropertyResolver propertyResolver = manager.getPropertyResolver();
+
+ manager.setPropertyResolverProvider("foo.bar.propertyResolver");
+ // default value
+ assertEquals("foo.bar.propertyResolver"
+ , manager.getPropertyResolverProvider());
+
+ // this should return the same property resolver, since the id is false
+ // and an alternative won't be found
+ assertEquals(propertyResolver, manager.getPropertyResolver());
+ }
+
+ public void testSetMethodResolverProvider() throws Exception
+ {
+ final DesignTimeApplicationManager manager = DesignTimeApplicationManager
+ .getInstance(_testJSP.getProject());
+ assertNotNull(manager);
+
+ // get the default method resolver
+ final AbstractDTMethodResolver methodResolver = manager.getMethodResolver();
+
+ manager.setMethodResolverProvider("foo.bar.methodResolver");
+ // default value
+ assertEquals("foo.bar.methodResolver"
+ , manager.getMethodResolverProvider());
+
+ // this should return the same method resolver, since the id is false
+ // and an alternative won't be found
+ assertEquals(methodResolver, manager.getMethodResolver());
+ }
+
+ public void testSetExternalContextProvider() throws Exception
+ {
+ final DesignTimeApplicationManager manager = DesignTimeApplicationManager
+ .getInstance(_testJSP.getProject());
+ assertNotNull(manager);
+
+ // get the default external context
+ final DTFacesContext facesContext = manager.getFacesContext(_testJSP);
+ final IDTExternalContext externalContext =
+ facesContext.getDTExternalContext(_testJSP);
+ assertTrue(externalContext instanceof DTJSPExternalContext);
+
+ manager.setExternalContextProvider("foo.bar.externalContextLocator");
+ // default value
+ assertEquals("foo.bar.externalContextLocator"
+ , manager.getExternalContextProvider());
+
+ // this should return the same external context, since the id is false
+ // and an alternative won't be found
+ assertTrue(facesContext.getDTExternalContext(_testJSP) instanceof DTJSPExternalContext);
+ }
+
+ public void testGetPropertyResolverProvider()
+ {
+ final DesignTimeApplicationManager manager = DesignTimeApplicationManager
+ .getInstance(_testJSP.getProject());
+ assertNotNull(manager);
+
+ // default value
+ assertEquals(
+ "org.eclipse.jst.jsf.core.propertyresolver.default.decorative",
+ manager.getPropertyResolverProvider());
+ }
+
+ public void testGetViewHandler()
+ {
+ final DesignTimeApplicationManager manager = DesignTimeApplicationManager
+ .getInstance(_testJSP.getProject());
+ assertNotNull(manager);
+
+ IDTViewHandler viewHandler = manager.getViewHandler();
+ assertNotNull(viewHandler);
+ assertTrue(viewHandler instanceof DefaultDTViewHandler);
+
+ }
+
+ public void testSetViewHandler() throws Exception
+ {
+ final DesignTimeApplicationManager manager = DesignTimeApplicationManager
+ .getInstance(_testJSP.getProject());
+ assertNotNull(manager);
+
+ final IFile settingsFile = getSettingsFile(_testJSP.getProject());
+ assertFalse(settingsFile.isAccessible());
+
+ manager.setViewHandlerId("foobar.chicken.on.a.bun");
+ assertTrue(settingsFile.isAccessible());
+
+ Properties props = new Properties();
+ props.load(settingsFile.getContents());
+ assertEquals("foobar.chicken.on.a.bun", props.getProperty("ViewHandler"));
+ }
+
+ public void testSetAndReloadSettings() throws Exception
+ {
+ final IProject project = _testJSP.getProject();
+ final DesignTimeApplicationManager manager = DesignTimeApplicationManager
+ .getInstance(project);
+ assertNotNull(manager);
+
+ final IFile settingsFile = getSettingsFile(project);
+ assertFalse(settingsFile.isAccessible());
+
+ manager.setViewHandlerId("foobar.chicken.on.a.bun");
+ assertTrue(settingsFile.isAccessible());
+
+ Properties props = new Properties();
+ props.load(settingsFile.getContents());
+ assertEquals("foobar.chicken.on.a.bun", props.getProperty("ViewHandler"));
+
+ // now, close and reopen the project
+ project.close(null);
+ assertFalse(project.isOpen());
+ project.open(null);
+ assertTrue(project.isOpen());
+
+ final DesignTimeApplicationManager newManager = DesignTimeApplicationManager
+ .getInstance(project);
+ assertNotNull(newManager.getViewHandler());
+ }
+
+ private static IFile getSettingsFile(final IProject project)
+ {
+ return project.getFolder(new Path(".settings")).getFile("org.eclipse.jst.jsf.designtime.appmgr.prefs");
+ }
+
+ // public void testSetExternalContextProvider()
+ // {
+ // final DesignTimeApplicationManager manager =
+ // DesignTimeApplicationManager.getInstance(_testJSP.getProject());
+ //
+ // manager.setExternalContextProvider(resolverPluginId);
+ // }
+ //
+ // public void testGetExternalContextProvider() {
+ // //fail("Not yet implemented");
+ // }
+ //
+ // public void testSetVariableResolverProvider() {
+ // //fail("Not yet implemented");
+ // }
+ // public void testSetPropertyResolverProvider() {
+ // //fail("Not yet implemented");
+ // }
+ //
+ // public void testSetMethodResolverProvider() {
+ // //fail("Not yet implemented");
+ // }
+ //
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestJSF20DefaultBeanSymbolSourceProvider.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestJSF20DefaultBeanSymbolSourceProvider.java
new file mode 100644
index 000000000..97a95f5aa
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestJSF20DefaultBeanSymbolSourceProvider.java
@@ -0,0 +1,212 @@
+/*******************************************************************************
+ * 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.designtime.tests;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jst.common.project.facet.core.JavaFacet;
+import org.eclipse.jst.jsf.context.symbol.ISymbol;
+import org.eclipse.jst.jsf.context.symbol.source.ISymbolConstants;
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.core.tests.TestsPlugin;
+import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
+import org.eclipse.jst.jsf.designtime.symbols.DefaultBeanSymbolSourceProvider;
+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.project.facet.core.ProjectFacetsManager;
+
+/**
+ * JUnit tests for org.eclipse.jst.jsf.designtime.DefaultBeanSymbolSourceProvider
+ *
+ * @author cbateman
+ *
+ */
+public class TestJSF20DefaultBeanSymbolSourceProvider extends TestCase
+{
+ private JDTTestEnvironment _jdtTestEnvironment;
+ private JSFFacetedTestEnvironment _jsfFactedTestEnvironment;
+ private IFile _facesConfigFile;
+
+ private final static String SRC_FOLDER_NAME = "src";
+ private final static String PACKAGE_NAME = "com.test";
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ JSFTestUtil.setValidationEnabled(false);
+ JSFTestUtil.setInternetProxyPreferences(true, "www-proxy.uk.oracle.com","80");
+
+ final WebProjectTestEnvironment projectTestEnvironment =
+ new WebProjectTestEnvironment("TestJSF20DefaultBeanSymbolSourceProvider_"+getName(), JavaFacet.VERSION_1_5, ProjectFacetsManager.getProjectFacet( "jst.web" ).getVersion("2.5"));
+ projectTestEnvironment.createProject(false);
+ _facesConfigFile = (IFile) projectTestEnvironment.
+ loadResourceInWebRoot(DesignTimeTestsPlugin.getDefault().getBundle(),
+ "/testdata/faces-config_2_0.xml.data",
+ "/WEB-INF/faces-config.xml");
+
+ _jsfFactedTestEnvironment = new JSFFacetedTestEnvironment(projectTestEnvironment);
+ _jsfFactedTestEnvironment.initialize(IJSFCoreConstants.FACET_VERSION_2_0);
+
+ _jdtTestEnvironment = new JDTTestEnvironment(projectTestEnvironment);
+
+ JSFTestUtil.loadSourceClass(
+ TestsPlugin.getDefault().getBundle(),
+ "/testfiles/TestBean1.java.data", "TestBean1", SRC_FOLDER_NAME, PACKAGE_NAME, _jdtTestEnvironment);
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ }
+
+ /**
+ * Test the external sanity of the suite (i.e. that the test data is in sync)
+ */
+ public void testSanity()
+ {
+ final DefaultBeanSymbolSourceProvider provider =
+ DefaultBeanSymbolSourceProvider.getInstance();
+
+ final ISymbol[] symbol =
+ provider.getSymbols(_facesConfigFile, ISymbolConstants.SYMBOL_SCOPE_ALL);
+
+ assertNotNull(symbol);
+ assertEquals("Check that test suite is in sync with setup()", symbol.length, 5);
+ }
+
+ /**
+ *
+ */
+ public void testAllScopes()
+ {
+ final String[] names = new String[]{"myBean_request", "myBean_session", "myBean_application", "myBean_none", "myBean_view"};
+ testScopeBeans(ISymbolConstants.SYMBOL_SCOPE_ALL, names.length, names);
+ }
+
+ /**
+ * Check mask by request scope
+ */
+ public void testOnlyRequestBeans()
+ {
+ final String[] names = new String[]{"myBean_request"};
+ testScopeBeans(ISymbolConstants.SYMBOL_SCOPE_REQUEST, names.length, names);
+ }
+
+ /**
+ * Check mask by Session scope
+ */
+ public void testOnlySessionBeans()
+ {
+ final String[] names = new String[]{"myBean_session"};
+ testScopeBeans(ISymbolConstants.SYMBOL_SCOPE_SESSION, names.length, names);
+ }
+
+ /**
+ * Check mask by Application scope
+ */
+ public void testOnlyApplicationBeans()
+ {
+ final String[] names = new String[]{"myBean_application"};
+ testScopeBeans(ISymbolConstants.SYMBOL_SCOPE_APPLICATION, names.length, names);
+ }
+ /**
+ * Check mask by None scope
+ */
+ public void testOnlyNoneBeans()
+ {
+ final String[] names = new String[]{"myBean_none"};
+ testScopeBeans(ISymbolConstants.SYMBOL_SCOPE_NONE, names.length, names);
+ }
+
+ /**
+ * Check mask by View scope
+ */
+ public void testOnlyViewBeans()
+ {
+ final String[] names = new String[]{"myBean_view"};
+ testScopeBeans(ISymbolConstants.SYMBOL_SCOPE_VIEW, names.length, names);
+ }
+
+ private void testScopeBeans(final int scope, final int expectedSize, final String[] expectedNames)
+ {
+ final DefaultBeanSymbolSourceProvider provider =
+ DefaultBeanSymbolSourceProvider.getInstance();
+
+ final ISymbol[] symbols =
+ provider.getSymbols(_facesConfigFile, scope);
+
+ assertEquals(expectedSize, symbols.length);
+
+ for (int j = 0; j < expectedNames.length; j++)
+ {
+ final String expectedName = expectedNames[j];
+ assertNotNull(expectedName);
+ boolean found = false;
+
+ FIND_IN_SYMBOLS:
+ for (int i = 0; i < symbols.length; i++)
+ {
+ if (expectedName.equals(symbols[i].getName()))
+ {
+ found = true;
+ break FIND_IN_SYMBOLS;
+ }
+ }
+
+ assertTrue(found);
+ }
+ }
+
+ /**
+ * Test the get symbol by prefix
+ */
+ public void testPrefixSearch()
+ {
+ final DefaultBeanSymbolSourceProvider provider =
+ DefaultBeanSymbolSourceProvider.getInstance();
+
+ final ISymbol[] symbols =
+ provider.getSymbols("myBean_n", _facesConfigFile, ISymbolConstants.SYMBOL_SCOPE_ALL);
+
+ assertEquals(1, symbols.length);
+ assertEquals("myBean_none", symbols[0].getName());
+ }
+
+ /**
+ * Test getting a symbol it's name
+ */
+ public void testGetSymbolByName()
+ {
+ testGetSymbolByName("myBean_none");
+ testGetSymbolByName("myBean_application");
+ testGetSymbolByName("myBean_session");
+ testGetSymbolByName("myBean_request");
+ testGetSymbolByName("myBean_view");
+ }
+
+ private void testGetSymbolByName(final String expectedName)
+ {
+ final DefaultBeanSymbolSourceProvider provider =
+ DefaultBeanSymbolSourceProvider.getInstance();
+
+ final ISymbol symbol =
+ provider.getSymbol(expectedName, _facesConfigFile,
+ ISymbolConstants.SYMBOL_SCOPE_ALL);
+
+ assertNotNull(symbol);
+ assertEquals(expectedName, symbol.getName());
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestJSF20ImplicitVariables.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestJSF20ImplicitVariables.java
new file mode 100644
index 000000000..f5171e61c
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestJSF20ImplicitVariables.java
@@ -0,0 +1,261 @@
+package org.eclipse.jst.jsf.designtime.tests;
+
+
+import java.io.ByteArrayInputStream;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jst.common.project.facet.core.JavaFacet;
+import org.eclipse.jst.jsf.context.symbol.ERuntimeSource;
+import org.eclipse.jst.jsf.context.symbol.IBoundedMapTypeDescriptor;
+import org.eclipse.jst.jsf.context.symbol.IInstanceSymbol;
+import org.eclipse.jst.jsf.context.symbol.ISymbol;
+import org.eclipse.jst.jsf.context.symbol.ITypeDescriptor;
+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.designtime.DesignTimeApplicationManager;
+import org.eclipse.jst.jsf.designtime.context.DTFacesContext;
+import org.eclipse.jst.jsf.designtime.el.DefaultDTPropertyResolver;
+import org.eclipse.jst.jsf.designtime.el.DefaultDTVariableResolver;
+import org.eclipse.jst.jsf.designtime.symbols.DefaultBuiltInSymbolProvider;
+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.ManagedBeanScopeType;
+import org.eclipse.jst.jsf.facesconfig.emf.ManagedBeanType;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+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.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.junit.Before;
+
+/**
+ * Tests the implicit JSF2.0 variables excercising {@link DefaultBuiltInSymbolProvider}, {@link DefaultDTVariableResolver}, and {@link DefaultDTPropertyResolver}
+ *
+ */
+public class TestJSF20ImplicitVariables extends TestCase
+{
+ private IType _testBean1Type;
+ private JSFFacetedTestEnvironment _jsfFactedTestEnvironment;
+ private JDTTestEnvironment _jdtTestEnvironment;
+ private IFile _testJSP1;
+
+ private final static String SRC_FOLDER_NAME = "src";
+ private final static String PACKAGE_NAME = "com.test";
+ private final static String TESTBEAN1_NAME = "TestBean1";
+ private static final String ATTRS_SYMBOL_NAME = "attrs";
+
+ @Before
+ public void setUp() throws Exception {
+ super.setUp();
+ JSFTestUtil.setValidationEnabled(false);
+ JSFTestUtil.setInternetProxyPreferences(true, "www-proxy.us.oracle.com","80");
+
+ final WebProjectTestEnvironment projectTestEnvironment =
+ new WebProjectTestEnvironment("TestJSF20ImplicitVariables_"+getName(), JavaFacet.VERSION_1_5, ProjectFacetsManager.getProjectFacet( "jst.web" ).getVersion("2.5"));
+ projectTestEnvironment.createProject(true);
+
+ final IResource res = projectTestEnvironment.loadResourceInWebRoot(DesignTimeTestsPlugin.getDefault().getBundle()
+ , "/testdata/testdata1.jsp.data", "testdata1.jsp");
+ _testJSP1 = (IFile) res;
+
+ _jsfFactedTestEnvironment = new JSFFacetedTestEnvironment(projectTestEnvironment);
+ _jsfFactedTestEnvironment.initialize(IJSFCoreConstants.FACET_VERSION_2_0);
+
+ final IProject project = projectTestEnvironment.getTestProject();
+
+ FacesConfigArtifactEdit edit = null;
+
+ try
+ {
+ edit = FacesConfigArtifactEdit.getFacesConfigArtifactEditForWrite(project, null);
+
+ final FacesConfigType model = edit.getFacesConfig();
+ final ManagedBeanClassType beanClass = FacesConfigFactory.eINSTANCE.createManagedBeanClassType();
+ beanClass.setTextContent("com.test.TestBean1");
+
+ final ManagedBeanNameType beanName = FacesConfigFactory.eINSTANCE.createManagedBeanNameType();
+ beanName.setTextContent("testBean1");
+
+ final ManagedBeanScopeType beanScope = FacesConfigFactory.eINSTANCE.createManagedBeanScopeType();
+ beanScope.setTextContent("session");
+
+ final ManagedBeanType bean = FacesConfigFactory.eINSTANCE.createManagedBeanType();
+ bean.setManagedBeanClass(beanClass);
+ bean.setManagedBeanName(beanName);
+ bean.setManagedBeanScope(beanScope);
+
+ model.getManagedBean().add(bean);
+
+ edit.save(null);
+ }
+ finally
+ {
+ if (edit != null)
+ {
+ edit.dispose();
+ }
+ }
+ _jdtTestEnvironment = new JDTTestEnvironment(projectTestEnvironment);
+
+ final TestFileResource input = new TestFileResource();
+ input.load(DesignTimeTestsPlugin.getDefault().getBundle(),
+ "/testdata/bundle1.resources.data");
+ _jdtTestEnvironment.addResourceFile("src"
+ , new ByteArrayInputStream(input.toBytes())
+ , "bundles", "bundle1.properties");
+
+ JSFTestUtil.loadSourceClass(
+ DesignTimeTestsPlugin.getDefault().getBundle(),
+ "/testdata/TestBean1.java.data", TESTBEAN1_NAME, SRC_FOLDER_NAME, PACKAGE_NAME, _jdtTestEnvironment);
+ _testBean1Type = _jdtTestEnvironment.getJavaProject().findType(PACKAGE_NAME+"."+TESTBEAN1_NAME);
+ assertNotNull(_testBean1Type);
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(JSFCoreUtilHelper.createSimpleRegistryFactory());
+
+ }
+
+ public void testCCSymbol() {
+ DefaultDTVariableResolver resolver = new DefaultDTVariableResolver();
+ DTFacesContext context = DesignTimeApplicationManager.getInstance(_jdtTestEnvironment.getJavaProject().getProject()).getFacesContext(_testJSP1);
+ ISymbol symbol = resolver.resolveVariable(context, "cc", _testJSP1);
+ assertNotNull(symbol);
+ assertTrue(symbol instanceof IInstanceSymbol);
+ assertEquals(ERuntimeSource.BUILT_IN_SYMBOL_LITERAL, ((IInstanceSymbol)symbol).getRuntimeSource());
+
+ DefaultDTPropertyResolver propresolver = new DefaultDTPropertyResolver();
+ propresolver.setProject(_jdtTestEnvironment.getProjectEnvironment().getTestProject());
+ ISymbol[] props = propresolver.getAllProperties(symbol);
+ assertContainsVariable(props, ATTRS_SYMBOL_NAME);
+// assertContainsVariable(props, "attributes"); //need real jars on cp
+
+ //tests "attrs"
+ ISymbol propSymbol = propresolver.getProperty(symbol, ATTRS_SYMBOL_NAME);
+ assertNotNull(propSymbol);
+ assertTrue(propSymbol instanceof IInstanceSymbol);
+ ITypeDescriptor typeDesc = ((IInstanceSymbol)propSymbol).getTypeDescriptor();
+ assertTrue(typeDesc instanceof IBoundedMapTypeDescriptor);
+
+// assertNull(propresolver.getProperty(symbol, "unknown"));
+ }
+
+ public void testComponentSymbol() {
+ DefaultDTVariableResolver resolver = new DefaultDTVariableResolver();
+ DTFacesContext context = DesignTimeApplicationManager.getInstance(_jdtTestEnvironment.getJavaProject().getProject()).getFacesContext(_testJSP1);
+ ISymbol symbol = resolver.resolveVariable(context, "component", _testJSP1);
+ assertNotNull(symbol);
+ assertTrue(symbol instanceof IInstanceSymbol);
+ assertEquals(ERuntimeSource.BUILT_IN_SYMBOL_LITERAL, ((IInstanceSymbol)symbol).getRuntimeSource());
+
+ DefaultDTPropertyResolver propresolver = new DefaultDTPropertyResolver();
+ propresolver.setProject(_jdtTestEnvironment.getProjectEnvironment().getTestProject());
+ ISymbol[] props = propresolver.getAllProperties(symbol);
+ assertContainsVariable(props, ATTRS_SYMBOL_NAME);
+// assertContainsVariable(props, "attributes"); //need real jars on cp
+
+ //tests "attrs" for component
+ ISymbol propSymbol = propresolver.getProperty(symbol, ATTRS_SYMBOL_NAME);
+ assertNotNull(propSymbol);
+ assertTrue(propSymbol instanceof IInstanceSymbol);
+ ITypeDescriptor typeDesc = ((IInstanceSymbol)propSymbol).getTypeDescriptor();
+ assertTrue(typeDesc instanceof IBoundedMapTypeDescriptor);
+
+// assertNull(propresolver.getProperty(symbol, "unknown"));
+
+ }
+
+ public void testResourceSymbol() {
+ DefaultDTVariableResolver resolver = new DefaultDTVariableResolver();
+ DTFacesContext context = DesignTimeApplicationManager.getInstance(_jdtTestEnvironment.getJavaProject().getProject()).getFacesContext(_testJSP1);
+ ISymbol symbol = resolver.resolveVariable(context, "resource", _testJSP1);
+ assertNotNull(symbol);
+ assertTrue(symbol instanceof IInstanceSymbol);
+ assertEquals(ERuntimeSource.BUILT_IN_SYMBOL_LITERAL, ((IInstanceSymbol)symbol).getRuntimeSource());
+ ITypeDescriptor typeDesc = ((IInstanceSymbol)symbol).getTypeDescriptor();
+ assertTrue(typeDesc instanceof IBoundedMapTypeDescriptor);
+ }
+
+ public void testViewScopeSymbol() {
+ DefaultDTVariableResolver resolver = new DefaultDTVariableResolver();
+ DTFacesContext context = DesignTimeApplicationManager.getInstance(_jdtTestEnvironment.getJavaProject().getProject()).getFacesContext(_testJSP1);
+ ISymbol symbol = resolver.resolveVariable(context, "viewScope", _testJSP1);
+ assertNotNull(symbol);
+ assertTrue(symbol instanceof IInstanceSymbol);
+ assertEquals(ERuntimeSource.BUILT_IN_SYMBOL_LITERAL, ((IInstanceSymbol)symbol).getRuntimeSource());
+ ITypeDescriptor typeDesc = ((IInstanceSymbol)symbol).getTypeDescriptor();
+ assertTrue(typeDesc instanceof IBoundedMapTypeDescriptor);
+
+ }
+
+ public void testFlashScopeSymbol() {
+ DefaultDTVariableResolver resolver = new DefaultDTVariableResolver();
+ DTFacesContext context = DesignTimeApplicationManager.getInstance(_jdtTestEnvironment.getJavaProject().getProject()).getFacesContext(_testJSP1);
+ ISymbol symbol = resolver.resolveVariable(context, "flash", _testJSP1);
+ assertNotNull(symbol);
+ assertTrue(symbol instanceof IInstanceSymbol);
+ assertEquals(ERuntimeSource.BUILT_IN_SYMBOL_LITERAL, ((IInstanceSymbol)symbol).getRuntimeSource());
+ ITypeDescriptor typeDesc = ((IInstanceSymbol)symbol).getTypeDescriptor();
+ assertTrue(typeDesc instanceof IBoundedMapTypeDescriptor);
+ }
+
+ public void testGetAllVariables()
+ {
+ final DesignTimeApplicationManager manager =
+ DesignTimeApplicationManager.getInstance
+ (_jdtTestEnvironment.getProjectEnvironment().getTestProject());
+
+ final DefaultDTVariableResolver variableResolver = new DefaultDTVariableResolver();
+
+ final ISymbol[] variables = variableResolver.getAllVariables
+ (manager.getFacesContext(_testJSP1), _testJSP1);
+
+ assertEquals(19, variables.length);
+
+ //jsf1.x - implicits
+ assertContainsVariable(variables, "applicationScope");
+ assertContainsVariable(variables, "sessionScope");
+ assertContainsVariable(variables, "requestScope");
+ assertContainsVariable(variables, "cookie");
+ assertContainsVariable(variables, "facesContext");
+ assertContainsVariable(variables, "header");
+ assertContainsVariable(variables, "headerValues");
+ assertContainsVariable(variables, "initParam");
+ assertContainsVariable(variables, "param");
+ assertContainsVariable(variables, "paramValues");
+ assertContainsVariable(variables, "view");
+
+ //jsf2.0 - implicits
+ assertContainsVariable(variables, "viewScope");
+ assertContainsVariable(variables, "flash");
+ assertContainsVariable(variables, "cc");
+ assertContainsVariable(variables, "component");
+ assertContainsVariable(variables, "resource");
+
+ //external
+ assertContainsVariable(variables, "testBean1");
+ assertContainsVariable(variables, "bundle");
+ assertContainsVariable(variables, "row");
+
+ }
+
+ private void assertContainsVariable(final ISymbol[] variables, final String name)
+ {
+ for (final ISymbol variable : variables)
+ {
+ if (name.equals(variable.getName()))
+ {
+ assertTrue(variable instanceof IInstanceSymbol);
+ return;
+ }
+ }
+
+ fail("Expected variable not found: "+name);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestJSPDefaultSymbolFactory.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestJSPDefaultSymbolFactory.java
new file mode 100644
index 000000000..d4ba8d090
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestJSPDefaultSymbolFactory.java
@@ -0,0 +1,132 @@
+/*******************************************************************************
+ * 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.designtime.tests;
+
+import java.io.ByteArrayInputStream;
+import java.util.ArrayList;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext;
+import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContextFactory;
+import org.eclipse.jst.jsf.context.symbol.IInstanceSymbol;
+import org.eclipse.jst.jsf.context.symbol.ISymbol;
+import org.eclipse.jst.jsf.context.symbol.source.ISymbolConstants;
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
+import org.eclipse.jst.jsf.designtime.internal.jsp.JSPDefaultSymbolFactory;
+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.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+
+public class TestJSPDefaultSymbolFactory extends TestCase
+{
+ private IFile _testJSP;
+ private JSFFacetedTestEnvironment _jsfFactedTestEnvironment;
+ private IStructuredModel _structuredModel;
+ private IStructuredDocument _structuredDocument;
+
+ @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("TestJSPDefaultSymbolFactory_"+getName());
+ projectTestEnvironment.createProject(false);
+
+ final JDTTestEnvironment jdtTestEnvironment =
+ new JDTTestEnvironment(projectTestEnvironment);
+
+ final TestFileResource input = new TestFileResource();
+ input.load(DesignTimeTestsPlugin.getDefault().getBundle(),
+ "/testdata/bundle1.resources.data");
+ jdtTestEnvironment.addResourceFile("src"
+ , new ByteArrayInputStream(input.toBytes())
+ , "bundles", "bundle1.properties");
+
+ final IResource res =
+ projectTestEnvironment.loadResourceInWebRoot(DesignTimeTestsPlugin.getDefault().getBundle()
+ , "/testdata/testdata1.jsp.data", "testdata1.jsp");
+ _testJSP = (IFile) res;
+
+ _jsfFactedTestEnvironment = new JSFFacetedTestEnvironment(projectTestEnvironment);
+ _jsfFactedTestEnvironment.initialize(IJSFCoreConstants.FACET_VERSION_1_1);
+
+ _structuredModel = StructuredModelManager.getModelManager().getModelForRead(_testJSP);
+ _structuredDocument = _structuredModel.getStructuredDocument();
+
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ _structuredModel.releaseFromRead();
+ }
+
+ public void testSupports()
+ {
+ final JSPDefaultSymbolFactory factory = new JSPDefaultSymbolFactory();
+
+ // must be a structured document context
+ assertFalse(factory.supports(_testJSP));
+
+ final IStructuredDocumentContext context =
+ IStructuredDocumentContextFactory.INSTANCE
+ .getContext(_structuredDocument, 0);
+
+ // must work for a JSP document context
+ assertTrue(factory.supports(context));
+ }
+
+ public void testCreate()
+ {
+ final JSPDefaultSymbolFactory factory = new JSPDefaultSymbolFactory();
+
+ final IStructuredDocumentContext context =
+ IStructuredDocumentContextFactory.INSTANCE
+ .getContext(_structuredDocument, 0);
+
+ ISymbol var =
+ factory.create("notAVariable"
+ , ISymbolConstants.SYMBOL_SCOPE_REQUEST, context, new ArrayList<Object>(), null);
+ assertNull(var);
+
+ var = factory.create("bundle"
+ , ISymbolConstants.SYMBOL_SCOPE_REQUEST
+ , IStructuredDocumentContextFactory.INSTANCE.getContext(_structuredDocument, 552)
+ , new ArrayList<Object>(), null);
+
+ // load bundle introduces a variable
+ assertNotNull(var);
+ assertTrue(var instanceof IInstanceSymbol);
+ assertEquals("bundle", var.getName());
+
+ var = factory.create("row"
+ , ISymbolConstants.SYMBOL_SCOPE_REQUEST
+ , IStructuredDocumentContextFactory.INSTANCE.getContext(_structuredDocument, 1361)
+ , new ArrayList<Object>(), null);
+
+ // data table introduces a variable
+ assertNotNull(var);
+ assertTrue(var instanceof IInstanceSymbol);
+ assertEquals("row", var.getName());
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestJSPModelProcessor.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestJSPModelProcessor.java
new file mode 100644
index 000000000..a92493e4e
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestJSPModelProcessor.java
@@ -0,0 +1,392 @@
+/*******************************************************************************
+ * 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.designtime.tests;
+
+import java.io.ByteArrayInputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Random;
+import java.util.Set;
+import java.util.TreeSet;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jst.jsf.context.symbol.ISymbol;
+import org.eclipse.jst.jsf.context.symbol.source.ISymbolConstants;
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
+import org.eclipse.jst.jsf.designtime.internal.jsp.JSPModelProcessor;
+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.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+
+public class TestJSPModelProcessor extends TestCase
+{
+ private static final int NUM_JSPS = 25;
+ private static final int WAIT_ITERATIONS = 50;
+ private static final int WAIT_SLEEP_TIME_MS = 100;
+
+ private IFile _testJSP1;
+ private List<IFile> _jsps;
+
+ private JSFFacetedTestEnvironment _jsfFactedTestEnvironment;
+
+ @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("TestJSPModelProcessor_"+getName());
+ projectTestEnvironment.createProject(false);
+
+ final JDTTestEnvironment jdtTestEnvironment =
+ new JDTTestEnvironment(projectTestEnvironment);
+
+ final TestFileResource input = new TestFileResource();
+ input.load(DesignTimeTestsPlugin.getDefault().getBundle(),
+ "/testdata/bundle1.resources.data");
+ jdtTestEnvironment.addResourceFile("src"
+ , new ByteArrayInputStream(input.toBytes())
+ , "bundles", "bundle1.properties");
+
+ _testJSP1 = (IFile) projectTestEnvironment.loadResourceInWebRoot(DesignTimeTestsPlugin.getDefault().getBundle()
+ , "/testdata/testdata1.jsp.data", "testdata1.jsp");
+
+ _jsps = new ArrayList<IFile>(NUM_JSPS);
+ for (int i = 0; i < NUM_JSPS; i++)
+ {
+ _jsps.add((IFile) projectTestEnvironment.loadResourceInWebRoot(DesignTimeTestsPlugin.getDefault().getBundle()
+ , "/testdata/testdata1.jsp.data", "testdata_"+i+".jsp"));
+ }
+
+ _jsfFactedTestEnvironment = new JSFFacetedTestEnvironment(projectTestEnvironment);
+ _jsfFactedTestEnvironment.initialize(IJSFCoreConstants.FACET_VERSION_1_1);
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ }
+
+ public void testGet() throws Exception
+ {
+ final JSPModelProcessor processor = JSPModelProcessor.get(_testJSP1);
+ assertNotNull(processor);
+ assertFalse(processor.isDisposed());
+ }
+
+ public void testGetMapForScope() throws Exception
+ {
+ // if we not refreshed yet, then should be no symbols
+ final JSPModelProcessor processor = JSPModelProcessor.get(_testJSP1);
+ assertNotNull(processor);
+
+ Map<Object, ISymbol> scopeMap =
+ processor.getMapForScope(ISymbolConstants.SYMBOL_SCOPE_REQUEST_STRING);
+ assertTrue(scopeMap.isEmpty());
+
+ scopeMap =
+ processor.getMapForScope(ISymbolConstants.SYMBOL_SCOPE_SESSION_STRING);
+ assertTrue(scopeMap.isEmpty());
+
+ scopeMap =
+ processor.getMapForScope(ISymbolConstants.SYMBOL_SCOPE_APPLICATION_STRING);
+ assertTrue(scopeMap.isEmpty());
+
+ scopeMap =
+ processor.getMapForScope(ISymbolConstants.SYMBOL_SCOPE_NONE_STRING);
+ assertTrue(scopeMap.isEmpty());
+ }
+
+ public void testRefreshAndGet() throws Exception
+ {
+ final IModelManager modelManager = StructuredModelManager.getModelManager();
+
+ IStructuredModel model = null;
+
+ try
+ {
+ model = modelManager.getModelForRead(_testJSP1);
+
+ // we should be the only one with a handle
+ System.out.println(model.getReferenceCountForRead());
+ assertFalse(model.isSharedForRead());
+
+ // if we not refreshed yet, then should be no symbols
+ final JSPModelProcessor processor = JSPModelProcessor.get(_testJSP1);
+ assertNotNull(processor);
+ System.out.println(model.getReferenceCountForRead());
+ // we should be the only one with a handle
+ assertFalse(model.isSharedForRead());
+
+ Map<Object, ISymbol> scopeMap =
+ processor.getMapForScope(ISymbolConstants.SYMBOL_SCOPE_REQUEST_STRING);
+ assertTrue(scopeMap.isEmpty());
+ System.out.println(model.getReferenceCountForRead());
+ // we should be the only one with a handle
+ assertFalse(model.isSharedForRead());
+
+ processor.refresh(!JSPModelProcessor.FORCE_REFRESH, JSPModelProcessor.RUN_ON_CURRENT_THREAD);
+ System.out.println(model.getReferenceCountForRead());
+ // we should be the only one with a handle
+ assertFalse(model.isSharedForRead());
+
+ // after refresh we should have a symbol for the loadBundle and the dataTable
+ scopeMap =
+ processor.getMapForScope(ISymbolConstants.SYMBOL_SCOPE_REQUEST_STRING);
+ assertFalse(scopeMap.isEmpty());
+ assertEquals(2, scopeMap.size());
+
+ // we should be the only one with a handle
+ System.out.println(model.getReferenceCountForRead());
+ assertFalse(model.isSharedForRead());
+ }
+ finally
+ {
+ if (model != null)
+ {
+ model.releaseFromRead();
+ }
+ }
+ }
+
+ public void testFileDeletion_RegressionBug199480() throws Exception
+ {
+ // Regression for bug 199480
+ // ensure that the deletion of a resource with a JSPModelProcessor
+ // on it without an editor close event is still disposed of due
+ // to the resource change event.
+ // if we not refreshed yet, then should be no symbols
+ final JSPModelProcessor processor = JSPModelProcessor.get(_testJSP1);
+ assertNotNull(processor);
+ assertFalse(processor.isDisposed());
+
+ JSFTestUtil.safeDelete(_testJSP1, 10, 1000);
+
+ // file is deleted, so the processor should dispose itself on the
+ // resource change event
+ waitForAndAssertProcessorDisposed(processor, true);
+ }
+
+ public void testProjectClosure() throws Exception
+ {
+ final IModelManager modelManager = StructuredModelManager.getModelManager();
+
+ IStructuredModel model = null;
+
+ try
+ {
+ model = modelManager.getModelForRead(_testJSP1);
+
+ // we should be the only one with a handle
+// assertFalse(model.isSharedForRead());
+
+ // ensure that if the enclosing project of the associated IFile
+ // is closed, then the processor gets disposed
+ final JSPModelProcessor processor = JSPModelProcessor.get(_testJSP1);
+ assertFalse(model.isSharedForRead());
+ assertNotNull(processor);
+ // we should still be the only one with a handle since JSPModelProcessor
+ // doesn't hold it.
+ assertFalse(processor.isDisposed());
+ processor.refresh(!JSPModelProcessor.FORCE_REFRESH, JSPModelProcessor.RUN_ON_CURRENT_THREAD);
+ assertFalse(model.isSharedForRead());
+
+ _testJSP1.getProject().close(null);
+
+ // file is deleted, so the processor should dispose itself on the
+ // resource change event
+ waitForAndAssertProcessorDisposed(processor, true);
+ // final check, with processor disposed, still not shared
+ assertFalse(model.isSharedForRead());
+ }
+ finally
+ {
+ if (model != null)
+ {
+ model.releaseFromRead();
+ }
+ }
+ }
+
+ public void testProjectDeletion() throws Exception
+ {
+ final IModelManager modelManager = StructuredModelManager.getModelManager();
+
+ IStructuredModel model = null;
+
+ try
+ {
+ model = modelManager.getModelForRead(_testJSP1);
+
+ // we should be the only one with a handle
+ //assertFalse(model.isSharedForRead());
+
+ // ensure that if the enclosing project of the associated IFile
+ // is deleted, then the processor gets disposed
+ final JSPModelProcessor processor = JSPModelProcessor.get(_testJSP1);
+ assertNotNull(processor);
+ assertFalse(processor.isDisposed());
+// assertFalse(model.isSharedForRead());
+ // we should still be the only one with a handle since JSPModelProcessor
+ // doesn't hold it.
+ processor.refresh(!JSPModelProcessor.FORCE_REFRESH, JSPModelProcessor.RUN_ON_CURRENT_THREAD);
+ assertFalse(model.isSharedForRead());
+
+ JSFTestUtil.safeDelete(_testJSP1, 10, 1000);
+
+ // file is deleted, so the processor should dispose itself on the
+ // resource change event
+ waitForAndAssertProcessorDisposed(processor, true);
+ assertFalse(model.isSharedForRead());
+ }
+ finally
+ {
+ if (model != null)
+ {
+ model.releaseFromRead();
+ }
+ }
+ }
+
+ public void testChangeRefresh() throws Exception
+ {
+ // random order of access to the jsps, but always the same between runs
+ final int order[] = new int[] {6,19,10,16,14,4,13,11,24,2,3,23,20,15,17,9,1,5,22,12,21,8,18,0,7};
+ assertEquals(NUM_JSPS, order.length);
+
+ for (final int element : order)
+ {
+ final IFile file = _jsps.get(element);
+
+ final JSPModelProcessor processor = JSPModelProcessor.get(file);
+ // the processor model should start out dirty since it won't
+ // get refreshed unless the resource detects a change or if
+ // it is explicitly refreshed
+ assertTrue(processor.isModelDirty());
+
+ // this should trigger a change event and update the model
+ file.touch(null);
+
+ Thread.sleep(2000);
+ waitForAndAssertProcessorDirty(processor, false);
+
+ // now delete the file and ensure the processor is disposed
+ JSFTestUtil.safeDelete(file, 10, 1000);
+
+ // file is deleted, so the processor should dispose itself on the
+ // resource change event
+ waitForAndAssertProcessorDisposed(processor, true);
+ }
+ }
+
+ public void testFileDoesnotExist()
+ {
+ IFile file = _testJSP1.getProject().getFile("/doesNotExist.jsp");
+ assertFalse(file.isAccessible());
+ boolean caughtException = false;
+ try
+ {
+ JSPModelProcessor.get(file);
+ }
+ catch (CoreException e)
+ {
+ caughtException = true;
+ }
+ assertTrue(caughtException);
+ }
+
+ public void testExplicitRefresh() throws Exception
+ {
+ // random order of access to the jsps, but always the same between runs
+ final int order[] = new int[] {6,19,10,16,14,4,13,11,24,2,3,23,20,15,17,9,1,5,22,12,21,8,18,0,7};
+ assertEquals(NUM_JSPS, order.length);
+
+ for (final int element : order)
+ {
+ final IFile file = _jsps.get(element);
+
+ final JSPModelProcessor processor = JSPModelProcessor.get(file);
+ // the processor model should start out dirty since it won't
+ // get refreshed unless the resource detects a change or if
+ // it is explicitly refreshed
+ // we should be the only one with a handle
+ waitForAndAssertProcessorDirty(processor, true);
+
+ // since the model is dirty this should trigger a refresh
+ processor.refresh(!JSPModelProcessor.FORCE_REFRESH, JSPModelProcessor.RUN_ON_CURRENT_THREAD);
+
+ waitForAndAssertProcessorDirty(processor, false);
+
+ // now delete the file and ensure the processor is disposed
+ JSFTestUtil.safeDelete(file, 10, 1000);
+
+ waitForAndAssertProcessorDisposed(processor, true);
+ }
+ }
+
+ private void waitForAndAssertProcessorDirty(
+ final JSPModelProcessor processor, final boolean expectedValue)
+ throws Exception
+ {
+ int i = 0;
+
+ while (i++ < WAIT_ITERATIONS
+ && (processor.isModelDirty() != expectedValue))
+ {
+ Thread.sleep(WAIT_SLEEP_TIME_MS);
+ }
+ assertEquals(expectedValue, processor.isModelDirty());
+ }
+
+ private void waitForAndAssertProcessorDisposed(
+ final JSPModelProcessor processor, final boolean expectedValue)
+ throws Exception
+ {
+ int i = 0;
+
+ while (i++ < WAIT_ITERATIONS
+ && (processor.isDisposed() != expectedValue))
+ {
+ Thread.sleep(WAIT_SLEEP_TIME_MS);
+ }
+ // file is deleted, so the processor should dispose itself on the
+ // resource change event
+ assertEquals(expectedValue, processor.isDisposed());
+ }
+
+ public static void main(final String[] args)
+ {
+ final Set<Integer> set = new TreeSet<Integer>();
+
+ final Random random = new Random();
+
+ while(set.size() < NUM_JSPS)
+ {
+ final Integer value = Integer.valueOf(Math.abs(random.nextInt()) % NUM_JSPS);
+
+ if (!set.contains(value))
+ {
+ System.out.printf("%d,", value);
+ set.add(value);
+ }
+ }
+ }
+}
+
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestResourceBundleMapSource.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestResourceBundleMapSource.java
new file mode 100644
index 000000000..c1cea72ed
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestResourceBundleMapSource.java
@@ -0,0 +1,257 @@
+/*******************************************************************************
+ * 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.designtime.tests;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jst.jsf.designtime.internal.symbols.ResourceBundleMapSourceFactory;
+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;
+
+/**
+ * Test cases for ResourceBundleMapSource
+ *
+ * @author cbateman
+ *
+ */
+public class TestResourceBundleMapSource extends TestCase
+{
+
+ private static final String BUNDLE1_PATH = "bundles";
+ private static final String BUNDLE1_NAME = "bundle1.properties";
+
+ // private static final String BUNDLE2_PATH = "bundles";
+ // private static final String BUNDLE2_NAME = "bundle2.properties";
+
+ private IProject _project1;
+ private IProject _project2;
+ private IProject _project3;
+ private IFile _bundle1;
+
+ // private IFile _bundle2;
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ JSFTestUtil.setValidationEnabled(false);
+
+ List<IResource> resources =
+ initProject("BundleResourceTestProject1_" + getName(),
+ "/testdata/bundle1.resources.data", BUNDLE1_PATH,
+ BUNDLE1_NAME);
+ _bundle1 = (IFile) resources.get(0);
+ _project1 = (IProject) resources.get(1);
+
+ resources =
+ initProject("BundleResourceTestProject2_" + getName(),
+ "/testdata/bundle2.resources.data", BUNDLE1_PATH,
+ BUNDLE1_NAME);
+ // _bundle2 = (IFile) resources.get(0);
+ _project2 = (IProject) resources.get(1);
+
+ resources =
+ initProject("BundleResourceTestProject3_" + getName(),
+ "/testdata/bundle1.resources.data", BUNDLE1_PATH,
+ BUNDLE1_NAME);
+ _project3 = (IProject) resources.get(1);
+ }
+
+ private List<IResource> initProject(final String projectName,
+ final String dataFilePath, final String bundlePath,
+ final String bundleName) throws Exception
+ {
+ final List<IResource> resources = new ArrayList<IResource>();
+ final ProjectTestEnvironment testEnv =
+ new ProjectTestEnvironment(projectName);
+ testEnv.createProject(false);
+ final JDTTestEnvironment jdtTestEnv = new JDTTestEnvironment(testEnv);
+ final TestFileResource input = new TestFileResource();
+ input
+ .load(DesignTimeTestsPlugin.getDefault().getBundle(),
+ dataFilePath);
+ resources.add(jdtTestEnv.addResourceFile("src",
+ new ByteArrayInputStream(input.toBytes()), bundlePath,
+ bundleName));
+
+ final IProject project = testEnv.getTestProject();
+ assertNotNull(project);
+ assertTrue(project.isAccessible());
+ resources.add(project);
+ return resources;
+ }
+
+ /**
+ * Basic sanity check that properties files can be loaded and contain what's
+ * expected
+ */
+ public void testSanity() throws Exception
+ {
+ Map<?, ?> map =
+ ResourceBundleMapSourceFactory.getResourceBundleMapSource(
+ _project1, "bundles.bundle1");
+ assertNotNull(map);
+ assertEquals(map.size(), 3);
+
+ map =
+ ResourceBundleMapSourceFactory.getResourceBundleMapSource(
+ _project2, "bundles.bundle1");
+ assertNotNull(map);
+ assertEquals(map.size(), 3);
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ JSFTestUtil.safeDelete(_project1, 25, 100);
+ JSFTestUtil.safeDelete(_project2, 25, 100);
+ JSFTestUtil.safeDelete(_project3, 25, 100);
+ }
+
+ /**
+ * Verify the expected contents of bundle1 in project1
+ */
+ public void testContentsProject1Bundle1() throws Exception
+ {
+ final Map<?, ?> map =
+ ResourceBundleMapSourceFactory.getResourceBundleMapSource(
+ _project1, "bundles.bundle1");
+ assertTrue(map.containsKey("prop1"));
+ assertEquals("blah", map.get("prop1"));
+ assertTrue(map.containsKey("one.dot"));
+ assertEquals("blah1", map.get("one.dot"));
+ assertTrue(map.containsKey("two.dot.property"));
+ assertEquals("blah3", map.get("two.dot.property"));
+ }
+
+ /**
+ * Verify the expected contents of bundle1 in project2
+ */
+ public void testContentsProject2Bundle1() throws Exception
+ {
+ final Map<?, ?> map =
+ ResourceBundleMapSourceFactory.getResourceBundleMapSource(
+ _project2, "bundles.bundle1");
+ assertTrue(map.containsKey("x_prop1"));
+ assertEquals("x_blah", map.get("x_prop1"));
+ assertTrue(map.containsKey("x_one.dot"));
+ assertEquals("x_blah1", map.get("x_one.dot"));
+ assertTrue(map.containsKey("x_two.dot.property"));
+ assertEquals("x_blah3", map.get("x_two.dot.property"));
+ }
+
+ /**
+ * Regression test of https://bugs.eclipse.org/bugs/show_bug.cgi?id=196452.
+ *
+ * This verifies that if the bundle file is deleted then a reload on the
+ * bundle correctly cleans up the map
+ *
+ * @throws CoreException
+ * @throws IOException
+ * @throws JavaModelException
+ */
+ public void testBundleDelete() throws JavaModelException, IOException,
+ CoreException
+ {
+ // test the initial state, before outside meddling
+ final Map<?, ?> map =
+ ResourceBundleMapSourceFactory.getResourceBundleMapSource(
+ _project1, "bundles.bundle1");
+ assertTrue(map.containsKey("prop1"));
+ assertEquals("blah", map.get("prop1"));
+ assertTrue(map.containsKey("one.dot"));
+ assertEquals("blah1", map.get("one.dot"));
+ assertTrue(map.containsKey("two.dot.property"));
+ assertEquals("blah3", map.get("two.dot.property"));
+
+ // now fiddle with the file
+ final File bundleFile = _bundle1.getLocation().toFile();
+ assertTrue(bundleFile.delete());
+ _bundle1.refreshLocal(IResource.DEPTH_INFINITE, null);
+
+ // the condition we are testing for is that the file is no
+ // longer accessible but the map tolerates this by becoming empty
+ assertFalse(_bundle1.isAccessible());
+
+ // the map should now return empty and querying keys should
+ // return null
+ assertTrue(map.isEmpty());
+ assertNull(map.get("prop1"));
+ assertNull(map.get("one.dot"));
+ assertNull(map.get("two.dot.property"));
+ }
+
+ /**
+ * Regression test of https://bugs.eclipse.org/bugs/show_bug.cgi?id=196452.
+ *
+ * This verifies that if the bundle file is modified outside of Eclipse,
+ * then a reload on the bundle doesn't throw an out of sync exception.
+ *
+ * @throws CoreException
+ * @throws IOException
+ * @throws JavaModelException
+ */
+ public void testProjectCloseCleanup() throws Exception
+ {
+ // test the initial state, before outside meddling
+ Map<?, ?> map =
+ ResourceBundleMapSourceFactory.getResourceBundleMapSource(
+ _project3, "bundles.bundle1");
+ assertTrue(map.containsKey("prop1"));
+ assertEquals("blah", map.get("prop1"));
+ assertTrue(map.containsKey("one.dot"));
+ assertEquals("blah1", map.get("one.dot"));
+ assertTrue(map.containsKey("two.dot.property"));
+ assertEquals("blah3", map.get("two.dot.property"));
+
+ // now close the project
+ // this will trigger a NOT_ACCESSIBLE event on the project
+ _project3.close(null);
+
+ // map should now be safely disposed
+ assertEquals(0, map.size());
+
+ boolean expectedExceptionThrown = false;
+
+ try
+ {
+ map =
+ ResourceBundleMapSourceFactory.getResourceBundleMapSource(
+ _project3, "bundles.bundle1");
+ }
+ catch (final CoreException ce)
+ {
+ // this code should run since _project3 is closed
+ // and therefore inaccessible
+ expectedExceptionThrown = true;
+ }
+
+ assertTrue(expectedExceptionThrown);
+
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestResourceBundleSymbolSourceProvider.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestResourceBundleSymbolSourceProvider.java
new file mode 100644
index 000000000..b4966d3a6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestResourceBundleSymbolSourceProvider.java
@@ -0,0 +1,172 @@
+/*******************************************************************************
+ * 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.designtime.tests;
+
+import java.io.ByteArrayInputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jst.common.project.facet.core.JavaFacet;
+import org.eclipse.jst.jsf.context.symbol.IInstanceSymbol;
+import org.eclipse.jst.jsf.context.symbol.IPropertySymbol;
+import org.eclipse.jst.jsf.context.symbol.ISymbol;
+import org.eclipse.jst.jsf.context.symbol.source.ISymbolConstants;
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+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.designtime.internal.symbols.ResourceBundleSymbolSourceProvider;
+import org.eclipse.jst.jsf.facesconfig.emf.ResourceBundleType;
+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.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+
+public class TestResourceBundleSymbolSourceProvider extends TestCase
+{
+ private IFile _testJSP;
+ private JSFFacetedTestEnvironment _jsfFactedTestEnvironment;
+ private WebProjectTestEnvironment _projectTestEnvironment;
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ JSFTestUtil.setValidationEnabled(false);
+ JSFTestUtil.setInternetProxyPreferences(true, "www-proxy.us.oracle.com","80");
+
+ _projectTestEnvironment =
+ new WebProjectTestEnvironment(
+ "TestResourceBundleSymbolSourceProvider_"+getName()
+ , JavaFacet.VERSION_1_5
+ , ProjectFacetsManager.getProjectFacet( "jst.web" ).getVersion("2.5")
+ );
+ _projectTestEnvironment.createProject(false);
+
+ final JDTTestEnvironment jdtTestEnvironment =
+ new JDTTestEnvironment(_projectTestEnvironment);
+
+ TestFileResource input = new TestFileResource();
+ input.load(DesignTimeTestsPlugin.getDefault().getBundle()
+ ,"/testdata/bundle1.resources.data");
+ jdtTestEnvironment.addResourceFile("src"
+ , new ByteArrayInputStream(input.toBytes())
+ , "beans", "bundle.properties");
+
+ input = new TestFileResource();
+ input.load(DesignTimeTestsPlugin.getDefault().getBundle()
+ ,"/testdata/bundle2.resources.data");
+ jdtTestEnvironment.addResourceFile("src"
+ , new ByteArrayInputStream(input.toBytes())
+ , "beans", "bundle2.properties");
+
+ /*IFile facesConfigFile = (IFile) */
+ _projectTestEnvironment
+ .loadResourceInWebRoot(DesignTimeTestsPlugin.getDefault().getBundle(),
+ "/testdata/faces-config_1_2.xml.data",
+ "/WEB-INF/faces-config.xml");
+
+ final IResource res =
+ _projectTestEnvironment.loadResourceInWebRoot(DesignTimeTestsPlugin.getDefault().getBundle()
+ , "/testdata/testdata1.jsp.data", "testdata1.jsp");
+ _testJSP = (IFile) res;
+
+ _jsfFactedTestEnvironment = new JSFFacetedTestEnvironment(_projectTestEnvironment);
+ _jsfFactedTestEnvironment.initialize(IJSFCoreConstants.FACET_VERSION_1_2);
+
+ //_structuredModel = StructuredModelManager.getModelManager().getModelForRead(_testJSP);
+ //_structuredDocument = _structuredModel.getStructuredDocument();
+ }
+
+ public void testSanity()
+ {
+ final IJSFAppConfigManager appconfigMgr = JSFAppConfigManagerFactory.getJSFAppConfigManagerInstance(_projectTestEnvironment.getTestProject());
+ final List<ResourceBundleType> resourceBundles = appconfigMgr.getResourceBundles();
+ assertEquals(2, resourceBundles.size());
+ }
+
+ public void testGetSymbolsIAdaptableInt()
+ {
+ final ResourceBundleSymbolSourceProvider sourceProvider =
+ new ResourceBundleSymbolSourceProvider();
+
+ final ISymbol[] symbols =
+ sourceProvider.getSymbols(_testJSP, ISymbolConstants.SYMBOL_SCOPE_ALL);
+ assertEquals(2, symbols.length);
+
+ final List<String> testProps = new ArrayList<String>();
+ testProps.add("prop1");
+ // these two are dotted and so only the first segment is used in the base property
+ testProps.add("one");
+ testProps.add("two");
+
+ assertContains(symbols, "resBundleProp1", testProps);
+
+ testProps.clear();
+ testProps.add("x_prop1");
+ // these two are dotted and so only the first segment is used in the base property
+ testProps.add("x_one");
+ testProps.add("x_two");
+
+ assertContains(symbols, "resBundleProp2", testProps);
+ }
+
+ @SuppressWarnings({ "unchecked"})
+ private void assertContains(final ISymbol[] symbols, final String varName,final List<String> properties)
+ {
+ final List<String> copyProperties = new ArrayList<String>(properties);
+ final List<String> propsNotFound = new ArrayList<String>();
+
+ boolean foundSymbol = false;
+
+ for (final ISymbol symbol : symbols)
+ {
+ if (varName.equals(symbol.getName()))
+ {
+ foundSymbol = true;
+ assertTrue(symbol instanceof IInstanceSymbol);
+ final IInstanceSymbol varSymbol = (IInstanceSymbol) symbol;
+ final List<IPropertySymbol> props =
+ varSymbol.getTypeDescriptor().getProperties();
+
+ for (final Object element : props)
+ {
+ final IPropertySymbol prop = (IPropertySymbol) element;
+ if (copyProperties.contains(prop.getName()))
+ {
+ copyProperties.remove(prop.getName());
+ }
+ else
+ {
+ propsNotFound.add(prop.getName());
+ }
+ }
+ }
+ }
+
+ assertTrue("Symbol not found", foundSymbol);
+ assertTrue(String.format("%d properties not found, %s not found, not matched %s"
+ , copyProperties.size()
+ , Arrays.toString(copyProperties.toArray(new String[0]))
+ , Arrays.toString(propsNotFound.toArray(new String[0])))
+ ,copyProperties.isEmpty());
+ }
+// public void testIsProvider()
+// {
+// fail("Not yet implemented");
+// }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestStartupHandler.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestStartupHandler.java
new file mode 100644
index 000000000..a06d792df
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestStartupHandler.java
@@ -0,0 +1,178 @@
+/*******************************************************************************
+ * 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.designtime.tests;
+
+import java.io.ByteArrayInputStream;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
+import org.eclipse.jst.jsf.designtime.internal.jsp.JSPModelProcessor;
+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.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.CloseResourceAction;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.ide.ResourceUtil;
+
+/**
+ * Some basic coverage of the editor open listener registered by the
+ * StartupHandler
+ *
+ * @author cbateman
+ *
+ */
+public class TestStartupHandler extends TestCase
+{
+ private IFile _testJSP1;
+ private WebProjectTestEnvironment _projectTestEnvironment;
+ private JSFFacetedTestEnvironment _jsfFactedTestEnvironment;
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ JSFTestUtil.setValidationEnabled(false);
+ JSFTestUtil.setInternetProxyPreferences(true, "www-proxy.us.oracle.com","80");
+
+ _projectTestEnvironment =
+ new WebProjectTestEnvironment("TestStartupHandler_"+getName());
+ _projectTestEnvironment.createProject(false);
+
+ final JDTTestEnvironment jdtTestEnvironment =
+ new JDTTestEnvironment(_projectTestEnvironment);
+
+ final TestFileResource input = new TestFileResource();
+ input.load(DesignTimeTestsPlugin.getDefault().getBundle(),
+ "/testdata/bundle1.resources.data");
+ jdtTestEnvironment.addResourceFile("src"
+ , new ByteArrayInputStream(input.toBytes())
+ , "bundles", "bundle1.properties");
+
+ final IResource res = _projectTestEnvironment.loadResourceInWebRoot(DesignTimeTestsPlugin.getDefault().getBundle()
+ , "/testdata/testdata1.jsp.data", "testdata1.jsp");
+ _testJSP1 = (IFile) res;
+
+ _jsfFactedTestEnvironment = new JSFFacetedTestEnvironment(_projectTestEnvironment);
+ _jsfFactedTestEnvironment.initialize(IJSFCoreConstants.FACET_VERSION_1_1);
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ }
+
+ public void testLaunchEditor() throws Exception
+ {
+ final IWorkbenchPage curPage =
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ final IEditorPart editor =
+ IDE.openEditor
+ (curPage
+ , _testJSP1);
+ assertNotNull(editor);
+ final IEditorPart foundEditor = ResourceUtil.findEditor(curPage, _testJSP1);
+ assertEquals(editor, foundEditor);
+
+ final JSPModelProcessor processor = JSPModelProcessor.get(_testJSP1);
+ // should have a second reference due to the open editor
+ assertNotNull(processor);
+ assertFalse(processor.isDisposed());
+ curPage.closeEditor(foundEditor, false);
+
+ // closing the editor part should have no effect on the processor
+ // being disposed
+ assertFalse(processor.isDisposed());
+ final JSPModelProcessor notDuplicate = JSPModelProcessor.get(_testJSP1);
+ assertEquals(processor, notDuplicate);
+ }
+
+ /**
+ * Ensure that if an editor with a JSPModelProcessor attached is closed
+ * through the action of closing the enclosing IProject, then StartupHandler
+ * detects this and correctly disposes the model processor.
+ *
+ * @throws Exception
+ */
+ public void testBug196760() throws Exception
+ {
+ final IWorkbenchPage curPage =
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ final IEditorPart editor = IDE.openEditor(curPage, _testJSP1);
+ assertNotNull(editor);
+ final IEditorPart foundEditor = ResourceUtil.findEditor(curPage, _testJSP1);
+ assertEquals(editor, foundEditor);
+
+ final JSPModelProcessor processor = JSPModelProcessor.get(_testJSP1);
+ assertNotNull(processor);
+ assertFalse(processor.isDisposed());
+
+ // close project with with user action
+ final CloseResourceAction action =
+ new CloseResourceAction(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow())
+ {
+ public void superRun()
+ {
+ super.run();
+
+ int numTries = 0;
+
+ while(_projectTestEnvironment.getTestProject().isOpen())
+ {
+ try {
+ numTries++;
+ Thread.sleep(1500);
+ } catch (InterruptedException e) {
+ // fall through
+ }
+
+ if (numTries > 20)
+ {
+ throw new RuntimeException("Number of tries exceeded 20");
+ }
+ }
+ }
+
+ @Override
+ public void run()
+ {
+ PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable()
+ {
+ public void run()
+ {
+ superRun();
+ }
+ });
+ }
+ };
+
+ action.selectionChanged(new StructuredSelection(_projectTestEnvironment.getTestProject()));
+ action.run();
+
+ // if the editor is closed due a project close, ensure that the processor is properly
+ // disposed
+ assertFalse(_projectTestEnvironment.getTestProject().isOpen());
+
+ // assert that the processor is disposed because its parent project
+ // has been closed
+ assertTrue(processor.isDisposed());
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/ChangeTester.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/ChangeTester.java
new file mode 100644
index 000000000..37b213c6e
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/ChangeTester.java
@@ -0,0 +1,177 @@
+package org.eclipse.jst.jsf.designtime.tests.resources;
+
+import static junit.framework.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.jst.jsf.test.util.mock.IWorkspaceContextWithEvents;
+import org.eclipse.jst.jsf.test.util.mock.MockResourceChangeEventFactory;
+
+public abstract class ChangeTester<EVENTTYPE, CHANGETYPE>
+{
+ protected final List<EVENTTYPE> _events = new ArrayList<EVENTTYPE>();
+ private final IWorkspaceContextWithEvents _context;
+ private final MockResourceChangeEventFactory _eventFactory;
+ private final IFolder _resourceRoot;
+
+ /**
+ * @param context
+ * @param factory
+ * @param resourceRoot
+ */
+ public ChangeTester(final IWorkspaceContextWithEvents context,
+ final MockResourceChangeEventFactory factory,
+ final IFolder resourceRoot)
+ {
+ _context = context;
+ _eventFactory = factory;
+ _resourceRoot = resourceRoot;
+ }
+
+ public void fireResourceFileContentsChange(final String resourceId)
+ {
+ installListener();
+ final IFile file = getFile(resourceId);
+ final IResourceChangeEvent event = _eventFactory
+ .createSimpleFileChange(file, true);
+ _context.fireWorkspaceEvent(event);
+ removeListener();
+ }
+
+ public void fireResourceFileAdd(final String resourceId)
+ {
+ installListener();
+ final IFile file = _resourceRoot.getFile(resourceId);
+ final IResourceChangeEvent event = _eventFactory
+ .createSimpleFileAdded(file);
+ _context.fireWorkspaceEvent(event);
+ removeListener();
+ }
+
+ private IFile getFile(final String resourceId)
+ {
+ final IFile file = _resourceRoot.getFile(resourceId);
+ assertNotNull(file);
+// assertTrue(file.exists());
+ return file;
+ }
+
+ private IFolder getFolder(final String folderName)
+ {
+ final IFolder folder = _resourceRoot.getFolder(folderName);
+ assertNotNull(folder);
+// assertTrue(folder.exists());
+ return folder;
+ }
+
+ protected abstract void installListener();
+
+ protected abstract boolean isChangeType(final EVENTTYPE event,
+ final CHANGETYPE type);
+
+ public void fireResourceFileDelete(final String resourceId)
+ {
+ installListener();
+ final IFile file = getFile(resourceId);
+ final IResourceChangeEvent event = _eventFactory
+ .createSimpleFileRemove(file);
+ _context.fireWorkspaceEvent(event);
+ removeListener();
+ }
+
+ public void fireResourceFolderAdd(final String folderName)
+ {
+ installListener();
+ final IFolder folder = getFolder(folderName);
+ final IResourceChangeEvent event = _eventFactory
+ .createSimpleFolderAdded(folder);
+ _context.fireWorkspaceEvent(event);
+ removeListener();
+ }
+
+ public void fireResourceFolderDelete(final String folderName)
+ {
+ installListener();
+ final IFolder folder = getFolder(folderName);
+ final IResourceChangeEvent event = _eventFactory
+ .createSimpleFolderDeleted(folder);
+ _context.fireWorkspaceEvent(event);
+ removeListener();
+ }
+
+ public void fireResourceFileDeleteRecusive(final String folderName)
+ {
+ installListener();
+ final IFolder folder = getFolder(folderName);
+ final IResourceChangeEvent event = _eventFactory
+ .createRecursiveFolderDeleted(folder);
+ _context.fireWorkspaceEvent(event);
+ removeListener();
+ }
+
+ protected abstract void removeListener();
+
+ public void fireResourceFolderRename(final String folderName,
+ final String newFolderName)
+ {
+ installListener();
+ final IFolder folder = getFolder(folderName);
+ final IFolder newFolder = getFolder(newFolderName);
+ final IResourceChangeEvent event = _eventFactory
+ .createSimpleFolderRename(folder, newFolder);
+ _context.fireWorkspaceEvent(event);
+ removeListener();
+ }
+
+ public void fireResourceFileRename(String fileName, String newFileName)
+ {
+ installListener();
+ final IFile folder = getFile(fileName);
+ final IFile newFolder = getFile(newFileName);
+ final IResourceChangeEvent event = _eventFactory
+ .createSimpleFileRename(folder, newFolder);
+ _context.fireWorkspaceEvent(event);
+ removeListener();
+ }
+
+ public EVENTTYPE getEvent(final int eventNum)
+ {
+ return _events.get(eventNum);
+ }
+
+ public EVENTTYPE getSingleEvent(final CHANGETYPE type)
+ {
+ List<EVENTTYPE> events = getEvent(type);
+ if (events.isEmpty())
+ {
+ throw new AssertionError();
+ } else if (events.size() > 1)
+ {
+ throw new AssertionError();
+ }
+ return events.get(0);
+ }
+
+ public List<EVENTTYPE> getEvent(final CHANGETYPE type)
+ {
+ List<EVENTTYPE> foundEvents = new ArrayList<EVENTTYPE>();
+ for (final EVENTTYPE event : _events)
+ {
+ if (isChangeType(event, type))
+ {
+ foundEvents.add(event);
+ }
+ }
+ return foundEvents;
+ }
+
+ public void assertNumEvents(final int numEvents)
+ {
+ assertEquals(numEvents, _events.size());
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/FastResourceLocatorSuite.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/FastResourceLocatorSuite.java
new file mode 100644
index 000000000..2d4197812
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/FastResourceLocatorSuite.java
@@ -0,0 +1,18 @@
+package org.eclipse.jst.jsf.designtime.tests.resources;
+
+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({TestResourceIdentifierFactory.class,
+ TestJarBasedJSFResource.class, TestJarBasedJSFResourceLocator.class,
+ TestWorkspaceBasedJSFResource.class, TestWorkspaceBasedResourceLocator.class,
+ TestJSFResource.class})
+public class FastResourceLocatorSuite
+{
+ // do nothing, the annotations define the suite in JUnit 4
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/TestJSFResource.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/TestJSFResource.java
new file mode 100644
index 000000000..036f64380
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/TestJSFResource.java
@@ -0,0 +1,52 @@
+package org.eclipse.jst.jsf.designtime.tests.resources;
+
+import static junit.framework.Assert.assertFalse;
+import static junit.framework.Assert.assertTrue;
+
+import org.eclipse.jst.jsf.common.internal.resource.ContentTypeResolver;
+import org.eclipse.jst.jsf.designtime.internal.resources.JSFResource;
+import org.eclipse.jst.jsf.designtime.internal.resources.ResourceIdentifier;
+import org.eclipse.jst.jsf.test.util.junit4.NoPluginEnvironment;
+import org.eclipse.jst.jsf.test.util.mock.MockContentTypeManager;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+@Category(NoPluginEnvironment.class)
+public class TestJSFResource
+{
+ private TestableJSFResource _xhtmlJsfResource;
+ private TestableJSFResource _xhtmlNotAJSFResource;
+
+ @Before
+ public void testSetup() throws Exception
+ {
+ final ContentTypeResolver contentTypeResolver = new ContentTypeResolver(new MockContentTypeManager());
+ _xhtmlJsfResource = new TestableJSFResource(new ResourceIdentifier("someResource.xhtml"), contentTypeResolver);
+ _xhtmlNotAJSFResource = new TestableJSFResource(new ResourceIdentifier("someResource.foo"), contentTypeResolver);
+ }
+
+ @Test
+ public void testIsContentType()
+ {
+ assertTrue(_xhtmlJsfResource.isContentType("org.eclipse.wst.html.core.htmlsource"));
+ assertFalse(_xhtmlNotAJSFResource.isContentType("org.eclipse.wst.html.core.htmlsource")); }
+
+
+
+ private final static class TestableJSFResource extends JSFResource
+ {
+
+ private TestableJSFResource(final ResourceIdentifier id,
+ final ContentTypeResolver contentTypeResolver)
+ {
+ super(id, contentTypeResolver);
+ }
+
+ @Override
+ public boolean isAccessible()
+ {
+ return true;
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/TestJarBasedJSFResource.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/TestJarBasedJSFResource.java
new file mode 100644
index 000000000..1078adc0a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/TestJarBasedJSFResource.java
@@ -0,0 +1,115 @@
+package org.eclipse.jst.jsf.designtime.tests.resources;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertFalse;
+import static junit.framework.Assert.assertNotNull;
+import static junit.framework.Assert.assertSame;
+import static junit.framework.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.JarURLConnection;
+import java.net.MalformedURLException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+import java.util.zip.ZipEntry;
+
+import org.eclipse.jst.jsf.common.internal.resource.ContentTypeResolver;
+import org.eclipse.jst.jsf.common.internal.util.JarUtilities;
+import org.eclipse.jst.jsf.designtime.internal.resources.JarBasedJSFResource;
+import org.eclipse.jst.jsf.designtime.internal.resources.ResourceIdentifier;
+import org.eclipse.jst.jsf.designtime.internal.resources.ResourceIdentifierFactory;
+import org.eclipse.jst.jsf.designtime.internal.resources.ResourceIdentifierFactory.InvalidIdentifierException;
+import org.eclipse.jst.jsf.test.util.junit4.NoPluginEnvironment;
+import org.eclipse.jst.jsf.test.util.mock.MockContentTypeManager;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+@Category(NoPluginEnvironment.class)
+public class TestJarBasedJSFResource
+{
+ private JarFile _jarFile;
+ private ZipEntry _entry;
+ private ContentTypeResolver _contentTypeResolver;
+
+ @Before
+ public void setUp() throws IOException
+ {
+ final File file = new File("./testdata/jsfResources.jar");
+ assertTrue(file.exists());
+ _jarFile = new JarFile(file.getAbsoluteFile());
+ _entry = _jarFile.getEntry("META-INF/resources/mylib/tag1.xhtml");
+ assertNotNull(_entry);
+ _contentTypeResolver = new ContentTypeResolver(
+ new MockContentTypeManager());
+ }
+
+ @Test
+ public void testJarBasedJSFResource() throws MalformedURLException,
+ InvalidIdentifierException
+ {
+ final URL url = JarUtilities.INSTANCE.createJarUrl(_jarFile,
+ (JarEntry) _entry);
+ final ResourceIdentifier id = new ResourceIdentifierFactory()
+ .createLibraryResource("mylib/tag1.xhtml");
+
+ final JarBasedJSFResource resource = new JarBasedJSFResource(id, url,
+ _contentTypeResolver);
+ assertSame(id, resource.getId());
+ assertSame(url, resource.getJarURL());
+ assertTrue(resource.isAccessible());
+ }
+
+ @Test
+ public void testJarBasedJSFResource_BadUrl() throws MalformedURLException,
+ InvalidIdentifierException
+ {
+ final URL url = JarUtilities.INSTANCE.createJarUrl("/SomeBadPath", "");
+ final ResourceIdentifier id = new ResourceIdentifierFactory()
+ .createLibraryResource("mylib/tag1.xhtml");
+
+ final JarBasedJSFResource resource = new JarBasedJSFResource(id, url,
+ _contentTypeResolver);
+ assertSame(id, resource.getId());
+ assertSame(url, resource.getJarURL());
+ // the url is bad, so we won't get anything.
+ assertFalse(resource.isAccessible());
+ }
+
+ @Test
+ public void testJarBasedJSFResource_GoodUrlBadEntry()
+ throws MalformedURLException, InvalidIdentifierException
+ {
+ final URL url = JarUtilities.INSTANCE.createJarUrl(_jarFile,
+ (JarEntry) _entry);
+ final ResourceIdentifier id = new ResourceIdentifierFactory()
+ .createLibraryResource("mylib/notATag1.xhtml");
+
+ final JarBasedJSFResource resource = new JarBasedJSFResource(id, url,
+ _contentTypeResolver);
+ assertSame(id, resource.getId());
+ assertSame(url, resource.getJarURL());
+ // the url is good, but there is no entry for notATag1,
+ // so we won't get anything.
+ assertFalse(resource.isAccessible());
+ }
+
+ @Test
+ public void testJarEntryURL() throws IOException, URISyntaxException
+ {
+ final URL url = JarUtilities.INSTANCE.createJarUrl(_jarFile,
+ (JarEntry) _entry);
+ assertNotNull(url);
+ final URLConnection jarConnection = url.openConnection();
+ assertTrue(jarConnection instanceof JarURLConnection);
+ final JarEntry jarEntry = ((JarURLConnection) jarConnection)
+ .getJarEntry();
+ assertNotNull(jarEntry);
+ assertEquals(_entry.getName(), jarEntry.getName());
+ assertEquals(_entry.isDirectory(), jarEntry.isDirectory());
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/TestJarBasedJSFResourceLocator.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/TestJarBasedJSFResourceLocator.java
new file mode 100644
index 000000000..6ff559a22
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/TestJarBasedJSFResourceLocator.java
@@ -0,0 +1,97 @@
+package org.eclipse.jst.jsf.designtime.tests.resources;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertTrue;
+
+import java.io.File;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jst.jsf.common.internal.locator.ILocatorChangeListener;
+import org.eclipse.jst.jsf.common.internal.resource.ContentTypeResolver;
+import org.eclipse.jst.jsf.common.internal.resource.DefaultJarLocator;
+import org.eclipse.jst.jsf.common.internal.resource.IJarLocator;
+import org.eclipse.jst.jsf.designtime.internal.resources.IJSFResourceFragment;
+import org.eclipse.jst.jsf.designtime.internal.resources.JarBasedJSFResourceLocator;
+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.MockContentTypeManager;
+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.MockJavaCoreMediator;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+@Category(NoPluginEnvironment.class)
+public class TestJarBasedJSFResourceLocator
+{
+ private IJarLocator _jarProvider;
+ private JarBasedJSFResourceLocator _locator;
+ private MockJDTWorkspaceContext _jdtContext;
+ private IWorkspaceContext _wsContext;
+ private IProject _project;
+
+ @SuppressWarnings("unchecked")
+ @Before
+ public void setUp()
+ {
+ _wsContext = new MockWorkspaceContext();
+ _project = _wsContext.createProject("TestProject");
+ File jarFile = new File("./testdata/jsfResources.jar");
+ assertTrue(jarFile.exists());
+ _jdtContext = new MockJDTWorkspaceContext(_wsContext);
+ _jdtContext.createCPELibraryInProject(_project, new Path(
+ "/WebContent/WEB-INF/lib/jsfResources.jar"), jarFile);
+ _jarProvider = new DefaultJarLocator(new MockJavaCoreMediator(
+ _jdtContext));
+ _locator = new JarBasedJSFResourceLocator(Collections.EMPTY_LIST,
+ new CopyOnWriteArrayList<ILocatorChangeListener>(),
+ _jarProvider, new ContentTypeResolver(
+ new MockContentTypeManager()));
+ }
+
+ @Test
+ public void testLocate()
+ {
+
+ _locator.start(_project);
+ // we can pass null here since our jar provider doesn't care about projects.
+ final List<IJSFResourceFragment> foundResources = _locator.locate(_project);
+ assertEquals(3, foundResources.size());
+ final Set<String> foundResourceIds = new HashSet<String>();
+ for (final IJSFResourceFragment res : foundResources)
+ {
+ foundResourceIds.add(res.getId().toString());
+ }
+ // contains a directory for mylib
+ assertTrue(foundResourceIds.contains("mylib"));
+ assertTrue(foundResourceIds.contains("mylib/tag1.xhtml"));
+ // @BugRegressionTest(bugNumber = 318478)
+ assertTrue(foundResourceIds.contains("mylib/invalidDir"));
+ }
+
+// @Test
+// @BugRegressionTest(bugNumber = 318478)
+// public void testAddInvalidResource()
+// {
+// _locator.start(_project);
+// assertEquals(1, _context.getWorkspace().getListeners().size());
+// _changeTester.fireResourceFolderAdd("mylib");
+// // the mylib should register a library add
+// _changeTester.assertNumEvents(1);
+// _changeTester.fireResourceFolderAdd("mylib/invalidDir");
+// // the dir is potentially valid as a fragment
+// _changeTester.assertNumEvents(1);
+// // the workspace resource locator shouldn't care if something with
+// // an invalid id is added
+// _changeTester.fireResourceFileAdd("mylib/invalidDir/file.css");
+// _changeTester.assertNumEvents(0);
+// }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/TestResourceIdentifierFactory.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/TestResourceIdentifierFactory.java
new file mode 100644
index 000000000..603fc2047
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/TestResourceIdentifierFactory.java
@@ -0,0 +1,85 @@
+package org.eclipse.jst.jsf.designtime.tests.resources;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertFalse;
+import static junit.framework.Assert.assertTrue;
+
+import java.util.regex.Pattern;
+
+import org.eclipse.jst.jsf.designtime.internal.resources.ResourceIdentifier;
+import org.eclipse.jst.jsf.designtime.internal.resources.ResourceIdentifierFactory;
+import org.eclipse.jst.jsf.designtime.internal.resources.ResourceIdentifierFactory.InvalidIdentifierException;
+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 TestResourceIdentifierFactory
+{
+ private ResourceIdentifierFactory _factory;
+
+ @Before
+ public void setUp() throws Exception
+ {
+ _factory = new ResourceIdentifierFactory();
+ }
+
+ @Test
+ public void testCreateLibraryResource() throws InvalidIdentifierException
+ {
+ ResourceIdentifier id = _factory.createLibraryResource("resourceOnly");
+ assertEquals("resourceOnly", id.getResourceName());
+
+ id = _factory.createLibraryResource("libName/resourceName");
+ assertEquals("resourceName", id.getResourceName());
+ assertEquals("libName", id.getLibraryName());
+
+ id = _factory.createLibraryResource("libName/1_0/resourceName");
+ assertEquals("resourceName", id.getResourceName());
+ assertEquals("libName", id.getLibraryName());
+
+ id = _factory.createLibraryResource("locale/libraryName/1_0/resourceName");
+ assertEquals("resourceName", id.getResourceName());
+ assertEquals("libraryName", id.getLibraryName());
+
+ id = _factory.createLibraryResource("libraryName/1_0/resourceName/resourceVersion");
+ assertEquals("resourceName", id.getResourceName());
+ assertEquals("libraryName", id.getLibraryName());
+
+ id = _factory.createLibraryResource("locale/libraryName/resourceName/resourceVersion");
+ assertEquals("resourceName", id.getResourceName());
+ assertEquals("libraryName", id.getLibraryName());
+
+ id = _factory.createLibraryResource("locale/libraryName/1_0/resourceName/resourceVersion");
+ assertEquals("resourceName", id.getResourceName());
+ assertEquals("libraryName", id.getLibraryName());
+ }
+
+ @Test(expected = InvalidIdentifierException.class)
+ public void testCreateLibraryResource_InvalidId_BadLibVersion() throws InvalidIdentifierException
+ {
+ _factory.createLibraryResource("libraryName/bad_version/resourceName");
+ }
+
+ @Test
+ public void testVersionPatternMatch()
+ {
+ Pattern versionPattern = ResourceIdentifierFactory.VersionPattern;
+ assertTrue(versionPattern.matcher("1").matches());
+ assertTrue(versionPattern.matcher("12").matches());
+ assertTrue(versionPattern.matcher("123").matches());
+ assertTrue(versionPattern.matcher("1_0").matches());
+ assertTrue(versionPattern.matcher("12_10").matches());
+ assertTrue(versionPattern.matcher("129_10").matches());
+ assertTrue(versionPattern.matcher("12_10_1").matches());
+
+ assertFalse(versionPattern.matcher("_").matches());
+ assertFalse(versionPattern.matcher("1_").matches());
+ assertFalse(versionPattern.matcher("_0").matches());
+ assertFalse(versionPattern.matcher("1_0_").matches());
+ assertFalse(versionPattern.matcher("a").matches());
+ assertFalse(versionPattern.matcher("a_0").matches());
+ assertFalse(versionPattern.matcher("1_0a").matches());
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/TestWorkspaceBasedJSFResource.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/TestWorkspaceBasedJSFResource.java
new file mode 100644
index 000000000..db17f2660
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/TestWorkspaceBasedJSFResource.java
@@ -0,0 +1,49 @@
+package org.eclipse.jst.jsf.designtime.tests.resources;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertFalse;
+import static junit.framework.Assert.assertTrue;
+
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jst.jsf.common.internal.resource.ContentTypeResolver;
+import org.eclipse.jst.jsf.designtime.internal.resources.ResourceIdentifierFactory;
+import org.eclipse.jst.jsf.designtime.internal.resources.ResourceIdentifierFactory.InvalidIdentifierException;
+import org.eclipse.jst.jsf.designtime.internal.resources.WorkspaceJSFResource;
+import org.eclipse.jst.jsf.test.util.junit4.NoPluginEnvironment;
+import org.eclipse.jst.jsf.test.util.mock.MockContentTypeManager;
+import org.eclipse.jst.jsf.test.util.mock.MockFile;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+@Category(NoPluginEnvironment.class)
+public class TestWorkspaceBasedJSFResource
+{
+ private WorkspaceJSFResource _res;
+ private MockFile _file;
+
+ @Before
+ public void setUp() throws Exception
+ {
+ _file = new MockFile(new Path("SomeProject/WebContent/resources/mylib/tag1.xhtml"));
+ _res = new WorkspaceJSFResource(new ResourceIdentifierFactory().createLibraryResource("mylib/tag1.xhtml"), _file, new ContentTypeResolver(new MockContentTypeManager()));
+ }
+
+ @Test
+ public void testIsAccessible() throws InvalidIdentifierException
+ {
+ // isAccessible on this type of JSFResource is simply a pass through
+ // to isAccessible on the underlying resource
+ _file.setExists(true);
+ assertTrue(_res.isAccessible());
+
+ _file.setExists(false);
+ assertFalse(_res.isAccessible());
+ }
+
+ @Test
+ public void testGetResource()
+ {
+ assertEquals(_file, _res.getResource());
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/TestWorkspaceBasedResourceLocator.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/TestWorkspaceBasedResourceLocator.java
new file mode 100644
index 000000000..d369743e4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/resources/TestWorkspaceBasedResourceLocator.java
@@ -0,0 +1,456 @@
+package org.eclipse.jst.jsf.designtime.tests.resources;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertNull;
+import static junit.framework.Assert.assertTrue;
+import static org.junit.Assert.assertNotNull;
+
+import java.io.File;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jst.jsf.common.internal.locator.ILocatorChangeListener;
+import org.eclipse.jst.jsf.common.internal.resource.ContentTypeResolver;
+import org.eclipse.jst.jsf.designtime.internal.resources.IJSFResourceFragment;
+import org.eclipse.jst.jsf.designtime.internal.resources.IJSFResourceFragment.Type;
+import org.eclipse.jst.jsf.designtime.internal.resources.IWorkspaceJSFResourceFragment;
+import org.eclipse.jst.jsf.designtime.internal.resources.JSFResource;
+import org.eclipse.jst.jsf.designtime.internal.resources.JSFResourceChangeListener;
+import org.eclipse.jst.jsf.designtime.internal.resources.JSFResourceChangeListener.JSFResourceChangedEvent;
+import org.eclipse.jst.jsf.designtime.internal.resources.JSFResourceChangeListener.JSFResourceChangedEvent.CHANGE_TYPE;
+import org.eclipse.jst.jsf.designtime.internal.resources.JSFResourceContainer;
+import org.eclipse.jst.jsf.designtime.internal.resources.ResourceFragmentIdentifier;
+import org.eclipse.jst.jsf.designtime.internal.resources.ResourceIdentifier;
+import org.eclipse.jst.jsf.designtime.internal.resources.ResourceIdentifierFactory;
+import org.eclipse.jst.jsf.designtime.internal.resources.ResourceIdentifierFactory.InvalidIdentifierException;
+import org.eclipse.jst.jsf.designtime.internal.resources.WorkspaceJSFResource;
+import org.eclipse.jst.jsf.designtime.internal.resources.WorkspaceJSFResourceContainer;
+import org.eclipse.jst.jsf.designtime.internal.resources.WorkspaceJSFResourceLocator;
+import org.eclipse.jst.jsf.test.util.junit4.BugRegressionTest;
+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.FileSystemZipLoader;
+import org.eclipse.jst.jsf.test.util.mock.IWorkspaceContextWithEvents;
+import org.eclipse.jst.jsf.test.util.mock.MockContentTypeManager;
+import org.eclipse.jst.jsf.test.util.mock.MockResource;
+import org.eclipse.jst.jsf.test.util.mock.MockResourceChangeEventFactory;
+import org.eclipse.jst.jsf.test.util.mock.MockVirtualComponentQuery;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.TestName;
+import org.junit.runner.RunWith;
+
+@RunWith(WorkspaceRunner.class)
+@Category(NoPluginEnvironment.class)
+public class TestWorkspaceBasedResourceLocator
+{
+ @Rule public TestName name = new TestName();
+
+ private WorkspaceJSFResourceLocator _locator;
+ @WorkspaceContext private IWorkspaceContextWithEvents _context;
+ private IProject _project;
+ private IContainer _webContentFolder;
+ private IFolder _resourceRoot;
+ private MockResourceChangeEventFactory _eventFactory;
+ private ResourceIdentifierFactory _resourceIdFactory;
+ private ChangeTester<JSFResourceChangedEvent, CHANGE_TYPE> _changeTester;
+
+ @SuppressWarnings(
+ { "unchecked" })
+ @Before
+ public void setUp() throws Exception
+ {
+ final File file = new File("./testdata/TestProject.zip");
+ assertTrue(file.exists());
+ final FileSystemZipLoader zipFileLoader = new FileSystemZipLoader(file, "Test2/");
+ _project = _context.loadProject(
+ new Path("TestProjectTaglibDescriptor_"+name.getMethodName()), zipFileLoader);
+ _context.ensureAllMembers(_project);
+ _webContentFolder = (IContainer) _context.getResource(_project
+ .getFullPath().append("/WebContent"));
+ assertNotNull(_webContentFolder);
+ _resourceRoot = _webContentFolder.getFolder(new Path("resources"));
+ _locator = new WorkspaceJSFResourceLocator(
+ Collections.EMPTY_LIST,
+ new CopyOnWriteArrayList<ILocatorChangeListener>(),
+ new MockVirtualComponentQuery(_project.getFolder("/WebContent")),
+ new ContentTypeResolver(new MockContentTypeManager()), _context
+ .getWorkspace());
+ _eventFactory = new MockResourceChangeEventFactory(_context);
+ _resourceIdFactory = new ResourceIdentifierFactory();
+ _changeTester = new ChangeTester<JSFResourceChangedEvent, CHANGE_TYPE>(
+ _context, _eventFactory, _resourceRoot)
+ {
+ private JSFResourceChangeListener _listener;
+
+ @Override
+ protected void installListener()
+ {
+ _events.clear();
+ _listener = new JSFResourceChangeListener()
+ {
+ @Override
+ public void changed(final JSFResourceChangedEvent event)
+ {
+ _events.add(event);
+ }
+ };
+ _locator.addListener(_listener);
+ }
+
+ @Override
+ protected boolean isChangeType(final JSFResourceChangedEvent event,
+ final CHANGE_TYPE type)
+ {
+ return event.getChangeType() == type;
+ }
+
+ @Override
+ protected void removeListener()
+ {
+ _locator.removeListener(_listener);
+ }
+ };
+ }
+
+ @Test
+ public void testLocate()
+ {
+ _locator.start(_project);
+ // we can pass null here since our jar provider doesn't care about
+ // projects.
+ final List<IJSFResourceFragment> foundResources = _locator
+ .locate(_project);
+ assertEquals(3, foundResources.size());
+ final Set<String> foundResourceIds = new HashSet<String>();
+ for (final IJSFResourceFragment res : foundResources)
+ {
+ foundResourceIds.add(res.getId().toString());
+ }
+ // contains a directory for mylib
+ assertTrue(foundResourceIds.contains("mylib333"));
+ assertTrue(foundResourceIds.contains("mylib333/tag1.xhtml"));
+ }
+
+ @Test
+ public void testResourceChangeContents_File()
+ throws InvalidIdentifierException
+ {
+ _locator.start(_project);
+ final IJSFResourceFragment changeThis = findById(_locator,
+ "mylib333/tag1.xhtml");
+ _changeTester.fireResourceFileContentsChange("mylib333/tag1.xhtml");
+ _changeTester.assertNumEvents(1);
+ final JSFResourceChangedEvent event = _changeTester.getEvent(0);
+ assertEquals(CHANGE_TYPE.CHANGED, event.getChangeType());
+ assertEquals(changeThis, event.getOldValue());
+ assertEquals(changeThis, event.getNewValue());
+ }
+
+ @Test
+ public void testRemoveChange_File() throws InvalidIdentifierException
+ {
+ _locator.start(_project);
+ final IJSFResourceFragment changeThis = findById(_locator,
+ "mylib333/tag1.xhtml");
+ assertEquals(3, _locator.locate(_project).size());
+ _changeTester.fireResourceFileDelete("mylib333/tag1.xhtml");
+ _changeTester.assertNumEvents(1);
+ final JSFResourceChangedEvent event = _changeTester.getEvent(0);
+ assertEquals(CHANGE_TYPE.REMOVED, event.getChangeType());
+ assertEquals(changeThis, event.getOldValue());
+ assertEquals(null, event.getNewValue());
+ assertEquals(2, _locator.locate(_project).size());
+ }
+
+ @Test
+ public void testAddChange_File_ExistingLib()
+ {
+ _locator.start(_project);
+ assertEquals(3, _locator.locate(_project).size());
+ _changeTester.fireResourceFileAdd("mylib333/tag2.xhtml");
+ _changeTester.assertNumEvents(1);
+ final JSFResourceChangedEvent event = _changeTester.getEvent(0);
+ assertEquals(CHANGE_TYPE.ADDED, event.getChangeType());
+ assertNull(event.getOldValue());
+ assertNotNull(event.getNewValue());
+ assertEquals(4, _locator.locate(_project).size());
+ }
+
+ @Test
+ public void testAddChange_Folder_NewLib()
+ {
+ _locator.start(_project);
+ assertEquals(3, _locator.locate(_project).size());
+ _changeTester.fireResourceFolderAdd("mylib999");
+ _changeTester.assertNumEvents(1);
+ final JSFResourceChangedEvent event = _changeTester.getEvent(0);
+ assertEquals(CHANGE_TYPE.ADDED, event.getChangeType());
+ assertNull(event.getOldValue());
+ assertNotNull(event.getNewValue());
+ assertEquals(Type.CONTAINER, event.getNewValue().getType());
+ final JSFResourceContainer newValue = (JSFResourceContainer) event
+ .getNewValue();
+ assertTrue(newValue instanceof WorkspaceJSFResourceContainer);
+ final IResource resource = ((WorkspaceJSFResourceContainer) newValue)
+ .getResource();
+ assertEquals(IResource.FOLDER, resource.getType());
+ assertEquals("mylib999", resource.getName());
+ assertEquals(Type.CONTAINER, newValue.getType());
+ assertEquals(4, _locator.locate(_project).size());
+ }
+
+ @Test
+ public void testMoveChange_Folder_Rename()
+ {
+ _locator.start(_project);
+ assertEquals(3, _locator.locate(_project).size());
+ _changeTester.fireResourceFolderRename("mylib333", "mylib1111");
+ _changeTester.assertNumEvents(3);
+ {
+ final JSFResourceChangedEvent event = _changeTester
+ .getSingleEvent(CHANGE_TYPE.ADDED);
+ assertEquals(CHANGE_TYPE.ADDED, event.getChangeType());
+ assertNull(event.getOldValue());
+ assertNotNull(event.getNewValue());
+ assertEquals(Type.CONTAINER, event.getNewValue().getType());
+ final JSFResourceContainer newValue = (JSFResourceContainer) event
+ .getNewValue();
+ assertTrue(newValue instanceof WorkspaceJSFResourceContainer);
+ final IResource resource = ((WorkspaceJSFResourceContainer) newValue)
+ .getResource();
+ assertEquals(IResource.FOLDER, resource.getType());
+ assertEquals("mylib1111", resource.getName());
+ assertEquals(Type.CONTAINER, newValue.getType());
+ }
+ {
+ final List<JSFResourceChangedEvent> events = _changeTester
+ .getEvent(CHANGE_TYPE.REMOVED);
+ assertEquals(2, events.size());
+ JSFResourceChangedEvent event = events.get(0);
+ {
+ assertNotNull(event.getOldValue());
+ assertNull(event.getNewValue());
+ assertEquals(Type.CONTAINER, event.getOldValue().getType());
+ final JSFResourceContainer oldValue = (JSFResourceContainer) event
+ .getOldValue();
+ assertTrue(oldValue instanceof WorkspaceJSFResourceContainer);
+ final IResource resource = ((WorkspaceJSFResourceContainer) oldValue)
+ .getResource();
+ assertEquals(IResource.FOLDER, resource.getType());
+ assertEquals("mylib333", resource.getName());
+ assertEquals(Type.CONTAINER, oldValue.getType());
+ }
+ event = events.get(1);
+ {
+ assertNotNull(event.getOldValue());
+ assertNull(event.getNewValue());
+ assertEquals(Type.RESOURCE, event.getOldValue().getType());
+ final IWorkspaceJSFResourceFragment oldValue = (IWorkspaceJSFResourceFragment) event
+ .getOldValue();
+ final IResource resource = (oldValue)
+ .getResource();
+ assertEquals(IResource.FILE, resource.getType());
+ assertEquals("tag1.xhtml", resource.getName());
+ }
+ }
+ assertEquals(3, _locator.locate(_project).size());
+ }
+
+ @Test
+ public void testMoveChange_File_Rename()
+ {
+ _locator.start(_project);
+ assertEquals(3, _locator.locate(_project).size());
+ _changeTester.fireResourceFileRename("mylib333/tag1.xhtml",
+ "mylib333/tag2.xhtml");
+ _changeTester.assertNumEvents(2);
+ {
+ final JSFResourceChangedEvent event = _changeTester
+ .getSingleEvent(CHANGE_TYPE.ADDED);
+ assertEquals(CHANGE_TYPE.ADDED, event.getChangeType());
+ assertNull(event.getOldValue());
+ assertNotNull(event.getNewValue());
+ assertEquals(Type.RESOURCE, event.getNewValue().getType());
+ final JSFResource newValue = (JSFResource) event.getNewValue();
+ assertTrue(newValue instanceof WorkspaceJSFResource);
+ final IResource resource = ((WorkspaceJSFResource) newValue)
+ .getResource();
+ assertEquals(IResource.FILE, resource.getType());
+ assertEquals("tag2.xhtml", resource.getName());
+ assertEquals("mylib333/tag2.xhtml", newValue.getId().toString());
+ assertEquals(Type.RESOURCE, newValue.getType());
+ }
+ {
+ final JSFResourceChangedEvent event = _changeTester
+ .getSingleEvent(CHANGE_TYPE.REMOVED);
+ assertEquals(CHANGE_TYPE.REMOVED, event.getChangeType());
+ assertNotNull(event.getOldValue());
+ assertNull(event.getNewValue());
+ assertEquals(Type.RESOURCE, event.getOldValue().getType());
+ final JSFResource oldValue = (JSFResource) event.getOldValue();
+ assertTrue(oldValue instanceof WorkspaceJSFResource);
+ final IResource resource = ((WorkspaceJSFResource) oldValue)
+ .getResource();
+ assertEquals(IResource.FILE, resource.getType());
+ assertEquals("tag1.xhtml", resource.getName());
+ assertEquals("mylib333/tag1.xhtml", oldValue.getId().toString());
+ }
+ assertEquals(3, _locator.locate(_project).size());
+ }
+
+ @Test
+ @BugRegressionTest(bugNumber = 312358)
+ public void testResourceRootDoesntExist()
+ {
+ ((MockResource) _resourceRoot).setExists(false);
+ _locator.start(_project);
+ // the workspace listener should get added event though the resource
+ // root doesn't yet exist.
+ assertEquals(1, _context.getListeners().size());
+ // simulate adding the folder
+ ((MockResource) _resourceRoot).setExists(true);
+ _changeTester.fireResourceFolderAdd("");
+ _changeTester.assertNumEvents(1);
+ // simulate adding a sub-folder
+ _changeTester.fireResourceFolderAdd("ezcomp");
+ _changeTester.assertNumEvents(1);
+ final List<JSFResourceChangedEvent> events = _changeTester
+ .getEvent(CHANGE_TYPE.ADDED);
+ assertEquals(1, events.size());
+ final JSFResourceChangedEvent event = events.get(0);
+ final ResourceFragmentIdentifier id = event.getNewValue().getId();
+ assertTrue(event.getNewValue().getType() == Type.CONTAINER);
+ assertEquals("ezcomp", id.getLibraryName());
+ }
+
+ @Test
+ @BugRegressionTest(bugNumber = 312358)
+ public void testRemoveResourceRootAndAdd()
+ {
+ _locator.start(_project);
+ assertEquals(1, _context.getListeners().size());
+ // delete the folder
+ _changeTester.fireResourceFolderDelete("");
+ // should get an event for root, lib333 and lib333/tag1.xhtml
+ _changeTester.assertNumEvents(3);
+ // should still be listening event after root is removed in case
+ // it gets added back
+ assertEquals(1, _context.getListeners().size());
+ // now add back the folder
+ _changeTester.fireResourceFolderAdd("");
+ _changeTester.assertNumEvents(1);
+ {
+ final JSFResourceChangedEvent event = _changeTester
+ .getSingleEvent(CHANGE_TYPE.ADDED);
+ assertEquals("", event.getNewValue().getId().toString());
+ }
+ // now add a child to the resource root and assert we discover it.
+ _changeTester.fireResourceFolderAdd("ezcomp");
+ _changeTester.assertNumEvents(1);
+ {
+ final JSFResourceChangedEvent event = _changeTester
+ .getSingleEvent(CHANGE_TYPE.ADDED);
+ assertEquals("ezcomp", event.getNewValue().getId().toString());
+ }
+ }
+
+ @Test
+ @BugRegressionTest(bugNumber = 312358)
+ public void testAddNoneResourceFolderToWebContent()
+ {
+ _locator.start(_project);
+ assertEquals(1, _context.getListeners().size());
+ // delete the folder
+ _changeTester.fireResourceFolderAdd("../foobar");
+ _changeTester.assertNumEvents(0);
+ }
+
+ @Test
+ @BugRegressionTest(bugNumber = 312358)
+ public void testRemoveRecursiveFolder()
+ {
+ _locator.start(_project);
+ assertEquals(1, _context.getListeners().size());
+ // delete the folder
+ _changeTester.fireResourceFileDeleteRecusive("");
+ final int expectedEvents = 3;
+ _changeTester.assertNumEvents(expectedEvents);
+ final List<JSFResourceChangedEvent> events = _changeTester
+ .getEvent(CHANGE_TYPE.REMOVED);
+ assertEquals(expectedEvents, events.size());
+ final Set<String> ids = new HashSet<String>();
+ for (final JSFResourceChangedEvent event : events)
+ {
+ ids.add(event.getOldValue().getId().toString());
+ }
+ assertTrue(ids.contains(""));
+ assertTrue(ids.contains("mylib333"));
+ assertTrue(ids.contains("mylib333/tag1.xhtml"));
+ assertEquals(expectedEvents, ids.size());
+ }
+
+ @Test
+ @BugRegressionTest(bugNumber = 314145)
+ public void testRenameFileInRootFolder()
+ {
+ _locator.start(_project);
+ assertEquals(1, _context.getListeners().size());
+ _changeTester.fireResourceFileRename("../t11.jsp", "../t11.jspx");
+ // the workspace resource locator shouldn't care if something outside
+ // the resources sub-dir changes.
+ _changeTester.assertNumEvents(0);
+ }
+
+ @Test
+ @BugRegressionTest(bugNumber = 318478)
+ public void testAddInvalidResource()
+ {
+ // when we add a file like "/foo/bar/res.css to the webroot/resources,
+ //this should trigger an internal invalid id exception and cause
+ // a lack of resulting resource add events. This is not a new
+ // condition with this regression test, but it was not previously
+ // covered
+ _locator.start(_project);
+ assertEquals(1, _context.getListeners().size());
+ _changeTester.fireResourceFolderAdd("mylib");
+ // the mylib should register a library add
+ _changeTester.assertNumEvents(1);
+ _changeTester.fireResourceFolderAdd("mylib/invalidDir");
+ // the dir is potentially valid as a fragment
+ _changeTester.assertNumEvents(1);
+ // the workspace resource locator shouldn't care if something with
+ // an invalid id is added
+ _changeTester.fireResourceFileAdd("mylib/invalidDir/file.css");
+ _changeTester.assertNumEvents(0);
+ }
+
+ private IJSFResourceFragment findById(
+ final WorkspaceJSFResourceLocator locator, final String id)
+ throws InvalidIdentifierException
+ {
+ final ResourceIdentifier resId = _resourceIdFactory
+ .createLibraryResource(id);
+ assertNotNull(resId);
+ final List<IJSFResourceFragment> located = _locator.locate(_project);
+ for (final IJSFResourceFragment res : located)
+ {
+ if (res.getId().equals(resId))
+ {
+ return res;
+ }
+ }
+ return null;
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/TestDTUIViewRoot.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/TestDTUIViewRoot.java
new file mode 100644
index 000000000..515c48928
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/TestDTUIViewRoot.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * 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.designtime.tests.views;
+
+import junit.framework.TestCase;
+
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
+import org.eclipse.jst.jsf.designtime.tests.DesignTimeTestsPlugin;
+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 TestDTUIViewRoot extends TestCase {
+
+ private static final String TESTJSP1_PATH = "testdata1.jsp";
+
+ private WebProjectTestEnvironment _webProjectTestEnv;
+ //private IFile _testJSP;
+ private JSFFacetedTestEnvironment _jsfFactedTestEnvironment;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ JSFTestUtil.setValidationEnabled(false);
+ JSFTestUtil.setInternetProxyPreferences(true,
+ "www-proxy.us.oracle.com", "80");
+
+ _webProjectTestEnv = new WebProjectTestEnvironment(getProjectName());
+ _webProjectTestEnv.createProject(false);
+
+ /*final IResource res =*/ _webProjectTestEnv.loadResourceInWebRoot(
+ DesignTimeTestsPlugin.getDefault().getBundle(),
+ "/testdata/testdata1.jsp.data", TESTJSP1_PATH);
+ //_testJSP = (IFile) res;
+
+ new JDTTestEnvironment(_webProjectTestEnv);
+
+ _jsfFactedTestEnvironment = new JSFFacetedTestEnvironment(
+ _webProjectTestEnv);
+ _jsfFactedTestEnvironment
+ .initialize(IJSFCoreConstants.FACET_VERSION_1_1);
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ private String getProjectName() {
+ return "TestDTUIViewRoot" + getName();
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/TestJSPViewDefnAdapter.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/TestJSPViewDefnAdapter.java
new file mode 100644
index 000000000..953e1a35c
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/TestJSPViewDefnAdapter.java
@@ -0,0 +1,231 @@
+/*******************************************************************************
+ * 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.designtime.tests.views;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jst.common.project.facet.core.JavaFacet;
+import org.eclipse.jst.jsf.context.resolver.structureddocument.IStructuredDocumentContextResolverFactory;
+import org.eclipse.jst.jsf.context.resolver.structureddocument.internal.ITextRegionContextResolver;
+import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext;
+import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContextFactory;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
+import org.eclipse.jst.jsf.designtime.DesignTimeApplicationManager;
+import org.eclipse.jst.jsf.designtime.context.DTFacesContext;
+import org.eclipse.jst.jsf.designtime.internal.view.IDTViewHandler;
+import org.eclipse.jst.jsf.designtime.internal.view.XMLViewDefnAdapter;
+import org.eclipse.jst.jsf.designtime.internal.view.XMLViewDefnAdapter.DTELExpression;
+import org.eclipse.jst.jsf.designtime.tests.DesignTimeTestsPlugin;
+import org.eclipse.jst.jsf.test.util.JSFTestUtil;
+import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
+import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
+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.sse.core.internal.provisional.text.IStructuredDocument;
+
+public class TestJSPViewDefnAdapter extends TestCase
+{
+ private final String ENV_JSF_VERSION = "jsfRuntimeVersion";
+
+ private JSFVersion _jsfVersion;
+
+ private WebProjectTestEnvironment _webProjectTestEnv;
+
+ private IFile _jspFile;
+
+ private IStructuredModel _structuredModel;
+
+ private final static ELData EMPTY_EXPR =
+ new ELData(
+ " ",
+ 566);
+ private final static ELData VAR_EXPR =
+ new ELData(
+ "myBean",
+ 599);
+ private final static ELData BEAN_PROP_EXPR =
+ new ELData(
+ "myBean.property",
+ 635);
+ private final static ELData BUILTIN_PROP_EXPR =
+ new ELData(
+ "paramValues.foo",
+ 680);
+ private final static ELData METHOD_EXPR =
+ new ELData(
+ "myBean.actionMethod",
+ 729);
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ JSFTestUtil.setValidationEnabled(false);
+
+ final String version = System.getProperty(ENV_JSF_VERSION);
+
+ if (version == null)
+ {
+ _jsfVersion = JSFVersion.V1_1;
+ }
+ else
+ {
+ _jsfVersion = JSFVersion.valueOfString(version);
+ }
+ // only 1.1 and 1.2 are supported
+ assertTrue(_jsfVersion == JSFVersion.V1_1
+ || _jsfVersion == JSFVersion.V1_2);
+
+ // assertNotNull(JSFCoreUtilHelper.getJSFRuntimeJarsDirectory(_jsfVersion));
+ //
+ final String jst_web_version =
+ (_jsfVersion == JSFVersion.V1_1) ? "2.4"
+ : ((_jsfVersion == JSFVersion.V1_2) ? "2.5" : null);
+ assertNotNull(jst_web_version);
+
+ final String jst_jsf_version = _jsfVersion.toString();
+
+ _webProjectTestEnv =
+ new WebProjectTestEnvironment(getClass().getName() + "_"
+ + getName(), JavaFacet.VERSION_1_5,
+ ProjectFacetsManager.getProjectFacet("jst.web")
+ .getVersion(jst_web_version));
+
+ _webProjectTestEnv.createProject(false);
+ assertNotNull(_webProjectTestEnv);
+ assertNotNull(_webProjectTestEnv.getTestProject());
+ assertTrue(_webProjectTestEnv.getTestProject().isAccessible());
+
+ final JSFFacetedTestEnvironment jsfFacetedTestEnv =
+ new JSFFacetedTestEnvironment(_webProjectTestEnv);
+ jsfFacetedTestEnv.initialize(jst_jsf_version);
+
+ _jspFile =
+ (IFile) _webProjectTestEnv.loadResourceInWebRoot(
+ DesignTimeTestsPlugin.getDefault().getBundle(),
+ "/testdata/testdata2.jsp.data", "testdata2.jsp");
+
+ _structuredModel =
+ StructuredModelManager.getModelManager().getModelForRead(
+ _jspFile);
+
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+
+ _structuredModel.releaseFromRead();
+ }
+
+ public final void testSanity()
+ {
+ final IStructuredDocument sdoc =
+ _structuredModel.getStructuredDocument();
+ assertNotNull(sdoc);
+
+ EMPTY_EXPR.assertELText(sdoc);
+ VAR_EXPR.assertELText(sdoc);
+ BEAN_PROP_EXPR.assertELText(sdoc);
+ BUILTIN_PROP_EXPR.assertELText(sdoc);
+ METHOD_EXPR.assertELText(sdoc);
+ }
+
+ public final void testGetELExpressionIModelContext() throws Exception
+ {
+ assertTrue(DesignTimeApplicationManager
+ .hasJSFDesignTime(_webProjectTestEnv.getTestProject()));
+
+ final DesignTimeApplicationManager manager =
+ DesignTimeApplicationManager.getInstance(_webProjectTestEnv
+ .getTestProject());
+ assertNotNull(manager);
+
+ IDTViewHandler handler = manager.getViewHandler();
+ DTFacesContext facesContext = manager.getFacesContext(_jspFile);
+ assertNotNull(facesContext);
+ assertTrue(handler.supportsViewDefinition(_jspFile));
+
+ XMLViewDefnAdapter adapter =
+ (XMLViewDefnAdapter) handler.getViewMetadataAdapterFactory(
+ facesContext).createAdapter(facesContext, "");
+ final IStructuredDocument sdoc = _structuredModel.getStructuredDocument();
+
+ checkELExpression(adapter, sdoc, EMPTY_EXPR);
+ checkELExpression(adapter, sdoc, VAR_EXPR);
+ checkELExpression(adapter, sdoc, BEAN_PROP_EXPR);
+ checkELExpression(adapter, sdoc, BUILTIN_PROP_EXPR);
+ checkELExpression(adapter, sdoc, METHOD_EXPR);
+ }
+
+ private void checkELExpression(final XMLViewDefnAdapter adapter,
+ final IStructuredDocument sdoc, final ELData elData)
+ throws Exception
+ {
+ final String expectedText = elData._expectedText;
+ final int offset = elData._offset;
+
+ // ensure that at ever valid offset in the EL expression, we get a
+ // valid el text back with it's sdoc's offset set to the start offset
+ // of the region.
+ for (int i = 0; i < expectedText.length(); i++)
+ {
+ final IStructuredDocumentContext context =
+ IStructuredDocumentContextFactory.INSTANCE.getContext(sdoc,offset+i);
+ final DTELExpression elExpr = adapter.getELExpression(context);
+
+ assertEquals(expectedText.trim(), elExpr.getText().trim());
+ assertEquals(offset, elExpr.getDocumentContext().getDocumentPosition());
+ }
+ }
+
+ private static class ELData
+ {
+ private final String _expectedText;
+ private final int _offset;
+
+ ELData(final String expectedText, int offset)
+ {
+ _expectedText = expectedText;
+ _offset = offset;
+ }
+
+ IStructuredDocumentContext getContext(IStructuredDocument sdoc)
+ {
+ final IStructuredDocumentContext context =
+ IStructuredDocumentContextFactory.INSTANCE.getContext(sdoc,
+ _offset);
+ assertNotNull(context);
+ return context;
+ }
+
+ String getELText(IStructuredDocument sdoc)
+ {
+ final ITextRegionContextResolver resolver =
+ IStructuredDocumentContextResolverFactory.INSTANCE
+ .getTextRegionResolver(getContext(sdoc));
+
+ assertEquals(DOMJSPRegionContexts.JSP_VBL_CONTENT, resolver
+ .getRegionType());
+ return resolver.getRegionText();
+ }
+
+ void assertELText(IStructuredDocument sdoc)
+ {
+ assertEquals(_expectedText, getELText(sdoc));
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/BaseStrategyTestClass.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/BaseStrategyTestClass.java
new file mode 100644
index 000000000..2cee60064
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/BaseStrategyTestClass.java
@@ -0,0 +1,131 @@
+/*******************************************************************************
+ * 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.designtime.tests.views.model.jsp;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ITagElement;
+import org.eclipse.jst.jsf.core.internal.tld.ITLDConstants;
+import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.JSPTagResolvingStrategy;
+import org.eclipse.jst.jsf.designtime.tests.views.model.jsp.VerifyRegistryUtil.CompositeVerifier;
+import org.eclipse.jst.jsf.designtime.tests.views.model.jsp.VerifyRegistryUtil.Verifier;
+
+public abstract class BaseStrategyTestClass extends BaseTestClass
+{
+ protected JSPTagResolvingStrategy _strategy;
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ _strategy = createStrategy();
+ }
+
+ // TODO: fix problems related to finding renderer type in commandButton
+ public final void testResolveTLDElementDeclaration()
+ {
+ for (final String uri : getTestUris())
+ {
+ final Map<String, ITagElement> tags = TestUtil
+ .constructTagElements(TestUtil.getTags(_tagRecords
+ .get(uri)), _strategy);
+
+ final List<Verifier> verifiers = createVerifiers(tags, uri);
+
+ final CompositeVerifier compVerifier =
+ new CompositeVerifier(verifiers,
+ getExpectedTagCount(uri).getMin(),
+ getExpectedTagCount(uri).getMax());
+
+ compVerifier.verify(tags);
+ }
+ }
+
+ protected abstract JSPTagResolvingStrategy createStrategy();
+
+ protected abstract List<String> getTestUris();
+
+ protected ExpectedTagCount getExpectedTagCount(final String uri)
+ {
+ if (ITLDConstants.URI_JSF_CORE.equals(uri))
+ {
+ switch(_jsfVersion)
+ {
+ case V1_0:
+ case V1_1:
+ return new ExpectedTagCount(18,18);
+
+ case V1_2:
+ return new ExpectedTagCount(20, 20);
+
+ default:
+ throw new IllegalStateException("Unknown version: "+_jsfVersion);
+ }
+ }
+ else if (ITLDConstants.URI_JSF_HTML.equals(uri))
+ {
+ return new ExpectedTagCount(25,25);
+ }
+
+ return null;
+ }
+
+ static class ExpectedTagCount
+ {
+ private final int _min;
+ private final int _max;
+ public ExpectedTagCount(final int min, final int max)
+ {
+ super();
+ assertTrue(min <= max);
+ this._max = max;
+ this._min = min;
+ }
+ public final int getMin()
+ {
+ return _min;
+ }
+ public final int getMax()
+ {
+ return _max;
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ protected List<Verifier> createVerifiers(
+ final Map<String, ITagElement> tagElements, final String uri)
+ {
+ if (ITLDConstants.URI_JSF_CORE.equals(uri))
+ {
+ switch (_jsfVersion)
+ {
+ case V1_0:
+ case V1_1:
+ return VerifyRegistryUtil.CORE_VERIFIERS_11;
+
+ case V1_2:
+ return VerifyRegistryUtil.CORE_VERIFIERS_12;
+
+ default:
+ return Collections.EMPTY_LIST;
+ }
+ }
+ else if (ITLDConstants.URI_JSF_HTML.equals(uri))
+ {
+ return VerifyRegistryUtil.HTML_VERIFIERS;
+ }
+
+ return Collections.EMPTY_LIST;
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/BaseTestClass.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/BaseTestClass.java
new file mode 100644
index 000000000..30893fc19
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/BaseTestClass.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * 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.designtime.tests.views.model.jsp;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import junit.framework.TestCase;
+
+import org.eclipse.jst.common.project.facet.core.JavaFacet;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.internal.tld.ITLDConstants;
+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.jsp.core.taglib.ITaglibRecord;
+import org.eclipse.jst.jsp.core.taglib.TaglibIndex;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+
+/**
+ * Does the basic setup for JSP tests.
+ *
+ * @author cbateman
+ *
+ */
+abstract class BaseTestClass extends TestCase
+{
+
+ protected WebProjectTestEnvironment _webProjectTestEnv;
+ protected Map<String, ITaglibRecord> _tagRecords;
+ protected JSFVersion _jsfVersion;
+
+ private final String ENV_JSF_VERSION = "jsfRuntimeVersion";
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ JSFTestUtil.setValidationEnabled(false);
+
+ final String version = System.getProperty(ENV_JSF_VERSION);
+
+ if (version == null)
+ {
+ fail("No version specified in " + ENV_JSF_VERSION);
+ }
+
+ _jsfVersion = JSFVersion.valueOfString(version);
+ // only 1.1 and 1.2 are supported
+ assertTrue(_jsfVersion == JSFVersion.V1_1
+ || _jsfVersion == JSFVersion.V1_2);
+
+ assertNotNull(JSFCoreUtilHelper.getJSFRuntimeJarsDirectory(_jsfVersion));
+
+ final String jst_web_version = (_jsfVersion == JSFVersion.V1_1) ? "2.4"
+ : ((_jsfVersion == JSFVersion.V1_2) ? "2.5" : null);
+ assertNotNull(jst_web_version);
+
+ final String jst_jsf_version = _jsfVersion.toString();
+
+ _webProjectTestEnv = new WebProjectTestEnvironment(getClass().getName()
+ + "_" + getName(), JavaFacet.VERSION_1_5, ProjectFacetsManager
+ .getProjectFacet("jst.web").getVersion(jst_web_version));
+
+ _webProjectTestEnv.createProject(false);
+ assertNotNull(_webProjectTestEnv);
+ assertNotNull(_webProjectTestEnv.getTestProject());
+ assertTrue(_webProjectTestEnv.getTestProject().isAccessible());
+
+ final JSFFacetedTestEnvironment jsfFacetedTestEnv = new JSFFacetedTestEnvironment(
+ _webProjectTestEnv);
+ jsfFacetedTestEnv.initialize(jst_jsf_version);
+
+ assertTrue(JSFCoreUtilHelper.addJSFRuntimeJarsToClasspath(_jsfVersion,
+ jsfFacetedTestEnv));
+
+ final ITaglibRecord[] tldrecs = TaglibIndex
+ .getAvailableTaglibRecords(_webProjectTestEnv.getTestProject()
+ .getFullPath());
+ _tagRecords = new HashMap<String, ITaglibRecord>();
+ for (final ITaglibRecord taglibRecord : tldrecs)
+ {
+ _tagRecords
+ .put(taglibRecord.getDescriptor().getURI(), taglibRecord);
+ }
+
+ assertNotNull(_tagRecords.get(ITLDConstants.URI_JSF_CORE));
+ assertNotNull(_tagRecords.get(ITLDConstants.URI_JSF_HTML));
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/JSPViewSuite.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/JSPViewSuite.java
new file mode 100644
index 000000000..493f18ea2
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/JSPViewSuite.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * 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.designtime.tests.views.model.jsp;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class JSPViewSuite
+{
+ public static Test suite()
+ {
+ // $JUnit-BEGIN$
+ final TestSuite suite = new TestSuite(
+ "Test for org.eclipse.jst.jsf.designtime.tests.JSPViewSuite");
+
+ suite.addTestSuite(TestDefaultJSPTagResolver.class);
+ if ("1.1".equals(System.getProperty("jsfRuntimeVersion")))
+ {
+ suite.addTestSuite(TestTagAnalyzer.class);
+ }
+ suite.addTestSuite(TestTagIntrospectingStrategy.class);
+ suite.addTestSuite(TestTLDNamespace.class);
+ suite.addTestSuite(TestTLDTagRegistry.class);
+
+ return suite;
+ // $JUnit-END$
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/TestDefaultJSPTagResolver.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/TestDefaultJSPTagResolver.java
new file mode 100644
index 000000000..6c0a91d43
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/TestDefaultJSPTagResolver.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * 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.designtime.tests.views.model.jsp;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.jst.jsf.core.internal.tld.ITLDConstants;
+import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.DefaultJSPTagResolver;
+import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.JSPTagResolvingStrategy;
+
+public class TestDefaultJSPTagResolver extends BaseStrategyTestClass
+{
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ }
+
+ public void testGetId()
+ {
+ assertEquals("org.eclipse.jst.jsf.metadata.DefaultJSPTagResolver", _strategy.getId());
+ }
+
+ @Override
+ protected JSPTagResolvingStrategy createStrategy()
+ {
+ return new DefaultJSPTagResolver(_webProjectTestEnv.getTestProject());
+ }
+
+ @Override
+ protected List<String> getTestUris()
+ {
+ return Collections.unmodifiableList(Arrays.asList(new String[]
+ { ITLDConstants.URI_JSF_CORE, ITLDConstants.URI_JSF_HTML }));
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/TestTLDNamespace.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/TestTLDNamespace.java
new file mode 100644
index 000000000..c81a61dc2
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/TestTLDNamespace.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * 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.designtime.tests.views.model.jsp;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jst.jsf.common.internal.policy.IdentifierOrderedIteratorPolicy;
+import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ITagElement;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.internal.tld.ITLDConstants;
+import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.CompositeTagResolvingStrategy;
+import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.DefaultJSPTagResolver;
+import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.TLDNamespace;
+import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.TagIntrospectingStrategy;
+import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDDocument;
+import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDElementDeclaration;
+
+public class TestTLDNamespace extends BaseTestClass
+{
+ private TLDNamespace _coreNS;
+ private TLDNamespace _htmlNS;
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ final List<String> policies = new ArrayList<String>();
+ policies.add(DefaultJSPTagResolver.ID);
+ policies.add(TagIntrospectingStrategy.ID);
+ final IdentifierOrderedIteratorPolicy<String> idOrderedPolicy =
+ new IdentifierOrderedIteratorPolicy<String>(policies);
+
+ final CompositeTagResolvingStrategy<TLDElementDeclaration> compStrategy =
+ new CompositeTagResolvingStrategy<TLDElementDeclaration>(idOrderedPolicy);
+
+ compStrategy.addStrategy(new TagIntrospectingStrategy(
+ _webProjectTestEnv.getTestProject()));
+ compStrategy.addStrategy(new DefaultJSPTagResolver(_webProjectTestEnv
+ .getTestProject()));
+
+ final TLDDocument coreDoc = TestUtil.getDocument(_tagRecords
+ .get(ITLDConstants.URI_JSF_CORE));
+ _coreNS = new TLDNamespace(coreDoc, compStrategy);
+
+ final TLDDocument htmlDoc = TestUtil.getDocument(_tagRecords
+ .get(ITLDConstants.URI_JSF_HTML));
+ _htmlNS = new TLDNamespace(htmlDoc, compStrategy);
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ }
+
+ public void testGetNSUri()
+ {
+ assertEquals(ITLDConstants.URI_JSF_CORE, _coreNS.getNSUri());
+ assertEquals(ITLDConstants.URI_JSF_HTML, _htmlNS.getNSUri());
+ }
+
+ public void testGetViewElements()
+ {
+ final Map<String, ITagElement> coreElements = TestUtil
+ .constructTagElements(_coreNS.getViewElements());
+
+ if (_jsfVersion == JSFVersion.V1_2)
+ {
+ VerifyRegistryUtil.runVerifiers(VerifyRegistryUtil.CORE_VERIFIERS_12, coreElements);
+ }
+ else
+ {
+ VerifyRegistryUtil.runVerifiers(VerifyRegistryUtil.CORE_VERIFIERS_11, coreElements);
+ }
+
+ final Map<String, ITagElement> htmlElements = TestUtil
+ .constructTagElements(_htmlNS.getViewElements());
+ VerifyRegistryUtil.runVerifiers(VerifyRegistryUtil.HTML_VERIFIERS,
+ htmlElements);
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/TestTLDTagRegistry.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/TestTLDTagRegistry.java
new file mode 100644
index 000000000..b8b8beaf4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/TestTLDTagRegistry.java
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * 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.designtime.tests.views.model.jsp;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+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.core.internal.tld.ITLDConstants;
+import org.eclipse.jst.jsf.designtime.internal.view.model.ITagRegistry;
+import org.eclipse.jst.jsf.designtime.internal.view.model.TagRegistryFactory.TagRegistryFactoryException;
+import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.registry.TLDRegistryManager.MyRegistryFactory;
+import org.eclipse.jst.jsf.designtime.tests.views.model.jsp.VerifyRegistryUtil.CompositeVerifier;
+
+public class TestTLDTagRegistry extends BaseTestClass
+{
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ }
+
+ public void testGetRegistry() throws TagRegistryFactoryException
+ {
+ final ITagRegistry registry = new MyRegistryFactory()
+ .createTagRegistry(_webProjectTestEnv.getTestProject());
+
+ assertNotNull(registry);
+ }
+
+ public void testGetAllTagLibraries() throws TagRegistryFactoryException
+ {
+ final ITagRegistry registry = new MyRegistryFactory()
+ .createTagRegistry(_webProjectTestEnv.getTestProject());
+
+ assertNotNull(registry);
+
+ final Collection<? extends Namespace> libraries = registry
+ .getAllTagLibraries();
+
+ final Map<String, Map<String, ITagElement>> elements = new HashMap<String, Map<String, ITagElement>>();
+
+ for (final Namespace ns : libraries)
+ {
+ for (final Iterator<?> it = ns.getViewElements().iterator(); it
+ .hasNext();)
+ {
+ final ITagElement tagElement = (ITagElement) it.next();
+ assertNotNull(
+ "Tag element shouldn't be null: " + ns.getNSUri(),
+ tagElement);
+
+ Map<String, ITagElement> elementMap = elements.get(ns
+ .getNSUri());
+
+ if (elementMap == null)
+ {
+ elementMap = new HashMap<String, ITagElement>();
+ elements.put(ns.getNSUri(), elementMap);
+ }
+
+ elementMap.put(tagElement.getName(), tagElement);
+ }
+ }
+
+ assertTrue(elements.containsKey(ITLDConstants.URI_JSF_CORE));
+ assertTrue(elements.containsKey(ITLDConstants.URI_JSF_HTML));
+
+ verifyCore(elements.get(ITLDConstants.URI_JSF_CORE));
+ verifyHtml(elements.get(ITLDConstants.URI_JSF_HTML));
+ }
+
+ private void verifyCore(final Map<String, ITagElement> tagElements)
+ {
+ CompositeVerifier compVerifier = null;
+
+ switch (_jsfVersion)
+ {
+ case V1_0:
+ case V1_1:
+ compVerifier = new CompositeVerifier(
+ VerifyRegistryUtil.CORE_VERIFIERS_11, 18, 18);
+ break;
+ case V1_2:
+ compVerifier = new CompositeVerifier(
+ VerifyRegistryUtil.CORE_VERIFIERS_12, 20, 20);
+ break;
+ }
+
+ assertNotNull(compVerifier);
+ compVerifier.verify(tagElements);
+ }
+
+ private void verifyHtml(final Map<String, ITagElement> tagElements)
+ {
+ CompositeVerifier compVerifier = new CompositeVerifier(
+ VerifyRegistryUtil.HTML_VERIFIERS, 25, 25);
+
+ compVerifier.verify(tagElements);
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/TestTagAnalyzer.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/TestTagAnalyzer.java
new file mode 100644
index 000000000..ccecb416e
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/TestTagAnalyzer.java
@@ -0,0 +1,251 @@
+/*******************************************************************************
+ * 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.designtime.tests.views.model.jsp;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentTypeInfo;
+import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.IComponentTagElement;
+import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.IHandlerTagElement;
+import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.IJSFTagElement;
+import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.IHandlerTagElement.TagHandlerType;
+import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.IJSFTagElement.TagType;
+import org.eclipse.jst.jsf.core.internal.tld.ITLDConstants;
+import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.TLDTagElement;
+import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.analyzer.TagAnalyzer;
+import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDElementDeclaration;
+import org.eclipse.jst.jsp.core.taglib.ITaglibRecord;
+
+public class TestTagAnalyzer extends BaseTestClass
+{
+ private TLDElementDeclaration _inputTextTag;
+ private TLDElementDeclaration _commandButtonTag;
+ private TLDElementDeclaration _convertDateTimeTag;
+// private TLDElementDeclaration _validateDoubleRangeTag;
+// private TLDElementDeclaration _convertNumberTag;
+// private TLDElementDeclaration _validateLengthTag;
+ private TLDElementDeclaration _validateLongRangeTag;
+ private TLDElementDeclaration _facetTag;
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ final ITaglibRecord coreTags = _tagRecords
+ .get(ITLDConstants.URI_JSF_CORE);
+ final ITaglibRecord htmlTags = _tagRecords
+ .get(ITLDConstants.URI_JSF_HTML);
+
+ _convertDateTimeTag = TestUtil.getTag(coreTags, "convertDateTime");
+ // TODO:
+// _validateDoubleRangeTag = TestUtil.getTag(coreTags,
+// "validateDoubleRange");
+// _convertNumberTag = TestUtil.getTag(coreTags, "convertNumber");
+// _validateLengthTag = TestUtil.getTag(coreTags, "validateLength");
+ _validateLongRangeTag = TestUtil.getTag(coreTags, "validateLongRange");
+ _facetTag = TestUtil.getTag(coreTags, "facet");
+
+ _inputTextTag = TestUtil.getTag(htmlTags, "inputText");
+ _commandButtonTag = TestUtil.getTag(htmlTags, "commandButton");
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ }
+
+ public void testFindComponentType()
+ {
+ final String componentType = TagAnalyzer.findComponentType(
+ _inputTextTag, _webProjectTestEnv.getTestProject());
+ assertEquals("javax.faces.HtmlInputText", componentType);
+ }
+
+ // TODO: introspection of converters and validators is flaky at best
+ // and very dependent on what's on the classpath
+// public void testFindConverterType()
+// {
+// final String converterType = TagAnalyzer.findConverterType(
+// _convertDateTimeTag, _webProjectTestEnv.getTestProject());
+//
+// // TODO: this doesn't work and may never work for JSF 1.2 without
+// // meta-data because of the *ELTag's.
+// assertEquals(null, converterType);
+// }
+//
+// public void testFindValidatorType()
+// {
+// final String validatorType = TagAnalyzer.findValidatorType(
+// _validateDoubleRangeTag, _webProjectTestEnv.getTestProject());
+//
+// // TODO: this doesn't work and may never work for JSF 1.2 without
+// // meta-data because of the *ELTag's.
+// assertEquals("javax.faces.DoubleRange", validatorType);
+// }
+
+ public void testCreateTLDTagElement()
+ {
+ final IProject project = _webProjectTestEnv.getTestProject();
+ verifyCommandButton((IComponentTagElement) TagAnalyzer
+ .createTLDTagElement(_commandButtonTag, project));
+
+ verifyCommandButton((IComponentTagElement) TagAnalyzer
+ .createTLDTagElement(_commandButtonTag, project));
+ // TODO:
+// verifyNumberConverter(((IConverterTagElement) TagAnalyzer
+// .createTLDTagElement(_convertNumberTag, project)));
+// verifyLengthValidator(((IValidatorTagElement) TagAnalyzer
+// .createTLDTagElement(_validateLengthTag, project)));
+ verifyFacetHandler(((IHandlerTagElement) TagAnalyzer
+ .createTLDTagElement(_facetTag, project)));
+ // XXX: verify robustness when the TLDElementDeclaration has a
+ // bad tagClass name.
+ }
+
+ public void testCreateComponentTagElement()
+ {
+ final TLDTagElement tagElement = TagAnalyzer.createComponentTagElement(
+ _commandButtonTag, _webProjectTestEnv.getTestProject());
+ assertNotNull(tagElement);
+ assertTrue(tagElement instanceof IComponentTagElement);
+ verifyCommandButton((IComponentTagElement) tagElement);
+ }
+
+ private void verifyCommandButton(
+ final IComponentTagElement componentTagElement)
+ {
+ assertEquals(TagType.COMPONENT, componentTagElement.getType());
+ final ComponentTypeInfo componentTypeInfo = componentTagElement
+ .getComponent();
+ assertEquals("javax.faces.component.html.HtmlCommandButton",
+ componentTypeInfo.getClassName());
+ assertEquals("javax.faces.HtmlCommandButton", componentTypeInfo
+ .getComponentType());
+ assertEquals("javax.faces.Command", componentTypeInfo
+ .getComponentFamily());
+
+ new Exception("TODO: derive renderer type from configuration files where possible")
+ .printStackTrace(System.err);
+ //assertEquals("javax.faces.Button", componentTypeInfo.getRenderFamily());
+ }
+
+ // TODO: converter and validator introspection are flaky at best
+// public void testCreateConverterTagElement()
+// {
+// final TLDTagElement tagElement = TagAnalyzer.createConverterTagElement(
+// _convertNumberTag, _webProjectTestEnv.getTestProject());
+// assertNotNull(tagElement);
+// assertTrue(tagElement instanceof IConverterTagElement);
+// verifyNumberConverter((IConverterTagElement) tagElement);
+// }
+//
+// private void verifyNumberConverter(
+// final IConverterTagElement converterTagElement)
+// {
+// assertEquals(TagType.CONVERTER, converterTagElement.getType());
+// final ConverterTypeInfo converterTypeInfo = converterTagElement
+// .getConverter();
+// assertEquals("javax.faces.convert.NumberConverter", converterTypeInfo
+// .getClassName());
+// assertEquals("javax.faces.Number", converterTypeInfo.getConverterId());
+// }
+//
+// public void testCreateValidatorTagElement()
+// {
+// final TLDTagElement tagElement = TagAnalyzer.createValidatorTagElement(
+// _validateLengthTag, _webProjectTestEnv.getTestProject());
+// assertNotNull(tagElement);
+// assertTrue(tagElement instanceof IValidatorTagElement);
+// verifyLengthValidator((IValidatorTagElement) tagElement);
+// }
+//
+// private void verifyLengthValidator(
+// final IValidatorTagElement validatorTagElement)
+// {
+// assertEquals(TagType.VALIDATOR, validatorTagElement.getType());
+// final ValidatorTypeInfo converterTypeInfo = validatorTagElement
+// .getValidator();
+// assertEquals("javax.faces.validator.LengthValidator", converterTypeInfo
+// .getClassName());
+// assertEquals("javax.faces.Length", converterTypeInfo.getValidatorId());
+// }
+
+ public void testCreateHandlerTagElement() throws Exception
+ {
+ final IType type = JavaCore.create(_webProjectTestEnv.getTestProject())
+ .findType(_facetTag.getTagclass());
+ final TLDTagElement tagElement = TagAnalyzer.createHandlerTagElement(
+ _facetTag, type);
+ assertNotNull(tagElement);
+ assertTrue(tagElement instanceof IHandlerTagElement);
+ verifyFacetHandler((IHandlerTagElement) tagElement);
+ }
+
+ private void verifyFacetHandler(IHandlerTagElement tagElement)
+ {
+ assertEquals(TagHandlerType.FACET, tagElement.getTagHandlerType());
+ }
+
+ public void testGetJSFComponentTagType() throws Exception
+ {
+ { // inputText is a component
+ final String inputTextTagClass = _inputTextTag.getTagclass();
+ final IType tagClassType = JavaCore.create(
+ _webProjectTestEnv.getTestProject()).findType(
+ inputTextTagClass);
+ assertEquals(IJSFTagElement.TagType.COMPONENT, TagAnalyzer
+ .getJSFComponentTagType(tagClassType, _webProjectTestEnv
+ .getTestProject()));
+ }
+
+ { // validateLongRange is a validator
+ final String validateLongRangeTagClass = _validateLongRangeTag
+ .getTagclass();
+ final IType tagClassType = JavaCore.create(
+ _webProjectTestEnv.getTestProject()).findType(
+ validateLongRangeTagClass);
+ assertEquals(IJSFTagElement.TagType.VALIDATOR, TagAnalyzer
+ .getJSFComponentTagType(tagClassType, _webProjectTestEnv
+ .getTestProject()));
+ }
+
+ { // convertDateTime
+ final String converterDateTimeTagClass = _convertDateTimeTag
+ .getTagclass();
+ final IType tagClassType = JavaCore.create(
+ _webProjectTestEnv.getTestProject()).findType(
+ converterDateTimeTagClass);
+ assertEquals(IJSFTagElement.TagType.CONVERTER, TagAnalyzer
+ .getJSFComponentTagType(tagClassType, _webProjectTestEnv
+ .getTestProject()));
+
+ }
+
+ { // loadBundle is not a component tag
+
+ final ITaglibRecord coreTags = _tagRecords
+ .get(ITLDConstants.URI_JSF_CORE);
+
+ final TLDElementDeclaration loadBundleTag = TestUtil.getTag(
+ coreTags, "loadBundle");
+
+ assertNotNull(loadBundleTag);
+ final String loadBundleTagClass = loadBundleTag.getTagclass();
+ final IType tagClassType = JavaCore.create(
+ _webProjectTestEnv.getTestProject()).findType(
+ loadBundleTagClass);
+ assertNull(TagAnalyzer.getJSFComponentTagType(tagClassType,
+ _webProjectTestEnv.getTestProject()));
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/TestTagIntrospectingStrategy.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/TestTagIntrospectingStrategy.java
new file mode 100644
index 000000000..38d1a2938
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/TestTagIntrospectingStrategy.java
@@ -0,0 +1,205 @@
+/*******************************************************************************
+ * 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.designtime.tests.views.model.jsp;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentTypeInfo;
+import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ConverterTypeInfo;
+import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ValidatorTypeInfo;
+import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ITagElement;
+import org.eclipse.jst.jsf.common.runtime.tests.model.RuntimeTestUtil;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.internal.tld.IJSFConstants;
+import org.eclipse.jst.jsf.core.internal.tld.ITLDConstants;
+import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.JSPTagResolvingStrategy;
+import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.TagIntrospectingStrategy;
+import org.eclipse.jst.jsf.designtime.tests.views.model.jsp.VerifyRegistryUtil.ComponentTagVerifier;
+import org.eclipse.jst.jsf.designtime.tests.views.model.jsp.VerifyRegistryUtil.ConverterTagVerifier;
+import org.eclipse.jst.jsf.designtime.tests.views.model.jsp.VerifyRegistryUtil.ValidatorTagVerifier;
+import org.eclipse.jst.jsf.designtime.tests.views.model.jsp.VerifyRegistryUtil.Verifier;
+
+public class TestTagIntrospectingStrategy extends BaseStrategyTestClass
+{
+ @Override
+ protected JSPTagResolvingStrategy createStrategy()
+ {
+ return new TagIntrospectingStrategy(_webProjectTestEnv.getTestProject());
+ }
+
+ public void testGetNotFoundIndicator()
+ {
+ assertNull(_strategy.getNotFoundIndicator());
+ }
+
+ public void testGetId()
+ {
+ assertEquals("org.eclipse.jst.jsf.designtime.TagIntrospectingStrategy",
+ _strategy.getId());
+ }
+
+ @Override
+ protected List<String> getTestUris()
+ {
+ return Collections.unmodifiableList(Arrays.asList(new String[]
+ { ITLDConstants.URI_JSF_CORE, ITLDConstants.URI_JSF_HTML }));
+ }
+
+ @Override
+ protected List<Verifier> createVerifiers(
+ final Map<String, ITagElement> tagElements, final String uri)
+ {
+ if (ITLDConstants.URI_JSF_CORE.equals(uri))
+ {
+ return createCoreVerifiers(_jsfVersion, tagElements);
+ }
+ else if (ITLDConstants.URI_JSF_HTML.equals(uri))
+ {
+ return createHtmlVerifiers(_jsfVersion, tagElements);
+ }
+ return super.createVerifiers(tagElements, uri);
+ }
+
+ private static List<Verifier> createHtmlVerifiers(JSFVersion jsfVersion,
+ Map<String, ITagElement> tagElements) {
+ // Copy the standard verifiers, but replace the component ones with
+ // clones that validate null renderer.
+ List<Verifier> verifiers = new ArrayList<Verifier>(VerifyRegistryUtil.HTML_VERIFIERS);
+
+ List<Verifier> replacements = new ArrayList<Verifier>();
+ for (final Iterator<Verifier> it = verifiers.iterator(); it.hasNext();)
+ {
+ final Verifier next = it.next();
+ if (next instanceof ComponentTagVerifier)
+ {
+ final ComponentTagVerifier replacementVerifier =
+ cloneVerifierWithNullRenderType((ComponentTagVerifier) next);
+ it.remove();
+ replacements.add(replacementVerifier);
+ }
+ }
+
+ for (final Verifier verifier : replacements)
+ {
+ verifiers.add(verifier);
+ }
+
+ return Collections.unmodifiableList(verifiers);
+ }
+
+ private static ComponentTagVerifier cloneVerifierWithNullRenderType(final ComponentTagVerifier tagVerifier)
+ {
+ ComponentTypeInfo typeInfo = tagVerifier._typeInfo;
+ ComponentTypeInfo newTypeInfo = new ComponentTypeInfo(typeInfo.getComponentType(), typeInfo.getClassName(), typeInfo.getSuperClasses(), typeInfo.getInterfaces(), typeInfo.getComponentFamily(), null);
+ return new ComponentTagVerifier(tagVerifier._tagId, newTypeInfo);
+ }
+
+ @Override
+ protected ExpectedTagCount getExpectedTagCount(String uri)
+ {
+ if (ITLDConstants.URI_JSF_CORE.equals(uri))
+ {
+ switch (_jsfVersion)
+ {
+ case V1_0:
+ case V1_1:
+ return new ExpectedTagCount(14, 15);
+ case V1_2:
+ return new ExpectedTagCount(13, 15);
+ default:
+ throw new IllegalStateException(_jsfVersion.toString());
+ }
+ }
+ // default
+ return super.getExpectedTagCount(uri);
+ }
+
+ static List<Verifier> createCoreVerifiers(final JSFVersion jsfVersion,
+ final Map<String, ITagElement> tagElements)
+ {
+ // default for JSF 1.2 where we can resolve converters and validators
+ // using tags
+ ConverterTypeInfo dateTimeConverterTypeInfo = ConverterTypeInfo.UNKNOWN;
+ ConverterTypeInfo numberConverterTypeInfo = ConverterTypeInfo.UNKNOWN;
+ ValidatorTypeInfo doubleRangeValidatorTypeInfo = ValidatorTypeInfo.UNKNOWN;
+ ValidatorTypeInfo lengthValidatorTypeInfo = ValidatorTypeInfo.UNKNOWN;
+ ValidatorTypeInfo longRangeValidatorTypeInfo = ValidatorTypeInfo.UNKNOWN;
+
+ if (jsfVersion == JSFVersion.V1_2)
+ {
+ assertTrue("Size was " + tagElements.size()
+ + " but expected [13,15]",
+ tagElements.size() >= 13 && tagElements.size() <= 15);
+ // the JSF 1.2 impl doesn't resolve converters and validators
+
+ // MyFaces resolves extra.
+
+ if (tagElements.size() == 15)
+ {
+ doubleRangeValidatorTypeInfo = RuntimeTestUtil.VALIDATORINFO_DOUBLERANGE;
+ lengthValidatorTypeInfo = RuntimeTestUtil.VALIDATORINFO_LENGTH;
+ longRangeValidatorTypeInfo = RuntimeTestUtil.VALIDATORINFO_LONGRANGE;
+ }
+ }
+ else
+ {
+ // ri doesn't respect the getComponentType contract so MyFaces
+ // will resolve 15, ri only 14
+ assertTrue("Size was " + tagElements.size()
+ + " but expected [14,15]", tagElements.size() >= 14
+ && tagElements.size() <= 15);
+ // this only get resolver properly if the classpath is set up with
+ // the right pre-req's, so there's no point in testing right now.
+// dateTimeConverterTypeInfo = RuntimeTestUtil.CONVERTERINFO_DATETIME;
+// numberConverterTypeInfo = RuntimeTestUtil.CONVERTERINFO_NUMBER;
+// doubleRangeValidatorTypeInfo = RuntimeTestUtil.VALIDATORINFO_DOUBLERANGE;
+// lengthValidatorTypeInfo = RuntimeTestUtil.VALIDATORINFO_LENGTH;
+// longRangeValidatorTypeInfo = RuntimeTestUtil.VALIDATORINFO_LONGRANGE;
+ }
+ final List<Verifier> verifiers = new ArrayList<Verifier>();
+ if (jsfVersion != JSFVersion.V1_2)
+ {
+ verifiers.add(VerifyRegistryUtil.ATTRIBUTE_VERIFIER);
+ }
+
+ verifiers.add(new ConverterTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_CONVERTDATETIME,
+ dateTimeConverterTypeInfo));
+ verifiers.add(VerifyRegistryUtil.CONVERTER_VERIFIER);
+ verifiers.add(new ConverterTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_CONVERTNUMBER,
+ numberConverterTypeInfo));
+ verifiers.add(VerifyRegistryUtil.FACET_VERIFIER);
+ verifiers.add(VerifyRegistryUtil.PARAM_VERIFIER);
+ verifiers.add(VerifyRegistryUtil.SELECTITEM_VERIFIER);
+ verifiers.add(VerifyRegistryUtil.SELECTITEMS_VERIFIER);
+ verifiers.add(VerifyRegistryUtil.SUBVIEW_VERIFIER);
+ verifiers.add(new ValidatorTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_VALIDATEDOUBLERANGE,
+ doubleRangeValidatorTypeInfo));
+ verifiers.add(new ValidatorTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_VALIDATELENGTH,
+ lengthValidatorTypeInfo));
+ verifiers.add(new ValidatorTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_VALIDATELONGRANGE,
+ longRangeValidatorTypeInfo));
+ verifiers.add(VerifyRegistryUtil.VALIDATOR_VERIFIER);
+ verifiers.add(VerifyRegistryUtil.VERBATIM_VERIFIER);
+
+ return verifiers;
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/TestUtil.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/TestUtil.java
new file mode 100644
index 000000000..44b58428e
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/TestUtil.java
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * 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.designtime.tests.views.model.jsp;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import junit.framework.Assert;
+
+import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ITagElement;
+import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.ITagResolvingStrategy;
+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.internal.contentmodel.tld.provisional.TLDElementDeclaration;
+import org.eclipse.jst.jsp.core.taglib.ITaglibRecord;
+import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
+import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
+
+/**
+ * Local test utility functions.
+ *
+ * @author cbateman
+ *
+ */
+final class TestUtil extends Assert
+{
+ public static TLDDocument getDocument(final ITaglibRecord record)
+ {
+ final CMDocumentFactoryTLD factory = new CMDocumentFactoryTLD();
+ final TLDDocument doc = (TLDDocument) factory.createCMDocument(record);
+ return doc;
+ }
+
+ public static TLDElementDeclaration getTag(final ITaglibRecord record,
+ final String name)
+ {
+ final TLDDocument doc = getDocument(record);
+ assertNotNull(doc);
+ final CMNode cmNode = doc.getElements().getNamedItem(name);
+ assertTrue(cmNode instanceof TLDElementDeclaration);
+ return (TLDElementDeclaration) cmNode;
+ }
+
+ public static List<TLDElementDeclaration> getTags(final ITaglibRecord record)
+ {
+ final TLDDocument doc = getDocument(record);
+ assertNotNull(doc);
+ final CMNamedNodeMap nodes = doc.getElements();
+
+ final List<TLDElementDeclaration> tags = new ArrayList<TLDElementDeclaration>();
+ for (final Iterator<?> it = nodes.iterator(); it.hasNext();)
+ {
+ final CMNode cmNode = (CMNode) it.next();
+ assertTrue(cmNode instanceof TLDElementDeclaration);
+ tags.add((TLDElementDeclaration) cmNode);
+ }
+ return tags;
+ }
+
+ public static Map<String, ITagElement> constructTagElements(Collection<? extends ITagElement> elements)
+ {
+ Map<String, ITagElement> map = new HashMap<String, ITagElement>();
+
+ for (ITagElement element : elements)
+ {
+ map.put(element.getName(), element);
+ }
+
+ return map;
+ }
+
+ public static Map<String, ITagElement> constructTagElements(
+ final List<TLDElementDeclaration> tlds,
+ final ITagResolvingStrategy<TLDElementDeclaration, String> strategy)
+ {
+ final Map<String, ITagElement> tagElements =
+ new HashMap<String, ITagElement>();
+ for (final TLDElementDeclaration tld : tlds)
+ {
+ final ITagElement tagElement = strategy.resolve(tld);
+ if (tagElement != null)
+ {
+ assertNotNull(tagElement.getName());
+ tagElements.put(tagElement.getName(), tagElement);
+ }
+ }
+
+ return tagElements;
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/VerifyRegistryUtil.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/VerifyRegistryUtil.java
new file mode 100644
index 000000000..a7ad4f5b5
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/model/jsp/VerifyRegistryUtil.java
@@ -0,0 +1,464 @@
+/*******************************************************************************
+ * 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.designtime.tests.views.model.jsp;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import junit.framework.Assert;
+import junit.framework.AssertionFailedError;
+
+import org.eclipse.jst.jsf.common.dom.TagIdentifier;
+import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentTypeInfo;
+import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ConverterTypeInfo;
+import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ValidatorTypeInfo;
+import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.IComponentTagElement;
+import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.IConverterTagElement;
+import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.IJSFTagElement;
+import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ITagElement;
+import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.IValidatorTagElement;
+import org.eclipse.jst.jsf.common.runtime.tests.model.RuntimeTestUtil;
+import org.eclipse.jst.jsf.core.internal.tld.IJSFConstants;
+
+public class VerifyRegistryUtil extends Assert
+{
+ // core verifiers
+ public static final Verifier ACTIONLISTENENER_VERIFIER = new TagHandlerVerifier(
+ IJSFConstants.TAG_IDENTIFIER_ACTIONLISTENER);
+
+ public static final Verifier ATTRIBUTE_VERIFIER = new TagHandlerVerifier(
+ IJSFConstants.TAG_IDENTIFIER_ATTRIBUTE);
+
+ public static final Verifier CONVERTDATETIME_VERIFIER = new ConverterTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_CONVERTDATETIME,
+ RuntimeTestUtil.CONVERTERINFO_DATETIME);
+
+ public static final Verifier CONVERTER_VERIFIER = new ConverterTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_CONVERTER, ConverterTypeInfo.UNKNOWN);
+
+ public static final Verifier CONVERTNUMBER_VERIFIER = new ConverterTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_CONVERTNUMBER,
+ RuntimeTestUtil.CONVERTERINFO_NUMBER);
+
+ public static final Verifier FACET_VERIFIER = new TagHandlerVerifier(
+ IJSFConstants.TAG_IDENTIFIER_FACET);
+
+ public static final Verifier LOADBUNDLE_VERIFIER = new TagHandlerVerifier(
+ IJSFConstants.TAG_IDENTIFIER_LOADBUNDLE);
+
+ public static final Verifier PARAM_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_PARAM, RuntimeTestUtil.COMPINFO_PARAM);
+
+ public static final Verifier PHASELISTENER_VERIFIER = new TagHandlerVerifier(
+ IJSFConstants.TAG_IDENTIFIER_PHASELISTENER);
+
+ public static final Verifier SELECTITEM_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_SELECTITEM,
+ RuntimeTestUtil.COMPINFO_SELECTITEM);
+
+ public static final Verifier SELECTITEMS_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_SELECTITEMS,
+ RuntimeTestUtil.COMPINFO_SELECTITEMS);
+
+ public static final Verifier SETPROPERTYACTIONLISTENER_VERIFIER = new TagHandlerVerifier(
+ IJSFConstants.TAG_IDENTIFIER_SETPROPERTYACTIONLISTENER);
+
+ public static final Verifier SUBVIEW_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_SUBVIEW,
+ RuntimeTestUtil.COMPINFO_SUBVIEW);
+
+ public static final Verifier VALIDATEDOUBLERANGE_VERIFIER = new ValidatorTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_VALIDATEDOUBLERANGE,
+ RuntimeTestUtil.VALIDATORINFO_DOUBLERANGE);
+
+ public static final Verifier VALIDATELENGTH_VERIFIER = new ValidatorTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_VALIDATELENGTH,
+ RuntimeTestUtil.VALIDATORINFO_LENGTH);
+
+ public static final Verifier VALIDATELONGRANGE_VERIFIER = new ValidatorTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_VALIDATELONGRANGE,
+ RuntimeTestUtil.VALIDATORINFO_LONGRANGE);
+
+ public static final Verifier VALIDATOR_VERIFIER = new ValidatorTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_VALIDATOR, ValidatorTypeInfo.UNKNOWN);
+
+ public static final Verifier VALUECHANGELISTENER_VERIFIER = new TagHandlerVerifier(
+ IJSFConstants.TAG_IDENTIFIER_VALUECHANGELISTENER);
+
+ public static final Verifier VERBATIM_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_VERBATIM,
+ RuntimeTestUtil.COMPINFO_VERBATIM);
+
+ public static final Verifier VIEW_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_VIEW, RuntimeTestUtil.COMPINFO_VIEW);
+
+ // html verifier
+ public static final Verifier COLUMN_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_COLUMN,
+ RuntimeTestUtil.COMPINFO_COLUMN);
+
+ public static final Verifier COMMANDBUTTON_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON,
+ RuntimeTestUtil.COMPINFO_COMMAND);
+
+ public static final Verifier COMMANDLINK_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_COMMANDLINK,
+ RuntimeTestUtil.COMPINFO_COMMANDLINK);
+
+ public static final Verifier DATATABLE_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_DATA_TABLE,
+ RuntimeTestUtil.COMPINFO_DATATABLE);
+
+ public static final Verifier FORM_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_FORM, RuntimeTestUtil.COMPINFO_FORM);
+
+ public static final Verifier GRAPHICIMAGE_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_GRAPHICIMAGE,
+ RuntimeTestUtil.COMPINFO_GRAPHIC);
+
+ public static final Verifier INPUTHIDDEN_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_INPUTHIDDEN,
+ RuntimeTestUtil.COMPINFO_HIDDEN);
+
+ public static final Verifier INPUTSECRET_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_INPUTSECRET,
+ RuntimeTestUtil.COMPINFO_SECRET);
+
+ public static final Verifier INPUTTEXT_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_INPUTTEXT,
+ RuntimeTestUtil.COMPINFO_INPUTTEXT);
+
+ public static final Verifier INPUTTEXTAREA_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_INPUTTEXTAREA,
+ RuntimeTestUtil.COMPINFO_INPUTTEXTAREA);
+
+ public static final Verifier MESSAGE_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_MESSAGE,
+ RuntimeTestUtil.COMPINFO_MESSAGE);
+
+ public static final Verifier MESSAGES_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_MESSAGES,
+ RuntimeTestUtil.COMPINFO_MESSAGES);
+
+ public static final Verifier OUTPUTFORMAT_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_OUTPUTFORMAT,
+ RuntimeTestUtil.COMPINFO_OUTPUTFORMAT);
+
+ public static final Verifier OUTPUTLABEL_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_OUTPUTLABEL,
+ RuntimeTestUtil.COMPINFO_OUTPUTLABEL);
+
+ public static final Verifier OUTPUTLINK_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_OUTPUTLINK,
+ RuntimeTestUtil.COMPINFO_OUTPUTLINK);
+
+ public static final Verifier OUTPUTTEXT_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_OUTPUTTEXT,
+ RuntimeTestUtil.COMPINFO_OUTPUTTEXT);
+
+ public static final Verifier PANELGRID_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_PANEL_GRID,
+ RuntimeTestUtil.COMPINFO_PANELGRID);
+
+ public static final Verifier PANELGROUP_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_PANEL_GROUP,
+ RuntimeTestUtil.COMPINFO_PANELGROUP);
+
+ public static final Verifier SELECTBOOLEANCHECKBOX_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_SELECTBOOLEANCHECKBOX,
+ RuntimeTestUtil.COMPINFO_SELECTBOOLEANCHECKBOX);
+
+ public static final Verifier SELECTMANYCHECKBOX_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_SELECTMANYCHECKBOX,
+ RuntimeTestUtil.COMPINFO_SELECTMANYCHECKBOX);
+
+ public static final Verifier SELECTMANYLISTBOX_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_SELECTMANYLISTBOX,
+ RuntimeTestUtil.COMPINFO_SELECTMANYLISTBOX);
+
+ public static final Verifier SELECTMANYMENU_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_SELECTMANYMENU,
+ RuntimeTestUtil.COMPINFO_SELECTMANYMENU);
+
+ public static final Verifier SELECTONELISTBOX_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_SELECTONELISTBOX,
+ RuntimeTestUtil.COMPINFO_SELECTONELISTBOX);
+
+ public static final Verifier SELECTONEMENU_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_SELECTONEMENU,
+ RuntimeTestUtil.COMPINFO_SELECTONEMENU);
+
+ public static final Verifier SELECTONERADIO_VERIFIER = new ComponentTagVerifier(
+ IJSFConstants.TAG_IDENTIFIER_SELECTONERADIO,
+ RuntimeTestUtil.COMPINFO_SELECTONERADIO);
+
+ public static final List<Verifier> CORE_VERIFIERS_11;
+ public static final List<Verifier> CORE_VERIFIERS_12;
+
+ public static final List<Verifier> HTML_VERIFIERS;
+
+ static
+ {
+ List<Verifier> verifiers = new ArrayList<Verifier>();
+
+ verifiers.add(ACTIONLISTENENER_VERIFIER);
+ verifiers.add(ATTRIBUTE_VERIFIER);
+ verifiers.add(CONVERTDATETIME_VERIFIER);
+ verifiers.add(CONVERTER_VERIFIER);
+ verifiers.add(CONVERTNUMBER_VERIFIER);
+ verifiers.add(FACET_VERIFIER);
+ verifiers.add(LOADBUNDLE_VERIFIER);
+ verifiers.add(PARAM_VERIFIER);
+ verifiers.add(SELECTITEM_VERIFIER);
+ verifiers.add(SELECTITEMS_VERIFIER);
+ verifiers.add(SUBVIEW_VERIFIER);
+ verifiers.add(VALIDATEDOUBLERANGE_VERIFIER);
+ verifiers.add(VALIDATELENGTH_VERIFIER);
+ verifiers.add(VALIDATELONGRANGE_VERIFIER);
+ verifiers.add(VALIDATOR_VERIFIER);
+ verifiers.add(VALUECHANGELISTENER_VERIFIER);
+ verifiers.add(VERBATIM_VERIFIER);
+ verifiers.add(VIEW_VERIFIER);
+
+ CORE_VERIFIERS_11 = Collections.unmodifiableList(verifiers);
+
+ verifiers = new ArrayList<Verifier>(CORE_VERIFIERS_11);
+ verifiers.add(PHASELISTENER_VERIFIER);
+ verifiers.add(SETPROPERTYACTIONLISTENER_VERIFIER);
+ CORE_VERIFIERS_12 = Collections.unmodifiableList(verifiers);
+
+ verifiers = new ArrayList<Verifier>();
+
+ verifiers.add(COLUMN_VERIFIER);
+ verifiers.add(COMMANDBUTTON_VERIFIER);
+ verifiers.add(COMMANDLINK_VERIFIER);
+ verifiers.add(DATATABLE_VERIFIER);
+ verifiers.add(FORM_VERIFIER);
+ verifiers.add(GRAPHICIMAGE_VERIFIER);
+ verifiers.add(INPUTHIDDEN_VERIFIER);
+ verifiers.add(INPUTSECRET_VERIFIER);
+ verifiers.add(INPUTTEXT_VERIFIER);
+ verifiers.add(INPUTTEXTAREA_VERIFIER);
+ verifiers.add(MESSAGE_VERIFIER);
+ verifiers.add(MESSAGES_VERIFIER);
+ verifiers.add(OUTPUTFORMAT_VERIFIER);
+ verifiers.add(OUTPUTLABEL_VERIFIER);
+ verifiers.add(OUTPUTLINK_VERIFIER);
+ verifiers.add(OUTPUTTEXT_VERIFIER);
+ verifiers.add(PANELGRID_VERIFIER);
+ verifiers.add(PANELGROUP_VERIFIER);
+ verifiers.add(SELECTBOOLEANCHECKBOX_VERIFIER);
+ verifiers.add(SELECTMANYCHECKBOX_VERIFIER);
+ verifiers.add(SELECTMANYLISTBOX_VERIFIER);
+ verifiers.add(SELECTMANYMENU_VERIFIER);
+ verifiers.add(SELECTONELISTBOX_VERIFIER);
+ verifiers.add(SELECTONEMENU_VERIFIER);
+ verifiers.add(SELECTONERADIO_VERIFIER);
+
+ HTML_VERIFIERS = Collections.unmodifiableList(verifiers);
+ }
+
+ public static void runVerifiers(final List<Verifier> verifiers,
+ final Map<String, ITagElement> tags)
+ {
+ for (final Verifier verifier : verifiers)
+ {
+ verifier.verify(tags);
+ }
+ }
+
+ abstract static class Verifier
+ {
+ protected final TagIdentifier _tagId;
+
+ public Verifier(final TagIdentifier tagId)
+ {
+ _tagId = tagId;
+ }
+
+ public abstract void verify(final Map<String, ITagElement> tagElements);
+ }
+
+ abstract static class TypeVerifier<TAGTYPEINFO> extends Verifier
+ {
+ protected final TAGTYPEINFO _typeInfo;
+
+ public TypeVerifier(final TagIdentifier tagId,
+ final TAGTYPEINFO typeInfo)
+ {
+ super(tagId);
+ _typeInfo = typeInfo;
+ }
+ }
+
+ static class ConverterTagVerifier extends TypeVerifier<ConverterTypeInfo>
+ {
+ public ConverterTagVerifier(final TagIdentifier tagId,
+ final ConverterTypeInfo typeInfo)
+ {
+ super(tagId, typeInfo);
+ }
+
+ @Override
+ public void verify(final Map<String, ITagElement> tagElements)
+ {
+ final ITagElement tagElement = tagElements.remove(_tagId
+ .getTagName());
+ assertTrue("Expected element to be converter: "
+ + _tagId.getTagName(),
+ tagElement instanceof IConverterTagElement);
+
+ final IConverterTagElement converterTag = (IConverterTagElement) tagElement;
+ final ConverterTypeInfo converterTypeInfo = converterTag
+ .getConverter();
+ // do verifySame from common.runtime.tests
+ try
+ {
+ RuntimeTestUtil.verifySame(_typeInfo, converterTypeInfo);
+ }
+ catch (final AssertionFailedError afe)
+ {
+ System.err.printf("Failure occurred in tag %s\n", _tagId
+ .asQName().toString());
+ throw afe;
+ }
+ }
+ }
+
+ static class ValidatorTagVerifier extends TypeVerifier<ValidatorTypeInfo>
+ {
+ public ValidatorTagVerifier(final TagIdentifier tagId,
+ final ValidatorTypeInfo typeInfo)
+ {
+ super(tagId, typeInfo);
+ }
+
+ @Override
+ public void verify(final Map<String, ITagElement> tagElements)
+ {
+ final ITagElement tagElement = tagElements.remove(_tagId
+ .getTagName());
+ assertTrue("Expected element to be validator: "
+ + _tagId.getTagName(),
+ tagElement instanceof IValidatorTagElement);
+ final IValidatorTagElement validatorTag = (IValidatorTagElement) tagElement;
+ final ValidatorTypeInfo validatorTypeInfo = validatorTag
+ .getValidator();
+ // do verifySame from common.runtime.tests
+ try
+ {
+ RuntimeTestUtil.verifySame(_typeInfo, validatorTypeInfo);
+ }
+ catch (final AssertionFailedError afe)
+ {
+ System.err.printf("Failure occurred in tag %s\n", _tagId
+ .asQName().toString());
+ throw afe;
+ }
+ }
+ }
+
+ static class ComponentTagVerifier extends TypeVerifier<ComponentTypeInfo>
+ {
+ public ComponentTagVerifier(final TagIdentifier tagId,
+ final ComponentTypeInfo typeInfo)
+ {
+ super(tagId, typeInfo);
+ }
+
+ @Override
+ public void verify(final Map<String, ITagElement> tagElements)
+ {
+ final ITagElement tagElement = tagElements.remove(_tagId
+ .getTagName());
+ assertTrue("Expected element to be component: "
+ + _tagId.getTagName(),
+ tagElement instanceof IComponentTagElement);
+ final IComponentTagElement componentTag = (IComponentTagElement) tagElement;
+ final ComponentTypeInfo componentTypeInfo = componentTag
+ .getComponent();
+ // do verifySame from common.runtime.tests
+ try
+ {
+ RuntimeTestUtil.verifySame(_typeInfo, componentTypeInfo);
+ }
+ catch (final AssertionFailedError afe)
+ {
+ System.err.printf("Failure occurred in tag %s\n", _tagId
+ .asQName().toString());
+ throw afe;
+ }
+ }
+ }
+
+ public static class JSFTagElementVerifier extends Verifier
+ {
+ public JSFTagElementVerifier(final TagIdentifier tagId)
+ {
+ super(tagId);
+ }
+
+ @Override
+ public void verify(final Map<String, ITagElement> tagElements)
+ {
+ final ITagElement tagElement = tagElements.remove(_tagId
+ .getTagName());
+ assertTrue("Expected jsf element to be jsf tag: "
+ + _tagId.getTagName(), tagElement instanceof IJSFTagElement);
+ }
+ }
+
+ public static class TagHandlerVerifier extends Verifier
+ {
+ public TagHandlerVerifier(final TagIdentifier tagId)
+ {
+ super(tagId);
+ }
+
+ @Override
+ public void verify(final Map<String, ITagElement> tagElements)
+ {
+ final ITagElement tagElement = tagElements.remove(_tagId
+ .getTagName());
+ assertTrue("Expected handler element to be jsf tag: "
+ + _tagId.getTagName(), tagElement instanceof ITagElement);
+ }
+ }
+
+ public static class CompositeVerifier
+ {
+ private final List<Verifier> _verifiers;
+ private final int _minExpectedTags;
+ private final int _maxExpectedTags;
+
+ public CompositeVerifier(final List<Verifier> verifiers,
+ final int minExpectedTags, final int maxExpectedTags)
+ {
+ _verifiers = verifiers;
+ _minExpectedTags = minExpectedTags;
+ _maxExpectedTags = maxExpectedTags;
+ }
+
+ public void verify(final Map<String, ITagElement> tags)
+ {
+ final int size = tags.size();
+
+ assertTrue(size >= _minExpectedTags);
+ assertTrue(size <= _maxExpectedTags);
+
+ runVerifiers(_verifiers, tags);
+
+ assertTrue(tags.size() <= (size - _minExpectedTags));
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/persistence/TestSerializableTLDTagElement.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/persistence/TestSerializableTLDTagElement.java
new file mode 100644
index 000000000..a71a04eda
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/views/persistence/TestSerializableTLDTagElement.java
@@ -0,0 +1,117 @@
+package org.eclipse.jst.jsf.designtime.tests.views.persistence;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.Map;
+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.tests.TestsPlugin;
+import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.CMNodeNamedMapAdapter;
+import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.TLDTagElement;
+import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.IAttributeAdvisor.NullAttributeAdvisor;
+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.internal.contentmodel.tld.provisional.TLDElementDeclaration;
+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 TestSerializableTLDTagElement extends TestCase
+{
+
+ private WebProjectTestEnvironment _webProject;
+ private TLDElementDeclaration _sampleTldElementDeclaration;
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ /* https://bugs.eclipse.org/bugs/show_bug.cgi?id=296496
+ final ZipFile zipFile = JSFTestUtil.createZipFile(TestsPlugin
+ .getDefault().getBundle(), "/testfiles/testzips/TLDTests.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/TLDTests2.zip");
+ _webProject = new WebProjectTestEnvironment(this,
+ JavaFacet.VERSION_1_5, ProjectFacetsManager.getProjectFacet(
+ "jst.web").getVersion("2.4"));
+ _webProject.createFromZip2(zipFile, true);
+ assertNotNull(_webProject);
+
+ _sampleTldElementDeclaration = findElementDeclaration(_webProject
+ .getTestProject(), "uri-supplied", "useBean");
+ assertNotNull(_sampleTldElementDeclaration);
+ }
+
+ // regression for: https://bugs.eclipse.org/bugs/show_bug.cgi?id=260931
+ public void testSerialization() throws Exception
+ {
+ final TLDTagElement tldTagElement = new TLDTagElement(_sampleTldElementDeclaration, new NullAttributeAdvisor());
+ verifyUseBean(tldTagElement);
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ ObjectOutputStream outStream = new ObjectOutputStream(out);
+ outStream.writeObject(tldTagElement);
+ ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
+ ObjectInputStream inStream = new ObjectInputStream(in);
+ Object readObject = inStream.readObject();
+ assertNotNull(readObject);
+ assertTrue(readObject instanceof TLDTagElement);
+ verifyUseBean((TLDTagElement) readObject);
+ // from the bug: CMNodeNamedMapAdapter should never get serialized as the attribute handler map.
+ assertFalse(((TLDTagElement)readObject).getAttributeHandlers() instanceof CMNodeNamedMapAdapter);
+ }
+
+ private void verifyUseBean(final TLDTagElement tldTagElement)
+ {
+ assertEquals("useBean", tldTagElement.getName());
+ assertEquals("uri-supplied", tldTagElement.getUri());
+ assertEquals("sample.http.taglib.UseBeanTag", tldTagElement.getTagHandlerClassName());
+ Map<?, ?> attributeHandlers = tldTagElement.getAttributeHandlers();
+ assertTrue(attributeHandlers.containsKey("id"));
+ assertTrue(attributeHandlers.containsKey("cls"));
+ assertTrue(attributeHandlers.containsKey("type"));
+ assertTrue(attributeHandlers.containsKey("request"));
+ assertTrue(attributeHandlers.containsKey("scope"));
+ assertEquals(5, attributeHandlers.size());
+ }
+
+ private static TLDElementDeclaration findElementDeclaration(
+ final IProject project, final String shortName, final String name)
+ {
+ final ITaglibRecord tagRecord = findTagRecord(project, shortName);
+ assertNotNull(tagRecord);
+ final CMDocumentFactoryTLD factory = new CMDocumentFactoryTLD();
+ final TLDDocument doc = (TLDDocument) factory
+ .createCMDocument(tagRecord);
+ assertNotNull(doc);
+ return (TLDElementDeclaration) doc.getElements().getNamedItem(name);
+ }
+
+ private static ITaglibRecord findTagRecord(final IProject project,
+ final String shortName)
+ {
+ for (final ITaglibRecord record : TaglibIndex
+ .getAvailableTaglibRecords(project.getFullPath()))
+ {
+ if (shortName.equals(record.getDescriptor().getShortName()))
+ {
+ return record;
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/test.xml b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/test.xml
new file mode 100644
index 000000000..e8508c28d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/test.xml
@@ -0,0 +1,50 @@
+<?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.designtime.tests"/>
+ <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml"/>
+ <property name="extraVMargs" value="-DjsfRuntimeJarsDirectoryV1.1=${testDir}/${jsf1.1Dir}"/>
+ <echo message="extraVMargs ${extraVMargs}" />
+ <!-- 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.designtime.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.designtime.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.designtime.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.designtime.tests/testdata/BeanWithListProp.java.data b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/BeanWithListProp.java.data
new file mode 100644
index 000000000..e7425e323
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/BeanWithListProp.java.data
@@ -0,0 +1,12 @@
+package com.test;
+
+public class BeanWithListProp
+{
+ private ListBean _myBean1;
+
+ // test a property of type Map
+ public ListBean getListProp()
+ {
+ return _myBean1;
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/BeanWithMapProp.java.data b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/BeanWithMapProp.java.data
new file mode 100644
index 000000000..d449c2dec
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/BeanWithMapProp.java.data
@@ -0,0 +1,12 @@
+package com.test;
+
+public class BeanWithMapProp
+{
+ private MapBean _myBean1;
+
+ // test a property of type Map
+ public MapBean getMapProp()
+ {
+ return _myBean1;
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/ListBean.java.data b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/ListBean.java.data
new file mode 100644
index 000000000..4abadc7bf
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/ListBean.java.data
@@ -0,0 +1,29 @@
+package com.test;
+
+import java.util.AbstractList;
+
+/**
+ * A bean class that implements java.util.List
+ *
+ * @author cbateman
+ *
+ */
+public class ListBean 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.designtime.tests/testdata/MapBean.java.data b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/MapBean.java.data
new file mode 100644
index 000000000..031333b32
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/MapBean.java.data
@@ -0,0 +1,13 @@
+package package com.test;
+
+
+import java.util.AbstractMap;
+import java.util.Collections;
+import java.util.Set;
+
+public class MapBean extends AbstractMap
+{
+ public Set entrySet() {
+ return Collections.EMPTY_SET;
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/MethodBean.java.data b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/MethodBean.java.data
new file mode 100644
index 000000000..b657a03a5
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/MethodBean.java.data
@@ -0,0 +1,14 @@
+
+
+public class MethodBean
+{
+ public String actionMethod()
+ {
+ return "chicken";
+ }
+
+ public String actionMethodWithParam(String arg)
+ {
+ return arg;
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/TestBean1.java.data b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/TestBean1.java.data
new file mode 100644
index 000000000..47606fc47
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/TestBean1.java.data
@@ -0,0 +1,41 @@
+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)
+ {
+ }
+// array of string property
+ public String[] getStringArrayProperty()
+ {
+ return new String[] {"a", "b", "c"};
+ }
+// array of integer 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.designtime.tests/testdata/TestBean2.java.data b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/TestBean2.java.data
new file mode 100644
index 000000000..d50dc27fc
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/TestBean2.java.data
@@ -0,0 +1,12 @@
+package com.test;
+
+public class TestBean2
+{
+ private TestBean1 _myBean1;
+
+ // test recursive properties like var.x.y.x.x.y...
+ public TestBean3 getMyBean3()
+ {
+ return null;
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/TestBean3.java.data b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/TestBean3.java.data
new file mode 100644
index 000000000..7b1d1f1a8
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/TestBean3.java.data
@@ -0,0 +1,10 @@
+package com.test;
+
+public class TestBean3
+{
+ // test recursive properties like var.x.y.x.x.y...
+ public TestBean2 getMyBean2()
+ {
+ return null;
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/TestBeanWithGenericProperties.java.data b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/TestBeanWithGenericProperties.java.data
new file mode 100644
index 000000000..d8c4b897d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/TestBeanWithGenericProperties.java.data
@@ -0,0 +1,19 @@
+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>();
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/TestProject.zip b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/TestProject.zip
new file mode 100644
index 000000000..abce390bf
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/TestProject.zip
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/bundle1.resources.data b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/bundle1.resources.data
new file mode 100644
index 000000000..388355e73
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/bundle1.resources.data
@@ -0,0 +1,3 @@
+prop1=blah
+one.dot=blah1
+two.dot.property=blah3 \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/bundle2.resources.data b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/bundle2.resources.data
new file mode 100644
index 000000000..c20ba77d9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/bundle2.resources.data
@@ -0,0 +1,3 @@
+x_prop1=x_blah
+x_one.dot=x_blah1
+x_two.dot.property=x_blah3 \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/faces-config.xml.data b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/faces-config.xml.data
new file mode 100644
index 000000000..fab426b8d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/faces-config.xml.data
@@ -0,0 +1,32 @@
+<?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_none</managed-bean-name>
+ <managed-bean-class>com.test.TestBean1</managed-bean-class>
+ <managed-bean-scope>none</managed-bean-scope>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>myBean_request</managed-bean-name>
+ <managed-bean-class>com.test.TestBean1</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>myBean_session</managed-bean-name>
+ <managed-bean-class>com.test.TestBean1</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>myBean_application</managed-bean-name>
+ <managed-bean-class>com.test.TestBean1</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ <description>This is my description of myBean_application</description>
+ </managed-bean>
+</faces-config>
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/faces-config_1_2.xml.data b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/faces-config_1_2.xml.data
new file mode 100644
index 000000000..1f064731e
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/faces-config_1_2.xml.data
@@ -0,0 +1,23 @@
+<?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
+ 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">
+ <application>
+ <resource-bundle>
+ <base-name>beans.bundle</base-name>
+ <var>resBundleProp1</var>
+ </resource-bundle>
+ <resource-bundle>
+ <base-name>beans.bundle2</base-name>
+ <var>resBundleProp2</var>
+ </resource-bundle>
+ </application>
+</faces-config>
+
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/faces-config_2_0.xml.data b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/faces-config_2_0.xml.data
new file mode 100644
index 000000000..413257ab8
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/faces-config_2_0.xml.data
@@ -0,0 +1,39 @@
+<?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">
+
+ <managed-bean>
+ <managed-bean-name>myBean_none</managed-bean-name>
+ <managed-bean-class>com.test.TestBean1</managed-bean-class>
+ <managed-bean-scope>none</managed-bean-scope>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>myBean_request</managed-bean-name>
+ <managed-bean-class>com.test.TestBean1</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>myBean_session</managed-bean-name>
+ <managed-bean-class>com.test.TestBean1</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>myBean_application</managed-bean-name>
+ <managed-bean-class>com.test.TestBean1</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ <description>This is my description of myBean_application</description>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>myBean_view</managed-bean-name>
+ <managed-bean-class>com.test.TestBean1</managed-bean-class>
+ <managed-bean-scope>view</managed-bean-scope>
+ </managed-bean>
+</faces-config>
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/jsfResources.jar b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/jsfResources.jar
new file mode 100644
index 000000000..befdd7177
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/jsfResources.jar
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/tag1.xhtml b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/tag1.xhtml
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/tag1.xhtml
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/testdata1.jsp.data b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/testdata1.jsp.data
new file mode 100644
index 000000000..b784cba58
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/testdata1.jsp.data
@@ -0,0 +1,54 @@
+
+<%@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="bundles.bundle1"/>
+
+<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']}"/><br>
+ <h:dataTable var="row" border="1">
+ <h:column id="column1">
+ <f:facet name="header">
+ <h:outputText value="column1"></h:outputText>
+ </f:facet>
+ </h:column>
+ <h:column id="column2">
+ <f:facet name="header">
+ <h:outputText value="column2"></h:outputText>
+ </f:facet>
+ </h:column>
+ </h:dataTable>
+ </h:form>
+
+ </body>
+</html>
+</f:view>
+
+
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/testdata2.jsp.data b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/testdata2.jsp.data
new file mode 100644
index 000000000..d9dc5ea6b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/testdata/testdata2.jsp.data
@@ -0,0 +1,29 @@
+<%@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.facesconfig.tests/.classpath b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/.classpath
new file mode 100644
index 000000000..304e86186
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.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.facesconfig.tests/.cvsignore b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/.cvsignore
new file mode 100644
index 000000000..419e3f520
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/.cvsignore
@@ -0,0 +1,5 @@
+bin
+temp.folder
+@dot
+build.xml
+javaCompiler...args
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/.project b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/.project
new file mode 100644
index 000000000..1af8ce97a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jst.jsf.facesconfig.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.facesconfig.tests/.settings/org.eclipse.core.resources.prefs b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 000000000..6eb60cc31
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Sun May 27 16:03:16 EDT 2007
+eclipse.preferences.version=1
+encoding/<project>=ISO-8859-1
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/.settings/org.eclipse.jdt.core.prefs b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..191e9f817
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,62 @@
+#Thu Sep 27 19:31:11 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=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=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
+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.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+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.facesconfig.tests/META-INF/MANIFEST.MF b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..a415cf801
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,25 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name.0
+Bundle-SymbolicName: org.eclipse.jst.jsf.facesconfig.tests;singleton:=true
+Bundle-Version: 1.4.100.qualifier
+Bundle-Activator: org.eclipse.jst.jsf.facesconfig.tests.TestsPlugin
+Bundle-Vendor: %Bundle-Vendor.0
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
+ 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.eclipse.emf.edit.ui;bundle-version="[2.2.0,3.0.0)",
+ org.eclipse.jst.j2ee;bundle-version="[1.1.0,1.3.0)",
+ org.eclipse.jst.j2ee.web;bundle-version="[1.1.0,1.2.0)",
+ org.eclipse.wst.common.frameworks.ui;bundle-version="[1.1.0,2.0.0)",
+ org.junit;bundle-version="3.8.1",
+ org.eclipse.jst.jsf.facesconfig;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.jst.jsf.test.util;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.jst.jsf.core;bundle-version="[1.1.0,2.0.0)"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.jst.jsf.facesconfig.tests;x-internal:=true,
+ org.eclipse.jst.jsf.facesconfig.tests.read;x-internal:=true,
+ org.eclipse.jst.jsf.facesconfig.tests.util;x-internal:=true,
+ org.eclipse.jst.jsf.facesconfig.tests.write;x-internal:=true
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/_readme.txt b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/_readme.txt
new file mode 100644
index 000000000..10c9fc4f0
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/_readme.txt
@@ -0,0 +1 @@
+Requires plugin "org.eclipse.wst.common.tests.collector" in same workbench instance. \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/about.html b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/about.html
new file mode 100644
index 000000000..72f94ad86
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/about.html
@@ -0,0 +1,22 @@
+<!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 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.facesconfig.tests/build.properties b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/build.properties
new file mode 100644
index 000000000..6ecf2e7b7
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/build.properties
@@ -0,0 +1,20 @@
+###############################################################################
+# 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
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ template/,\
+ test.xml,\
+ plugin.properties,\
+ about.html
+javacSource=1.5
+javacTarget=1.5
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/launch/AllFacesConfigTests.launch b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/launch/AllFacesConfigTests.launch
new file mode 100644
index 000000000..346890ce4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/launch/AllFacesConfigTests.launch
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/AllFacesConfigTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.jst.jsf.facesconfig.tests.AllFacesConfigTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jst.jsf.facesconfig.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx512m -XX:MaxPermSize=512M"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="false"/>
+</launchConfiguration>
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/plugin.properties b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/plugin.properties
new file mode 100644
index 000000000..c01573273
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/plugin.properties
@@ -0,0 +1,11 @@
+###############################################################################
+# 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
+#
+###############################################################################
+# Properties for the faces config test plugin
+Bundle-Name.0=JSF Tools - FacesConfig Model Tests
+Bundle-Vendor.0=Eclipse Web Tools Platform
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/pom.xml b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/pom.xml
new file mode 100644
index 000000000..9c7452142
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/pom.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012, 2013 Eclipse Foundation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Distribution License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/org/documents/edl-v10.php
+
+ Contributors:
+ Thanh Ha (Eclipse Foundation) - initial implementation
+ Ian Trimble (Oracle) - initial tests configuration
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.webtools.jsf</groupId>
+ <artifactId>org.eclipse.webtools.jsf.tests</artifactId>
+ <version>3.6.0-SNAPSHOT</version>
+ <relativePath>../../../</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.webtools.jsf</groupId>
+ <artifactId>org.eclipse.jst.jsf.facesconfig.tests</artifactId>
+ <version>1.4.100-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <configuration>
+ <useUIHarness>true</useUIHarness>
+ <testSuite>${project.artifactId}</testSuite>
+ <testClass>org.eclipse.jst.jsf.facesconfig.tests.AllFacesConfigTests</testClass>
+ <dependencies>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.jst.j2ee.ejb</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ </dependencies>
+ <argLine>-DjsfRuntimeJarsDirectoryV1.1=${project.basedir}/../jsfRuntimeJarsDirectory/V1.1 -DjsfRuntimeJarsDirectoryV1.2=${project.basedir}/../jsfRuntimeJarsDirectory/V1.2 -DjsfRuntimeJarsDirectoryV2.0=${project.basedir}/../jsfRuntimeJarsDirectory/V2.0</argLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/AllFacesConfigTests.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/AllFacesConfigTests.java
new file mode 100644
index 000000000..e168c3359
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/AllFacesConfigTests.java
@@ -0,0 +1,41 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+import org.eclipse.jst.jsf.facesconfig.tests.read.AllReadTests;
+import org.eclipse.jst.jsf.facesconfig.tests.write.AllWriteTests;
+
+
+/**
+ * Container for all JSF tooling unit tests.
+ *
+ * @author spaxton
+ */
+public class AllFacesConfigTests extends TestSuite {
+
+ public static void main(String[] args) {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite() {
+ return new AllFacesConfigTests();
+ }
+
+ public AllFacesConfigTests() {
+ super();
+ addTest(AllReadTests.suite());
+ addTest(AllWriteTests.suite());
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/TestsPlugin.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/TestsPlugin.java
new file mode 100644
index 000000000..2f5f47eb7
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/TestsPlugin.java
@@ -0,0 +1,65 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests;
+
+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 {
+
+ //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 default instance
+ */
+ 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.facesconfig.tests", path);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/AllReadTests.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/AllReadTests.java
new file mode 100644
index 000000000..2b72adef5
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/AllReadTests.java
@@ -0,0 +1,177 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests.read;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.test.util.ConfigurableTestSuite;
+import org.eclipse.jst.jsf.test.util.ConfigurableTestCase.TestConfiguration;
+
+/**
+ * Wrapper suite for all the tests against the .util package.
+ *
+ * @author xjiang
+ * @author spaxton
+ * @author le-ake m. G kristos
+ */
+public class AllReadTests {
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("FacesConfig Model Read Translation");
+ suite.addTest(Faces_1_1_suite());
+ suite.addTest(Faces_1_2_suite());
+ suite.addTest(Faces_2_0_suite());
+ return suite;
+ }
+
+ private static Test Faces_2_0_suite()
+ {
+ TestConfiguration testConfiguration = new TestConfiguration();
+ testConfiguration.put(BaseReadTestCase.CONFIG_FILE_KEY, "WEB-INF/faces-config_2_0.xml");
+ testConfiguration.put(BaseReadTestCase.FACES_VERSION_KEY, IJSFCoreConstants.JSF_VERSION_2_0);
+
+ TestSuite suite =
+ new ConfigurableTestSuite(testConfiguration, "Faces 2.0 Model Tests");
+ suite.addTest(new ConfigurableTestSuite(ReadFacesConfigElementsTestCase_2_0.class, "Faces-config - Each Element"));
+ suite.addTest(new ConfigurableTestSuite(ReadApplicationTestCase_2_0.class, "Application Test"));
+ suite.addTest(new ConfigurableTestSuite(ReadFactoryTestCase_2_0.class, "Factory Test"));
+ suite.addTest(new ConfigurableTestSuite(ReadNavigationRuleTestCase_2_0.class, "Navigation Rule Test"));
+ suite.addTest(new ConfigurableTestSuite(ReadManagedBeanTestCase_2_0.class, "Managed-Bean Test"));
+ suite.addTest(new ConfigurableTestSuite(ReadRenderKitTestCase_2_0.class, "Render-kit Test"));
+
+ Faces_base_suite(suite, testConfiguration);
+ return suite;
+ }
+
+ private static Test Faces_1_2_suite()
+ {
+ TestConfiguration testConfiguration = new TestConfiguration();
+ testConfiguration.put(BaseReadTestCase.CONFIG_FILE_KEY, "WEB-INF/faces-config_1_2.xml");
+ testConfiguration.put(BaseReadTestCase.FACES_VERSION_KEY, IJSFCoreConstants.JSF_VERSION_1_2);
+
+ TestSuite suite =
+ new ConfigurableTestSuite(testConfiguration, "Faces 1.2 Model Tests");
+ suite.addTest(new ConfigurableTestSuite(ReadApplicationTestCase_1_2.class, "Application Test"));
+ suite.addTest(new ConfigurableTestSuite(ReadFacesConfigElementsTestCase_1_2.class,
+ "Faces-config - Each Element"));
+ // Factory
+ suite.addTest(new ConfigurableTestSuite(ReadFactoryTestCase_1_2.class,
+ "Facesconfig -Factory "));
+ // Converter
+ suite.addTest(new ConfigurableTestSuite(ReadConverterTestCase_1_2.class,
+ "Converter Test - Single"));
+ // Lifecycle
+ suite.addTest(new ConfigurableTestSuite(ReadLifecycleTestCase_1_2.class,
+ "Lifecycle Test - Single"));
+ // Navigation
+ suite.addTest(new ConfigurableTestSuite(ReadNavigationRuleTestCase_1_2.class,
+ "Navigation Rule"));
+ // Validator
+ suite.addTest(new ConfigurableTestSuite(ReadValidatorTestCase_1_2.class,
+ "Validator Test - Single"));
+ // Managed Bean
+ suite.addTest(new ConfigurableTestSuite(ReadManagedBeanTestCase_1_2.class,
+ "Managed-Bean Test"));
+ // Render-kit
+ suite.addTest(new ConfigurableTestSuite(ReadRenderKitTestCase_1_2.class,
+ "Render-kit Test"));
+
+ Faces_base_suite(suite, testConfiguration);
+ return suite;
+ }
+
+ private static Test Faces_1_1_suite()
+ {
+ TestConfiguration testConfiguration = new TestConfiguration();
+ testConfiguration.put(BaseReadTestCase.CONFIG_FILE_KEY, BaseReadTestCase.CONFIG_FILE_DEFAULT);
+ testConfiguration.put(BaseReadTestCase.FACES_VERSION_KEY, IJSFCoreConstants.JSF_VERSION_1_1);
+
+ TestSuite suite =
+ new ConfigurableTestSuite(testConfiguration, "Faces 1.1 Model Tests");
+ suite.addTest(new ConfigurableTestSuite(ReadFacesConfigElementsTestCase.class,
+ "Faces-config - Each Element"));
+ // Application
+ suite.addTest(new ConfigurableTestSuite(ReadApplicationTestCase.class,
+ "Application Test"));
+ // Factory
+ suite.addTest(new ConfigurableTestSuite(ReadFactoryTestCase.class,
+ "Facesconfig -Factory "));
+ // Converter
+ suite.addTest(new ConfigurableTestSuite(ReadConverterTestCase.class,
+ "Converter Test - Single"));
+ // Lifecycle
+ suite.addTest(new ConfigurableTestSuite(ReadLifecycleTestCase.class,
+ "Lifecycle Test - Single"));
+ Faces_base_suite(suite, testConfiguration);
+ // Navigation
+ suite.addTest(new ConfigurableTestSuite(ReadNavigationRuleTestCase.class,
+ "Navigation Rule"));
+ // Validator
+ suite.addTest(new ConfigurableTestSuite(ReadValidatorTestCase.class,
+ "Validator Test - Single"));
+ // Managed Bean
+ suite.addTest(new ConfigurableTestSuite(ReadManagedBeanTestCase.class,
+ "Managed-Bean Test"));
+ // Render-kit
+ suite.addTest(new ConfigurableTestSuite(ReadRenderKitTestCase.class,
+ "Render-kit Test"));
+
+ return suite;
+ }
+
+ private static void Faces_base_suite(TestSuite suite, TestConfiguration configuration)
+ {
+ // Component
+ suite.addTest(new ConfigurableTestSuite(ReadComponentTestCase.class,
+ "Component Test"));
+ suite.addTest(new ConfigurableTestSuite(ReadAttributeComponentTestCase.class,
+ "Component-->Attribute Test"));
+ suite.addTest(new ConfigurableTestSuite(ReadFacetComponentTestCase.class,
+ "Component-->Facet Test"));
+ suite.addTest(new ConfigurableTestSuite(ReadPropertyComponentTestCase.class,
+ "Component-->Property Test"));
+
+ suite.addTest(new ConfigurableTestSuite(ReadAttributeConverterTestCase.class,
+ "Converter-->Attribute Test"));
+ suite.addTest(new ConfigurableTestSuite(ReadPropertyConverterTestCase.class,
+ "Converter-->Property Test"));
+
+ // Managed Bean
+ suite.addTest(new ConfigurableTestSuite(
+ ReadManagedBeanManagedPropertyTestCase.class,
+ "Managed-Bean Property"));
+
+ // Referenced Bean
+ suite.addTest(new ConfigurableTestSuite(ReadReferencedBeanTestCase.class,
+ "Referenced-Bean Test"));
+
+ // Render-kit
+ suite.addTest(new ConfigurableTestSuite(ReadRendererTestCase.class,
+ "Render-kit-->Renderer Test"));
+ suite.addTest(new ConfigurableTestSuite(ReadAttributeRendererTestCase.class,
+ "Render-kit-->Renderer-->Attribute"));
+ suite.addTest(new ConfigurableTestSuite(ReadFacetRendererTestCase.class,
+ "Render-kit-->Renderer-->Facet"));
+
+ // Validator
+ suite.addTest(new ConfigurableTestSuite(ReadAttributeValidatorTestCase.class,
+ "Validator-->Attribute Test - Single"));
+ suite.addTest(new ConfigurableTestSuite(ReadPropertyValidatorTestCase.class,
+ "Validator-->Property Test"));
+
+ // Extended data
+ suite.addTest(new ConfigurableTestSuite(ReadExtensionDataTestCase.class,
+ "Extension Data Test 1"));
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/BaseReadTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/BaseReadTestCase.java
new file mode 100644
index 000000000..461ef7174
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/BaseReadTestCase.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * 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.facesconfig.tests.read;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.facesconfig.tests.util.WizardUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+import org.eclipse.jst.jsf.test.util.ConfigurableTestCase;
+
+public class BaseReadTestCase extends ConfigurableTestCase
+{
+ final static String CONFIG_FILE_KEY = "config-file-key";
+ final static String FACES_VERSION_KEY = "faces-version-key";
+ final static String CONFIG_FILE_DEFAULT = "";
+
+ protected IProject project;
+ protected String _facesConfigFile;
+ protected String _facesVersion;
+
+ public BaseReadTestCase(String name)
+ {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ initialize(_testConfiguration);
+
+ WizardUtil.createProject(getName());
+ project = WizardUtil.getTestProject(getName());
+ }
+
+ protected FacesConfigArtifactEdit getArtifactEditForRead()
+ {
+ FacesConfigArtifactEdit edit = null;
+
+ if (CONFIG_FILE_DEFAULT.equals(_facesConfigFile))
+ {
+ edit = FacesConfigArtifactEdit
+ .getFacesConfigArtifactEditForRead(project, null);
+ }
+ else
+ {
+ edit = FacesConfigArtifactEdit
+ .getFacesConfigArtifactEditForRead(project, _facesConfigFile);
+ }
+
+ assertNotNull(edit);
+ return edit;
+ }
+
+ protected void initialize(TestConfiguration testConfiguration)
+ {
+ if (_testConfiguration != null)
+ {
+ _facesConfigFile = _testConfiguration.get(CONFIG_FILE_KEY);
+ assertNotNull(_facesConfigFile);
+ _facesVersion = _testConfiguration.get(FACES_VERSION_KEY);
+ assertNotNull(_facesVersion);
+ }
+ else
+ {
+ // defaults to 1.1; subs should override for higher versions
+ _facesConfigFile = CONFIG_FILE_DEFAULT;
+ _facesVersion = IJSFCoreConstants.JSF_VERSION_1_1;
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadApplicationTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadApplicationTestCase.java
new file mode 100644
index 000000000..a27586242
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadApplicationTestCase.java
@@ -0,0 +1,303 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests.read;
+
+import org.eclipse.jst.jsf.facesconfig.emf.ActionListenerType;
+import org.eclipse.jst.jsf.facesconfig.emf.ApplicationType;
+import org.eclipse.jst.jsf.facesconfig.emf.DefaultRenderKitIdType;
+import org.eclipse.jst.jsf.facesconfig.emf.LocaleConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.MessageBundleType;
+import org.eclipse.jst.jsf.facesconfig.emf.NavigationHandlerType;
+import org.eclipse.jst.jsf.facesconfig.emf.PropertyResolverType;
+import org.eclipse.jst.jsf.facesconfig.emf.StateManagerType;
+import org.eclipse.jst.jsf.facesconfig.emf.SupportedLocaleType;
+import org.eclipse.jst.jsf.facesconfig.emf.VariableResolverType;
+import org.eclipse.jst.jsf.facesconfig.emf.ViewHandlerType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+/*
+ * This Junit class is used to test that the different of child lists
+ * of Application are correctly populated.
+ */
+public class ReadApplicationTestCase extends BaseReadTestCase
+{
+ public ReadApplicationTestCase(String name) {
+ super(name);
+ }
+
+ /*
+ * The following method is used to test for the empty navigation rule. Since
+ * I am supplying a single faces-config.xml file as a testing file, I had to
+ * testcases fit in to it by controlling the conditions
+ *
+ */
+ public void testSingleApplication() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ ApplicationType application1 = getApplication1(edit);
+ assertEquals(1, application1.getActionListener().size());
+ assertEquals(1, application1.getDefaultRenderKitId().size());
+ assertEquals(1, application1.getLocaleConfig().size());
+ assertEquals(1, application1.getMessageBundle().size());
+ assertEquals(1, application1.getNavigationHandler().size());
+ assertEquals(1, application1.getPropertyResolver().size());
+ assertEquals(1, application1.getStateManager().size());
+ assertEquals(1, application1.getVariableResolver().size());
+ assertEquals(1, application1.getViewHandler().size());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ ApplicationType getApplication1(FacesConfigArtifactEdit edit)
+ {
+ ApplicationType application1 =
+ FacesConfigModelUtil.findApplicationById
+ (edit.getFacesConfig().getApplication(), "application1");
+ assertNotNull(application1);
+ return application1;
+ }
+
+ /*
+ * Testing for action-listener
+ *
+ */
+ public void testActionListener() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ ApplicationType application1 = getApplication1(edit);
+ ActionListenerType actionListener =
+ FacesConfigModelUtil.findActionListenerById
+ (application1.getActionListener(), "actionListener1");
+ assertNotNull(actionListener);
+ assertEquals("Action listener",
+ actionListener.getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Testing for default-render-kit-id
+ *
+ */
+ public void testDefaultRenderKitId() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ ApplicationType application1 = getApplication1(edit);
+ DefaultRenderKitIdType defaultRenderKit =
+ FacesConfigModelUtil.findDefaultRenderKitIdTypeById
+ (application1.getDefaultRenderKitId(), "defaultRenderKit1");
+ assertNotNull(defaultRenderKit);
+ assertEquals("some renderer kit",
+ defaultRenderKit.getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Testing for a single entry of message-bundle
+ *
+ */
+ public void testMessageBundle() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ ApplicationType application1 = getApplication1(edit);
+ MessageBundleType messageBundleType =
+ FacesConfigModelUtil.findMessageBundleTypeById
+ (application1.getMessageBundle(), "messageBundle1");
+ assertNotNull(messageBundleType);
+ assertEquals("some messeage bundle goes here",
+ messageBundleType.getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Testing for a single entry of navigation-handler
+ *
+ */
+ public void testNavigationHandler() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ ApplicationType application1 = getApplication1(edit);
+ NavigationHandlerType navigationHandlerType =
+ (NavigationHandlerType)
+ FacesConfigModelUtil.findEObjectElementById
+ (application1.getNavigationHandler(), "navigationHandler1");
+ assertNotNull(navigationHandlerType);
+ assertEquals("navigation handler",
+ navigationHandlerType.getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Testing for a single entry of view-handler
+ *
+ */
+ public void testViewHandler() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ ApplicationType application1 = getApplication1(edit);
+ ViewHandlerType viewHandlerType =
+ (ViewHandlerType)
+ FacesConfigModelUtil.findEObjectElementById
+ (application1.getViewHandler(), "viewHandler1");
+ assertNotNull(viewHandlerType);
+ assertEquals("view handler",
+ viewHandlerType.getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Testing for a single entry of state-manager
+ *
+ */
+ public void testStateManager() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ ApplicationType application1 = getApplication1(edit);
+ StateManagerType stateManagerType =
+ (StateManagerType)
+ FacesConfigModelUtil.findEObjectElementById
+ (application1.getStateManager(), "stateManager1");
+ assertNotNull(stateManagerType);
+ assertEquals("state manager",
+ stateManagerType.getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+
+ /*
+ * Testing for the variable-resolver
+ */
+
+ public void testSingleVariableResolver() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ ApplicationType application1 = getApplication1(edit);
+ VariableResolverType variableResolverType =
+ (VariableResolverType)
+ FacesConfigModelUtil.findEObjectElementById
+ (application1.getVariableResolver(), "variableResolver1");
+ assertNotNull(variableResolverType);
+ assertEquals("com.ibm.faces.databind.SelectItemsVarResolver",
+ variableResolverType.getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Testing for the property-resolver
+ */
+ public void testSinglePropertyResolver() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ ApplicationType application1 = getApplication1(edit);
+ PropertyResolverType propertyResolverType =
+ (PropertyResolverType)
+ FacesConfigModelUtil.findEObjectElementById
+ (application1.getPropertyResolver(), "propertyResolver1");
+ assertNotNull(propertyResolverType);
+ assertEquals("com.ibm.faces.databind.SelectItemsPropResolver",
+ propertyResolverType.getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Testing for the local-config within an application
+ */
+ public void testLocalConfig() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ ApplicationType application1 = getApplication1(edit);
+ LocaleConfigType localeConfigType =
+ (LocaleConfigType)
+ FacesConfigModelUtil.findEObjectElementById
+ (application1.getLocaleConfig(), "localeConfig1");
+ assertNotNull(localeConfigType);
+
+ assertEquals("en", localeConfigType.getDefaultLocale().getTextContent());
+ assertEquals("defaultLocale1", localeConfigType.getDefaultLocale().getId());
+
+ assertEquals(2, localeConfigType.getSupportedLocale().size());
+
+ SupportedLocaleType supportedLocaleType =
+ (SupportedLocaleType)
+ FacesConfigModelUtil.findEObjectElementById(
+ localeConfigType.getSupportedLocale(),
+ "supportedLocale_en");
+ assertNotNull(supportedLocaleType);
+ assertEquals("en", supportedLocaleType.getTextContent().trim());
+
+ supportedLocaleType =
+ (SupportedLocaleType)
+ FacesConfigModelUtil.findEObjectElementById(
+ localeConfigType.getSupportedLocale(),
+ "supportedLocale_de");
+ assertNotNull(supportedLocaleType);
+ assertEquals("de", supportedLocaleType.getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadApplicationTestCase_1_2.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadApplicationTestCase_1_2.java
new file mode 100644
index 000000000..9f463f4dc
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadApplicationTestCase_1_2.java
@@ -0,0 +1,144 @@
+/*******************************************************************************
+ * 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.facesconfig.tests.read;
+
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.facesconfig.emf.ApplicationExtensionType;
+import org.eclipse.jst.jsf.facesconfig.emf.ApplicationType;
+import org.eclipse.jst.jsf.facesconfig.emf.BaseNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.DynamicElement;
+import org.eclipse.jst.jsf.facesconfig.emf.ELResolverType;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.emf.ResourceBundleType;
+import org.eclipse.jst.jsf.facesconfig.emf.VarType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class ReadApplicationTestCase_1_2 extends ReadApplicationTestCase {
+
+ public ReadApplicationTestCase_1_2(String name) {
+ super(name);
+ }
+
+ protected void initialize(TestConfiguration testConfiguration) {
+ // override base when not in a configurable test suite
+ if(_testConfiguration == null)
+ {
+ _facesConfigFile = "WEB-INF/faces-config_1_2.xml";
+ _facesVersion = IJSFCoreConstants.JSF_VERSION_1_2;
+ }
+ else
+ {
+ super.initialize(testConfiguration);
+ }
+ }
+
+ public void testELResolver()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ ApplicationType application1 = getApplication1(edit);
+ ELResolverType elResolverType =
+ (ELResolverType)
+ FacesConfigModelUtil.findEObjectElementById
+ (application1.getELResolver(), "el-resolver-id");
+ assertNotNull(elResolverType);
+ assertEquals("com.test.MyELResolver",
+ elResolverType.getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testResourceBundle()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ ApplicationType application1 = getApplication1(edit);
+ ResourceBundleType resourceBundle =
+ (ResourceBundleType)
+ FacesConfigModelUtil.findEObjectElementById
+ (application1.getResourceBundle(), "resourceBundleId1");
+ assertNotNull(resourceBundle);
+
+ // test descriptioni
+ {
+ DescriptionType descType =
+ (DescriptionType) FacesConfigModelUtil.findEObjectElementById
+ (resourceBundle.getDescription(), "resourceBundleDesc");
+ assertEquals("Resource Bundle description blah"
+ , descType.getTextContent());
+ }
+ // test displayname
+ {
+ DisplayNameType displayNameType =
+ (DisplayNameType) FacesConfigModelUtil.findEObjectElementById
+ (resourceBundle.getDisplayName(), "resourceBundleDisplayName");
+ assertEquals("Resource Bundle display name blah"
+ , displayNameType.getTextContent());
+ }
+ // test icon
+ {
+ IconType iconType =
+ (IconType) FacesConfigModelUtil.findEObjectElementById
+ (resourceBundle.getIcon(), "resourceBundleId");
+ assertEquals("resourceBundle-smallIcon"
+ , iconType.getSmallIcon().getTextContent());
+ assertEquals("resourceBundle-largeIcon"
+ , iconType.getLargeIcon().getTextContent());
+ }
+
+ BaseNameType baseName = resourceBundle.getBaseName();
+ assertNotNull(baseName);
+ assertEquals("com.test.Bundle", baseName.getTextContent());
+
+ VarType var = resourceBundle.getVar();
+ assertNotNull(var);
+ assertEquals("bundleVar", var.getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testApplicationExtension()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ ApplicationType application1 = getApplication1(edit);
+ ApplicationExtensionType applicationExt =
+ (ApplicationExtensionType)
+ FacesConfigModelUtil.findEObjectElementById
+ (application1.getApplicationExtension(), "applicatinExtension1");
+ assertNotNull(applicationExt);
+ assertEquals(1,
+ applicationExt.getChildNodes().size());
+ DynamicElement element =
+ (DynamicElement) applicationExt.getChildNodes().get(0);
+ assertEquals("some-extension-data", element.getName());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadApplicationTestCase_2_0.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadApplicationTestCase_2_0.java
new file mode 100644
index 000000000..58edf1607
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadApplicationTestCase_2_0.java
@@ -0,0 +1,155 @@
+/*******************************************************************************
+ * 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.facesconfig.tests.read;
+
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.facesconfig.emf.ApplicationType;
+import org.eclipse.jst.jsf.facesconfig.emf.DefaultValidatorsType;
+import org.eclipse.jst.jsf.facesconfig.emf.ResourceHandlerType;
+import org.eclipse.jst.jsf.facesconfig.emf.SourceClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.SystemEventClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.SystemEventListenerClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.SystemEventListenerType;
+import org.eclipse.jst.jsf.facesconfig.emf.ValidatorIdType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class ReadApplicationTestCase_2_0 extends ReadApplicationTestCase_1_2 {
+
+ public ReadApplicationTestCase_2_0(String name) {
+ super(name);
+ }
+
+ protected void initialize(TestConfiguration testConfiguration) {
+ // override base when not in a configurable test suite
+ if(_testConfiguration == null)
+ {
+ _facesConfigFile = "WEB-INF/faces-config_2_0.xml";
+ _facesVersion = IJSFCoreConstants.JSF_VERSION_2_0;
+ }
+ else
+ {
+ super.initialize(testConfiguration);
+ }
+ }
+
+// public void testPartialTraversal()
+// {
+// FacesConfigArtifactEdit edit = null;
+// try {
+// edit = getArtifactEditForRead();
+// assertNotNull(edit.getFacesConfig());
+// ApplicationType application1 = getApplication1(edit);
+// PartialTraversalType partialTraversal =
+// (PartialTraversalType)
+// FacesConfigModelUtil.findEObjectElementById
+// (application1.getPartialTraversal(), "partial-traversal-id");
+// assertNotNull(partialTraversal);
+// assertEquals("com.test.MyPartialTraversal",
+// partialTraversal.getTextContent().trim());
+// } finally {
+// if (edit != null) {
+// edit.dispose();
+// }
+// }
+// }
+
+ public void testResourceHandler()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ ApplicationType application1 = getApplication1(edit);
+ ResourceHandlerType resourceHandler =
+ (ResourceHandlerType)
+ FacesConfigModelUtil.findEObjectElementById
+ (application1.getResourceHandler(), "resource-handler-id");
+ assertNotNull(resourceHandler);
+ assertEquals("com.test.MyResourceHandler",
+ resourceHandler.getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testSystemEventListener()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ ApplicationType application1 = getApplication1(edit);
+ SystemEventListenerType systemEventListener =
+ (SystemEventListenerType)
+ FacesConfigModelUtil.findEObjectElementById
+ (application1.getSystemEventListener(), "system-event-listener-id");
+ assertNotNull(systemEventListener);
+
+ SystemEventListenerClassType systemEventListenerClass = systemEventListener.getSystemEventListenerClass();
+// (SystemEventListenerClassType)
+// FacesConfigModelUtil.findEObjectElementById
+// (systemEventListener.getSystemEventListenerClass(), "system-event-listener-class-id");
+ assertNotNull(systemEventListenerClass);
+ assertEquals("com.test.MySystemEventListener",
+ systemEventListenerClass.getTextContent().trim());
+
+ SystemEventClassType systemEventClass = systemEventListener.getSystemEventClass();
+// (SystemEventClassType)
+// FacesConfigModelUtil.findEObjectElementById
+// (systemEventListener.getSystemEventClass(), "system-event-class-id");
+ assertNotNull(systemEventClass);
+ assertEquals("com.test.MySystemEvent",
+ systemEventClass.getTextContent().trim());
+
+ SourceClassType sourceClass = systemEventListener.getSourceClass();
+// (SourceClassType)
+// FacesConfigModelUtil.findEObjectElementById
+// (systemEventListener.getSourceClass(), "source-class-id");
+ assertNotNull(sourceClass);
+ assertEquals("com.test.MySource",
+ sourceClass.getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testDefaultValidator()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ ApplicationType application1 = getApplication1(edit);
+ DefaultValidatorsType defaultValidators =
+ (DefaultValidatorsType)
+ FacesConfigModelUtil.findEObjectElementById
+ (application1.getDefaultValidators(), "default-validators-id");
+ assertNotNull(defaultValidators);
+ ValidatorIdType validatorId =
+ (ValidatorIdType)
+ FacesConfigModelUtil.findEObjectElementById
+ (defaultValidators.getValidatorId(), "validator-id-id");
+ assertNotNull(validatorId);
+ assertEquals("MyValidator",
+ validatorId.getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadAttributeComponentTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadAttributeComponentTestCase.java
new file mode 100644
index 000000000..5497767c6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadAttributeComponentTestCase.java
@@ -0,0 +1,257 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests.read;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jst.jsf.facesconfig.emf.AttributeType;
+import org.eclipse.jst.jsf.facesconfig.emf.ComponentType;
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+/*
+ * This clas is used to test the Attribute inside Component Element
+ *
+ */
+public class ReadAttributeComponentTestCase extends BaseReadTestCase {
+
+ public ReadAttributeComponentTestCase(String name) {
+ super(name);
+ }
+
+ /*
+ * The following method is used to test for the existence of a single
+ * attribute in the Compoenent Element. While testing I had just one with
+ * everything (all children) inside it
+ */
+ public void testSingleAttribute() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ AttributeType attribute1 = getAttribute1(edit.getFacesConfig());
+ assertNotNull(attribute1);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ private ComponentType getComponent1(FacesConfigType facesConfigType)
+ {
+ return (ComponentType) FacesConfigModelUtil
+ .findEObjectElementById
+ (facesConfigType.getComponent(), "component1");
+ }
+
+ private AttributeType getAttribute1(FacesConfigType facesConfigType)
+ {
+ ComponentType component1 = getComponent1(facesConfigType);
+ assertNotNull(component1);
+ return (AttributeType) FacesConfigModelUtil
+ .findEObjectElementById
+ (component1.getAttribute(), "componentAttribute1");
+ }
+ /*
+ * This is to test the description child inside of Attribute
+ *
+ */
+
+ public void testDescription() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ AttributeType attributeType =
+ getAttribute1(edit.getFacesConfig());
+ assertNotNull(attributeType);
+
+ DescriptionType descType =
+ (DescriptionType)FacesConfigModelUtil.findEObjectElementById
+ (attributeType.getDescription()
+ ,"componentAttribute1_descripton1");
+ assertEquals("attribute-description"
+ , descType.getTextContent().trim());
+ }
+ finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * A simple test to check if the Display Name is present
+ * within the faces-config.xml file
+ */
+
+ public void testDisplayName() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ AttributeType attributeType =
+ getAttribute1(edit.getFacesConfig());
+ assertNotNull(attributeType);
+
+ final DisplayNameType displayNameType =
+ (DisplayNameType)FacesConfigModelUtil.findEObjectElementById
+ (attributeType.getDisplayName()
+ ,"componentAttribute1_displayName1");
+ assertEquals("attribute-display-name"
+ , displayNameType.getTextContent().trim());
+ }
+ finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Checks to see if there is an icon defined
+ *
+ */
+ public void testIcon() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ AttributeType attrType = getAttribute1(edit.getFacesConfig());
+ assertNotNull(attrType);
+
+ IconType iconType =
+ (IconType) FacesConfigModelUtil
+ .findEObjectElementById
+ (attrType.getIcon(), "componentAttribute1_icon1");
+ assertNotNull(iconType);
+
+ assertEquals("attribute-small-icon",
+ iconType.getSmallIcon().getTextContent());
+ assertEquals("attribute-large-icon",
+ iconType.getLargeIcon().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * This one tests for the existence of two items.
+ * They are the required items by all renderers
+ * They are : attribute-name and attribute-class.
+ * It thought it was better to put them together instead of
+ * writing single -separate methods for each of them.
+ *Simply, extract the names and check if same the one
+ *in faces-config.xml
+ */
+ public void testAttributeNameAndClass() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ AttributeType attribute1 = getAttribute1(edit.getFacesConfig());
+ assertNotNull(attribute1);
+
+ assertEquals("attribute-name"
+ ,attribute1.getAttributeName().getTextContent());
+ assertEquals("attribute-class"
+ ,attribute1.getAttributeClass().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Checks for the item suggested-value within attribute
+ *
+ */
+ public void testSuggestedValue() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ AttributeType attributeType =
+ getAttribute1(edit.getFacesConfig());
+
+ assertEquals("attribute-suggested-value"
+ ,attributeType.getSuggestedValue().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testDefaultValue()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ AttributeType attributeType =
+ getAttribute1(edit.getFacesConfig());
+
+ assertEquals("value5"
+ , attributeType.getDefaultValue().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /**
+ * Checks for the item attribute-extension within attribute
+ * TODO: not currently supported
+ */
+ public void testAttributeExtension() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ if (edit.getFacesConfig() != null) {
+ EList comp = edit.getFacesConfig().getComponent();
+ assertTrue(!comp.isEmpty());
+ for (int i = 0; i < comp.size(); i++) {
+ ComponentType compType = (ComponentType) comp
+ .get(i);
+ assertTrue(!compType.getAttribute().isEmpty());
+
+ EList attr = compType.getAttribute();
+ for (int k = 0; k < attr.size(); k++) {
+ AttributeType attrType = (AttributeType) attr.get(k);
+ EList ext= attrType.getAttributeExtension();
+ assertTrue(ext.size()!=0);
+ }
+ }
+ }
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadAttributeConverterTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadAttributeConverterTestCase.java
new file mode 100644
index 000000000..b898ad3bd
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadAttributeConverterTestCase.java
@@ -0,0 +1,255 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests.read;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jst.jsf.facesconfig.emf.AttributeType;
+import org.eclipse.jst.jsf.facesconfig.emf.ComponentType;
+import org.eclipse.jst.jsf.facesconfig.emf.ConverterType;
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+/*
+ * This Junit class is used to test for the existence of all
+ * items with in attribute of the Converter Element
+ *
+ */
+public class ReadAttributeConverterTestCase extends BaseReadTestCase {
+
+ public ReadAttributeConverterTestCase(String name) {
+ super(name);
+ }
+
+ /*
+ * checks to see if there exists an atribute in the first place
+ *
+ */
+ public void testSingleAttribute() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ AttributeType attribute1 = getAttribute1(edit.getFacesConfig());
+ assertNotNull(attribute1);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ private AttributeType getAttribute1(FacesConfigType facesConfig)
+ {
+ ConverterType converter1 =
+ (ConverterType) FacesConfigModelUtil
+ .findEObjectElementById(facesConfig.getConverter(), "converter1");
+ assertNotNull(converter1);
+
+ return (AttributeType)
+ FacesConfigModelUtil
+ .findEObjectElementById(converter1.getAttribute()
+ , "converter1Attribute");
+ }
+
+
+ /*
+ * This is to test the description child inside of Attribute
+ *
+ */
+
+ public void testDescription() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ AttributeType attributeType =
+ getAttribute1(edit.getFacesConfig());
+ assertNotNull(attributeType);
+
+ DescriptionType descType =
+ (DescriptionType)FacesConfigModelUtil.findEObjectElementById
+ (attributeType.getDescription()
+ ,"converter1_attribute_description");
+ assertEquals("converter-attribute-description"
+ , descType.getTextContent().trim());
+ }
+ finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * A simple test to check if the Display Name is present
+ * within the faces-config.xml file
+ */
+
+ public void testDisplayName() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ AttributeType attributeType =
+ getAttribute1(edit.getFacesConfig());
+ assertNotNull(attributeType);
+
+ final DisplayNameType displayNameType =
+ (DisplayNameType)FacesConfigModelUtil.findEObjectElementById
+ (attributeType.getDisplayName()
+ ,"converter1_attribute_display-name");
+ assertEquals("converter-attribute-display-name"
+ , displayNameType.getTextContent().trim());
+ }
+ finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Checks to see if there is an icon defined
+ *
+ */
+ public void testIcon() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ AttributeType attrType = getAttribute1(edit.getFacesConfig());
+ assertNotNull(attrType);
+
+ IconType iconType =
+ (IconType) FacesConfigModelUtil
+ .findEObjectElementById
+ (attrType.getIcon(), "converter1_attribute_icon");
+ assertNotNull(iconType);
+
+ assertEquals("converter1-attribute-small-icon",
+ iconType.getSmallIcon().getTextContent());
+ assertEquals("converter1-attribute-large-icon",
+ iconType.getLargeIcon().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * This one tests for the existence of two items.
+ * They are the required items by all renderers
+ * They are : attribute-name and attribute-class.
+ * It thought it was better to put them together instead of
+ * writing single -separate methods for each of them.
+ *Simply, extract the names and check if same the one
+ *in faces-config.xml
+ */
+ public void testAttributeNameAndClass() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ AttributeType attribute1 = getAttribute1(edit.getFacesConfig());
+ assertNotNull(attribute1);
+
+ assertEquals("converter1-attribute-name"
+ ,attribute1.getAttributeName().getTextContent());
+ assertEquals("converter1-attribute-class"
+ ,attribute1.getAttributeClass().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Checks for the item suggested-value within attribute
+ *
+ */
+ public void testSuggestedValue() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ AttributeType attributeType =
+ getAttribute1(edit.getFacesConfig());
+
+ assertEquals("converter1-attribute-suggested-value"
+ ,attributeType.getSuggestedValue().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testDefaultValue()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ AttributeType attributeType =
+ getAttribute1(edit.getFacesConfig());
+
+ assertEquals("converter1-default-value"
+ , attributeType.getDefaultValue().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /**
+ * Checks for the item attribute-extension within attribute
+ * TODO: not currently supported
+ */
+ public void testAttributeExtension() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ if (edit.getFacesConfig() != null) {
+ EList comp = edit.getFacesConfig().getComponent();
+ assertTrue(!comp.isEmpty());
+ for (int i = 0; i < comp.size(); i++) {
+ ComponentType compType = (ComponentType) comp
+ .get(i);
+ assertTrue(!compType.getAttribute().isEmpty());
+
+ EList attr = compType.getAttribute();
+ for (int k = 0; k < attr.size(); k++) {
+ AttributeType attrType = (AttributeType) attr.get(k);
+ EList ext= attrType.getAttributeExtension();
+ assertTrue(ext.size()!=0);
+ }
+ }
+ }
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadAttributeRendererTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadAttributeRendererTestCase.java
new file mode 100644
index 000000000..e5764582d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadAttributeRendererTestCase.java
@@ -0,0 +1,258 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2006 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.facesconfig.tests.read;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jst.jsf.facesconfig.emf.AttributeType;
+import org.eclipse.jst.jsf.facesconfig.emf.ComponentType;
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.emf.RenderKitType;
+import org.eclipse.jst.jsf.facesconfig.emf.RendererType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class ReadAttributeRendererTestCase extends BaseReadTestCase {
+
+ public ReadAttributeRendererTestCase(String name) {
+ super(name);
+ }
+
+ /*
+ * checks to see if there exists an atribute in the first place
+ *
+ */
+ public void testSingleAttribute() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ AttributeType attribute1 = getAttribute1(edit.getFacesConfig());
+ assertNotNull(attribute1);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ private AttributeType getAttribute1(FacesConfigType facesConfig)
+ {
+ RenderKitType renderKit =
+ (RenderKitType) FacesConfigModelUtil
+ .findEObjectElementById
+ (facesConfig.getRenderKit(), "renderKit1");
+ assertNotNull(renderKit);
+
+ RendererType renderer =
+ (RendererType) FacesConfigModelUtil
+ .findEObjectElementById
+ (renderKit.getRenderer(), "renderKit1Renderer");
+ assertNotNull(renderer);
+
+ return (AttributeType) FacesConfigModelUtil
+ .findEObjectElementById
+ (renderer.getAttribute(), "renderKit1RendererAttribute1");
+ }
+
+
+ /*
+ * This is to test the description child inside of Attribute
+ *
+ */
+
+ public void testDescription() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ AttributeType attributeType =
+ getAttribute1(edit.getFacesConfig());
+ assertNotNull(attributeType);
+
+ DescriptionType descType =
+ (DescriptionType)FacesConfigModelUtil.findEObjectElementById
+ (attributeType.getDescription()
+ ,"renderKit1RendererAttribute1Description");
+ assertEquals("renderer-attribute-attribute-description"
+ , descType.getTextContent().trim());
+ }
+ finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * A simple test to check if the Display Name is present
+ * within the faces-config.xml file
+ */
+
+ public void testDisplayName() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ AttributeType attributeType =
+ getAttribute1(edit.getFacesConfig());
+ assertNotNull(attributeType);
+
+ final DisplayNameType displayNameType =
+ (DisplayNameType)FacesConfigModelUtil.findEObjectElementById
+ (attributeType.getDisplayName()
+ ,"renderKit1RendererAttribute1DisplayName");
+ assertEquals("renderer-attribute-display-name"
+ , displayNameType.getTextContent().trim());
+ }
+ finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Checks to see if there is an icon defined
+ *
+ */
+ public void testIcon() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ AttributeType attrType = getAttribute1(edit.getFacesConfig());
+ assertNotNull(attrType);
+
+ IconType iconType =
+ (IconType) FacesConfigModelUtil
+ .findEObjectElementById
+ (attrType.getIcon(), "renderKit1RendererAttribute1Icon");
+ assertNotNull(iconType);
+
+ assertEquals("renderer-attribute-small-icon",
+ iconType.getSmallIcon().getTextContent());
+ assertEquals("renderer-attribute-large-icon",
+ iconType.getLargeIcon().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * This one tests for the existence of two items.
+ * They are the required items by all renderers
+ * They are : attribute-name and attribute-class.
+ * It thought it was better to put them together instead of
+ * writing single -separate methods for each of them.
+ *Simply, extract the names and check if same the one
+ *in faces-config.xml
+ */
+ public void testAttributeNameAndClass() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ AttributeType attribute1 = getAttribute1(edit.getFacesConfig());
+ assertNotNull(attribute1);
+
+ assertEquals("renderer attribute name"
+ ,attribute1.getAttributeName().getTextContent());
+ assertEquals("renderer Attribute Class"
+ ,attribute1.getAttributeClass().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Checks for the item suggested-value within attribute
+ *
+ */
+ public void testSuggestedValue() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ AttributeType attributeType =
+ getAttribute1(edit.getFacesConfig());
+
+ assertEquals("renderer attribute suggested value"
+ ,attributeType.getSuggestedValue().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testDefaultValue()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ AttributeType attributeType =
+ getAttribute1(edit.getFacesConfig());
+
+ assertEquals("renderer attribute default value"
+ , attributeType.getDefaultValue().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /**
+ * Checks for the item attribute-extension within attribute
+ * TODO: not currently supported
+ */
+ public void testAttributeExtension() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ if (edit.getFacesConfig() != null) {
+ EList comp = edit.getFacesConfig().getComponent();
+ assertTrue(!comp.isEmpty());
+ for (int i = 0; i < comp.size(); i++) {
+ ComponentType compType = (ComponentType) comp
+ .get(i);
+ assertTrue(!compType.getAttribute().isEmpty());
+
+ EList attr = compType.getAttribute();
+ for (int k = 0; k < attr.size(); k++) {
+ AttributeType attrType = (AttributeType) attr.get(k);
+ EList ext= attrType.getAttributeExtension();
+ assertTrue(ext.size()!=0);
+ }
+ }
+ }
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadAttributeValidatorTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadAttributeValidatorTestCase.java
new file mode 100644
index 000000000..cbdf4d38f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadAttributeValidatorTestCase.java
@@ -0,0 +1,255 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests.read;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jst.jsf.facesconfig.emf.AttributeType;
+import org.eclipse.jst.jsf.facesconfig.emf.ComponentType;
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.emf.ValidatorType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+/*
+ * This Junit class is used to test Attibute part in the Validator Element
+ *
+ */
+public class ReadAttributeValidatorTestCase extends BaseReadTestCase {
+
+ public ReadAttributeValidatorTestCase(String name) {
+ super(name);
+ }
+
+ /*
+ * checks to see if there exists an atribute in the first place
+ *
+ */
+ public void testSingleAttribute() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ AttributeType attribute1 = getAttribute1(edit.getFacesConfig());
+ assertNotNull(attribute1);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ private AttributeType getAttribute1(FacesConfigType facesConfig)
+ {
+ ValidatorType validator1 =
+ (ValidatorType) FacesConfigModelUtil
+ .findEObjectElementById(facesConfig.getValidator(), "validator1");
+ assertNotNull(validator1);
+
+ return (AttributeType)
+ FacesConfigModelUtil
+ .findEObjectElementById(validator1.getAttribute()
+ , "validator1_attribute");
+ }
+
+
+ /*
+ * This is to test the description child inside of Attribute
+ *
+ */
+
+ public void testDescription() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ AttributeType attributeType =
+ getAttribute1(edit.getFacesConfig());
+ assertNotNull(attributeType);
+
+ DescriptionType descType =
+ (DescriptionType)FacesConfigModelUtil.findEObjectElementById
+ (attributeType.getDescription()
+ ,"validator1_attribute_description");
+ assertEquals("validator-attribute-description"
+ , descType.getTextContent().trim());
+ }
+ finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * A simple test to check if the Display Name is present
+ * within the faces-config.xml file
+ */
+
+ public void testDisplayName() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ AttributeType attributeType =
+ getAttribute1(edit.getFacesConfig());
+ assertNotNull(attributeType);
+
+ final DisplayNameType displayNameType =
+ (DisplayNameType)FacesConfigModelUtil.findEObjectElementById
+ (attributeType.getDisplayName()
+ ,"validator1_attribute_displayName");
+ assertEquals("validator-attribute-display-name"
+ , displayNameType.getTextContent().trim());
+ }
+ finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Checks to see if there is an icon defined
+ *
+ */
+ public void testIcon() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ AttributeType attrType = getAttribute1(edit.getFacesConfig());
+ assertNotNull(attrType);
+
+ IconType iconType =
+ (IconType) FacesConfigModelUtil
+ .findEObjectElementById
+ (attrType.getIcon(), "validator1_attribute_icon");
+ assertNotNull(iconType);
+
+ assertEquals("validator-attribute-small-icon",
+ iconType.getSmallIcon().getTextContent());
+ assertEquals("validator-attribute-large-icon",
+ iconType.getLargeIcon().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * This one tests for the existence of two items.
+ * They are the required items by all renderers
+ * They are : attribute-name and attribute-class.
+ * It thought it was better to put them together instead of
+ * writing single -separate methods for each of them.
+ *Simply, extract the names and check if same the one
+ *in faces-config.xml
+ */
+ public void testAttributeNameAndClass() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ AttributeType attribute1 = getAttribute1(edit.getFacesConfig());
+ assertNotNull(attribute1);
+
+ assertEquals("validator-attribute-name"
+ ,attribute1.getAttributeName().getTextContent());
+ assertEquals("validator-attribute-class"
+ ,attribute1.getAttributeClass().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Checks for the item suggested-value within attribute
+ *
+ */
+ public void testSuggestedValue() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ AttributeType attributeType =
+ getAttribute1(edit.getFacesConfig());
+
+ assertEquals("validator-attribute-suggested-value"
+ ,attributeType.getSuggestedValue().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testDefaultValue()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ AttributeType attributeType =
+ getAttribute1(edit.getFacesConfig());
+
+ assertEquals("validator-default-value"
+ , attributeType.getDefaultValue().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /**
+ * Checks for the item attribute-extension within attribute
+ * TODO: not currently supported
+ */
+ public void testAttributeExtension() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ if (edit.getFacesConfig() != null) {
+ EList comp = edit.getFacesConfig().getComponent();
+ assertTrue(!comp.isEmpty());
+ for (int i = 0; i < comp.size(); i++) {
+ ComponentType compType = (ComponentType) comp
+ .get(i);
+ assertTrue(!compType.getAttribute().isEmpty());
+
+ EList attr = compType.getAttribute();
+ for (int k = 0; k < attr.size(); k++) {
+ AttributeType attrType = (AttributeType) attr.get(k);
+ EList ext= attrType.getAttributeExtension();
+ assertTrue(ext.size()!=0);
+ }
+ }
+ }
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadComponentTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadComponentTestCase.java
new file mode 100644
index 000000000..a3bcc4119
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadComponentTestCase.java
@@ -0,0 +1,251 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests.read;
+
+import org.eclipse.jst.jsf.facesconfig.emf.AttributeType;
+import org.eclipse.jst.jsf.facesconfig.emf.ComponentExtensionType;
+import org.eclipse.jst.jsf.facesconfig.emf.ComponentType;
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacetType;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.emf.PropertyType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+/*
+ * This Junit class is used to test for Component with in faces-config
+ * root Element.
+ *
+ */
+public class ReadComponentTestCase extends BaseReadTestCase {
+
+ public ReadComponentTestCase(String name) {
+ super(name);
+ }
+
+ /*
+ * assert there is at least one Component listed
+ */
+ public void testSingleComponent() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ assertNotNull(getComponent1(edit.getFacesConfig()));
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ private ComponentType getComponent1(FacesConfigType facesConfig)
+ {
+ return (ComponentType) FacesConfigModelUtil
+ .findEObjectElementById(facesConfig.getComponent(), "component1");
+ }
+
+ // Test for the Descirption
+ public void testNonEmptyDescription() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ final ComponentType component1 =
+ getComponent1(edit.getFacesConfig());
+ assertNotNull(component1);
+
+ final DescriptionType descriptionType =
+ (DescriptionType) FacesConfigModelUtil.
+ findEObjectElementById
+ (component1.getDescription(), "componentDescription1");
+ assertNotNull(descriptionType);
+ assertEquals("my component", descriptionType.getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ *Check for the Display name
+ *
+ */
+ public void testDisplayName() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ final ComponentType component1 =
+ getComponent1(edit.getFacesConfig());
+ assertNotNull(component1);
+
+ final DisplayNameType displayNameType =
+ (DisplayNameType) FacesConfigModelUtil.
+ findEObjectElementById
+ (component1.getDisplayName(), "componentDisplayName1");
+ assertNotNull(displayNameType);
+ assertEquals("My component", displayNameType.getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+
+ /*
+ * get the icon of a compnent
+ *
+ */
+ public void testNonEmptyIcon() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ final ComponentType component1 =
+ getComponent1(edit.getFacesConfig());
+ assertNotNull(component1);
+
+ final IconType iconType =
+ (IconType) FacesConfigModelUtil.
+ findEObjectElementById
+ (component1.getIcon(), "componentIcon1");
+ assertNotNull(iconType);
+
+ assertEquals("small-icon",
+ iconType.getSmallIcon().getTextContent().trim());
+ assertEquals("large-icon",
+ iconType.getLargeIcon().getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /**
+ * check to see there is the Component-type and the Component-class
+ */
+ public void testNonEmptyComponentTypeAndClass() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull (edit.getFacesConfig());
+ ComponentType component1 = getComponent1(edit.getFacesConfig());
+ assertNotNull(component1);
+
+ assertEquals("component-type", component1.getComponentType().getTextContent());
+ assertEquals("ComponentClass", component1.getComponentClass().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+
+ /**
+ * check for the attribute part of the Component
+ * @see ReadAttributeComponentTestCase for the full test of the
+ * component attributes
+ */
+ public void testAttribute() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull (edit.getFacesConfig());
+ ComponentType component1 = getComponent1(edit.getFacesConfig());
+
+ // full testing of attribute is in ReadAttributeComponentTestCase
+ assertEquals(1, component1.getAttribute().size());
+ assertEquals("componentAttribute1",
+ ((AttributeType)component1.getAttribute().get(0)).getId());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /**
+ * check to see there is property listed in the input file
+ * @see ReadPropertyComponentTestCase for full test of component
+ * property
+ */
+ public void testProperty() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ ComponentType component1 = getComponent1(edit.getFacesConfig());
+ assertNotNull(component1);
+
+ assertEquals(1, component1.getProperty().size());
+ assertEquals("componentProperty1", ((PropertyType)component1.getProperty().get(0)).getId());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testFacet()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ ComponentType component1 = getComponent1(edit.getFacesConfig());
+ assertNotNull(component1);
+
+ assertEquals(1, component1.getFacet().size());
+ assertEquals("componentFacet1", ((FacetType)component1.getFacet().get(0)).getId());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Check for hte Component-Extension inside Component
+ */
+
+ public void testComponentExtension() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ ComponentType component1 = getComponent1(edit.getFacesConfig());
+ assertNotNull(component1);
+
+ ComponentExtensionType extType =
+ (ComponentExtensionType) FacesConfigModelUtil
+ .findEObjectElementById(component1.getComponentExtension()
+ , "componentExtension1");
+ assertNotNull(extType);
+ //assertEquals("component-extension", extType.getAny().get(0));
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadConverterTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadConverterTestCase.java
new file mode 100644
index 000000000..52575086f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadConverterTestCase.java
@@ -0,0 +1,177 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests.read;
+
+import org.eclipse.jst.jsf.facesconfig.emf.ConverterType;
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+/*
+ * This Junit class is used to test the Converter which is one of
+ * many items inside the root elemnt faces-config in the configuration
+ * information hierarchy of the faces-config.xml file
+ *
+ */
+public class ReadConverterTestCase extends BaseReadTestCase {
+ public ReadConverterTestCase(String name) {
+ super(name);
+ }
+
+ /*
+ * Check to see if this element exists. There sould be at least one
+ * of such kind listed in the file.
+ */
+ public void testSingleConverter() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ assertNotNull(getConverter1(edit.getFacesConfig()));
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ ConverterType getConverter1(FacesConfigType facesConfig)
+ {
+ return
+ (ConverterType) FacesConfigModelUtil.
+ findEObjectElementById
+ (facesConfig.getConverter(), "converter1");
+ }
+
+ private ConverterType getConverter2(FacesConfigType facesConfig)
+ {
+
+ return
+ (ConverterType) FacesConfigModelUtil.
+ findEObjectElementById
+ (facesConfig.getConverter(), "converter2");
+ }
+
+ // Test for the Descirption
+ public void testDescriptionGroup() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ ConverterType converter1 = getConverter1(edit.getFacesConfig());
+ assertNotNull(converter1);
+
+ // test descriptioni
+ {
+ DescriptionType descType =
+ (DescriptionType) FacesConfigModelUtil.findEObjectElementById
+ (converter1.getDescription(), "converter1Description");
+ assertEquals("converter-description"
+ , descType.getTextContent());
+ }
+ // test displayname
+ {
+ DisplayNameType displayNameType =
+ (DisplayNameType) FacesConfigModelUtil.findEObjectElementById
+ (converter1.getDisplayName(), "converter1DisplayName");
+ assertEquals("converter-display-name"
+ , displayNameType.getTextContent());
+ }
+ // test icon
+ {
+ IconType iconType =
+ (IconType) FacesConfigModelUtil.findEObjectElementById
+ (converter1.getIcon(), "converter1Icon");
+ assertEquals("converter-small-icon"
+ , iconType.getSmallIcon().getTextContent());
+ assertEquals("converter-large-icon"
+ , iconType.getLargeIcon().getTextContent());
+ }
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testValidatorSingleValueProperties() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ // we need two different converters because converter-for-class
+ // and converter-id are mutually exclusive
+ final ConverterType converter1 = getConverter1(edit.getFacesConfig());
+ assertNotNull(converter1);
+
+ assertEquals("converter-for-class"
+ , converter1.getConverterForClass().getTextContent());
+ assertEquals("converter-class"
+ , converter1.getConverterClass().getTextContent());
+
+ final ConverterType converter2 = getConverter2(edit.getFacesConfig());
+ assertNotNull(converter2);
+
+ assertEquals("converter2-id"
+ , converter2.getConverterId().getTextContent());
+ assertEquals("converter2-class"
+ , converter2.getConverterClass().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /**
+ * Test the attribute sub-property of validators.
+ * Note: the attribute itself is tested in ReadAttributeConverterTestCase
+ * this test case just tests the presence of the attribute
+ */
+ public void testAttribute() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ ConverterType converter1 = getConverter1(edit.getFacesConfig());
+ assertEquals(1, converter1.getAttribute().size());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /**
+ * Test the property sub-property of validators
+ * Note: the attribute itself is tested in ReadPropertyConverterTestCase
+ * this test case just tests for the presence of the property
+ */
+ public void testProperty() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ ConverterType converter1 = getConverter1(edit.getFacesConfig());
+ assertEquals(1, converter1.getProperty().size());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadConverterTestCase_1_2.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadConverterTestCase_1_2.java
new file mode 100644
index 000000000..e09a9926b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadConverterTestCase_1_2.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * 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.facesconfig.tests.read;
+
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.facesconfig.emf.ConverterExtensionType;
+import org.eclipse.jst.jsf.facesconfig.emf.ConverterType;
+import org.eclipse.jst.jsf.facesconfig.emf.DynamicElement;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class ReadConverterTestCase_1_2 extends ReadConverterTestCase
+{
+ public ReadConverterTestCase_1_2(String name) {
+ super(name);
+ }
+
+ protected void initialize(TestConfiguration testConfiguration) {
+ // override base when not in a configurable test suite
+ if(_testConfiguration == null)
+ {
+ _facesConfigFile = "WEB-INF/faces-config_1_2.xml";
+ _facesVersion = IJSFCoreConstants.JSF_VERSION_1_2;
+ }
+ else
+ {
+ super.initialize(testConfiguration);
+ }
+ }
+
+ public void testConverterExtension() {
+
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ ConverterType converter1 = getConverter1(edit.getFacesConfig());
+ assertNotNull(converter1);
+
+ assertEquals(1, converter1.getConverterExtension().size());
+ ConverterExtensionType converterExtensionType =
+ (ConverterExtensionType) converter1.getConverterExtension().get(0);
+ assertEquals(1, converterExtensionType.getChildNodes().size());
+ DynamicElement element = (DynamicElement) converterExtensionType.getChildNodes().get(0);
+ assertEquals("converter-extension-tag", element.getName());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadExtensionDataTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadExtensionDataTestCase.java
new file mode 100644
index 000000000..515bd03cb
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadExtensionDataTestCase.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2006 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.facesconfig.tests.read;
+
+import java.util.List;
+
+import org.eclipse.jst.jsf.facesconfig.emf.ComponentExtensionType;
+import org.eclipse.jst.jsf.facesconfig.emf.ComponentType;
+import org.eclipse.jst.jsf.facesconfig.emf.DynamicAttribute;
+import org.eclipse.jst.jsf.facesconfig.emf.DynamicElement;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+/**
+ * Read test for extension data
+ *
+ * @author cbateman
+ *
+ */
+public class ReadExtensionDataTestCase extends BaseReadTestCase
+{
+ public ReadExtensionDataTestCase(String name) {
+ super(name);
+ }
+
+ /*
+ * Check for hte Component-Extension inside Component
+ */
+
+ public void testSingleElementRoot() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = FacesConfigArtifactEdit
+ .getFacesConfigArtifactEditForRead(project,
+ "WEB-INF/faces-config-ext-data1.xml");
+ assertNotNull(edit.getFacesConfig());
+ ComponentType component1 = getComponent1(edit.getFacesConfig());
+ assertNotNull(component1);
+
+ ComponentExtensionType extType =
+ (ComponentExtensionType) FacesConfigModelUtil
+ .findEObjectElementById(component1.getComponentExtension()
+ , "singleRootComponentExt");
+ assertNotNull(extType);
+ List elements = extType.getChildNodes();
+ assertEquals(1, elements.size());
+ DynamicElement singleRoot = (DynamicElement) elements.get(0);
+ assertEquals("any-data", singleRoot.getName());
+
+ assertEquals(1, singleRoot.getAttributes().size());
+ DynamicAttribute attribute =
+ (DynamicAttribute) singleRoot.getAttributes().get(0);
+ assertEquals("attribute", attribute.getName());
+ assertEquals("any-data-attribute", attribute.getValue());
+
+ assertEquals(2, singleRoot.getChildNodes().size());
+
+ DynamicElement firstChild =
+ (DynamicElement) singleRoot.getChildNodes().get(0);
+ assertEquals("first-child", firstChild.getName());
+ assertEquals("someData", firstChild.getTextContent());
+
+ DynamicElement secondChild =
+ (DynamicElement) singleRoot.getChildNodes().get(1);
+ assertEquals("second-child", secondChild.getName());
+ assertEquals("second Child's data", secondChild.getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ private ComponentType getComponent1(FacesConfigType facesConfig)
+ {
+ return (ComponentType) FacesConfigModelUtil
+ .findEObjectElementById(facesConfig.getComponent(), "component1");
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFacesConfigElementsTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFacesConfigElementsTestCase.java
new file mode 100644
index 000000000..3ee50a740
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFacesConfigElementsTestCase.java
@@ -0,0 +1,201 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests.read;
+
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+/*
+ * This Junit class is used to test the FacesConfigFactoryImpl
+ * class.
+ *
+ */
+public class ReadFacesConfigElementsTestCase extends BaseReadTestCase {
+
+ public ReadFacesConfigElementsTestCase(String name) {
+ super(name);
+ }
+
+ /*
+ * Test the applicaion element of faces-config.xml
+ *
+ */
+ public final void testApplication() {
+
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ assertEquals(1, edit.getFacesConfig().getApplication().size());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Test the factory element of faces-config.xml
+ *
+ */
+ public final void testFactory() {
+
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ assertEquals(1, edit.getFacesConfig().getFactory().size());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+ /*
+ * Test the component element of faces-config.xml
+ *
+ */
+ public final void testComponent() {
+
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ assertEquals(1, edit.getFacesConfig().getComponent().size());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Test the managed-bean element of faces-config.xml
+ *
+ */
+ public final void testManagedBean() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ assertEquals(3, edit.getFacesConfig().getManagedBean().size());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+
+ /*
+ * Test the referenced-bean element of faces-config.xml
+ *
+ */
+ public final void testReferencedBean() {
+
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ assertEquals(1, edit.getFacesConfig().getReferencedBean().size());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+
+ /*
+ * Test the render-kit element of faces-config.xml
+ *
+ */
+ public final void testRenderKit() {
+
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ assertEquals(1, edit.getFacesConfig().getRenderKit().size());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+ /*
+ * Testing for the validator elment of the config file
+ */
+
+ public final void testValidator() {
+
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ assertEquals(1, edit.getFacesConfig().getValidator().size());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Testing for the converter elment of the config file
+ */
+
+ public final void testConverter() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ assertEquals(2, edit.getFacesConfig().getConverter().size());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /**
+ * Testing for the navigation rule list population
+ */
+ public final void testNavigationRule()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ assertEquals(2, edit.getFacesConfig().getNavigationRule().size());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /**
+ * Testing for the lifecycle list population
+ */
+ public final void testLifecycle()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ assertEquals(1, edit.getFacesConfig().getLifecycle().size());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFacesConfigElementsTestCase_1_2.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFacesConfigElementsTestCase_1_2.java
new file mode 100644
index 000000000..fa596acaf
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFacesConfigElementsTestCase_1_2.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * 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.facesconfig.tests.read;
+
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.facesconfig.emf.DynamicElement;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigExtensionType;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class ReadFacesConfigElementsTestCase_1_2 extends
+ ReadFacesConfigElementsTestCase
+{
+ public ReadFacesConfigElementsTestCase_1_2(String name) {
+ super(name);
+ }
+
+ protected void initialize(TestConfiguration testConfiguration) {
+ // override base when not in a configurable test suite
+ if(_testConfiguration == null)
+ {
+ _facesConfigFile = "WEB-INF/faces-config_1_2.xml";
+ _facesVersion = IJSFCoreConstants.JSF_VERSION_1_2;
+ }
+ else
+ {
+ super.initialize(testConfiguration);
+ }
+ }
+
+ public void testFacesConfigExtension() {
+
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ assertEquals(1, edit.getFacesConfig().getFacesConfigExtension().size());
+ FacesConfigExtensionType facesConfigExt =
+ (FacesConfigExtensionType) edit.getFacesConfig().getFacesConfigExtension().get(0);
+ assertEquals(1, facesConfigExt.getChildNodes().size());
+ DynamicElement element = (DynamicElement) facesConfigExt.getChildNodes().get(0);
+ assertEquals("faces-config-extended-data", element.getName());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFacesConfigElementsTestCase_2_0.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFacesConfigElementsTestCase_2_0.java
new file mode 100644
index 000000000..0652b43fb
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFacesConfigElementsTestCase_2_0.java
@@ -0,0 +1,255 @@
+/*******************************************************************************
+ * 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.facesconfig.tests.read;
+
+import java.util.List;
+
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.facesconfig.emf.AbsoluteOrderingType;
+import org.eclipse.jst.jsf.facesconfig.emf.AttributeClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.AttributeExtensionType;
+import org.eclipse.jst.jsf.facesconfig.emf.AttributeNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.AttributeType;
+import org.eclipse.jst.jsf.facesconfig.emf.BehaviorExtensionType;
+import org.eclipse.jst.jsf.facesconfig.emf.BehaviorType;
+import org.eclipse.jst.jsf.facesconfig.emf.DefaultValueType;
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.DynamicElement;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.emf.NameType;
+import org.eclipse.jst.jsf.facesconfig.emf.OrderingOrderingType;
+import org.eclipse.jst.jsf.facesconfig.emf.OrderingType;
+import org.eclipse.jst.jsf.facesconfig.emf.PropertyType;
+import org.eclipse.jst.jsf.facesconfig.emf.SuggestedValueType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class ReadFacesConfigElementsTestCase_2_0 extends
+ ReadFacesConfigElementsTestCase
+{
+ public ReadFacesConfigElementsTestCase_2_0(String name) {
+ super(name);
+ }
+
+ protected void initialize(TestConfiguration testConfiguration) {
+ // override base when not in a configurable test suite
+ if(_testConfiguration == null)
+ {
+ _facesConfigFile = "WEB-INF/faces-config_2_0.xml";
+ _facesVersion = IJSFCoreConstants.JSF_VERSION_2_0;
+ }
+ else
+ {
+ super.initialize(testConfiguration);
+ }
+ }
+
+ public final void testOrdering() {
+
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ assertEquals(1, edit.getFacesConfig().getOrdering().size());
+
+ OrderingType ordering = (OrderingType)edit.getFacesConfig().getOrdering().get(0);
+// (OrderingType)
+// FacesConfigModelUtil.findEObjectElementById
+// (edit.getFacesConfig().getOrdering(), "ordering-id");
+ assertNotNull(ordering);
+
+ OrderingOrderingType after = ordering.getAfter();
+ assertNotNull(after);
+ assertNotNull(after.getName());
+ assertEquals("afterName", ((NameType)after.getName().get(0)).getTextContent().trim());
+ assertNotNull(after.getOthers());
+ assertEquals("after-others-id", after.getOthers().getId().trim());
+
+ OrderingOrderingType before = ordering.getBefore();
+ assertNotNull(before);
+ assertNotNull(before.getName());
+ assertEquals("beforeName", ((NameType)before.getName().get(0)).getTextContent().trim());
+ assertNotNull(before.getOthers());
+ assertEquals("before-others-id", before.getOthers().getId().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public final void testAbsoluteOrdering() {
+
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ AbsoluteOrderingType absoluteOrdering = edit.getFacesConfig().getAbsoluteOrdering();
+ assertNotNull(absoluteOrdering);
+
+ assertNotNull(absoluteOrdering.getName());
+ assertEquals("absoluteOrderingName", ((NameType)absoluteOrdering.getName().get(0)).getTextContent().trim());
+ assertNotNull(absoluteOrdering.getOthers());
+ assertEquals("absolute-ordering-others-id", absoluteOrdering.getOthers().getId().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public final void testName() {
+
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ assertNotNull(edit.getFacesConfig().getName());
+ assertEquals("facesconfigName", edit.getFacesConfig().getName().getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public final void testBehavior() {
+
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ assertEquals(1, edit.getFacesConfig().getBehavior().size());
+
+ BehaviorType behavior = (BehaviorType)edit.getFacesConfig().getBehavior().get(0);
+// (BehaviorType)
+// FacesConfigModelUtil.findEObjectElementById
+// (edit.getFacesConfig().getBehavior(), "behavior-id");
+ assertNotNull(behavior);
+
+ DescriptionType descriptionType = (DescriptionType) FacesConfigModelUtil.
+ findEObjectElementById(behavior.getDescription(), "behaviorDescription1");
+ assertNotNull(descriptionType);
+ assertEquals("my behavior", descriptionType.getTextContent().trim());
+
+ final DisplayNameType displayNameType =
+ (DisplayNameType) FacesConfigModelUtil.
+ findEObjectElementById(behavior.getDisplayName(), "behaviorDisplayName1");
+ assertNotNull(displayNameType);
+ assertEquals("My behavior", displayNameType.getTextContent().trim());
+
+ final IconType iconType =
+ (IconType) FacesConfigModelUtil.
+ findEObjectElementById(behavior.getIcon(), "behaviorIcon1");
+ assertNotNull(iconType);
+
+ assertEquals("small-icon", iconType.getSmallIcon().getTextContent().trim());
+ assertEquals("large-icon", iconType.getLargeIcon().getTextContent().trim());
+
+ assertEquals("behavior-id-id", behavior.getBehaviorId().getTextContent().trim());
+ assertEquals("behavior-class", behavior.getBehaviorClass().getTextContent().trim());
+ assertEquals(1, behavior.getAttribute().size());
+ assertEquals(1, behavior.getProperty().size());
+
+ assertEquals(1, behavior.getBehaviorExtension().size());
+ BehaviorExtensionType behaviorExtensionType =
+ (BehaviorExtensionType) behavior.getBehaviorExtension().get(0);
+ assertEquals(2, behaviorExtensionType.getChildNodes().size());
+ DynamicElement element = (DynamicElement) behaviorExtensionType.getChildNodes().get(0);
+ assertEquals("a", element.getName());
+ element = (DynamicElement) behaviorExtensionType.getChildNodes().get(1);
+ assertEquals("behavior-extension-tag", element.getName());
+
+ //behavior attrs
+ assertEquals(1,behavior.getAttribute().size());
+ AttributeType attr = (AttributeType)behavior.getAttribute().get(0);
+ assertNotNull(attr);
+ AttributeNameType attrName = attr.getAttributeName();
+ assertEquals("behavior1AttributeName", attrName.getId());
+ assertEquals("behavior1AttributeName", attrName.getTextContent());
+ AttributeClassType attrClass = attr.getAttributeClass();
+ assertEquals("behavior1AttributeClass", attrClass.getId());
+ assertEquals("behavior1AttributeClass", attrClass.getTextContent());
+ List<DescriptionType> descs = attr.getDescription();
+ assertEquals(2, descs.size());
+ DescriptionType desc = (DescriptionType)descs.get(0);
+ assertEquals("behavior1AttributeDescription1", desc.getId());
+ assertEquals("behavior1AttributeDescription1", desc.getTextContent());
+ List<DisplayNameType> disps= attr.getDisplayName();
+ assertEquals(2, disps.size());
+ DisplayNameType disp = (DisplayNameType)disps.get(0);
+ assertEquals("behavior1AttributeDisplayName1", disp.getId());
+ assertEquals("fr", disp.getLang());
+ assertEquals("behavior1AttributeDisplayName1", disp.getTextContent());
+ List<IconType> icons = attr.getIcon();
+ assertEquals(1, icons.size());
+ IconType icon = (IconType)icons.get(0);
+ assertEquals("behavior1AttributeSmallIcon", icon.getSmallIcon().getTextContent());
+ assertEquals("behavior1AttributeLargeIcon", icon.getLargeIcon().getTextContent());
+ DefaultValueType defVal = attr.getDefaultValue();
+ assertNotNull(defVal);
+ assertEquals("behavior1AttributeDefaultValue", defVal.getId());
+ assertEquals("behavior1AttributeDefaultValue", defVal.getTextContent());
+ SuggestedValueType sugVal = attr.getSuggestedValue();
+ assertNotNull(sugVal);
+ assertEquals("behavior1AttributeSuggestedValue", sugVal.getId());
+ assertEquals("behavior1AttributeSuggestedValue", sugVal.getTextContent());
+ List<AttributeExtensionType> attrExts = attr.getAttributeExtension();
+ assertEquals(2, attrExts.size());
+ AttributeExtensionType attrExt = (AttributeExtensionType)attrExts.get(0);
+ assertEquals("behavior1AttributeExtension1", attrExt.getId());
+// assertEquals("<a>B</a>", attrExt.getTextContent()); //NOT WORKING
+ assertEquals(1, attrExt.getChildNodes().size());
+
+ //behavior props
+ List<PropertyType> props = behavior.getProperty();
+ assertEquals(1, props.size());
+ PropertyType prop = (PropertyType)props.get(0);
+ assertEquals("behavior1Property", prop.getId());
+ assertNull(prop.getDefaultValue());
+ assertEquals(1, prop.getDescription().size());
+ desc = (DescriptionType)prop.getDescription().get(0);
+ assertNull(desc.getId());
+ assertEquals("behavior1PropertyDescription", desc.getTextContent());
+ disp = (DisplayNameType)prop.getDisplayName().get(0);
+ assertNull(disp.getId());
+ assertEquals("behavior1PropertyDisplayName", disp.getTextContent());
+ assertEquals(1, prop.getIcon().size());
+ icon = (IconType)prop.getIcon().get(0);
+ assertEquals("behavior1PropertySmallIcon", icon.getSmallIcon().getId());
+ assertEquals("behavior1PropertySmallIcon", icon.getSmallIcon().getTextContent());
+ assertEquals("behavior1PropertyName", prop.getPropertyName().getTextContent());
+ assertEquals("behavior1PropertyClass", prop.getPropertyClass().getTextContent());
+
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public final void testMetadataComplete() {
+
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ assertEquals(true, edit.getFacesConfig().isMetadataComplete());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFacetComponentTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFacetComponentTestCase.java
new file mode 100644
index 000000000..8cefa8a6a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFacetComponentTestCase.java
@@ -0,0 +1,179 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2006 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.facesconfig.tests.read;
+
+import org.eclipse.jst.jsf.facesconfig.emf.ComponentType;
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacetType;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+/**
+ * Test the FacetType on a ComponentType
+ *
+ * @author cbateman
+ *
+ */
+public class ReadFacetComponentTestCase extends BaseReadTestCase {
+
+ public ReadFacetComponentTestCase(String name) {
+ super(name);
+ }
+
+ /*
+ * The following method is used to test for the existence of a single
+ * attribute in the Compoenent Element. While testing I had just one with
+ * everything (all children) inside it
+ */
+ public void testSingleFacet() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ FacetType facet1 = getFacet1(edit.getFacesConfig());
+ assertNotNull(facet1);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ private ComponentType getComponent1(FacesConfigType facesConfigType)
+ {
+ return (ComponentType) FacesConfigModelUtil
+ .findEObjectElementById
+ (facesConfigType.getComponent(), "component1");
+ }
+
+ private FacetType getFacet1(FacesConfigType facesConfigType)
+ {
+ ComponentType component1 = getComponent1(facesConfigType);
+ assertNotNull(component1);
+ return (FacetType) FacesConfigModelUtil
+ .findEObjectElementById
+ (component1.getFacet(), "componentFacet1");
+ }
+
+ /*
+ * This is to test the description child inside of Attribute
+ *
+ */
+
+ public void testDescription() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ FacetType facetType =
+ getFacet1(edit.getFacesConfig());
+ assertNotNull(facetType);
+
+ DescriptionType descType =
+ (DescriptionType)FacesConfigModelUtil.findEObjectElementById
+ (facetType.getDescription()
+ ,"componentFacet1_descripton1");
+ assertEquals("Facet1 Description"
+ , descType.getTextContent().trim());
+ }
+ finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * A simple test to check if the Display Name is present
+ * within the faces-config.xml file
+ */
+
+ public void testDisplayName() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ FacetType facetType =
+ getFacet1(edit.getFacesConfig());
+ assertNotNull(facetType);
+
+ final DisplayNameType displayNameType =
+ (DisplayNameType)FacesConfigModelUtil.findEObjectElementById
+ (facetType.getDisplayName()
+ ,"componentFacet1_displayName1");
+ assertEquals("Component Facet 1"
+ , displayNameType.getTextContent().trim());
+ }
+ finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Checks to see if there is an icon defined
+ *
+ */
+ public void testIcon() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ FacetType facetType = getFacet1(edit.getFacesConfig());
+ assertNotNull(facetType);
+
+ IconType iconType =
+ (IconType) FacesConfigModelUtil
+ .findEObjectElementById
+ (facetType.getIcon(), "componentFacet1_icon1");
+ assertNotNull(iconType);
+
+ assertEquals("facet-small-icon",
+ iconType.getSmallIcon().getTextContent());
+ assertEquals("facet-large-icon",
+ iconType.getLargeIcon().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /**
+ *
+ */
+ public void testFacetName() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ FacetType facet1 = getFacet1(edit.getFacesConfig());
+ assertNotNull(facet1);
+
+ assertEquals("facetName_chieb_sieb"
+ ,facet1.getFacetName().getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFacetRendererTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFacetRendererTestCase.java
new file mode 100644
index 000000000..a47d49d19
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFacetRendererTestCase.java
@@ -0,0 +1,177 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2006 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.facesconfig.tests.read;
+
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacetType;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.emf.RenderKitType;
+import org.eclipse.jst.jsf.facesconfig.emf.RendererType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class ReadFacetRendererTestCase extends BaseReadTestCase {
+
+ public ReadFacetRendererTestCase(String name) {
+ super(name);
+ }
+
+ /*
+ * The following method is used to test for the existence of a single
+ * attribute in the Compoenent Element. While testing I had just one with
+ * everything (all children) inside it
+ */
+ public void testSingleFacet() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ FacetType facet1 = getFacet1(edit.getFacesConfig());
+ assertNotNull(facet1);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ private FacetType getFacet1(FacesConfigType facesConfigType)
+ {
+ RenderKitType renderKit =
+ (RenderKitType) FacesConfigModelUtil
+ .findEObjectElementById
+ (facesConfigType.getRenderKit(), "renderKit1");
+ assertNotNull(renderKit);
+
+ RendererType renderer =
+ (RendererType) FacesConfigModelUtil
+ .findEObjectElementById
+ (renderKit.getRenderer(), "renderKit1Renderer");
+ assertNotNull(renderer);
+
+ return (FacetType) FacesConfigModelUtil
+ .findEObjectElementById
+ (renderer.getFacet(), "renderKit1Renderer1Facet1");
+ }
+
+ /*
+ * This is to test the description child inside of Attribute
+ *
+ */
+
+ public void testDescription() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ FacetType facetType =
+ getFacet1(edit.getFacesConfig());
+ assertNotNull(facetType);
+
+ DescriptionType descType =
+ (DescriptionType)FacesConfigModelUtil.findEObjectElementById
+ (facetType.getDescription()
+ ,"renderKit1Renderer1Facet1Description");
+ assertEquals("RendererFacetDescription"
+ , descType.getTextContent().trim());
+ }
+ finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * A simple test to check if the Display Name is present
+ * within the faces-config.xml file
+ */
+
+ public void testDisplayName() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ FacetType facetType =
+ getFacet1(edit.getFacesConfig());
+ assertNotNull(facetType);
+
+ final DisplayNameType displayNameType =
+ (DisplayNameType)FacesConfigModelUtil.findEObjectElementById
+ (facetType.getDisplayName()
+ ,"renderKit1Renderer1Facet1DisplayName");
+ assertEquals("RendererFacetDisplayName"
+ , displayNameType.getTextContent().trim());
+ }
+ finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Checks to see if there is an icon defined
+ *
+ */
+ public void testIcon() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ FacetType facetType = getFacet1(edit.getFacesConfig());
+ assertNotNull(facetType);
+
+ IconType iconType =
+ (IconType) FacesConfigModelUtil
+ .findEObjectElementById
+ (facetType.getIcon(), "renderKit1Renderer1Facet1Icon");
+ assertNotNull(iconType);
+
+ assertEquals("facet-renderer-small-icon",
+ iconType.getSmallIcon().getTextContent());
+ assertEquals("facet-renderer-large-icon",
+ iconType.getLargeIcon().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /**
+ *
+ */
+ public void testFacetName() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ FacetType facet1 = getFacet1(edit.getFacesConfig());
+ assertNotNull(facet1);
+
+ assertEquals("rendererFacetName"
+ ,facet1.getFacetName().getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFactoryTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFactoryTestCase.java
new file mode 100644
index 000000000..4b7b0d839
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFactoryTestCase.java
@@ -0,0 +1,157 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+
+package org.eclipse.jst.jsf.facesconfig.tests.read;
+
+import org.eclipse.jst.jsf.facesconfig.emf.ApplicationFactoryType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesContextFactoryType;
+import org.eclipse.jst.jsf.facesconfig.emf.FactoryType;
+import org.eclipse.jst.jsf.facesconfig.emf.LifecycleFactoryType;
+import org.eclipse.jst.jsf.facesconfig.emf.RenderKitFactoryType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+
+/*
+* This Junit class is used to test the FacesConfigFactoryImpl
+* class.
+*
+*/
+public class ReadFactoryTestCase extends BaseReadTestCase {
+
+ public ReadFactoryTestCase(String name) {
+ super(name);
+ }
+
+ /*
+ * Test the applicaion element of faces-config.xml
+ *
+ */
+ public void testEmptyFactory() {
+
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ assertEquals(1, edit.getFacesConfig().getFactory().size());
+ assertNotNull(getFactoryType1(edit.getFacesConfig()));
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ FactoryType getFactoryType1(FacesConfigType facesConfig)
+ {
+ return (FactoryType) FacesConfigModelUtil
+ .findEObjectElementById(facesConfig.getFactory(), "factory1");
+ }
+ /*
+ * Test the application-factory element of Factory in faces-config.xml
+ *
+ */
+ public void testApplicationFactory() {
+
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ FactoryType factoryType1 = getFactoryType1(edit.getFacesConfig());
+ assertNotNull(factoryType1);
+ ApplicationFactoryType applicationFactoryType1 =
+ (ApplicationFactoryType) FacesConfigModelUtil.findEObjectElementById
+ (factoryType1.getApplicationFactory(), "applicationFactory1");
+ assertNotNull(applicationFactoryType1);
+ assertEquals("application-factory",
+ applicationFactoryType1.getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Test the faces-context-factory element of Factory in faces-config.xml
+ */
+ public void testFacesContextFactory() {
+
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ FactoryType factoryType1 = getFactoryType1(edit.getFacesConfig());
+ assertNotNull(factoryType1);
+ FacesContextFactoryType facesContextFactoryType1 =
+ (FacesContextFactoryType) FacesConfigModelUtil.findEObjectElementById
+ (factoryType1.getFacesContextFactory(), "facesContextFactory1");
+ assertNotNull(facesContextFactoryType1);
+ assertEquals("faces-context-factory",
+ facesContextFactoryType1.getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+
+ /*
+ * Test the application-factory element of Factory in faces-config.xml
+ *
+ */
+ public void testLifeCycleFactory() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ FactoryType factoryType1 = getFactoryType1(edit.getFacesConfig());
+ assertNotNull(factoryType1);
+ LifecycleFactoryType lifecycleFactoryType1 =
+ (LifecycleFactoryType) FacesConfigModelUtil.findEObjectElementById
+ (factoryType1.getLifecycleFactory(), "lifecycleFactory1");
+ assertNotNull(lifecycleFactoryType1);
+ assertEquals("lifecycle-factory",
+ lifecycleFactoryType1.getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /**
+ * Test the renderkit-factory element
+ */
+ public void testRenderkitFactory()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ FactoryType factoryType1 = getFactoryType1(edit.getFacesConfig());
+ assertNotNull(factoryType1);
+ RenderKitFactoryType renderKitFactoryType1 =
+ (RenderKitFactoryType) FacesConfigModelUtil.findEObjectElementById
+ (factoryType1.getRenderKitFactory(), "renderKitFactory1");
+ assertNotNull(renderKitFactoryType1);
+ assertEquals("render-kit-factory",
+ renderKitFactoryType1.getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFactoryTestCase_1_2.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFactoryTestCase_1_2.java
new file mode 100644
index 000000000..008263407
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFactoryTestCase_1_2.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * 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.facesconfig.tests.read;
+
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.facesconfig.emf.DynamicElement;
+import org.eclipse.jst.jsf.facesconfig.emf.FactoryExtensionType;
+import org.eclipse.jst.jsf.facesconfig.emf.FactoryType;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class ReadFactoryTestCase_1_2 extends ReadFactoryTestCase {
+ public ReadFactoryTestCase_1_2(String name) {
+ super(name);
+ }
+
+ protected void initialize(TestConfiguration testConfiguration) {
+ // override base when not in a configurable test suite
+ if(_testConfiguration == null)
+ {
+ _facesConfigFile = "WEB-INF/faces-config_1_2.xml";
+ _facesVersion = IJSFCoreConstants.JSF_VERSION_1_2;
+ }
+ else
+ {
+ super.initialize(testConfiguration);
+ }
+ }
+
+ public void testFactoryExtension() {
+
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ FactoryType factoryType1 = getFactoryType1(edit.getFacesConfig());
+ assertNotNull(factoryType1);
+
+ assertEquals(1, factoryType1.getFactoryExtension().size());
+ FactoryExtensionType factoryExtensionType =
+ (FactoryExtensionType) factoryType1.getFactoryExtension().get(0);
+ assertEquals(1, factoryExtensionType.getChildNodes().size());
+ DynamicElement element = (DynamicElement) factoryExtensionType.getChildNodes().get(0);
+ assertEquals("factory-extension-tag", element.getName());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFactoryTestCase_2_0.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFactoryTestCase_2_0.java
new file mode 100644
index 000000000..815f63485
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadFactoryTestCase_2_0.java
@@ -0,0 +1,168 @@
+/*******************************************************************************
+ * 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.facesconfig.tests.read;
+
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.facesconfig.emf.ExceptionHandlerFactoryType;
+import org.eclipse.jst.jsf.facesconfig.emf.ExternalContextFactoryType;
+import org.eclipse.jst.jsf.facesconfig.emf.FactoryType;
+import org.eclipse.jst.jsf.facesconfig.emf.PartialViewContextFactoryType;
+import org.eclipse.jst.jsf.facesconfig.emf.TagHandlerDelegateFactoryType;
+import org.eclipse.jst.jsf.facesconfig.emf.ViewDeclarationLanguageFactoryType;
+import org.eclipse.jst.jsf.facesconfig.emf.VisitContextFactoryType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class ReadFactoryTestCase_2_0 extends ReadFactoryTestCase_1_2 {
+ public ReadFactoryTestCase_2_0(String name) {
+ super(name);
+ }
+
+ protected void initialize(TestConfiguration testConfiguration) {
+ // override base when not in a configurable test suite
+ if(_testConfiguration == null)
+ {
+ _facesConfigFile = "WEB-INF/faces-config_2_0.xml";
+ _facesVersion = IJSFCoreConstants.JSF_VERSION_2_0;
+ }
+ else
+ {
+ super.initialize(testConfiguration);
+ }
+ }
+
+ public void testExceptionHandlerFactory() {
+
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ FactoryType factoryType1 = getFactoryType1(edit.getFacesConfig());
+ assertNotNull(factoryType1);
+ ExceptionHandlerFactoryType exceptionHandlerFactory1 =
+ (ExceptionHandlerFactoryType) FacesConfigModelUtil.findEObjectElementById
+ (factoryType1.getExceptionHandlerFactory(), "exceptionHandlerFactory1");
+ assertNotNull(exceptionHandlerFactory1);
+ assertEquals("exception-handler-factory",
+ exceptionHandlerFactory1.getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testExternalContextFactory() {
+
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ FactoryType factoryType1 = getFactoryType1(edit.getFacesConfig());
+ assertNotNull(factoryType1);
+ ExternalContextFactoryType externalContextFactory1 =
+ (ExternalContextFactoryType) FacesConfigModelUtil.findEObjectElementById
+ (factoryType1.getExternalContextFactory(), "externalContextFactory1");
+ assertNotNull(externalContextFactory1);
+ assertEquals("external-context-factory",
+ externalContextFactory1.getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testPartialViewContextFactory() {
+
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ FactoryType factoryType1 = getFactoryType1(edit.getFacesConfig());
+ assertNotNull(factoryType1);
+ PartialViewContextFactoryType partialViewContextFactory1 =
+ (PartialViewContextFactoryType) FacesConfigModelUtil.findEObjectElementById
+ (factoryType1.getPartialViewContextFactory(), "partialViewContextFactory1");
+ assertNotNull(partialViewContextFactory1);
+ assertEquals("partial-view-context-factory",
+ partialViewContextFactory1.getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testViewDeclarationLanguageFactory() {
+
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ FactoryType factoryType1 = getFactoryType1(edit.getFacesConfig());
+ assertNotNull(factoryType1);
+ ViewDeclarationLanguageFactoryType viewDeclarationLanguageFactory1 =
+ (ViewDeclarationLanguageFactoryType) FacesConfigModelUtil.findEObjectElementById
+ (factoryType1.getViewDeclarationLanguageFactory(), "viewDeclarationLanguageFactory1");
+ assertNotNull(viewDeclarationLanguageFactory1);
+ assertEquals("view-declaration-language-factory",
+ viewDeclarationLanguageFactory1.getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testTagHandlerDelegateFactory() {
+
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ FactoryType factoryType1 = getFactoryType1(edit.getFacesConfig());
+ assertNotNull(factoryType1);
+ TagHandlerDelegateFactoryType tagHandlerDelegateFactory1 =
+ (TagHandlerDelegateFactoryType) FacesConfigModelUtil.findEObjectElementById
+ (factoryType1.getTagHandlerDelegateFactory(), "tagHandlerDelegateFactory1");
+ assertNotNull(tagHandlerDelegateFactory1);
+ assertEquals("tag-handler-delegate-factory",
+ tagHandlerDelegateFactory1.getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testVisitContextFactory() {
+
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ FactoryType factoryType1 = getFactoryType1(edit.getFacesConfig());
+ assertNotNull(factoryType1);
+ VisitContextFactoryType visitContextFactory =
+ (VisitContextFactoryType) FacesConfigModelUtil.findEObjectElementById
+ (factoryType1.getVisitContextFactory(), "visitContextFactory1");
+ assertNotNull(visitContextFactory);
+ assertEquals("visit-context-factory",
+ visitContextFactory.getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadLifecycleTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadLifecycleTestCase.java
new file mode 100644
index 000000000..7d7fcbd0d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadLifecycleTestCase.java
@@ -0,0 +1,78 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests.read;
+
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.LifecycleType;
+import org.eclipse.jst.jsf.facesconfig.emf.PhaseListenerType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+/*
+ * This Junit class is used to test the lifecycle which is one of
+ * many items inside the root elemnt faces-config in the configuration
+ * information hierarchy of the faces-config.xml file
+ *
+ */
+public class ReadLifecycleTestCase extends BaseReadTestCase {
+
+ public ReadLifecycleTestCase(String name) {
+ super(name);
+ }
+
+ /*
+ * The following method is used to test for the empty navigation rule. Since
+ * I am supplying a single faces-config.xml file as a testing file, I had to
+ * testcases fit in to it by controlling the conditions
+ *
+ */
+ public void testLifecycle() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ assertEquals(1, edit.getFacesConfig().getLifecycle().size());
+ assertNotNull(getLifecycleType1(edit.getFacesConfig()));
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ LifecycleType getLifecycleType1(FacesConfigType facesConfig)
+ {
+ return (LifecycleType)
+ FacesConfigModelUtil
+ .findEObjectElementById(facesConfig.getLifecycle(),
+ "lifecycle1");
+ }
+
+ // Test for the Descirption
+ public void testPhaseListener() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ LifecycleType lifecycle1 = getLifecycleType1(edit.getFacesConfig());
+ assertNotNull(lifecycle1);
+ PhaseListenerType phaseListener1 = (PhaseListenerType) FacesConfigModelUtil
+ .findEObjectElementById(lifecycle1.getPhaseListener(), "phaseListener1");
+ assertNotNull(phaseListener1);
+ assertEquals("org.eclipse.wtp.jsf.tests.ValueResourcePhaseListener",
+ phaseListener1.getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadLifecycleTestCase_1_2.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadLifecycleTestCase_1_2.java
new file mode 100644
index 000000000..ac5991cbd
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadLifecycleTestCase_1_2.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * 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.facesconfig.tests.read;
+
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.facesconfig.emf.DynamicElement;
+import org.eclipse.jst.jsf.facesconfig.emf.LifecycleExtensionType;
+import org.eclipse.jst.jsf.facesconfig.emf.LifecycleType;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class ReadLifecycleTestCase_1_2 extends ReadLifecycleTestCase {
+
+ public ReadLifecycleTestCase_1_2(String name) {
+ super(name);
+ }
+ protected void initialize(TestConfiguration testConfiguration) {
+ // override base when not in a configurable test suite
+ if(_testConfiguration == null)
+ {
+ _facesConfigFile = "WEB-INF/faces-config_1_2.xml";
+ _facesVersion = IJSFCoreConstants.JSF_VERSION_1_2;
+ }
+ else
+ {
+ super.initialize(testConfiguration);
+ }
+ }
+
+ public void testLifecycleExtension() {
+
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ LifecycleType lifecycle1 = getLifecycleType1(edit.getFacesConfig());
+ assertNotNull(lifecycle1);
+
+ assertEquals(1, lifecycle1.getLifecycleExtension().size());
+ LifecycleExtensionType lifecycleExtensionType =
+ (LifecycleExtensionType) lifecycle1.getLifecycleExtension().get(0);
+ assertEquals(1, lifecycleExtensionType.getChildNodes().size());
+ DynamicElement element = (DynamicElement) lifecycleExtensionType.getChildNodes().get(0);
+ assertEquals("lifecycle-extension-tag", element.getName());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadManagedBeanManagedPropertyTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadManagedBeanManagedPropertyTestCase.java
new file mode 100644
index 000000000..2037da041
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadManagedBeanManagedPropertyTestCase.java
@@ -0,0 +1,273 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests.read;
+
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.emf.ListEntriesType;
+import org.eclipse.jst.jsf.facesconfig.emf.ManagedBeanType;
+import org.eclipse.jst.jsf.facesconfig.emf.ManagedPropertyType;
+import org.eclipse.jst.jsf.facesconfig.emf.MapEntriesType;
+import org.eclipse.jst.jsf.facesconfig.emf.MapEntryType;
+import org.eclipse.jst.jsf.facesconfig.emf.ValueType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+/*
+ * This Junit class is used to test the Managed-Property
+ * of the Managed-Bean Element
+ *
+ */
+public class ReadManagedBeanManagedPropertyTestCase extends
+ BaseReadTestCase {
+
+ public ReadManagedBeanManagedPropertyTestCase(String name) {
+ super(name);
+ }
+
+ /*
+ * Check to see there is at least one property that exists within attribute
+ *
+ */
+ public void testSingleManagedProperty() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ assertNotNull(getManagedProperty(
+ "managedBean1Property1", edit.getFacesConfig()));
+ assertNotNull(getManagedProperty("managedBean1Property2"
+ , edit.getFacesConfig()));
+ assertNotNull(getManagedProperty("managedBeanMapProperty"
+ , edit.getFacesConfig()));
+ assertNotNull(getManagedProperty("managedBeanListProperty"
+ , edit.getFacesConfig()));
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ private ManagedPropertyType getManagedProperty(String property, FacesConfigType facesConfig)
+ {
+ ManagedBeanType bean = (ManagedBeanType) FacesConfigModelUtil
+ .findEObjectElementById(facesConfig.getManagedBean(), "managedBean1");
+ assertNotNull(bean);
+ return (ManagedPropertyType)
+ FacesConfigModelUtil
+ .findEObjectElementById(bean.getManagedProperty(), property);
+ }
+
+ /*
+ * Get the Description. It simply checks to see if there is at least
+ * one such item
+ *
+ */
+
+ public void testManagedBeanDescriptionGroup() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ ManagedPropertyType property =
+ getManagedProperty("managedBean1Property1"
+ , edit.getFacesConfig());
+ assertNotNull(property);
+
+ DescriptionType descType =
+ (DescriptionType) FacesConfigModelUtil
+ .findEObjectElementById(property.getDescription()
+ , "managedBean1Property1_description");
+ assertNotNull(descType);
+ assertEquals("managed-property-description", descType.getTextContent());
+
+ DisplayNameType displayName =
+ (DisplayNameType) FacesConfigModelUtil
+ .findEObjectElementById(property.getDisplayName()
+ , "managedBean1Property1_displayName");
+ assertNotNull(displayName);
+ assertEquals("managed-property-display-name"
+ , displayName.getTextContent());
+
+ IconType iconType =
+ (IconType) FacesConfigModelUtil
+ .findEObjectElementById(property.getIcon()
+ , "managedBean1Property1_icon");
+ assertNotNull(iconType);
+ assertEquals("managedBean1-property-small-icon"
+ , iconType.getSmallIcon().getTextContent());
+ assertEquals("managedBean1-property-large-icon"
+ , iconType.getLargeIcon().getTextContent());
+
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+
+ /*
+ * Get both the Property-name and Property-class. It simply checks to see if
+ * there is at least one each items and check if the names are identical
+ * as given in the input xml file.
+ *
+ */
+ public void testValueManagedProperty() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ ManagedPropertyType property =
+ getManagedProperty("managedBean1Property1"
+ , edit.getFacesConfig());
+ assertNotNull(property);
+
+ assertEquals("bean-property-name"
+ , property.getPropertyName().getTextContent());
+ assertEquals("bean-property-class"
+ , property.getPropertyClass().getTextContent());
+ assertEquals("bean-propertyValue1"
+ , property.getValue().getTextContent());
+ assertNull(property.getNullValue());
+ assertNull(property.getMapEntries());
+ assertNull(property.getListEntries());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testNullValueManagedProperty()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ ManagedPropertyType property =
+ getManagedProperty("managedBean1Property2"
+ , edit.getFacesConfig());
+ assertNotNull(property);
+
+ assertEquals("bean-property2-name"
+ , property.getPropertyName().getTextContent());
+ assertEquals("bean-property2-class"
+ , property.getPropertyClass().getTextContent());
+ assertNotNull(property.getNullValue());
+ assertNull(property.getValue());
+ assertNull(property.getMapEntries());
+ assertNull(property.getListEntries());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testMapValueManagedProperty()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ ManagedPropertyType property =
+ getManagedProperty("managedBeanMapProperty"
+ , edit.getFacesConfig());
+ assertNotNull(property);
+
+ assertEquals("map-bean-name"
+ , property.getPropertyName().getTextContent());
+ assertEquals("map-bean-class"
+ , property.getPropertyClass().getTextContent());
+ assertNotNull(property.getMapEntries());
+
+ MapEntriesType mapEntries = property.getMapEntries();
+ assertEquals("propertyMapEntryKey",
+ mapEntries.getKeyClass().getTextContent());
+ assertEquals("propertyMapEntryValueClass",
+ mapEntries.getValueClass().getTextContent());
+
+ MapEntryType mapEntry =
+ (MapEntryType) FacesConfigModelUtil
+ .findEObjectElementById(mapEntries.getMapEntry(), "mapPropertyEntryWithValue");
+ assertNotNull(mapEntry);
+ assertEquals("propertyMapKey1"
+ , mapEntry.getKey().getTextContent());
+ assertEquals("propertyMapValue1"
+ , mapEntry.getValue().getTextContent());
+ assertNull(mapEntry.getNullValue());
+ mapEntry =
+ (MapEntryType) FacesConfigModelUtil
+ .findEObjectElementById(mapEntries.getMapEntry(), "mapPropertyEntryWithNullValue");
+ assertNotNull(mapEntry);
+ assertEquals("propertyMapKey2"
+ , mapEntry.getKey().getTextContent());
+ assertNotNull(mapEntry.getNullValue());
+ assertNull(mapEntry.getValue());
+
+ assertNull(property.getNullValue());
+ assertNull(property.getValue());
+ assertNull(property.getListEntries());
+
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testListValueManagedProperty()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ ManagedPropertyType property =
+ getManagedProperty("managedBeanListProperty"
+ , edit.getFacesConfig());
+ assertNotNull(property);
+
+ assertEquals("list-bean-name"
+ , property.getPropertyName().getTextContent());
+ assertEquals("list-bean-class"
+ , property.getPropertyClass().getTextContent());
+ assertNotNull(property.getListEntries());
+
+ ListEntriesType listEntries = property.getListEntries();
+ assertEquals(1, listEntries.getValue().size());
+ assertEquals(1, listEntries.getNullValue().size());
+
+ ValueType valueType = (ValueType) listEntries.getValue().get(0);
+
+ assertEquals("managedBeanListPropertyValue",
+ valueType.getTextContent());
+
+ assertNull(property.getNullValue());
+ assertNull(property.getValue());
+ assertNull(property.getMapEntries());
+
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadManagedBeanTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadManagedBeanTestCase.java
new file mode 100644
index 000000000..e73683184
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadManagedBeanTestCase.java
@@ -0,0 +1,228 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests.read;
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.emf.ListEntriesType;
+import org.eclipse.jst.jsf.facesconfig.emf.ManagedBeanType;
+import org.eclipse.jst.jsf.facesconfig.emf.MapEntriesType;
+import org.eclipse.jst.jsf.facesconfig.emf.MapEntryType;
+import org.eclipse.jst.jsf.facesconfig.emf.ValueType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+/*
+ * This Junit class is used to test the managed-bean which is one of
+ * many items inside the root elemnt faces-config in the configuration
+ * information hierarchy of the faces-config.xml file
+ *
+ */
+public class ReadManagedBeanTestCase extends BaseReadTestCase {
+
+ public ReadManagedBeanTestCase(String name) {
+ super(name);
+ }
+
+ /*
+ *Test to see if there is at least one managed-bean.
+ *This should be specified in the file for reading (faces-config)
+ */
+ public void testManagedBean() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ assertNotNull(getManagedBean("managedBean1", edit.getFacesConfig()));
+ assertNotNull(getManagedBean("mapBean1", edit.getFacesConfig()));
+ assertNotNull(getManagedBean("listBean1", edit.getFacesConfig()));
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ ManagedBeanType getManagedBean(String name, FacesConfigType facesConfig)
+ {
+ return (ManagedBeanType) FacesConfigModelUtil
+ .findEObjectElementById(facesConfig.getManagedBean(), name);
+ }
+
+ // Test for the Descirption
+ public void testDescriptionGroup() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ final ManagedBeanType managedBean1 =
+ getManagedBean("managedBean1", edit.getFacesConfig());
+
+ DescriptionType descType =
+ (DescriptionType) FacesConfigModelUtil
+ .findEObjectElementById(managedBean1.getDescription()
+ , "managedBean1Description");
+ assertNotNull(descType);
+ assertEquals("managed-bean-description", descType.getTextContent());
+
+ DisplayNameType displayName =
+ (DisplayNameType) FacesConfigModelUtil
+ .findEObjectElementById(managedBean1.getDisplayName()
+ , "managedBean1DisplayName");
+ assertNotNull(displayName);
+ assertEquals("managed-bean-display-name"
+ , displayName.getTextContent());
+
+ IconType iconType =
+ (IconType) FacesConfigModelUtil
+ .findEObjectElementById(managedBean1.getIcon()
+ , "managedBean1Icon");
+ assertNotNull(iconType);
+ assertEquals("managedBean1-small-icon"
+ , iconType.getSmallIcon().getTextContent());
+ assertEquals("managedBean1-large-icon"
+ , iconType.getLargeIcon().getTextContent());
+
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+
+ /*
+ * Check for a managed-bean-class
+ */
+ public void testSingleValuedProperties() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ {
+ final ManagedBeanType managedBean1 =
+ getManagedBean("managedBean1", edit.getFacesConfig());
+
+ assertEquals("managedBeanName",
+ managedBean1.getManagedBeanName().getTextContent());
+ assertEquals("managed-bean-class",
+ managedBean1.getManagedBeanClass().getTextContent());
+ assertEquals("request",
+ managedBean1.getManagedBeanScope().getTextContent());
+ }
+
+ {
+ final ManagedBeanType mapBean1 =
+ getManagedBean("mapBean1", edit.getFacesConfig());
+
+ assertEquals("mapBean1",
+ mapBean1.getManagedBeanName().getTextContent());
+ assertEquals("mapBean1-class",
+ mapBean1.getManagedBeanClass().getTextContent());
+ assertEquals("request",
+ mapBean1.getManagedBeanScope().getTextContent());
+ }
+
+ {
+ final ManagedBeanType listBean1 =
+ getManagedBean("listBean1", edit.getFacesConfig());
+
+ assertEquals("listBean1",
+ listBean1.getManagedBeanName().getTextContent());
+ assertEquals("listBean1-class",
+ listBean1.getManagedBeanClass().getTextContent());
+ assertEquals("request",
+ listBean1.getManagedBeanScope().getTextContent());
+ }
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testMapBeanProperties()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ ManagedBeanType bean =
+ getManagedBean("mapBean1"
+ , edit.getFacesConfig());
+ assertNotNull(bean);
+
+ MapEntriesType mapEntries = bean.getMapEntries();
+
+ assertEquals("mapBeanEntryKey",
+ mapEntries.getKeyClass().getTextContent());
+ assertEquals("mapBeanEntryValueClass",
+ mapEntries.getValueClass().getTextContent());
+
+ MapEntryType mapEntry =
+ (MapEntryType) FacesConfigModelUtil
+ .findEObjectElementById(mapEntries.getMapEntry(), "mapBeanEntryWithValue");
+ assertNotNull(mapEntry);
+ assertEquals("mapBeanKey1"
+ , mapEntry.getKey().getTextContent());
+ assertEquals("mapBeanValue1"
+ , mapEntry.getValue().getTextContent());
+ assertNull(mapEntry.getNullValue());
+
+ mapEntry =
+ (MapEntryType) FacesConfigModelUtil
+ .findEObjectElementById(mapEntries.getMapEntry(), "mapBeanEntryWithNullValue");
+ assertNotNull(mapEntry);
+ assertEquals("mapBeanKey2"
+ , mapEntry.getKey().getTextContent());
+ assertNotNull(mapEntry.getNullValue());
+ assertNull(mapEntry.getValue());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testListBeanProperties()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ ManagedBeanType bean =
+ getManagedBean("listBean1"
+ , edit.getFacesConfig());
+ assertNotNull(bean);
+
+ ListEntriesType listEntries = bean.getListEntries();
+
+ assertEquals("listBeanListPropertyClass",
+ listEntries.getValueClass().getTextContent());
+ assertEquals(1, listEntries.getValue().size());
+ assertEquals(1, listEntries.getNullValue().size());
+
+ ValueType valueType = (ValueType)listEntries.getValue().get(0);
+ assertNotNull(valueType);
+ assertEquals("listBeanListPropertyValue", valueType.getTextContent().trim());
+
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadManagedBeanTestCase_1_2.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadManagedBeanTestCase_1_2.java
new file mode 100644
index 000000000..b28e4dcb6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadManagedBeanTestCase_1_2.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * 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.facesconfig.tests.read;
+
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.facesconfig.emf.DynamicElement;
+import org.eclipse.jst.jsf.facesconfig.emf.ManagedBeanExtensionType;
+import org.eclipse.jst.jsf.facesconfig.emf.ManagedBeanType;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class ReadManagedBeanTestCase_1_2 extends ReadManagedBeanTestCase
+{
+ public ReadManagedBeanTestCase_1_2(String name) {
+ super(name);
+ }
+
+ protected void initialize(TestConfiguration testConfiguration) {
+ // override base when not in a configurable test suite
+ if(_testConfiguration == null)
+ {
+ _facesConfigFile = "WEB-INF/faces-config_1_2.xml";
+ _facesVersion = IJSFCoreConstants.JSF_VERSION_1_2;
+ }
+ else
+ {
+ super.initialize(testConfiguration);
+ }
+ }
+
+ public void testManagedBeanExtension() {
+
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ ManagedBeanType managedBean1 =
+ getManagedBean("managedBean1", edit.getFacesConfig());
+ assertNotNull(managedBean1);
+
+ assertEquals(1, managedBean1.getManagedBeanExtension().size());
+ ManagedBeanExtensionType managedBeanExtensionType =
+ (ManagedBeanExtensionType) managedBean1.getManagedBeanExtension().get(0);
+ assertEquals(1, managedBeanExtensionType.getChildNodes().size());
+ DynamicElement element = (DynamicElement) managedBeanExtensionType.getChildNodes().get(0);
+ assertEquals("managed-bean-extension-tag", element.getName());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadManagedBeanTestCase_2_0.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadManagedBeanTestCase_2_0.java
new file mode 100644
index 000000000..10949b1dd
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadManagedBeanTestCase_2_0.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * 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.facesconfig.tests.read;
+
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.facesconfig.emf.ManagedBeanType;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class ReadManagedBeanTestCase_2_0 extends ReadManagedBeanTestCase_1_2
+{
+ public ReadManagedBeanTestCase_2_0(String name) {
+ super(name);
+ }
+
+ protected void initialize(TestConfiguration testConfiguration) {
+ // override base when not in a configurable test suite
+ if(_testConfiguration == null)
+ {
+ _facesConfigFile = "WEB-INF/faces-config_2_0.xml";
+ _facesVersion = IJSFCoreConstants.JSF_VERSION_2_0;
+ }
+ else
+ {
+ super.initialize(testConfiguration);
+ }
+ }
+
+ public void testEagerAttribute() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ final ManagedBeanType managedBean1 =
+ getManagedBean("managedBean1", edit.getFacesConfig());
+
+ assertNotNull(managedBean1);
+ assertEquals(true, managedBean1.isEager());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadNavigationRuleTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadNavigationRuleTestCase.java
new file mode 100644
index 000000000..7365a7007
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadNavigationRuleTestCase.java
@@ -0,0 +1,303 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests.read;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.emf.NavigationCaseType;
+import org.eclipse.jst.jsf.facesconfig.emf.NavigationRuleType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+/*
+ * This Junit class is used to test the FacesConfigFactoryImpl
+ * class.
+ *
+ */
+
+
+public class ReadNavigationRuleTestCase extends BaseReadTestCase {
+
+ public ReadNavigationRuleTestCase(String name) {
+ super(name);
+ }
+
+ /*
+ * The following method is used to test for the existence of at least
+ * one navigation-rule
+ */
+ public void testSingleNavigationRule() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ EList navRules = edit.getFacesConfig().getNavigationRule();
+ assertTrue(!navRules.isEmpty());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /**
+ * Verify that display is populated
+ */
+ public void testDisplayName()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit);
+ EList navRules = edit.getFacesConfig().getNavigationRule();
+ assertTrue(!navRules.isEmpty());
+ NavigationRuleType navRule =
+ FacesConfigModelUtil.
+ findNavigationHandlerRuleByDisplayName(navRules, "display name 1");
+ assertNotNull(navRule);
+
+ // verify that xml:lang's are being populated
+ navRule = FacesConfigModelUtil.
+ findNavigationHandlerRuleByDescriptionText(navRules,
+ "A navigation rule with lang attributes");
+ assertNotNull(navRule);
+
+ DisplayNameType displayNameType = FacesConfigModelUtil.
+ findDisplayNameType(navRule.getDisplayName(), "English Display Name");
+ assertNotNull(displayNameType);
+ assertEquals("en", displayNameType.getLang());
+
+ displayNameType = FacesConfigModelUtil.
+ findDisplayNameType(navRule.getDisplayName(), "Nom D'Affichage De Francais");
+ assertNotNull(displayNameType);
+ assertEquals("fr", displayNameType.getLang());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ // Test for the Descirption
+
+ public void testNonEmptyDescription() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit);
+ EList navRules = edit.getFacesConfig().getNavigationRule();
+ assertTrue(!navRules.isEmpty());
+ NavigationRuleType navRule =
+ FacesConfigModelUtil.
+ findNavigationHandlerRuleByDescriptionText(navRules,
+ "Descri 1");
+ assertNotNull(navRule);
+
+ // verify that xml:lang's are being populated
+ navRule = FacesConfigModelUtil.
+ findNavigationHandlerRuleByDescriptionText(navRules,
+ "A navigation rule with lang attributes");
+ assertNotNull(navRule);
+
+ DescriptionType descType = FacesConfigModelUtil.
+ findDescriptionType(navRule.getDescription(), "A navigation rule with lang attributes");
+ assertNotNull(descType);
+ assertEquals("en", descType.getLang());
+
+ descType = FacesConfigModelUtil.
+ findDescriptionType(navRule.getDescription(), "What color is it?");
+ assertNotNull(descType);
+ assertEquals("en-US", descType.getLang());
+
+ descType = FacesConfigModelUtil.
+ findDescriptionType(navRule.getDescription(), "What colour is it?");
+ assertNotNull(descType);
+ assertEquals("en-GB", descType.getLang());
+
+ descType = FacesConfigModelUtil.
+ findDescriptionType(navRule.getDescription(), "Quelle couleur est lui?");
+ assertNotNull(descType);
+ assertEquals("fr", descType.getLang());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Test for the exisence of navigation-cases
+ */
+
+ public void testNonEmptyNavigationCases() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ EList navRules = edit.getFacesConfig().getNavigationRule();
+ assertTrue(!navRules.isEmpty());
+
+ // test first navigation rule
+ NavigationRuleType navRule =
+ FacesConfigModelUtil
+ .findNavigationHandlerRuleByDisplayName
+ (navRules, "display name 1");
+ assertNotNull(navRule);
+
+ assertEquals(2, navRule.getNavigationCase().size());
+ NavigationCaseType navCase = FacesConfigModelUtil.
+ findNavigationCaseByDisplayName(navRule.getNavigationCase(),
+ "what display name");
+ assertNotNull(navCase);
+
+ assertNotNull(navCase.getFromAction());
+ assertEquals("#{from-action}", navCase.getFromAction().getTextContent());
+
+ assertNotNull(navCase.getFromOutcome());
+ assertEquals("drilldown", navCase.getFromOutcome().getTextContent());
+
+ assertNotNull(navCase.getToViewId());
+ assertEquals("/edit.jsp", navCase.getToViewId().getTextContent());
+
+ assertNotNull(navCase.getRedirect());
+
+
+ navCase = FacesConfigModelUtil.
+ findNavigationCaseByDisplayName(navRule.getNavigationCase(),
+ "second navigation case");
+ assertNotNull(navCase);
+
+
+ assertNotNull(navCase.getFromAction());
+ assertEquals("#{action2}", navCase.getFromAction().getTextContent());
+
+ assertNotNull(navCase.getFromOutcome());
+ assertEquals("outcome2", navCase.getFromOutcome().getTextContent());
+
+ assertNotNull(navCase.getToViewId());
+ assertEquals("/edit2.jsp", navCase.getToViewId().getTextContent());
+
+ assertNull(navCase.getRedirect());
+
+ // test second navigation rule
+ navRule =
+ FacesConfigModelUtil
+ .findNavigationHandlerRuleByDisplayName
+ (navRules, "English Display Name");
+ assertNotNull(navRule);
+
+ navCase = FacesConfigModelUtil.
+ findNavigationCaseByDisplayName(navRule.getNavigationCase(),
+ "second navigation rule navcase");
+ assertNotNull(navCase);
+
+ assertNotNull(navCase.getFromAction());
+ assertEquals("#{action3}", navCase.getFromAction().getTextContent());
+
+ assertNotNull(navCase.getFromOutcome());
+ assertEquals("outcome3", navCase.getFromOutcome().getTextContent());
+
+ assertNotNull(navCase.getToViewId());
+ assertEquals("/edit3.jsp", navCase.getToViewId().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+ /*
+ * assert the existence of icon
+ */
+
+ public void testNonEmptyIcon() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ EList navRules = edit.getFacesConfig().getNavigationRule();
+ assertTrue(!navRules.isEmpty());
+ NavigationRuleType navRule =
+ FacesConfigModelUtil
+ .findNavigationHandlerRuleByDisplayName
+ (navRules, "display name 1");
+
+ assertNotNull(navRule);
+ EList icons = navRule.getIcon();
+ assertEquals(1, icons.size());
+ IconType iconType = (IconType) icons.get(0);
+ assertNotNull(iconType.getSmallIcon());
+ assertEquals("myicon", iconType.getSmallIcon().getTextContent());
+ assertNull(iconType.getLargeIcon());
+
+ navRule =
+ FacesConfigModelUtil
+ .findNavigationHandlerRuleByDisplayName
+ (navRules, "English Display Name");
+ assertNotNull(navRule);
+
+ icons = navRule.getIcon();
+ assertEquals(2, icons.size());
+
+ IconType icon =
+ FacesConfigModelUtil.
+ findIconTypeByLang(icons, null);
+ assertNotNull(icon);
+ assertNotNull(icon.getSmallIcon());
+ assertEquals("small-icon", icon.getSmallIcon().getTextContent());
+ assertNotNull(icon.getLargeIcon());
+ assertEquals("large-icon", icon.getLargeIcon().getTextContent());
+
+ icon = FacesConfigModelUtil.
+ findIconTypeByLang(icons, "en");
+ assertNotNull(icon);
+ assertNotNull(icon.getSmallIcon());
+ assertEquals("en_small-icon", icon.getSmallIcon().getTextContent());
+ assertNotNull(icon.getLargeIcon());
+ assertEquals("en_large-icon", icon.getLargeIcon().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testFromViewIdType()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ EList navRules = edit.getFacesConfig().getNavigationRule();
+ assertTrue(!navRules.isEmpty());
+ NavigationRuleType navRule =
+ FacesConfigModelUtil
+ .findNavigationHandlerRuleByDisplayName
+ (navRules, "display name 1");
+ assertNotNull(navRule);
+ assertEquals("/Page1.jsp",navRule.getFromViewId().getTextContent());
+
+ navRule =
+ FacesConfigModelUtil
+ .findNavigationHandlerRuleByDisplayName
+ (navRules, "English Display Name");
+ assertNotNull(navRule);
+ assertEquals("/Page1.jsp",navRule.getFromViewId().getTextContent());
+ }
+ finally
+ {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadNavigationRuleTestCase_1_2.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadNavigationRuleTestCase_1_2.java
new file mode 100644
index 000000000..298d25b65
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadNavigationRuleTestCase_1_2.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * 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.facesconfig.tests.read;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.facesconfig.emf.DynamicElement;
+import org.eclipse.jst.jsf.facesconfig.emf.NavigationRuleExtensionType;
+import org.eclipse.jst.jsf.facesconfig.emf.NavigationRuleType;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class ReadNavigationRuleTestCase_1_2 extends ReadNavigationRuleTestCase
+{
+ public ReadNavigationRuleTestCase_1_2(String name) {
+ super(name);
+ }
+ protected void initialize(TestConfiguration testConfiguration) {
+ // override base when not in a configurable test suite
+ if(_testConfiguration == null)
+ {
+ _facesConfigFile = "WEB-INF/faces-config_1_2.xml";
+ _facesVersion = IJSFCoreConstants.JSF_VERSION_1_2;
+ }
+ else
+ {
+ super.initialize(testConfiguration);
+ }
+ }
+
+ public void testNavigationRuleExtension() {
+
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ EList navRules = edit.getFacesConfig().getNavigationRule();
+ assertEquals(2, navRules.size());
+ NavigationRuleType navigation1 =
+ (NavigationRuleType) navRules.get(0);
+
+ assertEquals(1, navigation1.getNavigationRuleExtension().size());
+ NavigationRuleExtensionType navigationRuleExtensionType =
+ (NavigationRuleExtensionType) navigation1.getNavigationRuleExtension().get(0);
+ assertEquals(1, navigationRuleExtensionType.getChildNodes().size());
+ DynamicElement element = (DynamicElement) navigationRuleExtensionType.getChildNodes().get(0);
+ assertEquals("navigation-extension-tag", element.getName());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadNavigationRuleTestCase_2_0.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadNavigationRuleTestCase_2_0.java
new file mode 100644
index 000000000..80a563298
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadNavigationRuleTestCase_2_0.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * 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.facesconfig.tests.read;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.facesconfig.emf.NavigationCaseType;
+import org.eclipse.jst.jsf.facesconfig.emf.NavigationRuleType;
+import org.eclipse.jst.jsf.facesconfig.emf.RedirectType;
+import org.eclipse.jst.jsf.facesconfig.emf.RedirectViewParamType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class ReadNavigationRuleTestCase_2_0 extends ReadNavigationRuleTestCase_1_2
+{
+ public ReadNavigationRuleTestCase_2_0(String name) {
+ super(name);
+ }
+ protected void initialize(TestConfiguration testConfiguration) {
+ // override base when not in a configurable test suite
+ if(_testConfiguration == null)
+ {
+ _facesConfigFile = "WEB-INF/faces-config_2_0.xml";
+ _facesVersion = IJSFCoreConstants.JSF_VERSION_2_0;
+ }
+ else
+ {
+ super.initialize(testConfiguration);
+ }
+ }
+
+ public void testIf()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit);
+ EList navRules = edit.getFacesConfig().getNavigationRule();
+ assertTrue(!navRules.isEmpty());
+ NavigationRuleType navRule =
+ FacesConfigModelUtil.
+ findNavigationHandlerRuleByDisplayName(navRules, "display name 1");
+ assertNotNull(navRule);
+
+ NavigationCaseType navCase = FacesConfigModelUtil.
+ findNavigationCaseByDisplayName(navRule.getNavigationCase(),
+ "what display name");
+ assertNotNull(navCase);
+ assertEquals("#{el-expression}", navCase.getIf().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testRedirect()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit);
+ EList navRules = edit.getFacesConfig().getNavigationRule();
+ assertTrue(!navRules.isEmpty());
+ NavigationRuleType navRule =
+ FacesConfigModelUtil.
+ findNavigationHandlerRuleByDisplayName(navRules, "display name 1");
+ assertNotNull(navRule);
+
+ NavigationCaseType navCase = FacesConfigModelUtil.
+ findNavigationCaseByDisplayName(navRule.getNavigationCase(),
+ "what display name");
+ assertNotNull(navCase);
+
+ RedirectType redirect = navCase.getRedirect();
+ assertNotNull(redirect);
+ assertEquals(true, redirect.isIncludeViewParams());
+ redirect.getViewParam();
+ RedirectViewParamType viewParam =
+ (RedirectViewParamType)
+ FacesConfigModelUtil.findEObjectElementById
+ (redirect.getViewParam(), "view-param-id");
+ assertNotNull(viewParam);
+ assertEquals("viewParamName", viewParam.getName().getTextContent().trim());
+ assertEquals("viewParamValue", viewParam.getValue().getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadPropertyComponentTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadPropertyComponentTestCase.java
new file mode 100644
index 000000000..7bb2f12a5
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadPropertyComponentTestCase.java
@@ -0,0 +1,259 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2006 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.facesconfig.tests.read;
+
+import org.eclipse.jst.jsf.facesconfig.emf.ComponentType;
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.emf.PropertyType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+/**
+ * Test component property
+ *
+ * @author cbateman
+ *
+ */
+public class ReadPropertyComponentTestCase extends BaseReadTestCase {
+
+ public ReadPropertyComponentTestCase(String name) {
+ super(name);
+ }
+
+ public void testProperty()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ PropertyType attribute1 = getProperty1(edit.getFacesConfig());
+ assertNotNull(attribute1);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+
+ }
+
+ private ComponentType getComponent1(FacesConfigType facesConfigType)
+ {
+ return (ComponentType) FacesConfigModelUtil
+ .findEObjectElementById
+ (facesConfigType.getComponent(), "component1");
+ }
+
+ private PropertyType getProperty1(FacesConfigType facesConfigType)
+ {
+ ComponentType component1 = getComponent1(facesConfigType);
+ assertNotNull(component1);
+ return (PropertyType) FacesConfigModelUtil
+ .findEObjectElementById
+ (component1.getProperty(), "componentProperty1");
+ }
+ /*
+ * This is to test the description child inside of Attribute
+ *
+ */
+
+ public void testDescription() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ PropertyType propertyType =
+ getProperty1(edit.getFacesConfig());
+ assertNotNull(propertyType);
+
+ DescriptionType descType =
+ (DescriptionType)FacesConfigModelUtil.findEObjectElementById
+ (propertyType.getDescription()
+ ,"componentProperty1_descripton1");
+ assertEquals("myDescript blah blah"
+ , descType.getTextContent().trim());
+ }
+ finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * A simple test to check if the Display Name is present
+ * within the faces-config.xml file
+ */
+
+ public void testDisplayName() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ PropertyType propertyType =
+ getProperty1(edit.getFacesConfig());
+ assertNotNull(propertyType);
+
+ final DisplayNameType displayNameType =
+ (DisplayNameType)FacesConfigModelUtil.findEObjectElementById
+ (propertyType.getDisplayName()
+ ,"componentProperty1_displayName1");
+ assertEquals("Component Property 1"
+ , displayNameType.getTextContent().trim());
+ }
+ finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Checks to see if there is an icon defined
+ *
+ */
+ public void testIcon() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ PropertyType propertyType = getProperty1(edit.getFacesConfig());
+ assertNotNull(propertyType);
+
+ IconType iconType =
+ (IconType) FacesConfigModelUtil
+ .findEObjectElementById
+ (propertyType.getIcon(), "componentProperty1_icon1");
+ assertNotNull(iconType);
+
+ assertEquals("property-small-icon",
+ iconType.getSmallIcon().getTextContent());
+ assertEquals("property-large-icon",
+ iconType.getLargeIcon().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * This one tests for the existence of two items.
+ * They are the required items by all renderers
+ * They are : attribute-name and attribute-class.
+ * It thought it was better to put them together instead of
+ * writing single -separate methods for each of them.
+ *Simply, extract the names and check if same the one
+ *in faces-config.xml
+ */
+ public void testPropertyNameAndClass() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ PropertyType property1 = getProperty1(edit.getFacesConfig());
+ assertNotNull(property1);
+
+ assertEquals("property1"
+ ,property1.getPropertyName().getTextContent());
+ assertEquals("ComponentProperty"
+ ,property1.getPropertyClass().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Checks for the item suggested-value within attribute
+ *
+ */
+ public void testSuggestedValue() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ PropertyType propertyType =
+ getProperty1(edit.getFacesConfig());
+ assertNotNull(propertyType);
+
+ assertEquals("suggestedValue"
+ ,propertyType.getSuggestedValue().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testDefaultValue()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ PropertyType propertyType =
+ getProperty1(edit.getFacesConfig());
+ assertNotNull(propertyType);
+
+ assertEquals("defaultValue6"
+ , propertyType.getDefaultValue().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /**
+ * Checks for the item attribute-extension within attribute
+ * TODO: not currently supported
+ */
+// public void testPropertyExtension() {
+// FacesConfigArtifactEdit edit = null;
+// try {
+// edit = FacesConfigArtifactEdit
+// .getFacesConfigArtifactEditForRead(project);
+// if (edit.getFacesConfig() != null) {
+// EList comp = edit.getFacesConfig().getComponent();
+// assertTrue(!comp.isEmpty());
+// for (int i = 0; i < comp.size(); i++) {
+// ComponentType compType = (ComponentType) comp
+// .get(i);
+// assertTrue(!compType.getAttribute().isEmpty());
+//
+// EList attr = compType.getAttribute();
+// for (int k = 0; k < attr.size(); k++) {
+// AttributeType attrType = (AttributeType) attr.get(k);
+// EList ext= attrType.getAttributeExtension();
+// assertTrue(ext.size()!=0);
+// System.out.println("The size of attribute-extension is >>?? " + ext.size() );
+// }
+// }
+// }
+// } finally {
+// if (edit != null) {
+// edit.dispose();
+// }
+// }
+// }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadPropertyConverterTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadPropertyConverterTestCase.java
new file mode 100644
index 000000000..b750e4e42
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadPropertyConverterTestCase.java
@@ -0,0 +1,258 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2006 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.facesconfig.tests.read;
+
+import org.eclipse.jst.jsf.facesconfig.emf.ConverterType;
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.emf.PropertyType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+/**
+ * Tests the property on a converter
+ *
+ * @author cbateman
+ */
+public class ReadPropertyConverterTestCase extends BaseReadTestCase
+{
+ public ReadPropertyConverterTestCase(String name) {
+ super(name);
+ }
+
+ public void testProperty()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ PropertyType property1 = getProperty1(edit.getFacesConfig());
+ assertNotNull(property1);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ private ConverterType getConverter1(FacesConfigType facesConfigType)
+ {
+ return (ConverterType) FacesConfigModelUtil
+ .findEObjectElementById
+ (facesConfigType.getConverter(), "converter1");
+ }
+
+ private PropertyType getProperty1(FacesConfigType facesConfigType)
+ {
+ ConverterType converter1 = getConverter1(facesConfigType);
+ assertNotNull(converter1);
+
+ return (PropertyType) FacesConfigModelUtil
+ .findEObjectElementById
+ (converter1.getProperty(), "converter1Property");
+ }
+
+ /*
+ * This is to test the description child inside of Attribute
+ *
+ */
+ public void testDescription() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ PropertyType propertyType =
+ getProperty1(edit.getFacesConfig());
+ assertNotNull(propertyType);
+
+ DescriptionType descType =
+ (DescriptionType)FacesConfigModelUtil.findEObjectElementById
+ (propertyType.getDescription()
+ ,"converter1_property_description");
+ assertEquals("converter-property-description"
+ , descType.getTextContent().trim());
+ }
+ finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * A simple test to check if the Display Name is present
+ * within the faces-config.xml file
+ */
+
+ public void testDisplayName() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ PropertyType propertyType =
+ getProperty1(edit.getFacesConfig());
+ assertNotNull(propertyType);
+
+ final DisplayNameType displayNameType =
+ (DisplayNameType)FacesConfigModelUtil.findEObjectElementById
+ (propertyType.getDisplayName()
+ ,"converter1_property_display-name");
+ assertEquals("converter-property-display-name"
+ , displayNameType.getTextContent().trim());
+ }
+ finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Checks to see if there is an icon defined
+ *
+ */
+ public void testIcon() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ PropertyType propertyType = getProperty1(edit.getFacesConfig());
+ assertNotNull(propertyType);
+
+ IconType iconType =
+ (IconType) FacesConfigModelUtil
+ .findEObjectElementById
+ (propertyType.getIcon(), "converter1_property_icon");
+ assertNotNull(iconType);
+
+ assertEquals("converter1-property-small-icon",
+ iconType.getSmallIcon().getTextContent());
+ assertEquals("converter1-property-large-icon",
+ iconType.getLargeIcon().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * This one tests for the existence of two items.
+ * They are the required items by all renderers
+ * They are : attribute-name and attribute-class.
+ * It thought it was better to put them together instead of
+ * writing single -separate methods for each of them.
+ *Simply, extract the names and check if same the one
+ *in faces-config.xml
+ */
+ public void testPropertyNameAndClass() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ PropertyType property1 = getProperty1(edit.getFacesConfig());
+ assertNotNull(property1);
+
+ assertEquals("converter-property-name"
+ ,property1.getPropertyName().getTextContent());
+ assertEquals("converter-property-propertyClass"
+ ,property1.getPropertyClass().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Checks for the item suggested-value within attribute
+ *
+ */
+ public void testSuggestedValue() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ PropertyType propertyType =
+ getProperty1(edit.getFacesConfig());
+ assertNotNull(propertyType);
+
+ assertEquals("converter-property-suggested-value"
+ ,propertyType.getSuggestedValue().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testDefaultValue()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ PropertyType propertyType =
+ getProperty1(edit.getFacesConfig());
+ assertNotNull(propertyType);
+
+ assertEquals("converter-property-default-value"
+ , propertyType.getDefaultValue().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /**
+ * Checks for the item attribute-extension within attribute
+ * TODO: not currently supported
+ */
+// public void testPropertyExtension() {
+// FacesConfigArtifactEdit edit = null;
+// try {
+// edit = FacesConfigArtifactEdit
+// .getFacesConfigArtifactEditForRead(project);
+// if (edit.getFacesConfig() != null) {
+// EList comp = edit.getFacesConfig().getComponent();
+// assertTrue(!comp.isEmpty());
+// for (int i = 0; i < comp.size(); i++) {
+// ComponentType compType = (ComponentType) comp
+// .get(i);
+// assertTrue(!compType.getAttribute().isEmpty());
+//
+// EList attr = compType.getAttribute();
+// for (int k = 0; k < attr.size(); k++) {
+// AttributeType attrType = (AttributeType) attr.get(k);
+// EList ext= attrType.getAttributeExtension();
+// assertTrue(ext.size()!=0);
+// System.out.println("The size of attribute-extension is >>?? " + ext.size() );
+// }
+// }
+// }
+// } finally {
+// if (edit != null) {
+// edit.dispose();
+// }
+// }
+// }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadPropertyValidatorTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadPropertyValidatorTestCase.java
new file mode 100644
index 000000000..d74c00444
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadPropertyValidatorTestCase.java
@@ -0,0 +1,253 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2006 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.facesconfig.tests.read;
+
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.emf.PropertyType;
+import org.eclipse.jst.jsf.facesconfig.emf.ValidatorType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class ReadPropertyValidatorTestCase extends BaseReadTestCase {
+
+ public ReadPropertyValidatorTestCase(String name) {
+ super(name);
+ }
+
+ public void testProperty()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ PropertyType property1 = getProperty1(edit.getFacesConfig());
+ assertNotNull(property1);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+
+ }
+
+ private ValidatorType getValidator1(FacesConfigType facesConfigType)
+ {
+ return (ValidatorType) FacesConfigModelUtil
+ .findEObjectElementById
+ (facesConfigType.getValidator(), "validator1");
+ }
+
+ private PropertyType getProperty1(FacesConfigType facesConfigType)
+ {
+ ValidatorType validator1 = getValidator1(facesConfigType);
+ assertNotNull(validator1);
+ return (PropertyType) FacesConfigModelUtil
+ .findEObjectElementById
+ (validator1.getProperty(), "validator1_property");
+ }
+ /*
+ * This is to test the description child inside of Attribute
+ *
+ */
+
+ public void testDescription() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ PropertyType propertyType =
+ getProperty1(edit.getFacesConfig());
+ assertNotNull(propertyType);
+
+ DescriptionType descType =
+ (DescriptionType)FacesConfigModelUtil.findEObjectElementById
+ (propertyType.getDescription()
+ ,"validator1_property_description");
+ assertEquals("validator-property-description"
+ , descType.getTextContent().trim());
+ }
+ finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * A simple test to check if the Display Name is present
+ * within the faces-config.xml file
+ */
+
+ public void testDisplayName() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ PropertyType propertyType =
+ getProperty1(edit.getFacesConfig());
+ assertNotNull(propertyType);
+
+ final DisplayNameType displayNameType =
+ (DisplayNameType)FacesConfigModelUtil.findEObjectElementById
+ (propertyType.getDisplayName()
+ ,"validator1_property_displayName");
+ assertEquals("validator-property-display-name"
+ , displayNameType.getTextContent().trim());
+ }
+ finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Checks to see if there is an icon defined
+ *
+ */
+ public void testIcon() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ PropertyType propertyType = getProperty1(edit.getFacesConfig());
+ assertNotNull(propertyType);
+
+ IconType iconType =
+ (IconType) FacesConfigModelUtil
+ .findEObjectElementById
+ (propertyType.getIcon(), "validator1_property_icon");
+ assertNotNull(iconType);
+
+ assertEquals("validator-property-small-icon",
+ iconType.getSmallIcon().getTextContent());
+ assertEquals("validator-property-large-icon",
+ iconType.getLargeIcon().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * This one tests for the existence of two items.
+ * They are the required items by all renderers
+ * They are : attribute-name and attribute-class.
+ * It thought it was better to put them together instead of
+ * writing single -separate methods for each of them.
+ *Simply, extract the names and check if same the one
+ *in faces-config.xml
+ */
+ public void testPropertyNameAndClass() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ PropertyType property1 = getProperty1(edit.getFacesConfig());
+ assertNotNull(property1);
+
+ assertEquals("validator-property-name"
+ ,property1.getPropertyName().getTextContent());
+ assertEquals("validator-property-class"
+ ,property1.getPropertyClass().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * Checks for the item suggested-value within attribute
+ *
+ */
+ public void testSuggestedValue() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ PropertyType propertyType =
+ getProperty1(edit.getFacesConfig());
+ assertNotNull(propertyType);
+
+ assertEquals("validator property suggested value"
+ ,propertyType.getSuggestedValue().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testDefaultValue()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ PropertyType propertyType =
+ getProperty1(edit.getFacesConfig());
+ assertNotNull(propertyType);
+
+ assertEquals("validator property default value"
+ , propertyType.getDefaultValue().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /**
+ * Checks for the item attribute-extension within attribute
+ * TODO: not currently supported
+ */
+// public void testPropertyExtension() {
+// FacesConfigArtifactEdit edit = null;
+// try {
+// edit = FacesConfigArtifactEdit
+// .getFacesConfigArtifactEditForRead(project);
+// if (edit.getFacesConfig() != null) {
+// EList comp = edit.getFacesConfig().getComponent();
+// assertTrue(!comp.isEmpty());
+// for (int i = 0; i < comp.size(); i++) {
+// ComponentType compType = (ComponentType) comp
+// .get(i);
+// assertTrue(!compType.getAttribute().isEmpty());
+//
+// EList attr = compType.getAttribute();
+// for (int k = 0; k < attr.size(); k++) {
+// AttributeType attrType = (AttributeType) attr.get(k);
+// EList ext= attrType.getAttributeExtension();
+// assertTrue(ext.size()!=0);
+// System.out.println("The size of attribute-extension is >>?? " + ext.size() );
+// }
+// }
+// }
+// } finally {
+// if (edit != null) {
+// edit.dispose();
+// }
+// }
+// }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadReferencedBeanTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadReferencedBeanTestCase.java
new file mode 100644
index 000000000..3457e60f7
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadReferencedBeanTestCase.java
@@ -0,0 +1,126 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests.read;
+
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.emf.ReferencedBeanType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+/*
+ * This Junit class is used to test the referenced-bean which is one of
+ * many items inside the root elemnt faces-config in the configuration
+ * information hierarchy of the faces-config.xml file
+ *
+ */
+public class ReadReferencedBeanTestCase extends BaseReadTestCase {
+
+ public ReadReferencedBeanTestCase(String name) {
+ super(name);
+ }
+
+
+ /*
+ * check for the existence of referenced-bean with in
+ * the root element - faces-config. There should be at least
+ * one of such kind (item)
+ */
+ public void testSingleReferncedBean() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ assertNotNull(getReferencedBean1(edit.getFacesConfig()));
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ private ReferencedBeanType getReferencedBean1(FacesConfigType facesConfig)
+ {
+ return (ReferencedBeanType)
+ FacesConfigModelUtil
+ .findEObjectElementById(facesConfig.getReferencedBean()
+ , "referencedBean1");
+ }
+
+ // Test for the Descirption
+ public void testDescriptionGroup() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ ReferencedBeanType referencedBean =
+ getReferencedBean1(edit.getFacesConfig());
+ assertNotNull(referencedBean);
+
+ DescriptionType descType =
+ (DescriptionType) FacesConfigModelUtil
+ .findEObjectElementById(referencedBean.getDescription()
+ , "referencedBean1Description");
+ assertNotNull(descType);
+ assertEquals("Referenced Bean Desc", descType.getTextContent());
+
+ DisplayNameType displayName =
+ (DisplayNameType) FacesConfigModelUtil
+ .findEObjectElementById(referencedBean.getDisplayName()
+ , "referencedBean1DisplayName");
+ assertNotNull(displayName);
+ assertEquals("referenced-bean-display"
+ , displayName.getTextContent());
+
+ IconType iconType =
+ (IconType) FacesConfigModelUtil
+ .findEObjectElementById(referencedBean.getIcon()
+ , "referencedBean1Icon");
+ assertNotNull(iconType);
+ assertEquals("referenced-bean-small-icon"
+ , iconType.getSmallIcon().getTextContent());
+ assertEquals("referenced-bean-large-icon"
+ , iconType.getLargeIcon().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+
+ /*
+ * check for refrenced-bean-name
+ */
+ public void testSingleValuedProperties(){
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ ReferencedBeanType referencedBean =
+ getReferencedBean1(edit.getFacesConfig());
+ assertNotNull(referencedBean);
+
+ assertEquals("referencedBeanName"
+ ,referencedBean.getReferencedBeanName().getTextContent().trim());
+ assertEquals("referenced-bean-class"
+ ,referencedBean.getReferencedBeanClass().getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadRenderKitTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadRenderKitTestCase.java
new file mode 100644
index 000000000..4d289c917
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadRenderKitTestCase.java
@@ -0,0 +1,144 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests.read;
+
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.emf.RenderKitType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+/*
+ * This Junit class is used to test the render which is one of
+ * many items inside the root elemnt faces-config in the configuration
+ * information hierarchy of the faces-config.xml file
+ *
+ */
+public class ReadRenderKitTestCase extends BaseReadTestCase {
+
+ public ReadRenderKitTestCase(String name) {
+ super(name);
+ }
+
+ /*
+ *Test to see if there is at least one render-kit.
+ *This should be specified in the file for reading (faces-config)
+ */
+ public void testSingleRenderKit() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ assertNotNull(getRenderKit1(edit.getFacesConfig()));
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ RenderKitType getRenderKit1(FacesConfigType facesConfig)
+ {
+ return (RenderKitType) FacesConfigModelUtil
+ .findEObjectElementById(facesConfig.getRenderKit(), "renderKit1");
+ }
+
+ // Test for the Descirption
+ public void testDescriptionGroup()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ RenderKitType renderKit = getRenderKit1(edit.getFacesConfig());
+ assertNotNull(renderKit);
+
+ DescriptionType descType =
+ (DescriptionType) FacesConfigModelUtil
+ .findEObjectElementById(renderKit.getDescription()
+ , "renderKit1Description");
+ assertNotNull(descType);
+ assertEquals("Render kit Desc", descType.getTextContent());
+
+ DisplayNameType displayName =
+ (DisplayNameType) FacesConfigModelUtil
+ .findEObjectElementById(renderKit.getDisplayName()
+ , "renderKit1DisplayName");
+ assertNotNull(displayName);
+ assertEquals("Render kit disp name"
+ , displayName.getTextContent());
+
+ IconType iconType =
+ (IconType) FacesConfigModelUtil
+ .findEObjectElementById(renderKit.getIcon()
+ , "renderKit1Icon");
+ assertNotNull(iconType);
+ assertEquals("small-renderkit-icon"
+ , iconType.getSmallIcon().getTextContent());
+ assertEquals("large-renderkit-icon"
+ , iconType.getLargeIcon().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * chech for hte render-kit-id element
+ */
+
+ public void testSingleValuedProperties() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ RenderKitType renderKit = getRenderKit1(edit.getFacesConfig());
+ assertNotNull(renderKit);
+
+ assertEquals("render-kit-Id"
+ ,renderKit.getRenderKitId().getTextContent());
+ assertEquals("render-kit-class"
+ ,renderKit.getRenderKitClass().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /**
+ * Checks to see if there is at least one renderer
+ * Note: testing of the renderer is done in ReadRendererTestCase
+ */
+ public void testRenderer() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ RenderKitType renderKit = getRenderKit1(edit.getFacesConfig());
+ assertNotNull(renderKit);
+
+ assertEquals(1, renderKit.getRenderer().size());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+
+ }
+
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadRenderKitTestCase_1_2.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadRenderKitTestCase_1_2.java
new file mode 100644
index 000000000..d49942b81
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadRenderKitTestCase_1_2.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * 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.facesconfig.tests.read;
+
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.facesconfig.emf.DynamicElement;
+import org.eclipse.jst.jsf.facesconfig.emf.RenderKitExtensionType;
+import org.eclipse.jst.jsf.facesconfig.emf.RenderKitType;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class ReadRenderKitTestCase_1_2 extends ReadRenderKitTestCase {
+ public ReadRenderKitTestCase_1_2(String name) {
+ super(name);
+ }
+
+ protected void initialize(TestConfiguration testConfiguration) {
+ // override base when not in a configurable test suite
+ if(_testConfiguration == null)
+ {
+ _facesConfigFile = "WEB-INF/faces-config_1_2.xml";
+ _facesVersion = IJSFCoreConstants.JSF_VERSION_1_2;
+ }
+ else
+ {
+ super.initialize(testConfiguration);
+ }
+ }
+
+ public void testRenderKitExtension() {
+
+ FacesConfigArtifactEdit edit = null;
+ try
+ {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ RenderKitType renderKit1 = getRenderKit1(edit.getFacesConfig());
+ assertNotNull(renderKit1);
+
+ assertEquals(1, renderKit1.getRenderKitExtension().size());
+ RenderKitExtensionType renderKitExtensionType =
+ (RenderKitExtensionType) renderKit1.getRenderKitExtension().get(0);
+ assertEquals(1, renderKitExtensionType.getChildNodes().size());
+ DynamicElement element = (DynamicElement) renderKitExtensionType.getChildNodes().get(0);
+ assertEquals("render-kit-extension-tag", element.getName());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadRenderKitTestCase_2_0.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadRenderKitTestCase_2_0.java
new file mode 100644
index 000000000..a57a6733b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadRenderKitTestCase_2_0.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * 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.facesconfig.tests.read;
+
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.facesconfig.emf.ClientBehaviorRendererClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.ClientBehaviorRendererType;
+import org.eclipse.jst.jsf.facesconfig.emf.ClientBehaviorRendererTypeType;
+import org.eclipse.jst.jsf.facesconfig.emf.RenderKitType;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class ReadRenderKitTestCase_2_0 extends ReadRenderKitTestCase_1_2 {
+ public ReadRenderKitTestCase_2_0(String name) {
+ super(name);
+ }
+
+ protected void initialize(TestConfiguration testConfiguration) {
+ // override base when not in a configurable test suite
+ if(_testConfiguration == null)
+ {
+ _facesConfigFile = "WEB-INF/faces-config_2_0.xml";
+ _facesVersion = IJSFCoreConstants.JSF_VERSION_2_0;
+ }
+ else
+ {
+ super.initialize(testConfiguration);
+ }
+ }
+
+ public void testClientBehaviorRenderer() {
+
+ FacesConfigArtifactEdit edit = null;
+ try
+ {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ RenderKitType renderKit1 = getRenderKit1(edit.getFacesConfig());
+ assertNotNull(renderKit1);
+
+ ClientBehaviorRendererType clientBehaviorRenderer1 = (ClientBehaviorRendererType)renderKit1.getClientBehaviorRenderer().get(0);
+// (ClientBehaviorRendererType) FacesConfigModelUtil.findEObjectElementById
+// (renderKit1.getClientBehaviorRenderer(), "client-behavior-renderer-id");
+ assertNotNull(clientBehaviorRenderer1);
+
+ ClientBehaviorRendererTypeType clientBehaviorRendererType1 = clientBehaviorRenderer1.getClientBehaviorRendererType();
+ assertNotNull(clientBehaviorRendererType1);
+ assertEquals("MyClientBehaviorRendererType",
+ clientBehaviorRendererType1.getTextContent().trim());
+
+ ClientBehaviorRendererClassType clientBehaviorRendererClass1 = clientBehaviorRenderer1.getClientBehaviorRendererClass();
+ assertNotNull(clientBehaviorRendererClass1);
+ assertEquals("com.test.MyClientBehaviorRenderer",
+ clientBehaviorRendererClass1.getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadRendererTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadRendererTestCase.java
new file mode 100644
index 000000000..9116c17a4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadRendererTestCase.java
@@ -0,0 +1,211 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests.read;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.emf.RenderKitType;
+import org.eclipse.jst.jsf.facesconfig.emf.RendererType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+/*
+ * This Junit class is used to test the for the existence of
+ * renderer
+ */
+public class ReadRendererTestCase extends BaseReadTestCase {
+
+ public ReadRendererTestCase(String name) {
+ super(name);
+ }
+
+ /*
+ * Check to see if there at least one Renderer in place
+ */
+ public void testSingleRenderer() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ assertNotNull(getRenderer1(edit.getFacesConfig()));
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ private RendererType getRenderer1(FacesConfigType facesConfig)
+ {
+ RenderKitType renderKitType =
+ (RenderKitType) FacesConfigModelUtil
+ .findEObjectElementById(facesConfig.getRenderKit()
+ , "renderKit1");
+ assertNotNull(renderKitType);
+
+ return
+ (RendererType) FacesConfigModelUtil
+ .findEObjectElementById(renderKitType.getRenderer()
+ , "renderKit1Renderer");
+ }
+
+ /*
+ * check for Description. It simply checks to see if there is at least
+ * one such item
+ *
+ */
+
+ public void testDescriptionGroup() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ RendererType renderKit = getRenderer1(edit.getFacesConfig());
+ assertNotNull(renderKit);
+
+ DescriptionType descType =
+ (DescriptionType) FacesConfigModelUtil
+ .findEObjectElementById(renderKit.getDescription()
+ , "renderKit1RendererDescription");
+ assertNotNull(descType);
+ assertEquals("my renderer description", descType.getTextContent());
+
+ DisplayNameType displayName =
+ (DisplayNameType) FacesConfigModelUtil
+ .findEObjectElementById(renderKit.getDisplayName()
+ , "renderKit1RendererDisplayName");
+ assertNotNull(displayName);
+ assertEquals("my renderer display name"
+ , displayName.getTextContent());
+
+ IconType iconType =
+ (IconType) FacesConfigModelUtil
+ .findEObjectElementById(renderKit.getIcon()
+ , "renderKit1RendererIcon");
+ assertNotNull(iconType);
+ assertEquals("renderer-small-icon"
+ , iconType.getSmallIcon().getTextContent());
+ assertEquals("renderer-large-icon"
+ , iconType.getLargeIcon().getTextContent());
+
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * This one tests for the existence of three items
+ * They are the required items by all renderers
+ * They are : renderer-type, renderer-class and component-family.
+ * It thought it was better to put them together instead of
+ * writing single -separate methods for all of them.
+ */
+ public void testStringForRequiredEntries() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ RendererType renderer = getRenderer1(edit.getFacesConfig());
+ assertNotNull(renderer);
+
+ assertEquals("renderer-type"
+ , renderer.getRendererType().getTextContent());
+ assertEquals("renderer-class"
+ , renderer.getRendererClass().getTextContent());
+ assertEquals("component-family"
+ ,renderer.getComponentFamily().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /**
+ * Basic check. See ReadAttributeRendererTestCase for detailed
+ * testing
+ */
+ public void testAttribute() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ RendererType renderer = getRenderer1(edit.getFacesConfig());
+ assertNotNull(renderer);
+
+ assertEquals(1, renderer.getAttribute().size());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testFacet()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ RendererType renderer = getRenderer1(edit.getFacesConfig());
+ assertNotNull(renderer);
+
+ assertEquals(1, renderer.getFacet().size());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /*
+ * check for Renderer-Extension. It simply checks to see if there is at least
+ * one such item
+ *
+ */
+
+ public void testRendererExtension() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ if (edit.getFacesConfig() != null) {
+ EList renderKit = edit.getFacesConfig().getRenderKit();
+ assertTrue(!renderKit.isEmpty());
+ for (int i = 0; i < renderKit.size(); i++) {
+ RenderKitType rendererType = (RenderKitType) renderKit
+ .get(i);
+ assertTrue(!rendererType.getRenderer().isEmpty());
+ EList rend = rendererType.getRenderer();
+ for (int k = 0; k < rend.size(); k++) {
+ RendererType rendType = (RendererType) rend.get(k);
+ EList ext= rendType.getRendererExtension();
+ assertTrue(ext.size()!=0);
+ }
+ }
+ }
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadValidatorTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadValidatorTestCase.java
new file mode 100644
index 000000000..c313b7121
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadValidatorTestCase.java
@@ -0,0 +1,160 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests.read;
+
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.emf.ValidatorType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+/*
+ * This Junit class is used to test the validator which is one of
+ * many items inside the root elemnt faces-config in the configuration
+ * information hierarchy of the faces-config.xml file
+ *
+ */
+public class ReadValidatorTestCase extends BaseReadTestCase {
+
+ public ReadValidatorTestCase(String name) {
+ super(name);
+ }
+
+ /*
+ * The following method is used to test for the empty navigation rule. Since
+ * I am supplying a single faces-config.xml file as a testing file, I had to
+ * testcases fit in to it by controlling the conditions
+ *
+ */
+ public void testSingleValidator() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ assertNotNull(getValidator1(edit.getFacesConfig()));
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ ValidatorType getValidator1(FacesConfigType facesConfig)
+ {
+ return (ValidatorType)
+ FacesConfigModelUtil
+ .findEObjectElementById(facesConfig.getValidator(), "validator1");
+ }
+
+ // Test for the Descirption
+ public void testDescriptionGroup() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+ ValidatorType validator1 = getValidator1(edit.getFacesConfig());
+ assertNotNull(validator1);
+
+ // test descriptioni
+ {
+ DescriptionType descType =
+ (DescriptionType) FacesConfigModelUtil.findEObjectElementById
+ (validator1.getDescription(), "validator1_description");
+ assertEquals("validator-description"
+ , descType.getTextContent());
+ }
+ // test displayname
+ {
+ DisplayNameType displayNameType =
+ (DisplayNameType) FacesConfigModelUtil.findEObjectElementById
+ (validator1.getDisplayName(), "validator1_displayName");
+ assertEquals("validator-display-name"
+ , displayNameType.getTextContent());
+ }
+ // test icon
+ {
+ IconType iconType =
+ (IconType) FacesConfigModelUtil.findEObjectElementById
+ (validator1.getIcon(), "validator1_icon");
+ assertEquals("validator-small-icon"
+ , iconType.getSmallIcon().getTextContent());
+ assertEquals("validator-large-icon"
+ , iconType.getLargeIcon().getTextContent());
+ }
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testValidatorSingleValueProperties() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ ValidatorType validator1 = getValidator1(edit.getFacesConfig());
+ assertNotNull(validator1);
+
+ assertEquals("validator-Id", validator1.getValidatorId().getTextContent());
+ assertEquals("validator-class", validator1.getValidatorClass().getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+
+
+ /**
+ * Test the attribute sub-property of validators.
+ * Note: the attribute itself is tested in ReadAttributeValidatorTestCase
+ * this test case just tests the presence of the attribute
+ */
+ public void testAttribute() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ ValidatorType validator = getValidator1(edit.getFacesConfig());
+ assertEquals(1, validator.getAttribute().size());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ /**
+ * Test the property sub-property of validators
+ * Note: the attribute itself is tested in ReadPropertyValidatorTestCase
+ * this test case just tests for the presence of the property
+ */
+ public void testProperty() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ ValidatorType validator = getValidator1(edit.getFacesConfig());
+ assertEquals(1, validator.getProperty().size());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadValidatorTestCase_1_2.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadValidatorTestCase_1_2.java
new file mode 100644
index 000000000..5144498ef
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/read/ReadValidatorTestCase_1_2.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * 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.facesconfig.tests.read;
+
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.facesconfig.emf.DynamicElement;
+import org.eclipse.jst.jsf.facesconfig.emf.ValidatorExtensionType;
+import org.eclipse.jst.jsf.facesconfig.emf.ValidatorType;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class ReadValidatorTestCase_1_2 extends ReadValidatorTestCase
+{
+ public ReadValidatorTestCase_1_2(String name) {
+ super(name);
+ }
+
+ protected void initialize(TestConfiguration testConfiguration) {
+ // override base when not in a configurable test suite
+ if(_testConfiguration == null)
+ {
+ _facesConfigFile = "WEB-INF/faces-config_1_2.xml";
+ _facesVersion = IJSFCoreConstants.JSF_VERSION_1_2;
+ }
+ else
+ {
+ super.initialize(testConfiguration);
+ }
+ }
+
+ public void testValidatorExtension() {
+
+ FacesConfigArtifactEdit edit = null;
+ try
+ {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ ValidatorType validator1 = getValidator1(edit.getFacesConfig());
+ assertNotNull(validator1);
+
+ assertEquals(1, validator1.getValidatorExtension().size());
+ ValidatorExtensionType validatorExtensionType =
+ (ValidatorExtensionType) validator1.getValidatorExtension().get(0);
+ assertEquals(1, validatorExtensionType.getChildNodes().size());
+ DynamicElement element = (DynamicElement) validatorExtensionType.getChildNodes().get(0);
+ assertEquals("validator-extension-tag", element.getName());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/util/CommonStructuresUtil.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/util/CommonStructuresUtil.java
new file mode 100644
index 000000000..593179339
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/util/CommonStructuresUtil.java
@@ -0,0 +1,664 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2006 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.facesconfig.tests.util;
+
+import junit.framework.TestCase;
+
+import org.eclipse.jst.jsf.facesconfig.emf.AttributeClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.AttributeNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.AttributeType;
+import org.eclipse.jst.jsf.facesconfig.emf.DefaultValueType;
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
+import org.eclipse.jst.jsf.facesconfig.emf.FacetNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacetType;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.emf.KeyClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.KeyType;
+import org.eclipse.jst.jsf.facesconfig.emf.LargeIconType;
+import org.eclipse.jst.jsf.facesconfig.emf.ListEntriesType;
+import org.eclipse.jst.jsf.facesconfig.emf.ManagedPropertyType;
+import org.eclipse.jst.jsf.facesconfig.emf.MapEntriesType;
+import org.eclipse.jst.jsf.facesconfig.emf.MapEntryType;
+import org.eclipse.jst.jsf.facesconfig.emf.NullValueType;
+import org.eclipse.jst.jsf.facesconfig.emf.PropertyClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.PropertyNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.PropertyType;
+import org.eclipse.jst.jsf.facesconfig.emf.SmallIconType;
+import org.eclipse.jst.jsf.facesconfig.emf.SuggestedValueType;
+import org.eclipse.jst.jsf.facesconfig.emf.ValueClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.ValueType;
+
+/**
+ * Provides utility methods to quickly create and match common structures using
+ * a specific prefix
+ *
+ */
+public final class CommonStructuresUtil extends TestCase {
+ private static final String TEST_SANITY = "testSanity";
+ private final static FacesConfigPackage _facesConfigPackage = FacesConfigPackage.eINSTANCE;
+ private final static FacesConfigFactory _facesConfigFactory = _facesConfigPackage
+ .getFacesConfigFactory();
+
+ public static final String ID = "id";
+ public static final String LANG = "lang";
+ public static final String NAME = "name";
+ public static final String CLASS = "class";
+ public static final String VALUE = "value";
+ private static final String KEY = "key";
+
+ private static final String DESCRIPTION_VALUE = "description";
+ private static final String DISPLAY_VALUE = "displayValue";
+ private static final String ICON = "icon";
+ private static final String SMALL_ICON = createPreficedString("small", ICON);
+ private static final String LARGE_ICON = createPreficedString("large", ICON);;
+
+ private static final String SUGGESTED_VALUE = createPreficedString(
+ "suggested", VALUE);
+ private static final String DEFAULT_VALUE = createPreficedString("default",
+ VALUE);;
+
+ private static final String ATTRIBUTE = "attribute";
+ private static final String ATTRIBUTE_NAME = createPreficedString(
+ ATTRIBUTE, NAME);
+ private static final String ATTRIBUTE_CLASS = createPreficedString(
+ ATTRIBUTE, CLASS);
+
+ private static final String PROPERTY = "property";
+ private static final String PROPERTY_NAME = createPreficedString(PROPERTY,
+ NAME);
+ private static final String PROPERTY_CLASS = createPreficedString(PROPERTY,
+ CLASS);
+
+ private static final String FACET = "facet";
+ private static final String FACET_NAME = createPreficedString(FACET, NAME);
+
+ private static final String MANAGED_PROPERTY = "managed-property";
+ private static final String MAP_ENTRIES = "map-entries";
+ private static final String MAP_ENTRIES_KEY_CLASS =
+ createPreficedString(MAP_ENTRIES, "key-class");
+ private static final String MAP_ENTRIES_VALUE_CLASS =
+ createPreficedString(MAP_ENTRIES, "value-class");
+ private static final String MAP_ENTRY = "map-entry";
+
+ private static final String LIST_ENTRIES = "list-entries";
+ private static final String LIST_ENTRIES_VALUE_CLASS =
+ createPreficedString(LIST_ENTRIES, "value-class");
+
+ public static DescriptionType createDescription(final String prefix) {
+ DescriptionType description = _facesConfigFactory
+ .createDescriptionType();
+ description.setTextContent(createPreficedString(prefix,
+ DESCRIPTION_VALUE));
+ description.setId(createPreficedString(prefix, ID));
+ description.setLang(createPreficedString(prefix, LANG));
+ return description;
+ }
+
+ public static void assertMatchesDescription(String prefix,
+ DescriptionType description) {
+ assertEquals(createPreficedString(prefix, DESCRIPTION_VALUE),
+ description.getTextContent());
+ assertEquals(createPreficedString(prefix, ID), description.getId());
+ assertEquals(createPreficedString(prefix, LANG), description.getLang());
+ }
+
+ public static DisplayNameType createDisplayName(final String prefix) {
+ DisplayNameType displayName = _facesConfigFactory
+ .createDisplayNameType();
+ displayName.setTextContent(createPreficedString(prefix, DISPLAY_VALUE));
+ displayName.setId(createPreficedString(prefix, ID));
+ displayName.setLang(createPreficedString(prefix, LANG));
+ return displayName;
+ }
+
+ public static void assertMatchesDisplayName(String prefix,
+ DisplayNameType displayName) {
+ assertEquals(createPreficedString(prefix, DISPLAY_VALUE), displayName
+ .getTextContent());
+ assertEquals(createPreficedString(prefix, ID), displayName.getId());
+ assertEquals(createPreficedString(prefix, LANG), displayName.getLang());
+ }
+
+ public static IconType createIcon(final String prefix) {
+ IconType iconType = _facesConfigFactory.createIconType();
+ iconType.setId(createPreficedString(prefix, createPreficedString(ICON,
+ ID)));
+ iconType.setLang(createPreficedString(prefix, LANG));
+ SmallIconType smallIconType = _facesConfigFactory.createSmallIconType();
+ smallIconType.setTextContent(createPreficedString(prefix, SMALL_ICON));
+
+ LargeIconType largeIconType = _facesConfigFactory.createLargeIconType();
+ largeIconType.setTextContent(createPreficedString(prefix, LARGE_ICON));
+
+ iconType.setSmallIcon(smallIconType);
+ iconType.setLargeIcon(largeIconType);
+ return iconType;
+ }
+
+ public static void assertMatchesIcon(final String prefix,
+ final IconType iconType) {
+ assertEquals(createPreficedString(prefix,
+ createPreficedString(ICON, ID)), iconType.getId());
+ assertEquals(createPreficedString(prefix, LANG), iconType.getLang());
+
+ SmallIconType smallIconType = iconType.getSmallIcon();
+ assertEquals(createPreficedString(prefix, SMALL_ICON), smallIconType
+ .getTextContent());
+
+ LargeIconType largeIconType = iconType.getLargeIcon();
+ assertEquals(createPreficedString(prefix, LARGE_ICON), largeIconType
+ .getTextContent());
+ }
+
+ public static AttributeType createAttribute(String prefix) {
+ final String ATTRIBUTE_PREFIX = createPreficedString(prefix, ATTRIBUTE);
+
+ AttributeType attrType = _facesConfigFactory.createAttributeType();
+
+ attrType.getDescription().add(createDescription(ATTRIBUTE_PREFIX));
+ attrType.getDisplayName().add(createDisplayName(ATTRIBUTE_PREFIX));
+ attrType.getIcon().add(createIcon(ATTRIBUTE_PREFIX));
+
+ AttributeNameType attributeNameType = _facesConfigFactory
+ .createAttributeNameType();
+ attributeNameType.setTextContent(createPreficedString(prefix,
+ ATTRIBUTE_NAME));
+ attributeNameType.setId(createPreficedString(prefix,
+ createPreficedString(ATTRIBUTE_NAME, ID)));
+ attrType.setAttributeName(attributeNameType);
+
+ AttributeClassType attributeClassType = _facesConfigFactory
+ .createAttributeClassType();
+ attributeClassType.setTextContent(createPreficedString(prefix,
+ ATTRIBUTE_CLASS));
+ attributeClassType.setId(createPreficedString(prefix,
+ createPreficedString(ATTRIBUTE_CLASS, ID)));
+ attrType.setAttributeClass(attributeClassType);
+
+ DefaultValueType defaultValueType = _facesConfigFactory
+ .createDefaultValueType();
+ defaultValueType.setTextContent(createPreficedString(prefix,
+ createPreficedString(ATTRIBUTE, DEFAULT_VALUE)));
+ defaultValueType.setId(createPreficedString(prefix,
+ createPreficedString(ATTRIBUTE, createPreficedString(
+ DEFAULT_VALUE, ID))));
+ attrType.setDefaultValue(defaultValueType);
+
+ SuggestedValueType suggestedValueType = _facesConfigFactory
+ .createSuggestedValueType();
+ suggestedValueType.setTextContent(createPreficedString(prefix,
+ createPreficedString(ATTRIBUTE, SUGGESTED_VALUE)));
+ suggestedValueType.setId(createPreficedString(prefix,
+ createPreficedString(ATTRIBUTE, createPreficedString(
+ SUGGESTED_VALUE, ID))));
+
+ attrType.setSuggestedValue(suggestedValueType);
+
+ attrType.setId(createPreficedString(prefix, createPreficedString(
+ ATTRIBUTE, ID)));
+
+ return attrType;
+ }
+
+ public static void assertMatchAttribute(String prefix,
+ AttributeType attrType) {
+ final String ATTRIBUTE_PREFIX = createPreficedString(prefix, ATTRIBUTE);
+
+ assertEquals(1, attrType.getDescription().size());
+ assertMatchesDescription(ATTRIBUTE_PREFIX, (DescriptionType) attrType
+ .getDescription().get(0));
+
+ assertEquals(1, attrType.getDisplayName().size());
+ assertMatchesDisplayName(ATTRIBUTE_PREFIX, (DisplayNameType) attrType
+ .getDisplayName().get(0));
+
+ assertEquals(1, attrType.getIcon().size());
+ assertMatchesIcon(ATTRIBUTE_PREFIX, (IconType) attrType.getIcon()
+ .get(0));
+
+ AttributeNameType attributeNameType = attrType.getAttributeName();
+ assertEquals(createPreficedString(prefix, ATTRIBUTE_NAME),
+ attributeNameType.getTextContent());
+ assertEquals(createPreficedString(prefix, createPreficedString(
+ ATTRIBUTE_NAME, ID)), attributeNameType.getId());
+
+ AttributeClassType attributeClassType = attrType.getAttributeClass();
+ assertEquals(createPreficedString(prefix, ATTRIBUTE_CLASS),
+ attributeClassType.getTextContent());
+ assertEquals(createPreficedString(prefix, createPreficedString(
+ ATTRIBUTE_CLASS, ID)), attributeClassType.getId());
+
+ DefaultValueType defaultValueType = attrType.getDefaultValue();
+ assertEquals(createPreficedString(prefix, createPreficedString(
+ ATTRIBUTE, DEFAULT_VALUE)), defaultValueType.getTextContent());
+ assertEquals(createPreficedString(prefix, createPreficedString(
+ ATTRIBUTE, createPreficedString(DEFAULT_VALUE, ID))),
+ defaultValueType.getId());
+
+ SuggestedValueType suggestedValueType = attrType.getSuggestedValue();
+ assertEquals(createPreficedString(prefix, createPreficedString(
+ ATTRIBUTE, SUGGESTED_VALUE)), suggestedValueType
+ .getTextContent());
+ assertEquals(createPreficedString(prefix, createPreficedString(
+ ATTRIBUTE, createPreficedString(SUGGESTED_VALUE, ID))),
+ suggestedValueType.getId());
+
+ assertEquals(createPreficedString(prefix, createPreficedString(
+ ATTRIBUTE, ID)), attrType.getId());
+ }
+
+ public static PropertyType createProperty(final String prefix) {
+ final String PROPERTY_PREFIX = createPreficedString(prefix, PROPERTY);
+
+ PropertyType propertyType = _facesConfigFactory.createPropertyType();
+
+ propertyType.getDescription().add(createDescription(PROPERTY_PREFIX));
+ propertyType.getDisplayName().add(createDisplayName(PROPERTY_PREFIX));
+ propertyType.getIcon().add(createIcon(PROPERTY_PREFIX));
+
+ PropertyNameType propertyNameType = _facesConfigFactory
+ .createPropertyNameType();
+ propertyNameType.setTextContent(createPreficedString(prefix,
+ PROPERTY_NAME));
+ propertyNameType.setId(createPreficedString(prefix,
+ createPreficedString(PROPERTY_NAME, ID)));
+ propertyType.setPropertyName(propertyNameType);
+
+ PropertyClassType propertyClassType = _facesConfigFactory
+ .createPropertyClassType();
+ propertyClassType.setTextContent(createPreficedString(prefix,
+ PROPERTY_CLASS));
+ propertyClassType.setId(createPreficedString(prefix,
+ createPreficedString(PROPERTY_CLASS, ID)));
+ propertyType.setPropertyClass(propertyClassType);
+
+ DefaultValueType defaultValueType = _facesConfigFactory
+ .createDefaultValueType();
+ defaultValueType.setTextContent(createPreficedString(prefix,
+ createPreficedString(PROPERTY, DEFAULT_VALUE)));
+ defaultValueType.setId(createPreficedString(prefix,
+ createPreficedString(PROPERTY, createPreficedString(
+ DEFAULT_VALUE, ID))));
+ propertyType.setDefaultValue(defaultValueType);
+
+ SuggestedValueType suggestedValueType = _facesConfigFactory
+ .createSuggestedValueType();
+ suggestedValueType.setTextContent(createPreficedString(prefix,
+ createPreficedString(PROPERTY, SUGGESTED_VALUE)));
+ suggestedValueType.setId(createPreficedString(prefix,
+ createPreficedString(PROPERTY, createPreficedString(
+ SUGGESTED_VALUE, ID))));
+ propertyType.setSuggestedValue(suggestedValueType);
+
+ propertyType.setId(createPreficedString(prefix, createPreficedString(
+ PROPERTY, ID)));
+
+ return propertyType;
+ }
+
+ public static void assertMatchProperty(final String prefix,
+ final PropertyType property) {
+ final String PROPERTY_PREFIX = createPreficedString(prefix, PROPERTY);
+
+ assertEquals(1, property.getDescription().size());
+ assertMatchesDescription(PROPERTY_PREFIX, (DescriptionType) property
+ .getDescription().get(0));
+
+ assertEquals(1, property.getDisplayName().size());
+ assertMatchesDisplayName(PROPERTY_PREFIX, (DisplayNameType) property
+ .getDisplayName().get(0));
+
+ assertEquals(1, property.getIcon().size());
+ assertMatchesIcon(PROPERTY_PREFIX, (IconType) property.getIcon().get(0));
+
+ PropertyNameType propertyNameType = property.getPropertyName();
+ assertEquals(createPreficedString(prefix, PROPERTY_NAME),
+ propertyNameType.getTextContent());
+ assertEquals(createPreficedString(prefix, createPreficedString(
+ PROPERTY_NAME, ID)), propertyNameType.getId());
+
+ PropertyClassType propertyClassType = property.getPropertyClass();
+ assertEquals(createPreficedString(prefix, PROPERTY_CLASS),
+ propertyClassType.getTextContent());
+ assertEquals(createPreficedString(prefix, createPreficedString(
+ PROPERTY_CLASS, ID)), propertyClassType.getId());
+
+ DefaultValueType defaultValueType = property.getDefaultValue();
+ assertEquals(createPreficedString(prefix, createPreficedString(
+ PROPERTY, DEFAULT_VALUE)), defaultValueType.getTextContent());
+ assertEquals(createPreficedString(prefix, createPreficedString(
+ PROPERTY, createPreficedString(DEFAULT_VALUE, ID))),
+ defaultValueType.getId());
+
+ SuggestedValueType suggestedValueType = property.getSuggestedValue();
+ assertEquals(createPreficedString(prefix, createPreficedString(
+ PROPERTY, SUGGESTED_VALUE)), suggestedValueType
+ .getTextContent());
+ assertEquals(createPreficedString(prefix, createPreficedString(
+ PROPERTY, createPreficedString(SUGGESTED_VALUE, ID))),
+ suggestedValueType.getId());
+
+ assertEquals(createPreficedString(prefix, createPreficedString(
+ PROPERTY, ID)), property.getId());
+
+ }
+
+ public static FacetType createFacet(final String prefix) {
+ final String FACET_PREFIX = createPreficedString(prefix, FACET);
+
+ final FacetType facet = _facesConfigFactory.createFacetType();
+
+ facet.getDescription().add(createDescription(FACET_PREFIX));
+ facet.getDisplayName().add(createDisplayName(FACET_PREFIX));
+ facet.getIcon().add(createIcon(FACET_PREFIX));
+
+ FacetNameType facetNameType = _facesConfigFactory.createFacetNameType();
+ facetNameType.setTextContent(createPreficedString(prefix, FACET_NAME));
+ facetNameType.setId(createPreficedString(prefix, createPreficedString(
+ FACET_NAME, ID)));
+ facet.setFacetName(facetNameType);
+
+ facet.setId(createPreficedString(prefix,
+ createPreficedString(FACET, ID)));
+
+ return facet;
+ }
+
+ public static void assertMatchFacet(final String prefix, FacetType facet) {
+ final String FACET_PREFIX = createPreficedString(prefix, FACET);
+
+ assertEquals(1, facet.getDescription().size());
+ assertMatchesDescription(FACET_PREFIX, (DescriptionType) facet
+ .getDescription().get(0));
+
+ assertEquals(1, facet.getDisplayName().size());
+ assertMatchesDisplayName(FACET_PREFIX, (DisplayNameType) facet
+ .getDisplayName().get(0));
+
+ assertEquals(1, facet.getIcon().size());
+ assertMatchesIcon(FACET_PREFIX, (IconType) facet.getIcon().get(0));
+
+ FacetNameType propertyNameType = facet.getFacetName();
+ assertEquals(createPreficedString(prefix, FACET_NAME), propertyNameType
+ .getTextContent());
+ assertEquals(createPreficedString(prefix, createPreficedString(
+ FACET_NAME, ID)), propertyNameType.getId());
+
+ assertEquals(createPreficedString(prefix, createPreficedString(FACET,
+ ID)), facet.getId());
+ }
+
+ public static ManagedPropertyType createManagedPropertyBase(
+ final String prefix) {
+ final String MANAGED_PROPERTY_PREFIX = createPreficedString(prefix,
+ MANAGED_PROPERTY);
+
+ final ManagedPropertyType managedProperty = _facesConfigFactory
+ .createManagedPropertyType();
+
+ managedProperty.getDescription().add(
+ createDescription(MANAGED_PROPERTY_PREFIX));
+ managedProperty.getDisplayName().add(
+ createDisplayName(MANAGED_PROPERTY_PREFIX));
+ managedProperty.getIcon().add(createIcon(MANAGED_PROPERTY_PREFIX));
+
+ PropertyNameType propertyNameType = _facesConfigFactory
+ .createPropertyNameType();
+ propertyNameType.setTextContent(createPreficedString(prefix,
+ PROPERTY_NAME));
+ propertyNameType.setId(createPreficedString(prefix,
+ createPreficedString(PROPERTY_NAME, ID)));
+ managedProperty.setPropertyName(propertyNameType);
+
+ PropertyClassType propertyClassType = _facesConfigFactory
+ .createPropertyClassType();
+ propertyClassType.setTextContent(createPreficedString(prefix,
+ PROPERTY_CLASS));
+ propertyClassType.setId(createPreficedString(prefix,
+ createPreficedString(PROPERTY_CLASS, ID)));
+ managedProperty.setPropertyClass(propertyClassType);
+
+ return managedProperty;
+ }
+
+ public static void assertMatchManagedPropertyBase(final String prefix,
+ final ManagedPropertyType managedProperty) {
+ final String MANAGED_PROPERTY_PREFIX = createPreficedString(prefix,
+ MANAGED_PROPERTY);
+
+ assertEquals(1, managedProperty.getDescription().size());
+ assertMatchesDescription(MANAGED_PROPERTY_PREFIX,
+ (DescriptionType) managedProperty.getDescription().get(0));
+
+ assertEquals(1, managedProperty.getDisplayName().size());
+ assertMatchesDisplayName(MANAGED_PROPERTY_PREFIX,
+ (DisplayNameType) managedProperty.getDisplayName().get(0));
+
+ assertEquals(1, managedProperty.getIcon().size());
+ assertMatchesIcon(MANAGED_PROPERTY_PREFIX, (IconType) managedProperty
+ .getIcon().get(0));
+
+ {
+ PropertyNameType propertyNameType = managedProperty
+ .getPropertyName();
+ assertEquals(createPreficedString(prefix, PROPERTY_NAME),
+ propertyNameType.getTextContent());
+ assertEquals(createPreficedString(prefix, createPreficedString(
+ PROPERTY_NAME, ID)), propertyNameType.getId());
+ }
+
+ {
+ PropertyClassType propertyClassType = managedProperty
+ .getPropertyClass();
+
+ assertEquals(createPreficedString(prefix, PROPERTY_CLASS),
+ propertyClassType.getTextContent());
+ assertEquals(createPreficedString(prefix, createPreficedString(
+ PROPERTY_CLASS, ID)), propertyClassType.getId());
+ }
+
+ }
+
+ public static ValueType createValue(final String prefix) {
+ final String VALUE_PREFIX = createPreficedString(prefix, VALUE);
+ final ValueType value = _facesConfigFactory.createValueType();
+
+ value.setTextContent(VALUE_PREFIX);
+ value.setId(createPreficedString(VALUE_PREFIX, ID));
+
+ return value;
+ }
+
+ public static void assertMatchValue(final String prefix, ValueType value)
+ {
+ final String VALUE_PREFIX = createPreficedString(prefix, VALUE);
+
+ assertEquals(VALUE_PREFIX, value.getTextContent());
+ assertEquals(createPreficedString(VALUE_PREFIX, ID), value.getId());
+ }
+
+ public static MapEntriesType createMapEntries(final String prefix)
+ {
+ final String MAP_ENTRIES_PREFIX =
+ createPreficedString(prefix,
+ createPreficedString(MANAGED_PROPERTY, MAP_ENTRIES));
+ final MapEntriesType mapEntries =
+ _facesConfigFactory.createMapEntriesType();
+
+ {
+ KeyClassType keyClass = _facesConfigFactory.createKeyClassType();
+ keyClass.setTextContent(createPreficedString(prefix,MAP_ENTRIES_KEY_CLASS));
+ keyClass.setId(createPreficedString(prefix,
+ createPreficedString(MAP_ENTRIES_KEY_CLASS, ID)));
+ mapEntries.setKeyClass(keyClass);
+ }
+
+ {
+ ValueClassType valueClass = _facesConfigFactory.createValueClassType();
+ valueClass.setTextContent(MAP_ENTRIES_VALUE_CLASS);
+ valueClass.setId(createPreficedString(MAP_ENTRIES_VALUE_CLASS, ID));
+ mapEntries.setValueClass(valueClass);
+ }
+
+ {
+ MapEntryType mapEntry = _facesConfigFactory.createMapEntryType();
+ mapEntry.setId(createPreficedString(MAP_ENTRY, ID));
+ KeyType keyType = _facesConfigFactory.createKeyType();
+ keyType.setId(createPreficedString(createPreficedString(MAP_ENTRY, ID), KEY));
+ keyType.setTextContent(createPreficedString(MAP_ENTRY, KEY));
+ mapEntry.setKey(keyType);
+ mapEntry.setValue(createValue(MAP_ENTRIES_PREFIX));
+
+ mapEntries.getMapEntry().add(mapEntry);
+ }
+
+ {
+ MapEntryType mapEntry = _facesConfigFactory.createMapEntryType();
+ mapEntry.setId(createPreficedString(createPreficedString(MAP_ENTRY, ID), "2"));
+ KeyType keyType = _facesConfigFactory.createKeyType();
+ keyType.setId(createPreficedString(createPreficedString(createPreficedString(MAP_ENTRY, ID), KEY),"2"));
+ keyType.setTextContent(createPreficedString(createPreficedString(MAP_ENTRY, KEY), "2"));
+ mapEntry.setKey(keyType);
+ NullValueType nullValue = _facesConfigFactory.createNullValueType();
+ nullValue.setId(createPreficedString("null", MAP_ENTRY));
+ mapEntry.setNullValue(nullValue);
+
+ mapEntries.getMapEntry().add(mapEntry);
+ }
+
+ mapEntries.setId(createPreficedString(MAP_ENTRIES_PREFIX, ID));
+
+ return mapEntries;
+ }
+
+ public static void assertMatchMapEntries(final String prefix, MapEntriesType mapEntries)
+ {
+ final String MAP_ENTRIES_PREFIX =
+ createPreficedString(prefix,
+ createPreficedString(MANAGED_PROPERTY, MAP_ENTRIES));
+
+ {
+ KeyClassType keyClass = mapEntries.getKeyClass();
+ assertEquals(createPreficedString(prefix,MAP_ENTRIES_KEY_CLASS)
+ , keyClass.getTextContent());
+ assertEquals(createPreficedString(prefix,
+ createPreficedString(MAP_ENTRIES_KEY_CLASS, ID))
+ , keyClass.getId());
+ }
+
+ {
+ ValueClassType valueClass = mapEntries.getValueClass();
+ assertEquals(MAP_ENTRIES_VALUE_CLASS, valueClass.getTextContent());
+ assertEquals(createPreficedString(MAP_ENTRIES_VALUE_CLASS, ID)
+ , valueClass.getId());
+ }
+
+ assertEquals(2, mapEntries.getMapEntry().size());
+ {
+ MapEntryType mapEntry =
+ (MapEntryType) mapEntries.getMapEntry().get(0);
+ assertEquals(createPreficedString(MAP_ENTRY, ID)
+ , mapEntry.getId());
+
+ KeyType keyType = mapEntry.getKey();
+ assertEquals(createPreficedString(createPreficedString(MAP_ENTRY, ID), KEY)
+ , keyType.getId());
+ assertEquals(createPreficedString(MAP_ENTRY, KEY)
+ , keyType.getTextContent());
+ assertMatchValue(MAP_ENTRIES_PREFIX, mapEntry.getValue());
+ }
+
+ {
+ MapEntryType mapEntry =
+ (MapEntryType) mapEntries.getMapEntry().get(1);
+ assertEquals(createPreficedString(createPreficedString(MAP_ENTRY, ID), "2")
+ , mapEntry.getId());
+
+ KeyType keyType = mapEntry.getKey();
+ assertEquals(createPreficedString(
+ createPreficedString(createPreficedString(MAP_ENTRY, ID), KEY), "2")
+ , keyType.getId());
+
+ NullValueType nullValue = mapEntry.getNullValue();
+ assertEquals(createPreficedString("null", MAP_ENTRY), nullValue.getId());
+ }
+
+ assertEquals(createPreficedString(MAP_ENTRIES_PREFIX, ID)
+ , mapEntries.getId());
+ }
+
+ public static ListEntriesType createListEntries(final String prefix)
+ {
+ final String LIST_ENTRIES_PREFIX =
+ createPreficedString(prefix,
+ createPreficedString(MANAGED_PROPERTY, LIST_ENTRIES));
+ final ListEntriesType listEntries =
+ _facesConfigFactory.createListEntriesType();
+
+ {
+ ValueClassType valueClass = _facesConfigFactory.createValueClassType();
+ valueClass.setTextContent(LIST_ENTRIES_VALUE_CLASS);
+ valueClass.setId(createPreficedString(LIST_ENTRIES_VALUE_CLASS, ID));
+ listEntries.setValueClass(valueClass);
+ }
+
+ listEntries.getValue().add(createValue(LIST_ENTRIES_PREFIX));
+ listEntries.setId(createPreficedString(LIST_ENTRIES_PREFIX, ID));
+
+ return listEntries;
+ }
+
+ public static void assertMatchListEntries(final String prefix, ListEntriesType listEntries)
+ {
+ final String LIST_ENTRIES_PREFIX =
+ createPreficedString(prefix,
+ createPreficedString(MANAGED_PROPERTY, LIST_ENTRIES));
+
+ {
+ ValueClassType valueClass = listEntries.getValueClass();
+ assertEquals(LIST_ENTRIES_VALUE_CLASS, valueClass.getTextContent());
+ assertEquals(createPreficedString(LIST_ENTRIES_VALUE_CLASS, ID)
+ , valueClass.getId());
+ }
+
+ assertEquals(1,listEntries.getValue().size());
+ ValueType value = (ValueType) listEntries.getValue().get(0);
+ assertMatchValue(LIST_ENTRIES_PREFIX, value);
+
+ assertEquals(createPreficedString(LIST_ENTRIES_PREFIX, ID), listEntries.getId());
+ }
+
+ public static String createPreficedString(final String prefix,
+ final String value) {
+ return prefix + "-" + value;
+ }
+
+ /**
+ * Tests that what is created by each method is successfully matched by the
+ * corresponding match method
+ */
+ public void testSanity() {
+ assertMatchesDescription(TEST_SANITY, createDescription(TEST_SANITY));
+ assertMatchesDisplayName(TEST_SANITY, createDisplayName(TEST_SANITY));
+ assertMatchesIcon(TEST_SANITY, createIcon(TEST_SANITY));
+ assertMatchAttribute(TEST_SANITY, createAttribute(TEST_SANITY));
+ assertMatchProperty(TEST_SANITY, createProperty(TEST_SANITY));
+ assertMatchFacet(TEST_SANITY, createFacet(TEST_SANITY));
+ assertMatchManagedPropertyBase(TEST_SANITY,
+ createManagedPropertyBase(TEST_SANITY));
+ assertMatchValue(TEST_SANITY, createValue(TEST_SANITY));
+ assertMatchMapEntries(TEST_SANITY, createMapEntries(TEST_SANITY));
+ assertMatchListEntries(TEST_SANITY, createListEntries(TEST_SANITY));
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/util/FacesConfigModelUtil.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/util/FacesConfigModelUtil.java
new file mode 100644
index 000000000..381f4fb55
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/util/FacesConfigModelUtil.java
@@ -0,0 +1,274 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2006 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.facesconfig.tests.util;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jst.jsf.facesconfig.emf.ActionListenerType;
+import org.eclipse.jst.jsf.facesconfig.emf.ApplicationType;
+import org.eclipse.jst.jsf.facesconfig.emf.DefaultRenderKitIdType;
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.emf.MessageBundleType;
+import org.eclipse.jst.jsf.facesconfig.emf.NavigationCaseType;
+import org.eclipse.jst.jsf.facesconfig.emf.NavigationRuleType;
+
+/**
+ * Utility methods for model handling in tests
+ *
+ */
+public final class FacesConfigModelUtil
+{
+ /**
+ * @param navHandlers
+ * @param descriptionText
+ * @return the navigation rule from the list navRules
+ * whose description text matches descriptionText or null if
+ * not found
+ */
+ public static NavigationRuleType findNavigationHandlerRuleByDescriptionText(List navRules, String descriptionText)
+ {
+ if (descriptionText == null)
+ {
+ return null;
+ }
+
+ for (final Iterator it = navRules.iterator(); it.hasNext();)
+ {
+ final NavigationRuleType navHandlerType =
+ (NavigationRuleType) it.next();
+
+ if (findDescriptionType(navHandlerType.getDescription(), descriptionText) != null)
+ {
+ return navHandlerType;
+ }
+ }
+
+ // not found
+ return null;
+ }
+
+ /**
+ * @param navRules
+ * @param displayName
+ * @return the the navigation rule from the list navRules
+ * whose display nmae text matches displayName or null if
+ * not found
+ */
+ public static NavigationRuleType findNavigationHandlerRuleByDisplayName(List navRules, String displayName)
+ {
+ if (displayName == null)
+ {
+ return null;
+ }
+
+ for (final Iterator it = navRules.iterator(); it.hasNext();)
+ {
+ final NavigationRuleType navHandlerType =
+ (NavigationRuleType) it.next();
+
+ if (findDisplayNameType(navHandlerType.getDisplayName(), displayName) != null)
+ {
+ return navHandlerType;
+ }
+ }
+
+ // not found
+ return null;
+ }
+
+
+ /**
+ * @param descTypes
+ * @param matchText
+ * @return the DisplayNameType from descTypes corresponding to
+ * matchText or null if not in list. String.equals() is used
+ * to match
+ */
+ public static DisplayNameType findDisplayNameType(List descTypes, String matchText)
+ {
+ if (matchText == null)
+ {
+ return null;
+ }
+
+ for (final Iterator it = descTypes.iterator(); it.hasNext();)
+ {
+ final DisplayNameType descType = (DisplayNameType) it.next();
+ if (matchText.equals(descType.getTextContent()))
+ {
+ return descType;
+ }
+ }
+
+ // if get through list and not found, then return null
+ return null;
+ }
+
+ /**
+ * @param descTypes
+ * @param matchText
+ * @return the DescriptionType from descTypes corresponding to
+ * matchText or null if not in list. String.equals() is used
+ * to match
+ */
+ public static DescriptionType findDescriptionType(List descTypes, String matchText)
+ {
+ if (matchText == null)
+ {
+ return null;
+ }
+
+ for (final Iterator it = descTypes.iterator(); it.hasNext();)
+ {
+ final DescriptionType descType = (DescriptionType) it.next();
+ if (matchText.equals(descType.getTextContent()))
+ {
+ return descType;
+ }
+ }
+
+ // if get through list and not found, then return null
+ return null;
+ }
+
+ public static IconType findIconTypeByLang(List iconTypes, String xmlLangMatch)
+ {
+ for (final Iterator it = iconTypes.iterator(); it.hasNext();)
+ {
+ final IconType icon = (IconType) it.next();
+ if (xmlLangMatch == null && icon.getLang() == null)
+ {
+ return icon;
+ }
+ else if (xmlLangMatch != null && xmlLangMatch.equals(icon.getLang()))
+ {
+ return icon;
+ }
+ }
+
+ // not found
+ return null;
+ }
+
+ public static NavigationCaseType findNavigationCaseByDisplayName(List navigationCases, String displayName)
+ {
+ for (final Iterator it = navigationCases.iterator(); it.hasNext();)
+ {
+ final NavigationCaseType navCase = (NavigationCaseType) it.next();
+
+ if (displayName != null &&
+ findDisplayNameType(navCase.getDisplayName(), displayName) != null)
+ {
+ return navCase;
+ }
+ }
+
+ // not found
+ return null;
+ }
+
+ public static ApplicationType findApplicationById(List applications, String id)
+ {
+ for (final Iterator it = applications.iterator(); it.hasNext();)
+ {
+ final ApplicationType app = (ApplicationType) it.next();
+
+ if (id != null && id.equals(app.getId()))
+ {
+ return app;
+ }
+ }
+
+ // not found
+ return null;
+ }
+
+ public static ActionListenerType findActionListenerById(List actionListeners, String id)
+ {
+ for (final Iterator it = actionListeners.iterator(); it.hasNext();)
+ {
+ final ActionListenerType app = (ActionListenerType) it.next();
+
+ if (id != null && id.equals(app.getId()))
+ {
+ return app;
+ }
+ }
+
+ // not found
+ return null;
+ }
+
+ /**
+ * @param defaultRenderKits
+ * @param id
+ * @return
+ */
+ public static DefaultRenderKitIdType findDefaultRenderKitIdTypeById(List defaultRenderKits, String id)
+ {
+ for (final Iterator it = defaultRenderKits.iterator(); it.hasNext();)
+ {
+ final DefaultRenderKitIdType renderKitId = (DefaultRenderKitIdType) it.next();
+
+ if (id != null && id.equals(renderKitId.getId()))
+ {
+ return renderKitId;
+ }
+ }
+
+ // not found
+ return null;
+ }
+
+ public static MessageBundleType findMessageBundleTypeById(List messageBundles, String id)
+ {
+ for (final Iterator it = messageBundles.iterator(); it.hasNext();)
+ {
+ final MessageBundleType messageBundle = (MessageBundleType) it.next();
+
+ if (id != null && id.equals(messageBundle.getId()))
+ {
+ return messageBundle;
+ }
+ }
+
+ // not found
+ return null;
+ }
+
+ public static EObject findEObjectElementById(List eObjects, String id)
+ {
+ for (final Iterator it = eObjects.iterator(); it.hasNext();)
+ {
+ final EObject eObject = (EObject) it.next();
+
+ final EStructuralFeature feature =
+ eObject.eClass().getEStructuralFeature("id");
+ if (feature != null)
+ {
+ Object value = eObject.eGet(feature);
+
+ if (value instanceof String
+ && value.equals(id))
+ {
+ return eObject;
+ }
+ }
+ }
+ // not found
+ return null;
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/util/WizardUtil.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/util/WizardUtil.java
new file mode 100644
index 000000000..636efc0f1
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/util/WizardUtil.java
@@ -0,0 +1,218 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests.util;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+import junit.framework.Assert;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jst.j2ee.internal.web.archive.operations.WebFacetProjectCreationDataModelProvider;
+import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
+import org.eclipse.wst.common.componentcore.ComponentCore;
+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.osgi.framework.Bundle;
+
+/**
+ * Utility class for launching JSF-related wizard operations.
+ *
+ * @author spaxton
+ */
+public class WizardUtil extends Assert {
+ private static boolean projectCreated = false;
+ private static final String FACESCONFIG_PROJECT_NAME = "FacesConfigUnitTest";
+ private static final String FACESCONFIG_EAR_PROJECT_NAME = FACESCONFIG_PROJECT_NAME + "EAR";
+
+ public static boolean isProjectCreated() {
+ return projectCreated;
+ }
+
+ public static void createProject(String nameSuffix) {
+ if(!isProjectCreated()) {
+ // first delete the projects of these names, if present
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ IResource oldWebProj = workspace.getRoot().getProject(createProjectName(nameSuffix));
+ IResource oldEarProj = workspace.getRoot().getProject(createEarProjectName(nameSuffix));
+
+ try {
+ workspace.delete(new IResource[] { oldWebProj, oldEarProj }, true, null);
+ } catch (CoreException ce) {
+ ce.printStackTrace();
+ }
+
+
+ try {
+ WebProjectTestEnvironment testEnv = new WebProjectTestEnvironment(createProjectName(nameSuffix));
+ testEnv.createProject(false);
+ assertNotNull(testEnv);
+ assertNotNull(testEnv.getTestProject());
+ assertTrue(testEnv.getTestProject().isAccessible());
+
+ IProject project = testEnv.getTestProject();
+ checkAndAddFacesConfig(project);
+ } catch (Exception t) {
+ throw new RuntimeException(t);
+ }
+
+ projectCreated = true;
+ }
+ }
+
+ protected static IProject createWebProject(String projectName) throws Exception {
+ if(!isProjectCreated()) {
+ IDataModel dataModel = DataModelFactory.createDataModel(new WebFacetProjectCreationDataModelProvider());
+ dataModel.setProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME, projectName);
+ dataModel.getDefaultOperation().execute(new NullProgressMonitor(), null);
+ }
+ return ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+ }
+
+ public static void setProjectDirtied() {
+ projectCreated = false;
+ }
+
+ /**
+ * Forces recreation of the test project - to be used after unit tests
+ * that dirty the project state.
+ * @param nameSuffix TODO
+ */
+ public static void recreateProject(String nameSuffix) {
+ setProjectDirtied();
+ createProject(nameSuffix);
+ }
+
+ /**
+ * Should call createProject first.
+ * @return the test project
+ * @param nameSuffix TODO
+ */
+ public static IProject getTestProject(String nameSuffix) {
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ return workspace.getRoot().getProject(createProjectName(nameSuffix));
+ }
+
+ private static String createProjectName(final String nameSuffix)
+ {
+ // TODO: do we need separate projects for each test?
+ return FACESCONFIG_PROJECT_NAME;//+"_"+nameSuffix;
+ }
+
+ private static String createEarProjectName(final String nameSuffix)
+ {
+ // TODO: do we need separate projects for each test?
+ return FACESCONFIG_EAR_PROJECT_NAME;//+"_"+nameSuffix;
+ }
+
+ private static void checkAndAddFacesConfig(IProject project) {
+ IContainer container = ComponentCore.createComponent(project).getRootFolder().getFolder("/WEB-INF").getUnderlyingFolder();
+ IFile facesConfigFile = ResourcesPlugin.getWorkspace().getRoot().getFile(container.getFullPath().append(new Path("faces-config.xml"))); //$NON-NLS-1$
+ IFile facesConfigFile1 = ResourcesPlugin.getWorkspace().getRoot().getFile(container.getFullPath().append(new Path("faces-config1.xml"))); //$NON-NLS-1$
+ IFile facesConfigFile2 = ResourcesPlugin.getWorkspace().getRoot().getFile(container.getFullPath().append(new Path("faces-config2.xml"))); //$NON-NLS-1$
+ IFile facesConfigFile3 = ResourcesPlugin.getWorkspace().getRoot().getFile(container.getFullPath().append(new Path("faces-config3.xml"))); //$NON-NLS-1$
+ IFile facesConfigFileExtData = ResourcesPlugin.getWorkspace().getRoot().getFile(container.getFullPath().append(new Path("faces-config-ext-data1.xml"))); //$NON-NLS-1$
+
+
+ IFile facesConfig_1_2File = ResourcesPlugin.getWorkspace().getRoot().getFile(container.getFullPath().append(new Path("faces-config_1_2.xml"))); //$NON-NLS-1$
+ IFile facesConfig_2_0File = ResourcesPlugin.getWorkspace().getRoot().getFile(container.getFullPath().append(new Path("faces-config_2_0.xml"))); //$NON-NLS-1$
+
+ if(facesConfigFile.exists()) {
+ return;
+ }
+
+ final IPath facesConfigPath = new Path("/template/faces-config.xml");
+ final IPath facesConfig1Path = new Path("/template/faces-config1.xml");
+ final IPath facesConfig2Path = new Path("/template/faces-config2.xml");
+ final IPath facesConfig3Path = new Path("/template/faces-config3.xml");
+ final IPath facesConfigExtData1Path = new Path("/template/faces-config-ext-data1.xml");
+ final IPath facesConfig_1_2_Path = new Path("/template/faces-config_1_2.xml");
+ final IPath facesConfig_2_0_Path = new Path("/template/faces-config_2_0.xml");
+
+ final Bundle myBundle = Platform.getBundle("org.eclipse.jst.jsf.facesconfig.tests");
+ // there is no faces-config, so add our starting template
+ try {
+
+ {
+ final String sourcePath = FileLocator.toFileURL(FileLocator.find(myBundle, facesConfigPath,null)).getPath().toString(); //$NON-NLS-1$ //$NON-NLS-2$
+ final File f = new File(sourcePath);
+ final FileInputStream sourceStream = new FileInputStream(f);
+ facesConfigFile.create(sourceStream, true, null);
+ sourceStream.close();
+ }
+ {
+ final String sourcePath1 = FileLocator.toFileURL(FileLocator.find(myBundle,facesConfig1Path,null)).getPath().toString(); //$NON-NLS-1$ //$NON-NLS-2$
+ final File f1 = new File(sourcePath1);
+ final FileInputStream sourceStream1 = new FileInputStream(f1);
+ facesConfigFile1.create(sourceStream1, true, null);
+ sourceStream1.close();
+ }
+ {
+ final String sourcePath2 = FileLocator.toFileURL(FileLocator.find(myBundle, facesConfig2Path,null)).getPath().toString(); //$NON-NLS-1$ //$NON-NLS-2$
+ final File f2 = new File(sourcePath2);
+ final FileInputStream sourceStream2 = new FileInputStream(f2);
+ facesConfigFile2.create(sourceStream2, true, null);
+ sourceStream2.close();
+ }
+ {
+ final String sourcePath3 = FileLocator.toFileURL(FileLocator.find(myBundle, facesConfig3Path,null)).getPath().toString(); //$NON-NLS-1$ //$NON-NLS-2$
+ final File f3 = new File(sourcePath3);
+ final FileInputStream sourceStream3 = new FileInputStream(f3);
+ facesConfigFile3.create(sourceStream3, true, null);
+ sourceStream3.close();
+ }
+
+ {
+ final String sourcePathExtData1 = FileLocator.toFileURL(FileLocator.find(myBundle, facesConfigExtData1Path,null)).getPath().toString(); //$NON-NLS-1$ //$NON-NLS-2$
+ final File fext = new File(sourcePathExtData1);
+ final FileInputStream sourceStreamExt1 = new FileInputStream(fext);
+ facesConfigFileExtData.create(sourceStreamExt1, true, null);
+ sourceStreamExt1.close();
+ }
+
+ {
+ final String sourcePathFacesConfig_1_2 =
+ FileLocator.toFileURL(FileLocator.find(myBundle, facesConfig_1_2_Path,null)).getPath().toString(); //$NON-NLS-1$ //$NON-NLS-2$
+ final File fext = new File(sourcePathFacesConfig_1_2);
+ final FileInputStream sourceStreamExt1 = new FileInputStream(fext);
+ facesConfig_1_2File.create(sourceStreamExt1, true, null);
+ sourceStreamExt1.close();
+ }
+
+ {
+ final String sourcePathFacesConfig_2_0 =
+ FileLocator.toFileURL(FileLocator.find(myBundle, facesConfig_2_0_Path,null)).getPath().toString(); //$NON-NLS-1$ //$NON-NLS-2$
+ final File fext = new File(sourcePathFacesConfig_2_0);
+ final FileInputStream sourceStreamExt2 = new FileInputStream(fext);
+ facesConfig_2_0File.create(sourceStreamExt2, true, null);
+ sourceStreamExt2.close();
+ }
+
+ } catch (IOException ioe) {
+ ioe.printStackTrace(System.err);
+ } catch (CoreException ce) {
+ ce.printStackTrace(System.err);
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/AllWriteTests.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/AllWriteTests.java
new file mode 100644
index 000000000..0cc4c868a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/AllWriteTests.java
@@ -0,0 +1,154 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests.write;
+
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.facesconfig.tests.util.CommonStructuresUtil;
+import org.eclipse.jst.jsf.test.util.ConfigurableTestSuite;
+import org.eclipse.jst.jsf.test.util.ConfigurableTestCase.TestConfiguration;
+
+/**
+ * Wrapper suite for all the tests against the .util package.
+ *
+ * @author spaxton
+ * @author le-ake m. G kristos
+ */
+public class AllWriteTests {
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("FacesConfig Model Write/Read Translation");
+ suite.addTest(Faces_1_1_suite());
+ suite.addTest(Faces_1_2_suite());
+ suite.addTest(Faces_2_0_suite());
+ return suite;
+ }
+
+ private static Test Faces_2_0_suite()
+ {
+ TestConfiguration testConfiguration = new TestConfiguration();
+ testConfiguration.put(BaseWriteTestCase.CONFIG_FILE_KEY, "WEB-INF/faces-config3.xml");
+ testConfiguration.put(BaseWriteTestCase.FACES_VERSION_KEY, IJSFCoreConstants.JSF_VERSION_2_0);
+
+ TestSuite suite =
+ new ConfigurableTestSuite(testConfiguration, "Faces 2.0 Model Tests");
+ suite.addTest(new ConfigurableTestSuite(WriteFacesConfigTestCase_2_0.class, "Write Facesconfig Test"));
+ suite.addTest(new ConfigurableTestSuite(WriteApplicationTestCase_2_0.class, "Write Application Test"));
+ suite.addTest(new ConfigurableTestSuite(WriteFactoryTestCase_2_0.class, "Write Factory Test"));
+ suite.addTest(new ConfigurableTestSuite(WriteManagedBeanTestCase_2_0.class, "Write Managed-bean Test"));
+ suite.addTest(new ConfigurableTestSuite(WriteNavigationRuleTestCase_2_0.class, "Write Navigation Rule Test"));
+ suite.addTest(new ConfigurableTestSuite(WriteRenderKitTestCase_2_0.class, "Write Render-kit Test"));
+
+ Faces_common_suite(suite, testConfiguration);
+
+ return suite;
+ }
+
+ private static Test Faces_1_2_suite()
+ {
+ TestConfiguration testConfiguration = new TestConfiguration();
+ testConfiguration.put(BaseWriteTestCase.CONFIG_FILE_KEY, "WEB-INF/faces-config2.xml");
+ testConfiguration.put(BaseWriteTestCase.FACES_VERSION_KEY, IJSFCoreConstants.JSF_VERSION_1_2);
+
+ TestSuite suite =
+ new ConfigurableTestSuite(testConfiguration, "Faces 1.2 Model Tests");
+ suite.addTest(new ConfigurableTestSuite(
+ WriteApplicationTestCase_1_2.class,
+ "Write application"));
+ suite.addTest(new ConfigurableTestSuite(
+ WriteConverterTestCase_1_2.class,
+ "Write converter Test"));
+ suite.addTest(new ConfigurableTestSuite(
+ WriteFactoryTestCase_1_2.class,
+ "Write factory "));
+ suite.addTest(new ConfigurableTestSuite(
+ WriteLifecycleTestCase_1_2.class,
+ "Write Lifecycle Test"));
+ suite.addTest(new ConfigurableTestSuite(
+ WriteManagedBeanTestCase_1_2.class,
+ "Write Managed-bean Test"));
+ suite.addTest(new ConfigurableTestSuite(
+ WriteNavigationRuleTestCase_1_2.class,
+ "Write navigation rule"));
+ suite.addTest(new ConfigurableTestSuite(
+ WriteRenderKitTestCase_1_2.class,
+ "Write Render-kit Test"));
+ suite.addTest(new ConfigurableTestSuite(
+ WriteValidatorTestCase_1_2.class,
+ "Write Validator Test"));
+ suite.addTest(new ConfigurableTestSuite(
+ FacesConfigExtensionTestCase.class,
+ "Write Facesconfig Extension Test"));
+
+
+ Faces_common_suite(suite, testConfiguration);
+
+ return suite;
+ }
+
+ private static Test Faces_1_1_suite()
+ {
+ TestConfiguration testConfiguration = new TestConfiguration();
+ testConfiguration.put(BaseWriteTestCase.CONFIG_FILE_KEY, "WEB-INF/faces-config1.xml");
+ testConfiguration.put(BaseWriteTestCase.FACES_VERSION_KEY, IJSFCoreConstants.JSF_VERSION_1_1);
+
+ TestSuite suite =
+ new ConfigurableTestSuite(testConfiguration, "Faces 1.1 Model Tests");
+
+ suite.addTest(new ConfigurableTestSuite(
+ WriteApplicationTestCase.class,
+ "Write application"));
+ suite.addTest(new ConfigurableTestSuite(
+ WriteConverterTestCase.class,
+ "Write converter Test"));
+ suite.addTest(new ConfigurableTestSuite(
+ WriteFactoryTestCase.class,
+ "Write factory "));
+ suite.addTest(new ConfigurableTestSuite(
+ WriteLifecycleTestCase.class,
+ "Write Lifecycle Test"));
+ suite.addTest(new ConfigurableTestSuite(
+ WriteManagedBeanTestCase.class,
+ "Write Managed-bean Test"));
+ suite.addTest(new ConfigurableTestSuite(
+ WriteNavigationRuleTestCase.class,
+ "Write navigation rule "));
+ suite.addTest(new ConfigurableTestSuite(
+ WriteRenderKitTestCase.class,
+ "Write Render-kit Test"));
+ suite.addTest(new ConfigurableTestSuite(
+ WriteValidatorTestCase.class,
+ "Write Validator Test"));
+ Faces_common_suite(suite, testConfiguration);
+
+ return suite;
+ }
+
+ private static void Faces_common_suite(TestSuite suite, TestConfiguration configuration)
+ {
+ suite.addTest(new ConfigurableTestSuite(
+ CommonStructuresUtil.class,
+ "Sanity Test"));
+ suite.addTest(new ConfigurableTestSuite(
+ WriteComponentTestCase.class,
+ "Write Component Test"));
+ suite.addTest(new ConfigurableTestSuite(
+ WriteReferencedBeanTestCase.class,
+ "Write ReferencedBean Test"));
+ suite.addTest(new ConfigurableTestSuite(
+ WriteComponentExtensionDataTestCase.class,
+ "Write Component Extension Data"));
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/BaseWriteTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/BaseWriteTestCase.java
new file mode 100644
index 000000000..285e84513
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/BaseWriteTestCase.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * 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.facesconfig.tests.write;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jst.jsf.facesconfig.emf.DynamicElement;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.tests.util.WizardUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+import org.eclipse.jst.jsf.test.util.ConfigurableTestCase;
+import org.eclipse.jst.jsf.test.util.JSFTestUtil;
+
+public class BaseWriteTestCase extends ConfigurableTestCase
+{
+ final static String CONFIG_FILE_KEY = "config-file-key";
+ final static String FACES_VERSION_KEY = "faces-version-key";
+
+ protected IProject project;
+ protected String _facesConfigFile;
+ protected String _facesVersion;
+
+ public BaseWriteTestCase(String name)
+ {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ initialize(_testConfiguration);
+
+ JSFTestUtil.setValidationEnabled(false);
+ JSFTestUtil.setInternetProxyPreferences(true, "www-proxy.uk.oracle.com", "80");
+
+ WizardUtil.createProject(getName());
+ project = WizardUtil.getTestProject(getName());
+ }
+
+ protected FacesConfigArtifactEdit getArtifactEditForRead()
+ {
+ FacesConfigArtifactEdit edit = FacesConfigArtifactEdit
+ .getFacesConfigArtifactEditForRead(project, _facesConfigFile);
+ assertNotNull(edit);
+ return edit;
+ }
+
+ protected FacesConfigArtifactEdit getArtifactEditForWrite()
+ {
+ FacesConfigArtifactEdit edit = FacesConfigArtifactEdit
+ .getFacesConfigArtifactEditForWrite(project, _facesConfigFile);
+ assertNotNull(edit);
+ return edit;
+ }
+
+ protected void initialize(TestConfiguration testConfiguration)
+ {
+ if (_testConfiguration != null)
+ {
+ _facesConfigFile = _testConfiguration.get(CONFIG_FILE_KEY);
+ assertNotNull(_facesConfigFile);
+ _facesVersion = _testConfiguration.get(FACES_VERSION_KEY);
+ assertNotNull(_facesVersion);
+ }
+ }
+
+ protected DynamicElement createDynamicElement(String name)
+ {
+ DynamicElement element =
+ FacesConfigFactory.eINSTANCE.createDynamicElement();
+ element.setName(name);
+ return element;
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/FacesConfigExtensionTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/FacesConfigExtensionTestCase.java
new file mode 100644
index 000000000..f886d1f5c
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/FacesConfigExtensionTestCase.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * 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.facesconfig.tests.write;
+
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.facesconfig.emf.DynamicElement;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigExtensionType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.CommonStructuresUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class FacesConfigExtensionTestCase extends BaseWriteTestCase {
+ private static final String FACES_CONFIG = "faces-config";
+
+ private final static String FACES_CONFIG_EXTENSION = CommonStructuresUtil
+ .createPreficedString(FACES_CONFIG, "extension");
+ private final static String FACES_CONFIG_EXTENSION_ID = CommonStructuresUtil
+ .createPreficedString(FACES_CONFIG_EXTENSION, "id");
+ private final static String FACES_CONFIG_EXTENSION_TAG = CommonStructuresUtil
+ .createPreficedString(FACES_CONFIG_EXTENSION, "tag");
+
+ public FacesConfigExtensionTestCase(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ // test should not be used with 1.1
+ assertNotSame(IJSFCoreConstants.JSF_VERSION_1_1, _facesVersion);
+ }
+
+ public void testFacesConfigExtension() {
+ FacesConfigArtifactEdit edit = null;
+
+ try {
+ edit = getArtifactEditForWrite();
+ assertNotNull(edit.getFacesConfig());
+ FacesConfigPackage facesConfigPackage = FacesConfigPackage.eINSTANCE;
+ FacesConfigFactory facesConfigFactory = facesConfigPackage
+ .getFacesConfigFactory();
+
+ FacesConfigType facesConfigType = edit.getFacesConfig();
+
+ FacesConfigExtensionType extensionType = facesConfigFactory
+ .createFacesConfigExtensionType();
+ extensionType.setId(FACES_CONFIG_EXTENSION_ID);
+
+ extensionType.getChildNodes().add(
+ createDynamicElement(FACES_CONFIG_EXTENSION_TAG));
+
+ facesConfigType.getFacesConfigExtension().add(extensionType);
+
+ edit.save(null);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ assertTrue(edit.isDisposed());
+ edit = null;
+ }
+ }
+
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ FacesConfigType facesConfig = edit.getFacesConfig();
+
+ assertEquals(1, facesConfig.getFacesConfigExtension().size());
+ FacesConfigExtensionType extensionType = (FacesConfigExtensionType) facesConfig
+ .getFacesConfigExtension().get(0);
+ assertEquals(FACES_CONFIG_EXTENSION_ID, extensionType.getId());
+
+ assertEquals(1, extensionType.getChildNodes().size());
+ DynamicElement element = (DynamicElement) extensionType
+ .getChildNodes().get(0);
+ assertEquals(FACES_CONFIG_EXTENSION_TAG, element.getName());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteApplicationTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteApplicationTestCase.java
new file mode 100644
index 000000000..8f3c7e5b1
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteApplicationTestCase.java
@@ -0,0 +1,200 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests.write;
+
+import org.eclipse.jst.jsf.facesconfig.emf.ActionListenerType;
+import org.eclipse.jst.jsf.facesconfig.emf.ApplicationType;
+import org.eclipse.jst.jsf.facesconfig.emf.DefaultLocaleType;
+import org.eclipse.jst.jsf.facesconfig.emf.DefaultRenderKitIdType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
+import org.eclipse.jst.jsf.facesconfig.emf.LocaleConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.MessageBundleType;
+import org.eclipse.jst.jsf.facesconfig.emf.NavigationHandlerType;
+import org.eclipse.jst.jsf.facesconfig.emf.PropertyResolverType;
+import org.eclipse.jst.jsf.facesconfig.emf.StateManagerType;
+import org.eclipse.jst.jsf.facesconfig.emf.SupportedLocaleType;
+import org.eclipse.jst.jsf.facesconfig.emf.VariableResolverType;
+import org.eclipse.jst.jsf.facesconfig.emf.ViewHandlerType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+/*
+ * This class is used to test wether the writing into the faces-config.xml file
+ * is being done propertly and the outputs are as expected
+ *
+ */
+public class WriteApplicationTestCase extends BaseWriteTestCase {
+ private static final String SUPPORTED_LOCALE_TYPE = "supported-locale-type";
+
+ private static final String DEFAULT_LOCALE = "default-locale";
+
+ private final static String actionListener = "action-listener";
+ private final static String variableResolver = "variable-resolver";
+ private final static String defaultRenderKitId = "default-render-kit-id";
+ private final static String messageBundle = "message-bundle";
+ private final static String navigationHandler = "navigation-handler";
+ private final static String viewHandler = "view-handler";
+ private final static String stateManager = "state-manager";
+ private final static String propertyResolver = "property-resolver";
+
+ private final static String APPLICATION_ID = "application-id";
+
+ public WriteApplicationTestCase(String name) {
+ super(name);
+ }
+
+ /*
+ * Do the writing here to all the attributes
+ *
+ */
+ public void testWriteApplication() {
+ FacesConfigArtifactEdit edit = null;
+
+ try {
+ edit = getArtifactEditForWrite();
+
+ assertNotNull(edit.getFacesConfig());
+
+ FacesConfigPackage facesConfigPackage = FacesConfigPackage.eINSTANCE;
+ FacesConfigFactory facesConfigFactory = facesConfigPackage
+ .getFacesConfigFactory();
+
+ ApplicationType newApplication = facesConfigFactory
+ .createApplicationType();
+ newApplication.setId(APPLICATION_ID);
+
+ ActionListenerType actionList = facesConfigFactory
+ .createActionListenerType();
+ actionList.setTextContent(actionListener);
+ newApplication.getActionListener().add(actionList);
+
+ VariableResolverType variableResolverType = facesConfigFactory
+ .createVariableResolverType();
+ variableResolverType.setTextContent(variableResolver);
+ newApplication.getVariableResolver().add(variableResolverType);
+
+ DefaultRenderKitIdType renderKitIdType = facesConfigFactory
+ .createDefaultRenderKitIdType();
+ renderKitIdType.setTextContent(defaultRenderKitId);
+ newApplication.getDefaultRenderKitId().add(renderKitIdType);
+
+ MessageBundleType messageBundleType = facesConfigFactory
+ .createMessageBundleType();
+ messageBundleType.setTextContent(messageBundle);
+ newApplication.getMessageBundle().add(messageBundleType);
+
+ NavigationHandlerType navigationHandlerType = facesConfigFactory
+ .createNavigationHandlerType();
+ navigationHandlerType.setTextContent(navigationHandler);
+ newApplication.getNavigationHandler().add(navigationHandlerType);
+
+ ViewHandlerType viewHandlerType = facesConfigFactory
+ .createViewHandlerType();
+ viewHandlerType.setTextContent(viewHandler);
+ newApplication.getViewHandler().add(viewHandlerType);
+
+ StateManagerType stateManagerType = facesConfigFactory
+ .createStateManagerType();
+ stateManagerType.setTextContent(stateManager);
+ newApplication.getStateManager().add(stateManagerType);
+
+ PropertyResolverType propertyResolverType = facesConfigFactory
+ .createPropertyResolverType();
+ propertyResolverType.setTextContent(propertyResolver);
+ newApplication.getPropertyResolver().add(propertyResolverType);
+
+ LocaleConfigType localConfigType = facesConfigFactory
+ .createLocaleConfigType();
+ DefaultLocaleType defaultLocaleType = facesConfigFactory
+ .createDefaultLocaleType();
+ defaultLocaleType.setTextContent(DEFAULT_LOCALE);
+ localConfigType.setDefaultLocale(defaultLocaleType);
+
+ SupportedLocaleType supportedLocalType = facesConfigFactory
+ .createSupportedLocaleType();
+ supportedLocalType.setTextContent(SUPPORTED_LOCALE_TYPE);
+ localConfigType.getSupportedLocale().add(supportedLocalType);
+
+ newApplication.getLocaleConfig().add(localConfigType);
+
+ edit.getFacesConfig().getApplication().add(newApplication);
+ edit.save(null);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ // assert that the file has been disposed
+ assertTrue(edit.isDisposed());
+ edit = null;
+ }
+ }
+
+ // now read back the file
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ ApplicationType application =
+ (ApplicationType) FacesConfigModelUtil
+ .findEObjectElementById(edit.getFacesConfig().getApplication(), APPLICATION_ID);
+
+ assertEquals(1, application.getActionListener().size());
+ assertEquals(actionListener, ((ActionListenerType) application
+ .getActionListener().get(0)).getTextContent());
+
+ assertEquals(1, application.getVariableResolver().size());
+ assertEquals(variableResolver, ((VariableResolverType) application
+ .getVariableResolver().get(0)).getTextContent());
+
+ assertEquals(1, application.getDefaultRenderKitId().size());
+ assertEquals(defaultRenderKitId,
+ ((DefaultRenderKitIdType) application
+ .getDefaultRenderKitId().get(0)).getTextContent());
+
+ assertEquals(1, application.getMessageBundle().size());
+ assertEquals(messageBundle, ((MessageBundleType) application
+ .getMessageBundle().get(0)).getTextContent());
+
+ assertEquals(1, application.getNavigationHandler().size());
+ assertEquals(navigationHandler,
+ ((NavigationHandlerType) application.getNavigationHandler()
+ .get(0)).getTextContent());
+
+ assertEquals(1, application.getViewHandler().size());
+ assertEquals(viewHandler, ((ViewHandlerType) application
+ .getViewHandler().get(0)).getTextContent());
+
+ assertEquals(1, application.getStateManager().size());
+ assertEquals(stateManager, ((StateManagerType) application
+ .getStateManager().get(0)).getTextContent());
+
+ assertEquals(1, application.getPropertyResolver().size());
+ assertEquals(propertyResolver, ((PropertyResolverType) application
+ .getPropertyResolver().get(0)).getTextContent());
+
+ assertEquals(1, application.getLocaleConfig().size());
+ LocaleConfigType localConfigType = (LocaleConfigType) application
+ .getLocaleConfig().get(0);
+
+ assertEquals(DEFAULT_LOCALE, localConfigType.getDefaultLocale()
+ .getTextContent());
+ assertEquals(1, localConfigType.getSupportedLocale().size());
+
+ assertEquals(SUPPORTED_LOCALE_TYPE,
+ ((SupportedLocaleType) localConfigType.getSupportedLocale()
+ .get(0)).getTextContent());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteApplicationTestCase_1_2.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteApplicationTestCase_1_2.java
new file mode 100644
index 000000000..2025b6ce8
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteApplicationTestCase_1_2.java
@@ -0,0 +1,191 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2006 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.facesconfig.tests.write;
+
+import org.eclipse.jst.jsf.facesconfig.emf.ApplicationExtensionType;
+import org.eclipse.jst.jsf.facesconfig.emf.ApplicationType;
+import org.eclipse.jst.jsf.facesconfig.emf.BaseNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.DynamicElement;
+import org.eclipse.jst.jsf.facesconfig.emf.ELResolverType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.emf.ResourceBundleType;
+import org.eclipse.jst.jsf.facesconfig.emf.VarType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.CommonStructuresUtil;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class WriteApplicationTestCase_1_2 extends WriteApplicationTestCase
+{
+ protected final static String APPLICATION_ID_1_2 = "application-id-1_2";
+ protected final static String EL_RESOLVER = "org.test.MyELResolver";
+ protected final static String RESOURCE_BUNDLE = "resourceBundle";
+ protected final static String BASE_NAME = "baseName";
+ protected final static String VAR = "varX";
+ protected final static String APPLICATION_EXTENSION = "application-extension";
+
+ public WriteApplicationTestCase_1_2(String name)
+ {
+ super(name);
+ }
+
+ public void test12Features()
+ {
+ FacesConfigArtifactEdit edit = null;
+
+ try
+ {
+ edit = getArtifactEditForWrite();
+
+ assertNotNull(edit.getFacesConfig());
+
+ FacesConfigPackage facesConfigPackage = FacesConfigPackage.eINSTANCE;
+ FacesConfigFactory facesConfigFactory = facesConfigPackage
+ .getFacesConfigFactory();
+
+ ApplicationType newApplication = facesConfigFactory
+ .createApplicationType();
+ newApplication.setId(APPLICATION_ID_1_2);
+
+ ELResolverType elResolver = facesConfigFactory.createELResolverType();
+ elResolver.setId(CommonStructuresUtil.createPreficedString(EL_RESOLVER, "id"));
+ elResolver.setTextContent(EL_RESOLVER);
+
+ newApplication.getELResolver().add(elResolver);
+
+ ResourceBundleType resourceBundle =
+ facesConfigFactory.createResourceBundleType();
+
+ resourceBundle.getDescription().add(
+ CommonStructuresUtil.createDescription(RESOURCE_BUNDLE));
+ resourceBundle.getDisplayName().add(
+ CommonStructuresUtil.createDisplayName(RESOURCE_BUNDLE));
+ resourceBundle.getIcon().add(
+ CommonStructuresUtil.createIcon(RESOURCE_BUNDLE));
+
+ {
+ BaseNameType baseNameType = facesConfigFactory.createBaseNameType();
+ baseNameType.setId(CommonStructuresUtil.createPreficedString(BASE_NAME, "id"));
+ baseNameType.setTextContent(BASE_NAME);
+ resourceBundle.setBaseName(baseNameType);
+ }
+
+ {
+ VarType varType = facesConfigFactory.createVarType();
+ varType.setId(CommonStructuresUtil.createPreficedString(VAR, "id"));
+ varType.setTextContent(VAR);
+ resourceBundle.setVar(varType);
+ }
+ resourceBundle.setId(CommonStructuresUtil.createPreficedString(RESOURCE_BUNDLE, "id"));
+ newApplication.getResourceBundle().add(resourceBundle);
+
+ ApplicationExtensionType appExt =
+ facesConfigFactory.createApplicationExtensionType();
+ appExt.setId(
+ CommonStructuresUtil.createPreficedString(APPLICATION_EXTENSION, "id"));
+
+ DynamicElement element = createDynamicElement(
+ CommonStructuresUtil.createPreficedString(APPLICATION_EXTENSION, "tag"));
+ appExt.getChildNodes().add(element);
+ newApplication.getApplicationExtension().add(appExt);
+
+ edit.getFacesConfig().getApplication().add(newApplication);
+ edit.save(null);
+ }
+ finally
+ {
+ if (edit != null) {
+ edit.dispose();
+ // assert that the file has been disposed
+ assertTrue(edit.isDisposed());
+ edit = null;
+ }
+ }
+
+ // now read back the file
+ try
+ {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+// assertEquals(1, edit.getFacesConfig().getApplication().size());
+ ApplicationType application =
+ (ApplicationType) FacesConfigModelUtil
+ .findEObjectElementById(edit.getFacesConfig().getApplication(), APPLICATION_ID_1_2);
+ assertNotNull(application);
+
+ assertEquals(1, application.getELResolver().size());
+ ELResolverType elResolver = (ELResolverType) application .getELResolver().get(0);
+ assertEquals(CommonStructuresUtil.createPreficedString(EL_RESOLVER, "id"),
+ elResolver.getId());
+ assertEquals(EL_RESOLVER, elResolver.getTextContent());
+
+ assertEquals(1, application.getResourceBundle().size());
+ ResourceBundleType resourceBundle =
+ (ResourceBundleType) application.getResourceBundle().get(0);
+
+ assertEquals(1, resourceBundle.getDescription().size());
+ CommonStructuresUtil.assertMatchesDescription
+ (RESOURCE_BUNDLE, (DescriptionType) resourceBundle.getDescription().get(0));
+
+ assertEquals(1, resourceBundle.getDisplayName().size());
+ CommonStructuresUtil.assertMatchesDisplayName
+ (RESOURCE_BUNDLE, (DisplayNameType) resourceBundle.getDisplayName().get(0));
+
+ assertEquals(1, resourceBundle.getIcon().size());
+ CommonStructuresUtil.assertMatchesIcon
+ (RESOURCE_BUNDLE, (IconType) resourceBundle.getIcon().get(0));
+
+ {
+ BaseNameType baseNameType = resourceBundle.getBaseName();
+ assertEquals(CommonStructuresUtil.createPreficedString(BASE_NAME, "id"),
+ baseNameType.getId());
+ assertEquals(BASE_NAME, baseNameType.getTextContent());
+ }
+
+ {
+ VarType varType = resourceBundle.getVar();
+ assertEquals(CommonStructuresUtil.createPreficedString(VAR, "id"),
+ varType.getId());
+ assertEquals(VAR, varType.getTextContent());
+
+ }
+ assertEquals(CommonStructuresUtil.createPreficedString(RESOURCE_BUNDLE, "id"),
+ resourceBundle.getId());
+
+ ApplicationExtensionType appExt =
+ (ApplicationExtensionType) FacesConfigModelUtil
+ .findEObjectElementById(application.getApplicationExtension()
+ , CommonStructuresUtil.createPreficedString(APPLICATION_EXTENSION, "id"));
+
+ assertEquals(1, appExt.getChildNodes().size());
+ DynamicElement element =
+ (DynamicElement) appExt.getChildNodes().get(0);
+ assertEquals(CommonStructuresUtil.createPreficedString(APPLICATION_EXTENSION, "tag")
+ ,element.getName());
+ }
+ finally
+ {
+ if (edit != null)
+ {
+ edit.dispose();
+ }
+ }
+ }
+
+// private ApplicationType getApplication(FacesConfigType facesConfig)
+// {
+// FacesConfigModelUtil
+// }
+}
+
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteApplicationTestCase_2_0.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteApplicationTestCase_2_0.java
new file mode 100644
index 000000000..49f8a704b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteApplicationTestCase_2_0.java
@@ -0,0 +1,154 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2006 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.facesconfig.tests.write;
+
+import org.eclipse.jst.jsf.facesconfig.emf.ApplicationType;
+import org.eclipse.jst.jsf.facesconfig.emf.DefaultValidatorsType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
+import org.eclipse.jst.jsf.facesconfig.emf.ResourceHandlerType;
+import org.eclipse.jst.jsf.facesconfig.emf.SourceClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.SystemEventClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.SystemEventListenerClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.SystemEventListenerType;
+import org.eclipse.jst.jsf.facesconfig.emf.ValidatorIdType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+
+public class WriteApplicationTestCase_2_0 extends WriteApplicationTestCase_1_2
+{
+ private final static String APPLICATION_ID_2_0 = "application-id-2_0";
+// private final static String PARTIAL_TRAVERSAL = "partial-traversal";
+ private final static String RESOURCE_HANDLER = "resource-handler";
+ private final static String SYSTEM_EVENT_LISTENER = "system-event-listener";
+ private final static String SYSTEM_EVENT_LISTENER_CLASS = "system-event-listener-class";
+ private final static String SYSTEM_EVENT_CLASS = "system-event-class";
+ private final static String SOURCE_CLASS = "source-class";
+ private final static String DEFAULT_VALIDATORS="default-validators";
+ private final static String VALIDATOR_ID="validator-id";
+
+ public WriteApplicationTestCase_2_0(String name)
+ {
+ super(name);
+ }
+
+ public void testApplication20()
+ {
+ FacesConfigArtifactEdit edit = null;
+
+ try {
+ edit = getArtifactEditForWrite();
+
+ assertNotNull(edit.getFacesConfig());
+
+ FacesConfigPackage facesConfigPackage = FacesConfigPackage.eINSTANCE;
+ FacesConfigFactory facesConfigFactory = facesConfigPackage
+ .getFacesConfigFactory();
+
+ ApplicationType newApplication = facesConfigFactory
+ .createApplicationType();
+ newApplication.setId(APPLICATION_ID_2_0);
+
+// PartialTraversalType partialTraversal = facesConfigFactory.createPartialTraversalType();
+// partialTraversal.setTextContent(PARTIAL_TRAVERSAL);
+// newApplication.getPartialTraversal().add(partialTraversal);
+
+ ResourceHandlerType resourceHandlerType = facesConfigFactory.createResourceHandlerType();
+ resourceHandlerType.setTextContent(RESOURCE_HANDLER);
+ newApplication.getResourceHandler().add(resourceHandlerType);
+
+ SystemEventListenerType systemEventListener = facesConfigFactory.createSystemEventListenerType();
+ systemEventListener.setId(SYSTEM_EVENT_LISTENER);
+ newApplication.getSystemEventListener().add(systemEventListener);
+ SystemEventListenerClassType systemEventListenerClass = facesConfigFactory.createSystemEventListenerClassType();
+ systemEventListenerClass.setTextContent(SYSTEM_EVENT_LISTENER_CLASS);
+ systemEventListener.setSystemEventListenerClass(systemEventListenerClass);
+ SystemEventClassType systemEventClass = facesConfigFactory.createSystemEventClassType();
+ systemEventClass.setTextContent(SYSTEM_EVENT_CLASS);
+ systemEventListener.setSystemEventClass(systemEventClass);
+ SourceClassType sourceClass = facesConfigFactory.createSourceClassType();
+ sourceClass.setTextContent(SOURCE_CLASS);
+ systemEventListener.setSourceClass(sourceClass);
+
+ DefaultValidatorsType defaultValidators = facesConfigFactory.createDefaultValidatorsType();
+ defaultValidators.setId(DEFAULT_VALIDATORS);
+ newApplication.getDefaultValidators().add(defaultValidators);
+ ValidatorIdType validatorId = facesConfigFactory.createValidatorIdType();
+ validatorId.setTextContent(VALIDATOR_ID);
+ defaultValidators.getValidatorId().add(validatorId);
+
+ edit.getFacesConfig().getApplication().add(newApplication);
+ edit.save(null);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ // assert that the file has been disposed
+ assertTrue(edit.isDisposed());
+ edit = null;
+ }
+ }
+
+ // now read back the file
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ ApplicationType application =
+ (ApplicationType) FacesConfigModelUtil
+ .findEObjectElementById(edit.getFacesConfig().getApplication(), APPLICATION_ID_2_0);
+
+// assertEquals(1, application.getPartialTraversal().size());
+// assertEquals(PARTIAL_TRAVERSAL, ((PartialTraversalType) application
+// .getPartialTraversal().get(0)).getTextContent());
+
+ assertEquals(1, application.getResourceHandler().size());
+ assertEquals(RESOURCE_HANDLER, ((ResourceHandlerType) application
+ .getResourceHandler().get(0)).getTextContent());
+
+ assertEquals(1, application.getSystemEventListener().size());
+ SystemEventListenerType systemEventListener = ((SystemEventListenerType) application
+ .getSystemEventListener().get(0));
+ assertEquals(SYSTEM_EVENT_LISTENER, systemEventListener.getId());
+// assertEquals(1, systemEventListener.getSystemEventListenerClass().size());
+// assertEquals(SYSTEM_EVENT_LISTENER_CLASS, ((SystemEventListenerClassType) systemEventListener
+// .getSystemEventListenerClass().get(0)).getTextContent());
+
+ assertEquals(SYSTEM_EVENT_LISTENER_CLASS,systemEventListener
+ .getSystemEventListenerClass().getTextContent());
+
+// assertEquals(1, systemEventListener.getSystemEventClass().size());
+// assertEquals(SYSTEM_EVENT_CLASS, ((SystemEventClassType) systemEventListener
+// .getSystemEventClass().get(0)).getTextContent());
+ assertEquals(SYSTEM_EVENT_CLASS, systemEventListener
+ .getSystemEventClass().getTextContent());
+
+// assertEquals(1, systemEventListener.getSourceClass().size());
+// assertEquals(SOURCE_CLASS, ((SourceClassType) systemEventListener
+// .getSourceClass().get(0)).getTextContent());
+
+ assertEquals(SOURCE_CLASS, systemEventListener
+ .getSourceClass().getTextContent());
+
+ assertEquals(1, application.getDefaultValidators().size());
+ DefaultValidatorsType defaultValidators = (DefaultValidatorsType)application.getDefaultValidators().get(0);
+ assertEquals(DEFAULT_VALIDATORS, defaultValidators.getId());
+ assertEquals(1, defaultValidators.getValidatorId().size());
+ assertEquals(VALIDATOR_ID, ((ValidatorIdType)defaultValidators.getValidatorId().get(0)).getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+}
+
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteComponentExtensionDataTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteComponentExtensionDataTestCase.java
new file mode 100644
index 000000000..7bccd9f70
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteComponentExtensionDataTestCase.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2006 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.facesconfig.tests.write;
+
+import org.eclipse.jst.jsf.facesconfig.emf.ComponentClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.ComponentType;
+import org.eclipse.jst.jsf.facesconfig.emf.ComponentTypeType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
+import org.eclipse.jst.jsf.facesconfig.tests.util.CommonStructuresUtil;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class WriteComponentExtensionDataTestCase extends BaseWriteTestCase {
+ private static final String COMPONENT_ID = "component1";
+
+ private static final String COMPONENT_CLASS = "component-class";
+
+ private static final String COMPONENT_TYPE = "component-type";
+
+ public WriteComponentExtensionDataTestCase(String name) {
+ super(name);
+ }
+
+
+ public void testWriteExtensionData()
+ {
+ FacesConfigArtifactEdit edit = null;
+ try
+ {
+ edit = FacesConfigArtifactEdit
+ .getFacesConfigArtifactEditForWrite(project, "WEB-INF/faces-config-ext-data1.xml");
+ assertNotNull(edit);
+ assertNotNull(edit.getFacesConfig());
+ FacesConfigPackage facesConfigPackage = FacesConfigPackage.eINSTANCE;
+ FacesConfigFactory facesConfigFactory = facesConfigPackage
+ .getFacesConfigFactory();
+
+ ComponentType newComponent =
+ (ComponentType) FacesConfigModelUtil
+ .findEObjectElementById(edit.getFacesConfig()
+ .getComponent(), COMPONENT_ID);
+
+ {
+ ComponentTypeType componentTypeType = facesConfigFactory.createComponentTypeType();
+ componentTypeType.setTextContent(COMPONENT_TYPE);
+ componentTypeType.setId(CommonStructuresUtil.createPreficedString(COMPONENT_TYPE
+ , CommonStructuresUtil.ID));
+ newComponent.setComponentType(componentTypeType);
+ }
+
+ {
+ ComponentClassType componentClassType = facesConfigFactory.createComponentClassType();
+ componentClassType.setTextContent(COMPONENT_CLASS);
+ componentClassType.setId(CommonStructuresUtil.createPreficedString(COMPONENT_CLASS
+ , CommonStructuresUtil.ID));
+ newComponent.setComponentClass(componentClassType);
+ }
+
+// ComponentExtensionType extType =
+// facesConfigFactory.createComponentExtensionType();
+// extType.setId(CommonStructuresUtil.createPreficedString(COMPONENT, "extension-id"));
+//
+// DynamicElement singleRoot = facesConfigFactory.createDynamicElement();
+// singleRoot.setName("any-data");
+// DynamicAttribute attribute = facesConfigFactory.createDynamicAttribute();
+// attribute.setName("some-attribute");
+// attribute.setValue("some-value");
+// singleRoot.getAttributes().add(attribute);
+//
+// DynamicElement firstChild = facesConfigFactory.createDynamicElement();
+// firstChild.setName("first-child");
+// singleRoot.getChildNodes().add(firstChild);
+//
+// DynamicElement secondChild =
+// facesConfigFactory.createDynamicElement();
+// secondChild.setName("second-child");
+// //secondChild.setTextContent("secondChild text content");
+// singleRoot.getChildNodes().add(secondChild);
+// extType.getChildNodes().add(singleRoot);
+// newComponent.getComponentExtension().add(extType);
+
+ edit.getFacesConfig().getComponent().add(newComponent);
+ edit.save(null);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ assertTrue(edit.isDisposed());
+ edit = null;
+ }
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteComponentTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteComponentTestCase.java
new file mode 100644
index 000000000..2cf30b863
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteComponentTestCase.java
@@ -0,0 +1,169 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests.write;
+
+import org.eclipse.jst.jsf.facesconfig.emf.AttributeType;
+import org.eclipse.jst.jsf.facesconfig.emf.ComponentClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.ComponentExtensionType;
+import org.eclipse.jst.jsf.facesconfig.emf.ComponentType;
+import org.eclipse.jst.jsf.facesconfig.emf.ComponentTypeType;
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.DynamicElement;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
+import org.eclipse.jst.jsf.facesconfig.emf.FacetType;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.emf.PropertyType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.CommonStructuresUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+
+public class WriteComponentTestCase extends BaseWriteTestCase {
+
+ private static final String COMPONENT = "component";
+
+ private static final String COMPONENT_CLASS = "component-class";
+
+ private static final String COMPONENT_TYPE = "component-type";
+
+ public WriteComponentTestCase(String name) {
+ super(name);
+ }
+
+ public void testWriteComponent() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForWrite();
+ assertNotNull(edit.getFacesConfig());
+ FacesConfigPackage facesConfigPackage = FacesConfigPackage.eINSTANCE;
+ FacesConfigFactory facesConfigFactory = facesConfigPackage
+ .getFacesConfigFactory();
+
+ ComponentType newComponent = facesConfigFactory
+ .createComponentType();
+
+ newComponent.getDescription().add(CommonStructuresUtil.createDescription(COMPONENT));
+ newComponent.getDisplayName().add(CommonStructuresUtil.createDisplayName(COMPONENT));
+ newComponent.getIcon().add(CommonStructuresUtil.createIcon(COMPONENT));
+
+ {
+ ComponentTypeType componentTypeType = facesConfigFactory.createComponentTypeType();
+ componentTypeType.setTextContent(COMPONENT_TYPE);
+ componentTypeType.setId(CommonStructuresUtil.createPreficedString(COMPONENT_TYPE
+ , CommonStructuresUtil.ID));
+ newComponent.setComponentType(componentTypeType);
+ }
+
+ {
+ ComponentClassType componentClassType = facesConfigFactory.createComponentClassType();
+ componentClassType.setTextContent(COMPONENT_CLASS);
+ componentClassType.setId(CommonStructuresUtil.createPreficedString(COMPONENT_CLASS
+ , CommonStructuresUtil.ID));
+ newComponent.setComponentClass(componentClassType);
+ }
+
+ // attributes
+ newComponent.getAttribute().add(CommonStructuresUtil.createAttribute(COMPONENT));
+
+ // property section
+ newComponent.getProperty().add(CommonStructuresUtil.createProperty(COMPONENT));
+
+ // facets
+ newComponent.getFacet().add(CommonStructuresUtil.createFacet(COMPONENT));
+
+ // component-extension
+ ComponentExtensionType ext =
+ facesConfigFactory.createComponentExtensionType();
+
+ DynamicElement element = facesConfigFactory.createDynamicElement();
+ element.setName("some-meta-data");
+ ext.getChildNodes().add(element);
+ newComponent.getComponentExtension().add(ext);
+
+ edit.getFacesConfig().getComponent().add(newComponent);
+ edit.save(null);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ assertTrue(edit.isDisposed());
+ edit = null;
+ }
+ }
+
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ assertEquals(1, edit.getFacesConfig().getComponent().size());
+
+ final ComponentType component =
+ (ComponentType) edit.getFacesConfig().getComponent().get(0);
+
+ assertEquals(1, component.getDescription().size());
+ CommonStructuresUtil.assertMatchesDescription
+ (COMPONENT, (DescriptionType) component.getDescription().get(0));
+
+ assertEquals(1, component.getDisplayName().size());
+ CommonStructuresUtil.assertMatchesDisplayName
+ (COMPONENT, (DisplayNameType)component.getDisplayName().get(0));
+
+ assertEquals(1, component.getIcon().size());
+ CommonStructuresUtil.assertMatchesIcon
+ (COMPONENT, (IconType)component.getIcon().get(0));
+ {
+ ComponentTypeType componentTypeType = component.getComponentType();
+ assertEquals(COMPONENT_TYPE
+ , componentTypeType.getTextContent());
+ assertEquals(CommonStructuresUtil.createPreficedString(COMPONENT_TYPE
+ , CommonStructuresUtil.ID)
+ , componentTypeType.getId());
+ }
+
+ {
+ ComponentClassType componentClassType = component.getComponentClass();
+ assertEquals(COMPONENT_CLASS
+ , componentClassType.getTextContent());
+ assertEquals(CommonStructuresUtil.createPreficedString(COMPONENT_CLASS
+ , CommonStructuresUtil.ID)
+ , componentClassType.getId());
+ }
+
+ assertEquals(1, component.getAttribute().size());
+ CommonStructuresUtil.assertMatchAttribute(COMPONENT
+ ,(AttributeType) component.getAttribute().get(0));
+
+ assertEquals(1, component.getProperty().size());
+ CommonStructuresUtil.assertMatchProperty(COMPONENT
+ ,(PropertyType) component.getProperty().get(0));
+
+ assertEquals(1, component.getFacet().size());
+ CommonStructuresUtil.assertMatchFacet(COMPONENT
+ ,(FacetType) component.getFacet().get(0));
+
+ // component-extension
+ assertEquals(1, component.getComponentExtension().size());
+ ComponentExtensionType ext =
+ (ComponentExtensionType) component.getComponentExtension().get(0);
+
+ assertEquals(1, ext.getChildNodes().size());
+ DynamicElement element =
+ (DynamicElement)ext.getChildNodes().get(0);
+ assertEquals("some-meta-data", element.getName());
+
+ } finally {
+
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteConverterTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteConverterTestCase.java
new file mode 100644
index 000000000..70094188d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteConverterTestCase.java
@@ -0,0 +1,146 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests.write;
+
+import org.eclipse.jst.jsf.facesconfig.emf.ConverterClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.ConverterForClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.ConverterIdType;
+import org.eclipse.jst.jsf.facesconfig.emf.ConverterType;
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.CommonStructuresUtil;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class WriteConverterTestCase extends BaseWriteTestCase {
+ protected static final String CONVERTER = "converter";
+ private static final String CONVERTER_CLASS =
+ CommonStructuresUtil.createPreficedString(CONVERTER, CommonStructuresUtil.CLASS);
+ private static final String CONVERTER_CLASS_FOR =
+ CommonStructuresUtil.createPreficedString(CONVERTER
+ , CommonStructuresUtil.createPreficedString(CommonStructuresUtil.CLASS, "for"));
+ protected static final String CONVERTER_ID =
+ CommonStructuresUtil.createPreficedString(CONVERTER, CommonStructuresUtil.ID);
+
+ public WriteConverterTestCase(String name) {
+ super(name);
+ }
+
+ public void testWriteConverter() {
+ FacesConfigArtifactEdit edit = null;
+
+ try {
+ edit = getArtifactEditForWrite();
+ assertNotNull(edit.getFacesConfig());
+ FacesConfigPackage facesConfigPackage = FacesConfigPackage.eINSTANCE;
+ FacesConfigFactory facesConfigFactory = facesConfigPackage.getFacesConfigFactory();
+
+ ConverterType converter = facesConfigFactory.createConverterType();
+
+ converter.getDescription().add(CommonStructuresUtil.createDescription(CONVERTER));
+ converter.getDisplayName().add(CommonStructuresUtil.createDisplayName(CONVERTER));
+ converter.getIcon().add(CommonStructuresUtil.createIcon(CONVERTER));
+
+ {
+ ConverterClassType converterClassType = facesConfigFactory.createConverterClassType();
+ converterClassType.setTextContent(CONVERTER_CLASS);
+ converterClassType.setId(CommonStructuresUtil.createPreficedString(CONVERTER_CLASS
+ , CommonStructuresUtil.ID));
+ converter.setConverterClass(converterClassType);
+ }
+
+ {
+ ConverterForClassType converterForClassType = facesConfigFactory.createConverterForClassType();
+ converterForClassType.setTextContent(CONVERTER_CLASS_FOR);
+ converterForClassType.setId(CommonStructuresUtil.createPreficedString(CONVERTER_CLASS_FOR
+ , CommonStructuresUtil.ID));
+ converter.setConverterForClass(converterForClassType);
+ }
+ {
+ ConverterIdType converterId = facesConfigFactory.createConverterIdType();
+ converterId.setTextContent(CONVERTER_ID);
+ converterId.setId(CommonStructuresUtil.createPreficedString(CONVERTER_CLASS_FOR
+ , CommonStructuresUtil.ID));
+ converter.setConverterId(converterId);
+ }
+
+ converter.getAttribute().add(CommonStructuresUtil.createAttribute(CONVERTER));
+ converter.getProperty().add(CommonStructuresUtil.createProperty(CONVERTER));
+
+ converter.setId(CONVERTER_ID);
+
+ edit.getFacesConfig().getConverter().add(converter);
+ edit.save(null);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ assertTrue(edit.isDisposed());
+ edit = null;
+ }
+ }
+
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ ConverterType converter =
+ (ConverterType) FacesConfigModelUtil
+ .findEObjectElementById(edit.getFacesConfig().getConverter(), CONVERTER_ID);
+ assertNotNull(converter);
+
+ assertEquals(1, converter.getDescription().size());
+ CommonStructuresUtil.assertMatchesDescription
+ (CONVERTER, (DescriptionType) converter.getDescription().get(0));
+
+ assertEquals(1, converter.getDisplayName().size());
+ CommonStructuresUtil.assertMatchesDisplayName
+ (CONVERTER, (DisplayNameType) converter.getDisplayName().get(0));
+
+ assertEquals(1, converter.getIcon().size());
+ CommonStructuresUtil.assertMatchesIcon
+ (CONVERTER, (IconType) converter.getIcon().get(0));
+
+ ConverterClassType converterClassType = converter.getConverterClass();
+ assertEquals(CONVERTER_CLASS, converterClassType.getTextContent());
+ assertEquals(CommonStructuresUtil.createPreficedString(CONVERTER_CLASS
+ , CommonStructuresUtil.ID)
+ , converterClassType.getId());
+
+ ConverterForClassType converterForClassType = converter.getConverterForClass();
+ assertEquals(CONVERTER_CLASS_FOR, converterForClassType.getTextContent());
+ assertEquals(CommonStructuresUtil.createPreficedString(CONVERTER_CLASS_FOR
+ , CommonStructuresUtil.ID)
+ , converterForClassType.getId());
+
+ ConverterIdType converterId = converter.getConverterId();
+ assertEquals(CONVERTER_ID, converterId.getTextContent());
+ assertEquals(CommonStructuresUtil.createPreficedString(CONVERTER_CLASS_FOR
+ , CommonStructuresUtil.ID)
+ , converterId.getId());
+
+ converter.getAttribute().add(CommonStructuresUtil.createAttribute(CONVERTER));
+ converter.getProperty().add(CommonStructuresUtil.createProperty(CONVERTER));
+
+ assertEquals(CommonStructuresUtil.createPreficedString(CONVERTER
+ , CommonStructuresUtil.ID)
+ , converter.getId());
+ } finally {
+ //assertTrue(result != null && result.equals(sTestString));
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+}
+
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteConverterTestCase_1_2.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteConverterTestCase_1_2.java
new file mode 100644
index 000000000..18dca2860
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteConverterTestCase_1_2.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2006 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.facesconfig.tests.write;
+
+import org.eclipse.jst.jsf.facesconfig.emf.ConverterExtensionType;
+import org.eclipse.jst.jsf.facesconfig.emf.ConverterType;
+import org.eclipse.jst.jsf.facesconfig.emf.DynamicElement;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
+import org.eclipse.jst.jsf.facesconfig.tests.util.CommonStructuresUtil;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class WriteConverterTestCase_1_2 extends WriteConverterTestCase {
+
+ private final static String EXTENDED_CONVERTER_ID = "extended-converter-id";
+
+ private final static String CONVERTER_EXTENSION = CommonStructuresUtil
+ .createPreficedString(CONVERTER, "extension");
+ private final static String CONVERTER_EXTENSION_ID = CommonStructuresUtil
+ .createPreficedString(CONVERTER_EXTENSION, "id");
+ private final static String CONVERTER_EXTENSION_TAG = CommonStructuresUtil
+ .createPreficedString(CONVERTER_EXTENSION, "tag");
+
+ public WriteConverterTestCase_1_2(String name) {
+ super(name);
+ }
+
+ public void testConverterExtension() {
+ FacesConfigArtifactEdit edit = null;
+
+ try {
+ edit = getArtifactEditForWrite();
+ assertNotNull(edit.getFacesConfig());
+ FacesConfigPackage facesConfigPackage = FacesConfigPackage.eINSTANCE;
+ FacesConfigFactory facesConfigFactory = facesConfigPackage
+ .getFacesConfigFactory();
+
+ ConverterType converter = facesConfigFactory.createConverterType();
+ converter.setId(EXTENDED_CONVERTER_ID);
+
+ ConverterExtensionType extensionType =
+ facesConfigFactory.createConverterExtensionType();
+ extensionType.setId(CONVERTER_EXTENSION_ID);
+
+ extensionType.getChildNodes().add(createDynamicElement(CONVERTER_EXTENSION_TAG));
+
+ converter.getConverterExtension().add(extensionType);
+ edit.getFacesConfig().getConverter().add(converter);
+ edit.save(null);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ assertTrue(edit.isDisposed());
+ edit = null;
+ }
+ }
+
+ try
+ {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ ConverterType converter =
+ (ConverterType) FacesConfigModelUtil
+ .findEObjectElementById(edit.getFacesConfig().getConverter(), EXTENDED_CONVERTER_ID);
+ assertNotNull(converter);
+
+ assertEquals(1, converter.getConverterExtension().size());
+ ConverterExtensionType extensionType =
+ (ConverterExtensionType) converter.getConverterExtension().get(0);
+ assertEquals(CONVERTER_EXTENSION_ID, extensionType.getId());
+
+ assertEquals(1, extensionType.getChildNodes().size());
+ DynamicElement element = (DynamicElement) extensionType.getChildNodes().get(0);
+ assertEquals(CONVERTER_EXTENSION_TAG, element.getName());
+ }
+ finally
+ {
+
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteFacesConfigTestCase_2_0.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteFacesConfigTestCase_2_0.java
new file mode 100644
index 000000000..a591b99b6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteFacesConfigTestCase_2_0.java
@@ -0,0 +1,239 @@
+/*******************************************************************************
+ * 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.facesconfig.tests.write;
+
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.facesconfig.emf.AbsoluteOrderingType;
+import org.eclipse.jst.jsf.facesconfig.emf.AttributeType;
+import org.eclipse.jst.jsf.facesconfig.emf.BehaviorClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.BehaviorExtensionType;
+import org.eclipse.jst.jsf.facesconfig.emf.BehaviorIdType;
+import org.eclipse.jst.jsf.facesconfig.emf.BehaviorType;
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.DynamicElement;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.emf.NameType;
+import org.eclipse.jst.jsf.facesconfig.emf.OrderingOrderingType;
+import org.eclipse.jst.jsf.facesconfig.emf.OrderingOthersType;
+import org.eclipse.jst.jsf.facesconfig.emf.OrderingType;
+import org.eclipse.jst.jsf.facesconfig.emf.PropertyType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.CommonStructuresUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class WriteFacesConfigTestCase_2_0 extends FacesConfigExtensionTestCase {
+
+ private final static String FACESCONFIG_NAME = "facesconfig-name";
+// private final static String ORDERING_ID = "ordering-id";
+ private final static String ABSOLUTE_ORDERING_NAME = "ordering-name";
+ private final static String ABSOLUTE_ORDERING_OTHERS_ID = "ordering-name-others-id";
+ private final static String BEFORE_ORDERING_NAME = "before-ordering-name";
+ private final static String BEFORE_ORDERING_OTHERS_ID = "before-ordering-name-others-id";
+ private final static String AFTER_ORDERING_NAME = "after-ordering-name";
+ private final static String AFTER_ORDERING_OTHERS_ID = "after-ordering-name-others-id";
+ private final static String BEHAVIOR = "behavior";
+// private final static String BEHAVIOR_ID = "behavior-id";
+ private final static String BEHAVIOR_ID_ID = "behavior-id-id";
+ private final static String BEHAVIOR_CLASS = "behavior-class";
+ private final static String BEHAVIOR_EXTENSION_ID = "behavior-extension-id";
+ private final static String BEHAVIOR_EXTENSION = "behavior-extension";
+
+ public WriteFacesConfigTestCase_2_0(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ assertEquals(IJSFCoreConstants.JSF_VERSION_2_0, _facesVersion);
+ }
+
+ public void testFacesConfig20() {
+ FacesConfigArtifactEdit edit = null;
+
+ try {
+ edit = getArtifactEditForWrite();
+ assertNotNull(edit.getFacesConfig());
+ FacesConfigPackage facesConfigPackage = FacesConfigPackage.eINSTANCE;
+ FacesConfigFactory facesConfigFactory = facesConfigPackage.getFacesConfigFactory();
+
+ FacesConfigType facesConfigType = edit.getFacesConfig();
+
+ {
+ //Ordering
+ OrderingType ordering = facesConfigFactory.createOrderingType();
+// ordering.setId(ORDERING_ID);
+ facesConfigType.getOrdering().add(ordering);
+ OrderingOrderingType before = facesConfigFactory.createOrderingOrderingType();
+ NameType beforeOrderingName = facesConfigFactory.createNameType();
+ beforeOrderingName.setTextContent(BEFORE_ORDERING_NAME);
+ before.getName().add(beforeOrderingName);
+ OrderingOthersType others = facesConfigFactory.createOrderingOthersType();
+ others.setId(BEFORE_ORDERING_OTHERS_ID);
+ before.setOthers(others);
+ ordering.setBefore(before);
+ OrderingOrderingType after = facesConfigFactory.createOrderingOrderingType();
+ NameType afterOrderingName = facesConfigFactory.createNameType();
+ afterOrderingName.setTextContent(AFTER_ORDERING_NAME);
+ after.getName().add(afterOrderingName);
+ OrderingOthersType others2 = facesConfigFactory.createOrderingOthersType();
+ others2.setId(AFTER_ORDERING_OTHERS_ID);
+ after.setOthers(others2);
+ ordering.setAfter(after);
+ }
+
+ {
+ //Absolute Ordering
+ AbsoluteOrderingType absoluteOrdering = facesConfigFactory.createAbsoluteOrderingType();
+ NameType orderingName = facesConfigFactory.createNameType();
+ orderingName.setTextContent(ABSOLUTE_ORDERING_NAME);
+ absoluteOrdering.getName().add(orderingName);
+ OrderingOthersType others = facesConfigFactory.createOrderingOthersType();
+ others.setId(ABSOLUTE_ORDERING_OTHERS_ID);
+ absoluteOrdering.setOthers(others);
+ facesConfigType.setAbsoluteOrdering(absoluteOrdering);
+ }
+
+ //Name
+ NameType name = facesConfigFactory.createNameType();
+ name.setTextContent(FACESCONFIG_NAME);
+ facesConfigType.setName(name);
+
+ {
+ //Behavior
+ BehaviorType behavior = facesConfigFactory.createBehaviorType();
+// behavior.setId(BEHAVIOR_ID);
+ facesConfigType.getBehavior().add(behavior);
+
+ behavior.getDescription().add(CommonStructuresUtil.createDescription(BEHAVIOR));
+ behavior.getDisplayName().add(CommonStructuresUtil.createDisplayName(BEHAVIOR));
+ behavior.getIcon().add(CommonStructuresUtil.createIcon(BEHAVIOR));
+
+ BehaviorIdType behaviorId = facesConfigFactory.createBehaviorIdType();
+ behaviorId.setTextContent(BEHAVIOR_ID_ID);
+ behavior.setBehaviorId(behaviorId);
+
+ BehaviorClassType behaviorClass = facesConfigFactory.createBehaviorClassType();
+ behaviorClass.setTextContent(BEHAVIOR_CLASS);
+ behavior.setBehaviorClass(behaviorClass);
+
+ AttributeType attribute = facesConfigFactory.createAttributeType();
+ behavior.getAttribute().add(attribute);
+
+ PropertyType property = facesConfigFactory.createPropertyType();
+ behavior.getProperty().add(property);
+
+ BehaviorExtensionType extensionType = facesConfigFactory.createBehaviorExtensionType();
+ extensionType.setId(BEHAVIOR_EXTENSION_ID);
+ extensionType.getChildNodes().add(createDynamicElement(BEHAVIOR_EXTENSION));
+ behavior.getBehaviorExtension().add(extensionType);
+ }
+
+ //Metadata Complete
+ facesConfigType.setMetadataComplete(true);
+
+ edit.save(null);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ assertTrue(edit.isDisposed());
+ edit = null;
+ }
+ }
+
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ FacesConfigType facesConfig = edit.getFacesConfig();
+
+ {
+ //Ordering
+ assertEquals(1, facesConfig.getOrdering().size());
+ OrderingType ordering = (OrderingType)facesConfig.getOrdering().get(0);
+// assertEquals(ORDERING_ID, ordering.getId());
+
+ OrderingOrderingType before = ordering.getBefore();
+ assertEquals(1, before.getName().size());
+ NameType name = (NameType)before.getName().get(0);
+ assertEquals(BEFORE_ORDERING_NAME, name.getTextContent().trim());
+ assertEquals(BEFORE_ORDERING_OTHERS_ID, before.getOthers().getId());
+
+ OrderingOrderingType after = ordering.getAfter();
+ assertEquals(1, after.getName().size());
+ NameType afterNname = (NameType)after.getName().get(0);
+ assertEquals(AFTER_ORDERING_NAME, afterNname.getTextContent().trim());
+ assertEquals(AFTER_ORDERING_OTHERS_ID, after.getOthers().getId());
+ }
+
+ {
+ //Absolute Ordering
+ AbsoluteOrderingType absoluteOrdering = facesConfig.getAbsoluteOrdering();
+ assertNotNull(absoluteOrdering);
+ assertEquals(1, absoluteOrdering.getName().size());
+ assertEquals(ABSOLUTE_ORDERING_NAME, ((NameType)absoluteOrdering.getName().get(0)).getTextContent().trim());
+ assertNotNull(absoluteOrdering.getOthers());
+ assertEquals(ABSOLUTE_ORDERING_OTHERS_ID, absoluteOrdering.getOthers().getId().trim());
+ }
+
+ {
+ //Name
+ NameType name = facesConfig.getName();
+ assertNotNull(name);
+ assertEquals(FACESCONFIG_NAME, name.getTextContent().trim());
+ }
+
+ {
+ //Behavior
+ assertEquals(1, facesConfig.getBehavior().size());
+ BehaviorType behavior = (BehaviorType)facesConfig.getBehavior().get(0);
+ assertEquals(1, behavior.getDescription().size());
+ CommonStructuresUtil.assertMatchesDescription
+ (BEHAVIOR, (DescriptionType) behavior.getDescription().get(0));
+
+ assertEquals(1, behavior.getDisplayName().size());
+ CommonStructuresUtil.assertMatchesDisplayName
+ (BEHAVIOR, (DisplayNameType)behavior.getDisplayName().get(0));
+
+ assertEquals(1, behavior.getIcon().size());
+ CommonStructuresUtil.assertMatchesIcon
+ (BEHAVIOR, (IconType)behavior.getIcon().get(0));
+
+ BehaviorIdType behaviorId = behavior.getBehaviorId();
+ assertEquals(BEHAVIOR_ID_ID, behaviorId.getTextContent().trim());
+
+ BehaviorClassType behaviorClass = behavior.getBehaviorClass();
+ assertEquals(BEHAVIOR_CLASS, behaviorClass.getTextContent().trim());
+
+ assertEquals(1, behavior.getAttribute().size());
+ assertEquals(1, behavior.getProperty().size());
+
+ assertEquals(1, behavior.getBehaviorExtension().size());
+ BehaviorExtensionType ext =
+ (BehaviorExtensionType) behavior.getBehaviorExtension().get(0);
+ assertEquals(BEHAVIOR_EXTENSION_ID, ext.getId());
+ assertEquals(1, ext.getChildNodes().size());
+ DynamicElement element = (DynamicElement) ext.getChildNodes().get(0);
+ assertEquals(BEHAVIOR_EXTENSION, element.getName());
+ }
+
+ //Metadata Complete
+ assertEquals(true, facesConfig.isMetadataComplete());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteFactoryTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteFactoryTestCase.java
new file mode 100644
index 000000000..15f2b4be5
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteFactoryTestCase.java
@@ -0,0 +1,158 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests.write;
+
+import org.eclipse.jst.jsf.facesconfig.emf.ApplicationFactoryType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesContextFactoryType;
+import org.eclipse.jst.jsf.facesconfig.emf.FactoryType;
+import org.eclipse.jst.jsf.facesconfig.emf.LifecycleFactoryType;
+import org.eclipse.jst.jsf.facesconfig.emf.RenderKitFactoryType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.CommonStructuresUtil;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+/*
+ * This Junit class is used to test the FacesConfigFactoryImpl
+ * class.
+ */
+public class WriteFactoryTestCase extends BaseWriteTestCase {
+ protected final static String FACTORY = "factory";
+ private final static String APPLICATION_FACTORY = "application-factory";
+ private final static String FACESCONTEXT_FACTORY = "faces-context-factory";
+ private final static String LIFECYCLE_FACTORY = "lifecycle-factory";
+ private final static String RENDERKIT_FACTORY = "render-kit-factory";
+ private final static String FACTORY_ID = CommonStructuresUtil
+ .createPreficedString(FACTORY, CommonStructuresUtil.ID);
+
+ public WriteFactoryTestCase(String name) {
+ super(name);
+ }
+
+ public void testFactory() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForWrite();
+ assertNotNull(edit.getFacesConfig());
+ FacesConfigPackage facesConfigPackage = FacesConfigPackage.eINSTANCE;
+ FacesConfigFactory facesConfigFactory = facesConfigPackage.getFacesConfigFactory();
+
+ FactoryType newfactory = facesConfigFactory.createFactoryType();
+
+ {
+ ApplicationFactoryType newApplicationFactory = facesConfigFactory.createApplicationFactoryType();
+ newApplicationFactory.setTextContent(APPLICATION_FACTORY);
+ newApplicationFactory.setId(CommonStructuresUtil
+ .createPreficedString(APPLICATION_FACTORY, CommonStructuresUtil.ID));
+ newfactory.getApplicationFactory().add(newApplicationFactory);
+ }
+
+ {
+ FacesContextFactoryType facesContextFactory = facesConfigFactory.createFacesContextFactoryType();
+ facesContextFactory.setTextContent(FACESCONTEXT_FACTORY);
+ facesContextFactory.setId(CommonStructuresUtil
+ .createPreficedString(FACESCONTEXT_FACTORY, CommonStructuresUtil.ID));
+ newfactory.getFacesContextFactory().add(facesContextFactory);
+ }
+
+ {
+ LifecycleFactoryType lifecycleFactory = facesConfigFactory.createLifecycleFactoryType();
+ lifecycleFactory.setTextContent(LIFECYCLE_FACTORY);
+ lifecycleFactory.setId(CommonStructuresUtil
+ .createPreficedString(LIFECYCLE_FACTORY, CommonStructuresUtil.ID));
+ newfactory.getLifecycleFactory().add(lifecycleFactory);
+ }
+
+ {
+ RenderKitFactoryType renderKit = facesConfigFactory.createRenderKitFactoryType();
+ renderKit.setTextContent(RENDERKIT_FACTORY);
+ renderKit.setId(CommonStructuresUtil
+ .createPreficedString(RENDERKIT_FACTORY, CommonStructuresUtil.ID));
+ newfactory.getRenderKitFactory().add(renderKit);
+ }
+
+ newfactory.setId(FACTORY_ID);
+
+ edit.getFacesConfig().getFactory().add(newfactory);
+ edit.save(null);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ assertTrue(edit.isDisposed());
+ edit = null;
+ }
+ }
+
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ FactoryType newFactory =
+ (FactoryType) FacesConfigModelUtil
+ .findEObjectElementById(
+ edit.getFacesConfig().getFactory(), FACTORY_ID);
+ assertNotNull(newFactory);
+
+ {
+ assertEquals(1, newFactory.getApplicationFactory().size());
+ ApplicationFactoryType newApplicationFactory =
+ (ApplicationFactoryType) newFactory.getApplicationFactory().get(0);
+
+ assertEquals(APPLICATION_FACTORY, newApplicationFactory.getTextContent());
+ assertEquals(CommonStructuresUtil
+ .createPreficedString(APPLICATION_FACTORY, CommonStructuresUtil.ID)
+ , newApplicationFactory.getId());
+ }
+
+ {
+ assertEquals(1, newFactory.getFacesContextFactory().size());
+ FacesContextFactoryType facesContextFactory =
+ (FacesContextFactoryType) newFactory.getFacesContextFactory().get(0);
+
+ assertEquals(FACESCONTEXT_FACTORY, facesContextFactory.getTextContent());
+ assertEquals(CommonStructuresUtil
+ .createPreficedString(FACESCONTEXT_FACTORY, CommonStructuresUtil.ID)
+ , facesContextFactory.getId());
+ }
+
+ {
+ assertEquals(1, newFactory.getLifecycleFactory().size());
+ LifecycleFactoryType lifecycleFactory =
+ (LifecycleFactoryType) newFactory.getLifecycleFactory().get(0);
+
+ assertEquals(LIFECYCLE_FACTORY, lifecycleFactory.getTextContent());
+ assertEquals(CommonStructuresUtil
+ .createPreficedString(LIFECYCLE_FACTORY, CommonStructuresUtil.ID)
+ , lifecycleFactory.getId());
+ }
+
+ {
+ assertEquals(1, newFactory.getRenderKitFactory().size());
+ RenderKitFactoryType renderKit =
+ (RenderKitFactoryType) newFactory.getRenderKitFactory().get(0);
+
+ assertEquals(RENDERKIT_FACTORY, renderKit.getTextContent());
+ assertEquals(CommonStructuresUtil
+ .createPreficedString(RENDERKIT_FACTORY, CommonStructuresUtil.ID)
+ ,renderKit.getId());
+ }
+
+ assertEquals(CommonStructuresUtil
+ .createPreficedString(FACTORY, CommonStructuresUtil.ID)
+ ,newFactory.getId());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteFactoryTestCase_1_2.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteFactoryTestCase_1_2.java
new file mode 100644
index 000000000..82c191a93
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteFactoryTestCase_1_2.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2006 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.facesconfig.tests.write;
+
+import org.eclipse.jst.jsf.facesconfig.emf.DynamicElement;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
+import org.eclipse.jst.jsf.facesconfig.emf.FactoryExtensionType;
+import org.eclipse.jst.jsf.facesconfig.emf.FactoryType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.CommonStructuresUtil;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class WriteFactoryTestCase_1_2 extends WriteFactoryTestCase {
+ private final static String EXTENDED_FACTORY_ID = "extended-factory-id";
+
+ private final static String FACTORY_EXTENSION = CommonStructuresUtil
+ .createPreficedString(FACTORY, "extension");
+ private final static String FACTORY_EXTENSION_ID = CommonStructuresUtil
+ .createPreficedString(FACTORY_EXTENSION, "id");
+ private final static String FACTORY_EXTENSION_TAG = CommonStructuresUtil
+ .createPreficedString(FACTORY_EXTENSION, "tag");
+
+ public WriteFactoryTestCase_1_2(String name) {
+ super(name);
+ }
+
+ public void testFactoryExtension() {
+ FacesConfigArtifactEdit edit = null;
+
+ try {
+ edit = getArtifactEditForWrite();
+ assertNotNull(edit.getFacesConfig());
+ FacesConfigPackage facesConfigPackage = FacesConfigPackage.eINSTANCE;
+ FacesConfigFactory facesConfigFactory = facesConfigPackage
+ .getFacesConfigFactory();
+
+ FactoryType factory = facesConfigFactory.createFactoryType();
+ factory.setId(EXTENDED_FACTORY_ID);
+
+ FactoryExtensionType extensionType =
+ facesConfigFactory.createFactoryExtensionType();
+ extensionType.setId(FACTORY_EXTENSION_ID);
+
+ extensionType.getChildNodes().add(createDynamicElement(FACTORY_EXTENSION_TAG));
+
+ factory.getFactoryExtension().add(extensionType);
+ edit.getFacesConfig().getFactory().add(factory);
+ edit.save(null);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ assertTrue(edit.isDisposed());
+ edit = null;
+ }
+ }
+
+ try
+ {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ FactoryType factory =
+ (FactoryType) FacesConfigModelUtil
+ .findEObjectElementById(edit.getFacesConfig().getFactory(), EXTENDED_FACTORY_ID);
+ assertNotNull(factory);
+
+ assertEquals(1, factory.getFactoryExtension().size());
+ FactoryExtensionType extensionType =
+ (FactoryExtensionType) factory.getFactoryExtension().get(0);
+ assertEquals(FACTORY_EXTENSION_ID, extensionType.getId());
+
+ assertEquals(1, extensionType.getChildNodes().size());
+ DynamicElement element = (DynamicElement) extensionType.getChildNodes().get(0);
+ assertEquals(FACTORY_EXTENSION_TAG, element.getName());
+ }
+ finally
+ {
+
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteFactoryTestCase_2_0.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteFactoryTestCase_2_0.java
new file mode 100644
index 000000000..b38243adf
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteFactoryTestCase_2_0.java
@@ -0,0 +1,193 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2006 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.facesconfig.tests.write;
+
+import org.eclipse.jst.jsf.facesconfig.emf.ExceptionHandlerFactoryType;
+import org.eclipse.jst.jsf.facesconfig.emf.ExternalContextFactoryType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
+import org.eclipse.jst.jsf.facesconfig.emf.FactoryType;
+import org.eclipse.jst.jsf.facesconfig.emf.PartialViewContextFactoryType;
+import org.eclipse.jst.jsf.facesconfig.emf.TagHandlerDelegateFactoryType;
+import org.eclipse.jst.jsf.facesconfig.emf.ViewDeclarationLanguageFactoryType;
+import org.eclipse.jst.jsf.facesconfig.emf.VisitContextFactoryType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.CommonStructuresUtil;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class WriteFactoryTestCase_2_0 extends WriteFactoryTestCase_1_2 {
+ private final static String EXCEPTIONHANDLER_FACTORY = "exception-handler-factory";
+ private final static String EXTERNALCONTEXT_FACTORY = "external-context-factory";
+ private final static String PARTIALVIEWCONTEXT_FACTORY = "partial-view-context-factory";
+ private final static String VIEWDECLARATIONLANGUAGE_FACTORY = "view-declaration-language-factory";
+ private final static String TAGHANDLERDELEGATE_FACTORY = "tag-handler-delegate-factory";
+ private final static String VISITCONTEXT_FACTORY = "visit-context-factory";
+ private final static String FACTORY_ID = CommonStructuresUtil
+ .createPreficedString(FACTORY+"20", CommonStructuresUtil.ID);
+
+ public WriteFactoryTestCase_2_0(String name) {
+ super(name);
+ }
+
+ public void testFactory20() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForWrite();
+ assertNotNull(edit.getFacesConfig());
+ FacesConfigPackage facesConfigPackage = FacesConfigPackage.eINSTANCE;
+ FacesConfigFactory facesConfigFactory = facesConfigPackage.getFacesConfigFactory();
+
+ FactoryType newfactory = facesConfigFactory.createFactoryType();
+
+ {
+ ExceptionHandlerFactoryType newExceptionHandlerFactory = facesConfigFactory.createExceptionHandlerFactoryType();
+ newExceptionHandlerFactory.setTextContent(EXCEPTIONHANDLER_FACTORY);
+ newExceptionHandlerFactory.setId(CommonStructuresUtil
+ .createPreficedString(EXCEPTIONHANDLER_FACTORY, CommonStructuresUtil.ID));
+ newfactory.getExceptionHandlerFactory().add(newExceptionHandlerFactory);
+ }
+
+ {
+ ExternalContextFactoryType externalContextFactory = facesConfigFactory.createExternalContextFactoryType();
+ externalContextFactory.setTextContent(EXTERNALCONTEXT_FACTORY);
+ externalContextFactory.setId(CommonStructuresUtil
+ .createPreficedString(EXTERNALCONTEXT_FACTORY, CommonStructuresUtil.ID));
+ newfactory.getExternalContextFactory().add(externalContextFactory);
+ }
+
+ {
+ PartialViewContextFactoryType partialViewContextFactory = facesConfigFactory.createPartialViewContextFactoryType();
+ partialViewContextFactory.setTextContent(PARTIALVIEWCONTEXT_FACTORY);
+ partialViewContextFactory.setId(CommonStructuresUtil
+ .createPreficedString(PARTIALVIEWCONTEXT_FACTORY, CommonStructuresUtil.ID));
+ newfactory.getPartialViewContextFactory().add(partialViewContextFactory);
+ }
+
+ {
+ ViewDeclarationLanguageFactoryType viewDeclarationLanguageFactory = facesConfigFactory.createViewDeclarationLanguageFactoryType();
+ viewDeclarationLanguageFactory.setTextContent(VIEWDECLARATIONLANGUAGE_FACTORY);
+ viewDeclarationLanguageFactory.setId(CommonStructuresUtil
+ .createPreficedString(VIEWDECLARATIONLANGUAGE_FACTORY, CommonStructuresUtil.ID));
+ newfactory.getViewDeclarationLanguageFactory().add(viewDeclarationLanguageFactory);
+ }
+
+ {
+ TagHandlerDelegateFactoryType tagHandlerDelegateFactory = facesConfigFactory.createTagHandlerDelegateFactoryType();
+ tagHandlerDelegateFactory.setTextContent(TAGHANDLERDELEGATE_FACTORY);
+ tagHandlerDelegateFactory.setId(CommonStructuresUtil
+ .createPreficedString(TAGHANDLERDELEGATE_FACTORY, CommonStructuresUtil.ID));
+ newfactory.getTagHandlerDelegateFactory().add(tagHandlerDelegateFactory);
+ }
+
+ {
+ VisitContextFactoryType visitContextFactory = facesConfigFactory.createVisitContextFactoryType();
+ visitContextFactory.setTextContent(VISITCONTEXT_FACTORY);
+ visitContextFactory.setId(CommonStructuresUtil
+ .createPreficedString(VISITCONTEXT_FACTORY, CommonStructuresUtil.ID));
+ newfactory.getVisitContextFactory().add(visitContextFactory);
+ }
+
+ newfactory.setId(FACTORY_ID);
+
+ edit.getFacesConfig().getFactory().add(newfactory);
+ edit.save(null);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ assertTrue(edit.isDisposed());
+ edit = null;
+ }
+ }
+
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ FactoryType newFactory =
+ (FactoryType) FacesConfigModelUtil
+ .findEObjectElementById(
+ edit.getFacesConfig().getFactory(), FACTORY_ID);
+ assertNotNull(newFactory);
+
+ {
+ assertEquals(1, newFactory.getExceptionHandlerFactory().size());
+ ExceptionHandlerFactoryType newExceptionHandlerFactory =
+ (ExceptionHandlerFactoryType) newFactory.getExceptionHandlerFactory().get(0);
+
+ assertEquals(EXCEPTIONHANDLER_FACTORY, newExceptionHandlerFactory.getTextContent());
+ assertEquals(CommonStructuresUtil
+ .createPreficedString(EXCEPTIONHANDLER_FACTORY, CommonStructuresUtil.ID)
+ , newExceptionHandlerFactory.getId());
+ }
+
+ {
+ assertEquals(1, newFactory.getExternalContextFactory().size());
+ ExternalContextFactoryType externalContextFactory =
+ (ExternalContextFactoryType) newFactory.getExternalContextFactory().get(0);
+
+ assertEquals(EXTERNALCONTEXT_FACTORY, externalContextFactory.getTextContent());
+ assertEquals(CommonStructuresUtil
+ .createPreficedString(EXTERNALCONTEXT_FACTORY, CommonStructuresUtil.ID)
+ , externalContextFactory.getId());
+ }
+
+ {
+ assertEquals(1, newFactory.getPartialViewContextFactory().size());
+ PartialViewContextFactoryType partialViewContextFactory =
+ (PartialViewContextFactoryType) newFactory.getPartialViewContextFactory().get(0);
+
+ assertEquals(PARTIALVIEWCONTEXT_FACTORY, partialViewContextFactory.getTextContent());
+ assertEquals(CommonStructuresUtil
+ .createPreficedString(PARTIALVIEWCONTEXT_FACTORY, CommonStructuresUtil.ID)
+ , partialViewContextFactory.getId());
+ }
+
+ {
+ assertEquals(1, newFactory.getViewDeclarationLanguageFactory().size());
+ ViewDeclarationLanguageFactoryType ViewDeclarationLanguageFactory =
+ (ViewDeclarationLanguageFactoryType) newFactory.getViewDeclarationLanguageFactory().get(0);
+
+ assertEquals(VIEWDECLARATIONLANGUAGE_FACTORY, ViewDeclarationLanguageFactory.getTextContent());
+ assertEquals(CommonStructuresUtil
+ .createPreficedString(VIEWDECLARATIONLANGUAGE_FACTORY, CommonStructuresUtil.ID)
+ ,ViewDeclarationLanguageFactory.getId());
+ }
+
+ {
+ assertEquals(1, newFactory.getTagHandlerDelegateFactory().size());
+ TagHandlerDelegateFactoryType tagHandlerDelegateFactory =
+ (TagHandlerDelegateFactoryType) newFactory.getTagHandlerDelegateFactory().get(0);
+
+ assertEquals(TAGHANDLERDELEGATE_FACTORY, tagHandlerDelegateFactory.getTextContent());
+ assertEquals(CommonStructuresUtil
+ .createPreficedString(TAGHANDLERDELEGATE_FACTORY, CommonStructuresUtil.ID)
+ ,tagHandlerDelegateFactory.getId());
+ }
+
+ {
+ assertEquals(1, newFactory.getVisitContextFactory().size());
+ VisitContextFactoryType visitContextFactory =
+ (VisitContextFactoryType) newFactory.getVisitContextFactory().get(0);
+
+ assertEquals(VISITCONTEXT_FACTORY, visitContextFactory.getTextContent());
+ assertEquals(CommonStructuresUtil
+ .createPreficedString(VISITCONTEXT_FACTORY, CommonStructuresUtil.ID)
+ ,visitContextFactory.getId());
+ }
+
+ assertEquals(FACTORY_ID, newFactory.getId());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteLifecycleTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteLifecycleTestCase.java
new file mode 100644
index 000000000..0f2766b99
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteLifecycleTestCase.java
@@ -0,0 +1,91 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests.write;
+
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
+import org.eclipse.jst.jsf.facesconfig.emf.LifecycleType;
+import org.eclipse.jst.jsf.facesconfig.emf.PhaseListenerType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.CommonStructuresUtil;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class WriteLifecycleTestCase extends BaseWriteTestCase
+{
+ protected final static String LIFECYCLE = "lifecycle";
+ private final static String PHASELISTENER = "phase-listener";
+ private final static String LIFECYCLE_ID =
+ CommonStructuresUtil.createPreficedString(LIFECYCLE, CommonStructuresUtil.ID);
+
+ public WriteLifecycleTestCase(String name) {
+ super(name);
+ }
+
+ public void testWriteLifecycle() {
+ FacesConfigArtifactEdit edit = null;
+
+ try {
+ edit = getArtifactEditForWrite();
+ assertNotNull(edit.getFacesConfig());
+ FacesConfigPackage facesConfigPackage = FacesConfigPackage.eINSTANCE;
+ FacesConfigFactory facesConfigFactory = facesConfigPackage
+ .getFacesConfigFactory();
+
+ LifecycleType newLifecycle = facesConfigFactory
+ .createLifecycleType();
+ PhaseListenerType newPhaseListener = facesConfigFactory
+ .createPhaseListenerType();
+ newPhaseListener.setTextContent(PHASELISTENER);
+ newPhaseListener.setId(CommonStructuresUtil.createPreficedString(
+ PHASELISTENER, CommonStructuresUtil.ID));
+ newLifecycle.getPhaseListener().add(newPhaseListener);
+
+ newLifecycle.setId(LIFECYCLE_ID);
+
+ edit.getFacesConfig().getLifecycle().add(newLifecycle);
+ edit.save(null);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ assertTrue(edit.isDisposed());
+ edit = null;
+ }
+ }
+
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ LifecycleType newLifecycle =
+ (LifecycleType) FacesConfigModelUtil
+ .findEObjectElementById(
+ edit.getFacesConfig().getLifecycle(), LIFECYCLE_ID);
+ assertNotNull(newLifecycle);
+
+ assertEquals(1, newLifecycle.getPhaseListener().size());
+ PhaseListenerType newPhaseListener =
+ (PhaseListenerType) newLifecycle.getPhaseListener().get(0);
+
+ assertEquals(PHASELISTENER, newPhaseListener.getTextContent());
+ assertEquals(CommonStructuresUtil.createPreficedString(
+ PHASELISTENER, CommonStructuresUtil.ID)
+ , newPhaseListener.getId());
+
+ assertEquals(CommonStructuresUtil.createPreficedString(
+ LIFECYCLE, CommonStructuresUtil.ID)
+ , newLifecycle.getId());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteLifecycleTestCase_1_2.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteLifecycleTestCase_1_2.java
new file mode 100644
index 000000000..81e28e80f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteLifecycleTestCase_1_2.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2006 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.facesconfig.tests.write;
+
+import org.eclipse.jst.jsf.facesconfig.emf.DynamicElement;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
+import org.eclipse.jst.jsf.facesconfig.emf.LifecycleExtensionType;
+import org.eclipse.jst.jsf.facesconfig.emf.LifecycleType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.CommonStructuresUtil;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class WriteLifecycleTestCase_1_2 extends WriteLifecycleTestCase {
+ private final static String EXTENDED_LIFECYCLE_ID = "extended-lifecycle-id";
+
+ private final static String LIFECYCLE_EXTENSION = CommonStructuresUtil
+ .createPreficedString(LIFECYCLE, "extension");
+ private final static String LIFECYCLE_EXTENSION_ID = CommonStructuresUtil
+ .createPreficedString(LIFECYCLE_EXTENSION, "id");
+ private final static String LIFECYCLE_EXTENSION_TAG = CommonStructuresUtil
+ .createPreficedString(LIFECYCLE_EXTENSION, "tag");
+
+ public WriteLifecycleTestCase_1_2(String name) {
+ super(name);
+ }
+
+ public void testLifecycleExtension() {
+ FacesConfigArtifactEdit edit = null;
+
+ try {
+ edit = getArtifactEditForWrite();
+ assertNotNull(edit.getFacesConfig());
+ FacesConfigPackage facesConfigPackage = FacesConfigPackage.eINSTANCE;
+ FacesConfigFactory facesConfigFactory = facesConfigPackage
+ .getFacesConfigFactory();
+
+ LifecycleType lifecycle = facesConfigFactory.createLifecycleType();
+ lifecycle.setId(EXTENDED_LIFECYCLE_ID);
+
+ LifecycleExtensionType extensionType = facesConfigFactory
+ .createLifecycleExtensionType();
+ extensionType.setId(LIFECYCLE_EXTENSION_ID);
+
+ extensionType.getChildNodes().add(
+ createDynamicElement(LIFECYCLE_EXTENSION_TAG));
+
+ lifecycle.getLifecycleExtension().add(extensionType);
+ edit.getFacesConfig().getLifecycle().add(lifecycle);
+ edit.save(null);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ assertTrue(edit.isDisposed());
+ edit = null;
+ }
+ }
+
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ LifecycleType lifecycle = (LifecycleType) FacesConfigModelUtil
+ .findEObjectElementById(edit.getFacesConfig()
+ .getLifecycle(), EXTENDED_LIFECYCLE_ID);
+ assertNotNull(lifecycle);
+
+ assertEquals(1, lifecycle.getLifecycleExtension().size());
+ LifecycleExtensionType extensionType = (LifecycleExtensionType) lifecycle
+ .getLifecycleExtension().get(0);
+ assertEquals(LIFECYCLE_EXTENSION_ID, extensionType.getId());
+
+ assertEquals(1, extensionType.getChildNodes().size());
+ DynamicElement element = (DynamicElement) extensionType
+ .getChildNodes().get(0);
+ assertEquals(LIFECYCLE_EXTENSION_TAG, element.getName());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteManagedBeanTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteManagedBeanTestCase.java
new file mode 100644
index 000000000..05449339e
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteManagedBeanTestCase.java
@@ -0,0 +1,396 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests.write;
+
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.emf.ListEntriesType;
+import org.eclipse.jst.jsf.facesconfig.emf.ManagedBeanClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.ManagedBeanNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.ManagedBeanScopeType;
+import org.eclipse.jst.jsf.facesconfig.emf.ManagedBeanType;
+import org.eclipse.jst.jsf.facesconfig.emf.ManagedPropertyType;
+import org.eclipse.jst.jsf.facesconfig.emf.MapEntriesType;
+import org.eclipse.jst.jsf.facesconfig.emf.NullValueType;
+import org.eclipse.jst.jsf.facesconfig.emf.ValueType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.CommonStructuresUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+
+public class WriteManagedBeanTestCase extends BaseWriteTestCase {
+
+ protected final static String MANAGED_BEAN = "managed-bean";
+ private final static String SCOPE = "scope";
+ private final static String MANAGED_BEAN_NAME =
+ CommonStructuresUtil.createPreficedString(MANAGED_BEAN, CommonStructuresUtil.NAME);
+ private final static String MANAGED_BEAN_SCOPE =
+ CommonStructuresUtil.createPreficedString(MANAGED_BEAN, SCOPE);
+ private final static String MANAGED_BEAN_CLASS =
+ CommonStructuresUtil.createPreficedString(MANAGED_BEAN, CommonStructuresUtil.CLASS);
+ private final static String MANAGED_BEAN_PROPERTY =
+ CommonStructuresUtil.createPreficedString(MANAGED_BEAN, "property");
+
+ public WriteManagedBeanTestCase(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ FacesConfigArtifactEdit edit = null;
+ try
+ {
+ edit =
+ getArtifactEditForWrite();
+ edit.getFacesConfig().getManagedBean().clear();
+ edit.save(null);
+ }
+ finally
+ {
+ if (edit != null)
+ {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testWriteManagedBean()
+ {
+ FacesConfigArtifactEdit edit = null;
+
+ try {
+ edit = getArtifactEditForWrite();
+ assertNotNull(edit.getFacesConfig());
+ FacesConfigPackage facesConfigPackage = FacesConfigPackage.eINSTANCE;
+ FacesConfigFactory facesConfigFactory = facesConfigPackage.getFacesConfigFactory();
+
+ ManagedBeanType managedBean = createManagedBeanBase();
+
+
+ { // null value
+ ManagedPropertyType managedPropWithNullValue =
+ CommonStructuresUtil
+ .createManagedPropertyBase(
+ CommonStructuresUtil.createPreficedString("null", MANAGED_BEAN_PROPERTY));
+
+ NullValueType nullValue = facesConfigFactory.createNullValueType();
+ nullValue.setId(
+ CommonStructuresUtil.createPreficedString(
+ CommonStructuresUtil.createPreficedString("null", MANAGED_BEAN_PROPERTY)
+ , CommonStructuresUtil.ID));
+ managedPropWithNullValue.setNullValue(nullValue);
+ managedBean.getManagedProperty().add(managedPropWithNullValue);
+ }
+
+ { // value property
+ ManagedPropertyType managedPropWithValue =
+ CommonStructuresUtil
+ .createManagedPropertyBase(
+ CommonStructuresUtil.createPreficedString("value", MANAGED_BEAN_PROPERTY));
+
+ managedPropWithValue.setValue
+ (CommonStructuresUtil.createValue(MANAGED_BEAN_PROPERTY));
+ managedBean.getManagedProperty().add(managedPropWithValue);
+ }
+
+ { // map property
+ ManagedPropertyType managedMapProp =
+ CommonStructuresUtil
+ .createManagedPropertyBase(
+ CommonStructuresUtil.createPreficedString("map", MANAGED_BEAN_PROPERTY));
+
+ managedMapProp.setMapEntries(
+ (CommonStructuresUtil.createMapEntries(MANAGED_BEAN_PROPERTY)));
+ managedBean.getManagedProperty()
+ .add(managedMapProp);
+ }
+
+ { // list property
+ ManagedPropertyType managedListProp =
+ CommonStructuresUtil
+ .createManagedPropertyBase(
+ CommonStructuresUtil.createPreficedString("list", MANAGED_BEAN_PROPERTY));
+
+ managedListProp.setListEntries(
+ (CommonStructuresUtil.createListEntries(MANAGED_BEAN_PROPERTY)));
+ managedBean.getManagedProperty()
+ .add(managedListProp);
+ }
+
+ edit.getFacesConfig().getManagedBean().add(managedBean);
+ edit.save(null);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ assertTrue(edit.isDisposed());
+ edit = null;
+ }
+ }
+
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ assertEquals(1, edit.getFacesConfig().getManagedBean().size());
+
+ ManagedBeanType managedBean =
+ (ManagedBeanType) edit.getFacesConfig().getManagedBean().get(0);
+
+ assertMatchManagedBeanBase(managedBean);
+
+ assertEquals(4, managedBean.getManagedProperty().size());
+
+ { // null value
+ ManagedPropertyType managedPropWithNullValue =
+ (ManagedPropertyType) managedBean.getManagedProperty().get(0);
+
+ CommonStructuresUtil.assertMatchManagedPropertyBase
+ (CommonStructuresUtil.createPreficedString("null", MANAGED_BEAN_PROPERTY)
+ ,managedPropWithNullValue);
+
+ NullValueType nullValue = managedPropWithNullValue.getNullValue();
+ assertEquals(CommonStructuresUtil.createPreficedString(
+ CommonStructuresUtil.createPreficedString("null", MANAGED_BEAN_PROPERTY)
+ , CommonStructuresUtil.ID)
+ , nullValue.getId());
+ }
+
+ { // value property
+ ManagedPropertyType managedPropWithValue =
+ (ManagedPropertyType) managedBean.getManagedProperty().get(1);
+
+ CommonStructuresUtil.assertMatchManagedPropertyBase
+ (CommonStructuresUtil.createPreficedString("value", MANAGED_BEAN_PROPERTY)
+ ,managedPropWithValue);
+
+ ValueType valueType = managedPropWithValue.getValue();
+ CommonStructuresUtil.assertMatchValue(MANAGED_BEAN_PROPERTY, valueType);
+ }
+
+ { // map property
+ ManagedPropertyType managedMapProp =
+ (ManagedPropertyType) managedBean.getManagedProperty().get(2);
+
+ CommonStructuresUtil
+ .assertMatchManagedPropertyBase(
+ CommonStructuresUtil.createPreficedString("map", MANAGED_BEAN_PROPERTY)
+ , managedMapProp);
+
+ CommonStructuresUtil.assertMatchMapEntries(MANAGED_BEAN_PROPERTY
+ ,managedMapProp.getMapEntries());
+ }
+
+ { // list property
+ ManagedPropertyType managedListProp =
+ (ManagedPropertyType) managedBean.getManagedProperty().get(3);
+
+ CommonStructuresUtil
+ .assertMatchManagedPropertyBase(
+ CommonStructuresUtil.createPreficedString("list", MANAGED_BEAN_PROPERTY)
+ , managedListProp);
+
+ CommonStructuresUtil.assertMatchListEntries(MANAGED_BEAN_PROPERTY
+ , managedListProp.getListEntries());
+ }
+
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testWriteMapManagedBean()
+ {
+ FacesConfigArtifactEdit edit = null;
+
+ try
+ {
+ edit = getArtifactEditForWrite();
+ assertNotNull(edit.getFacesConfig());
+
+ ManagedBeanType managedBean = createManagedBeanBase();
+ managedBean.setMapEntries(CommonStructuresUtil.createMapEntries(MANAGED_BEAN));
+
+ edit.getFacesConfig().getManagedBean().add(managedBean);
+ edit.save(null);
+ }
+ finally
+ {
+ if (edit != null)
+ {
+ edit.dispose();
+ assertTrue(edit.isDisposed());
+ edit = null;
+ }
+ }
+
+ try
+ {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ assertEquals(1, edit.getFacesConfig().getManagedBean().size());
+ ManagedBeanType managedBean =
+ (ManagedBeanType) edit.getFacesConfig().getManagedBean().get(0);
+
+ assertMatchManagedBeanBase(managedBean);
+ MapEntriesType mapEntries = managedBean.getMapEntries();
+ CommonStructuresUtil.assertMatchMapEntries(MANAGED_BEAN, mapEntries);
+ }
+ finally
+ {
+ if (edit != null)
+ {
+ edit.dispose();
+ }
+ }
+ }
+
+ public void testWriteListManagedBean()
+ {
+ FacesConfigArtifactEdit edit = null;
+
+ try
+ {
+ edit = getArtifactEditForWrite();
+ assertNotNull(edit.getFacesConfig());
+
+ ManagedBeanType managedBean = createManagedBeanBase();
+ managedBean.setListEntries(CommonStructuresUtil.createListEntries(MANAGED_BEAN));
+ edit.getFacesConfig().getManagedBean().add(managedBean);
+ edit.save(null);
+ }
+ finally
+ {
+ if (edit != null)
+ {
+ edit.dispose();
+ assertTrue(edit.isDisposed());
+ edit = null;
+ }
+ }
+
+ try
+ {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ assertEquals(1, edit.getFacesConfig().getManagedBean().size());
+ ManagedBeanType managedBean =
+ (ManagedBeanType) edit.getFacesConfig().getManagedBean().get(0);
+
+ assertMatchManagedBeanBase(managedBean);
+ ListEntriesType mapEntries = managedBean.getListEntries();
+ CommonStructuresUtil.assertMatchListEntries(MANAGED_BEAN, mapEntries);
+ }
+ finally
+ {
+ if (edit != null)
+ {
+ edit.dispose();
+ }
+ }
+ }
+
+ private ManagedBeanType createManagedBeanBase()
+ {
+ FacesConfigPackage facesConfigPackage = FacesConfigPackage.eINSTANCE;
+ FacesConfigFactory facesConfigFactory = facesConfigPackage.getFacesConfigFactory();
+
+ ManagedBeanType managedBean = facesConfigFactory.createManagedBeanType();
+
+ managedBean.getDescription().add(CommonStructuresUtil.createDescription(MANAGED_BEAN));
+ managedBean.getDisplayName().add(CommonStructuresUtil.createDisplayName(MANAGED_BEAN));
+ managedBean.getIcon().add(CommonStructuresUtil.createIcon(MANAGED_BEAN));
+
+ {
+ ManagedBeanNameType managedBeanNameType = facesConfigFactory.createManagedBeanNameType();
+ managedBeanNameType.setTextContent(MANAGED_BEAN_NAME);
+ managedBeanNameType.setId(
+ CommonStructuresUtil.createPreficedString(MANAGED_BEAN_NAME
+ , CommonStructuresUtil.ID));
+ managedBean.setManagedBeanName(managedBeanNameType);
+ }
+
+ {
+ ManagedBeanClassType managedBeanClassType = facesConfigFactory.createManagedBeanClassType();
+ managedBeanClassType.setTextContent(MANAGED_BEAN_CLASS);
+ managedBeanClassType.setId(
+ CommonStructuresUtil.createPreficedString(MANAGED_BEAN_CLASS
+ , CommonStructuresUtil.ID));
+ managedBean.setManagedBeanClass(managedBeanClassType);
+ }
+
+ {
+ ManagedBeanScopeType managedBeanScopeType = facesConfigFactory.createManagedBeanScopeType();
+ managedBeanScopeType.setTextContent(MANAGED_BEAN_SCOPE);
+ managedBeanScopeType.setId(
+ CommonStructuresUtil.createPreficedString(MANAGED_BEAN_SCOPE
+ , CommonStructuresUtil.ID));
+ managedBean.setManagedBeanScope(managedBeanScopeType);
+ }
+
+ return managedBean;
+ }
+
+
+ private void assertMatchManagedBeanBase(ManagedBeanType managedBean)
+ {
+ {
+ assertEquals(1, managedBean.getDescription().size());
+ DescriptionType description =
+ (DescriptionType) managedBean.getDescription().get(0);
+ CommonStructuresUtil.assertMatchesDescription(MANAGED_BEAN, description);
+ }
+
+ {
+ assertEquals(1, managedBean.getDisplayName().size());
+ DisplayNameType displayName =
+ (DisplayNameType) managedBean.getDisplayName().get(0);
+ CommonStructuresUtil.assertMatchesDisplayName(MANAGED_BEAN, displayName);
+ }
+
+ {
+ assertEquals(1, managedBean.getIcon().size());
+ IconType icon =
+ (IconType) managedBean.getIcon().get(0);
+ CommonStructuresUtil.assertMatchesIcon(MANAGED_BEAN, icon);
+ }
+
+ {
+ ManagedBeanNameType managedBeanNameType = managedBean.getManagedBeanName();
+ assertEquals(MANAGED_BEAN_NAME, managedBeanNameType.getTextContent());
+ assertEquals(CommonStructuresUtil.createPreficedString(MANAGED_BEAN_NAME
+ , CommonStructuresUtil.ID)
+ ,managedBeanNameType.getId());
+ }
+
+ {
+ ManagedBeanClassType managedBeanClassType = managedBean.getManagedBeanClass();
+ assertEquals(MANAGED_BEAN_CLASS, managedBeanClassType.getTextContent());
+ assertEquals(CommonStructuresUtil.createPreficedString(MANAGED_BEAN_CLASS
+ , CommonStructuresUtil.ID)
+ , managedBeanClassType.getId());
+ }
+
+ {
+ ManagedBeanScopeType managedBeanScopeType = managedBean.getManagedBeanScope();
+ assertEquals(MANAGED_BEAN_SCOPE, managedBeanScopeType.getTextContent());
+ assertEquals(CommonStructuresUtil.createPreficedString(MANAGED_BEAN_SCOPE
+ , CommonStructuresUtil.ID)
+ , managedBeanScopeType.getId());
+ }
+ }
+}
+
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteManagedBeanTestCase_1_2.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteManagedBeanTestCase_1_2.java
new file mode 100644
index 000000000..3ad821dd4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteManagedBeanTestCase_1_2.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2006 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.facesconfig.tests.write;
+
+import org.eclipse.jst.jsf.facesconfig.emf.DynamicElement;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
+import org.eclipse.jst.jsf.facesconfig.emf.ManagedBeanExtensionType;
+import org.eclipse.jst.jsf.facesconfig.emf.ManagedBeanType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.CommonStructuresUtil;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class WriteManagedBeanTestCase_1_2 extends WriteManagedBeanTestCase {
+ private final static String EXTENDED_MANAGED_BEAN_ID = "extended-managed-bean-id";
+
+ private final static String MANAGED_BEAN_EXTENSION = CommonStructuresUtil
+ .createPreficedString(MANAGED_BEAN, "extension");
+ private final static String MANAGED_BEAN_EXTENSION_ID = CommonStructuresUtil
+ .createPreficedString(MANAGED_BEAN_EXTENSION, "id");
+ private final static String MANAGED_BEAN_EXTENSION_TAG = CommonStructuresUtil
+ .createPreficedString(MANAGED_BEAN_EXTENSION, "tag");
+
+ public WriteManagedBeanTestCase_1_2(String name) {
+ super(name);
+ }
+
+ public void testManagedBeanExtension() {
+ FacesConfigArtifactEdit edit = null;
+
+ try {
+ edit = getArtifactEditForWrite();
+ assertNotNull(edit.getFacesConfig());
+ FacesConfigPackage facesConfigPackage = FacesConfigPackage.eINSTANCE;
+ FacesConfigFactory facesConfigFactory = facesConfigPackage
+ .getFacesConfigFactory();
+
+ ManagedBeanType managedBean = facesConfigFactory.createManagedBeanType();
+ managedBean.setId(EXTENDED_MANAGED_BEAN_ID);
+
+ ManagedBeanExtensionType extensionType = facesConfigFactory
+ .createManagedBeanExtensionType();
+ extensionType.setId(MANAGED_BEAN_EXTENSION_ID);
+
+ extensionType.getChildNodes().add(
+ createDynamicElement(MANAGED_BEAN_EXTENSION_TAG));
+
+ managedBean.getManagedBeanExtension().add(extensionType);
+ edit.getFacesConfig().getManagedBean().add(managedBean);
+ edit.save(null);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ assertTrue(edit.isDisposed());
+ edit = null;
+ }
+ }
+
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ ManagedBeanType managedBean = (ManagedBeanType) FacesConfigModelUtil
+ .findEObjectElementById(edit.getFacesConfig()
+ .getManagedBean(), EXTENDED_MANAGED_BEAN_ID);
+ assertNotNull(managedBean);
+
+ assertEquals(1, managedBean.getManagedBeanExtension().size());
+ ManagedBeanExtensionType extensionType = (ManagedBeanExtensionType) managedBean
+ .getManagedBeanExtension().get(0);
+ assertEquals(MANAGED_BEAN_EXTENSION_ID, extensionType.getId());
+
+ assertEquals(1, extensionType.getChildNodes().size());
+ DynamicElement element = (DynamicElement) extensionType
+ .getChildNodes().get(0);
+ assertEquals(MANAGED_BEAN_EXTENSION_TAG, element.getName());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteManagedBeanTestCase_2_0.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteManagedBeanTestCase_2_0.java
new file mode 100644
index 000000000..e5e86b9b8
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteManagedBeanTestCase_2_0.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2006 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.facesconfig.tests.write;
+
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
+import org.eclipse.jst.jsf.facesconfig.emf.ManagedBeanType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class WriteManagedBeanTestCase_2_0 extends WriteManagedBeanTestCase_1_2 {
+ private final static String EXTENDED_MANAGED_BEAN_ID20 = "extended-managed-bean-id-20";
+
+ public WriteManagedBeanTestCase_2_0(String name) {
+ super(name);
+ }
+
+ public void testManagedBeanExtension() {
+ FacesConfigArtifactEdit edit = null;
+
+ try {
+ edit = getArtifactEditForWrite();
+ assertNotNull(edit.getFacesConfig());
+ FacesConfigPackage facesConfigPackage = FacesConfigPackage.eINSTANCE;
+ FacesConfigFactory facesConfigFactory = facesConfigPackage.getFacesConfigFactory();
+
+ ManagedBeanType managedBean = facesConfigFactory.createManagedBeanType();
+ managedBean.setId(EXTENDED_MANAGED_BEAN_ID20);
+ managedBean.setEager(true);
+
+ edit.getFacesConfig().getManagedBean().add(managedBean);
+ edit.save(null);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ assertTrue(edit.isDisposed());
+ edit = null;
+ }
+ }
+
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ ManagedBeanType managedBean = (ManagedBeanType) FacesConfigModelUtil
+ .findEObjectElementById(edit.getFacesConfig()
+ .getManagedBean(), EXTENDED_MANAGED_BEAN_ID20);
+ assertNotNull(managedBean);
+ assertEquals(true, managedBean.isEager());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteNavigationRuleTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteNavigationRuleTestCase.java
new file mode 100644
index 000000000..76c115923
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteNavigationRuleTestCase.java
@@ -0,0 +1,201 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests.write;
+
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
+import org.eclipse.jst.jsf.facesconfig.emf.FromActionType;
+import org.eclipse.jst.jsf.facesconfig.emf.FromOutcomeType;
+import org.eclipse.jst.jsf.facesconfig.emf.FromViewIdType;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.emf.NavigationCaseType;
+import org.eclipse.jst.jsf.facesconfig.emf.NavigationRuleType;
+import org.eclipse.jst.jsf.facesconfig.emf.ToViewIdType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.CommonStructuresUtil;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+
+public class WriteNavigationRuleTestCase extends BaseWriteTestCase {
+ protected static final String NAVIGATION_RULE = "navigation-rule";
+ private static final String FROM_VIEW_ID = "from-view-id";
+ private static final String FROM_VIEW_ID_ID =
+ CommonStructuresUtil.createPreficedString(FROM_VIEW_ID, CommonStructuresUtil.ID);
+ private static final String NAVIGATION_RULE_ID =
+ CommonStructuresUtil.createPreficedString(NAVIGATION_RULE, CommonStructuresUtil.ID);
+
+ private static final String NAVIGATION_CASE = "navigation-case";
+ private static final String FROM_ACTION = "from-action";
+ private static final String NAVIGATION_CASE_FROM_ACTION =
+ CommonStructuresUtil.createPreficedString(NAVIGATION_CASE,FROM_ACTION);
+ private static final String FROM_OUTCOME = "from-outcome";
+ private static final String NAVIGATION_CASE_FROM_OUTCOME =
+ CommonStructuresUtil.createPreficedString(NAVIGATION_CASE,FROM_OUTCOME);
+ private static final String TO_VIEW_ID = "from-view-id";
+ private static final String NAVIGATION_CASE_TO_VIEW_ID =
+ CommonStructuresUtil.createPreficedString(NAVIGATION_CASE,TO_VIEW_ID);
+
+ public WriteNavigationRuleTestCase(String name) {
+ super(name);
+ }
+
+
+ public void testWriteNavigationRule() {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = getArtifactEditForWrite();
+ assertNotNull(edit.getFacesConfig());
+
+ FacesConfigPackage facesConfigPackage = FacesConfigPackage.eINSTANCE;
+ FacesConfigFactory facesConfigFactory = facesConfigPackage.getFacesConfigFactory();
+
+ NavigationRuleType navigationRule = facesConfigFactory.createNavigationRuleType();
+
+ navigationRule.getDescription().add(CommonStructuresUtil.createDescription(NAVIGATION_RULE));
+ navigationRule.getDisplayName().add(CommonStructuresUtil.createDisplayName(NAVIGATION_RULE));
+ navigationRule.getIcon().add(CommonStructuresUtil.createIcon(NAVIGATION_RULE));
+
+ FromViewIdType fromViewIdType = facesConfigFactory.createFromViewIdType();
+ fromViewIdType.setTextContent(FROM_VIEW_ID);
+ fromViewIdType.setId(FROM_VIEW_ID_ID);
+ navigationRule.setFromViewId(fromViewIdType);
+
+ NavigationCaseType navCaseType = facesConfigFactory.createNavigationCaseType();
+
+ navCaseType.getDescription().add(CommonStructuresUtil.createDescription(NAVIGATION_CASE));
+ navCaseType.getDisplayName().add(CommonStructuresUtil.createDisplayName(NAVIGATION_CASE));
+ navCaseType.getIcon().add(CommonStructuresUtil.createIcon(NAVIGATION_CASE));
+
+ {
+ FromActionType fromActionType = facesConfigFactory.createFromActionType();
+ fromActionType.setTextContent(NAVIGATION_CASE_FROM_ACTION);
+ fromActionType.setId(
+ CommonStructuresUtil.createPreficedString(NAVIGATION_CASE_FROM_ACTION
+ , CommonStructuresUtil.ID));
+ navCaseType.setFromAction(fromActionType);
+ }
+
+ {
+ FromOutcomeType fromOutcomeType = facesConfigFactory.createFromOutcomeType();
+ fromOutcomeType.setTextContent(NAVIGATION_CASE_FROM_OUTCOME);
+ fromOutcomeType.setId(
+ CommonStructuresUtil.createPreficedString(NAVIGATION_CASE_FROM_OUTCOME
+ , CommonStructuresUtil.ID));
+ navCaseType.setFromOutcome(fromOutcomeType);
+ }
+
+ {
+ ToViewIdType toViewIdType = facesConfigFactory.createToViewIdType();
+ toViewIdType.setTextContent(NAVIGATION_CASE_TO_VIEW_ID);
+ toViewIdType.setId(
+ CommonStructuresUtil.createPreficedString(NAVIGATION_CASE_TO_VIEW_ID
+ , CommonStructuresUtil.ID));
+ navCaseType.setToViewId(toViewIdType);
+ }
+
+ navigationRule.getNavigationCase().add(navCaseType);
+ navigationRule.setId(NAVIGATION_RULE_ID);
+
+ edit.getFacesConfig().getNavigationRule().add(navigationRule);
+ edit.save(null);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ assertTrue(edit.isDisposed());
+ edit = null;
+ }
+ }
+
+ try
+ {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ NavigationRuleType navigationRule =
+ (NavigationRuleType) FacesConfigModelUtil
+ .findEObjectElementById(
+ edit.getFacesConfig().getNavigationRule(), NAVIGATION_RULE_ID);
+ assertNotNull(navigationRule);
+
+
+ assertEquals(1, navigationRule.getDescription().size());
+ CommonStructuresUtil.assertMatchesDescription
+ (NAVIGATION_RULE, (DescriptionType) navigationRule.getDescription().get(0));
+
+ assertEquals(1, navigationRule.getDisplayName().size());
+ CommonStructuresUtil.assertMatchesDisplayName
+ (NAVIGATION_RULE, (DisplayNameType) navigationRule.getDisplayName().get(0));
+
+ assertEquals(1, navigationRule.getIcon().size());
+ CommonStructuresUtil.assertMatchesIcon
+ (NAVIGATION_RULE, (IconType) navigationRule.getIcon().get(0));
+
+ FromViewIdType fromViewIdType = navigationRule.getFromViewId();
+ assertEquals(FROM_VIEW_ID, fromViewIdType.getTextContent());
+ assertEquals(FROM_VIEW_ID_ID, fromViewIdType.getId());
+
+ assertEquals(1, navigationRule.getNavigationCase().size());
+ NavigationCaseType navCaseType =
+ (NavigationCaseType) navigationRule.getNavigationCase().get(0);
+
+ assertEquals(1, navCaseType.getDescription().size());
+ CommonStructuresUtil.assertMatchesDescription(NAVIGATION_CASE
+ ,(DescriptionType)navCaseType.getDescription().get(0));
+
+ assertEquals(1, navCaseType.getDisplayName().size());
+ CommonStructuresUtil.assertMatchesDisplayName(NAVIGATION_CASE
+ ,(DisplayNameType)navCaseType.getDisplayName().get(0));
+
+ assertEquals(1, navCaseType.getIcon().size());
+ CommonStructuresUtil.assertMatchesIcon(NAVIGATION_CASE
+ ,(IconType)navCaseType.getIcon().get(0));
+
+ navCaseType.getIcon().add(CommonStructuresUtil.createIcon(NAVIGATION_CASE));
+
+ {
+ FromActionType fromActionType = navCaseType.getFromAction();
+ assertEquals(NAVIGATION_CASE_FROM_ACTION
+ ,fromActionType.getTextContent());
+ assertEquals(CommonStructuresUtil.createPreficedString(NAVIGATION_CASE_FROM_ACTION
+ , CommonStructuresUtil.ID)
+ ,fromActionType.getId());
+ }
+
+ {
+ FromOutcomeType fromOutcomeType = navCaseType.getFromOutcome();
+ assertEquals(NAVIGATION_CASE_FROM_OUTCOME, fromOutcomeType.getTextContent());
+ assertEquals(CommonStructuresUtil.createPreficedString(NAVIGATION_CASE_FROM_OUTCOME
+ , CommonStructuresUtil.ID)
+ ,fromOutcomeType.getId());
+ }
+
+ {
+ ToViewIdType toViewIdType = navCaseType.getToViewId();
+ assertEquals(NAVIGATION_CASE_TO_VIEW_ID, toViewIdType.getTextContent());
+ assertEquals(CommonStructuresUtil.createPreficedString(NAVIGATION_CASE_TO_VIEW_ID
+ , CommonStructuresUtil.ID)
+ ,toViewIdType.getId());
+ }
+
+ assertEquals(CommonStructuresUtil.createPreficedString(NAVIGATION_RULE, CommonStructuresUtil.ID)
+ , navigationRule.getId());
+ }
+ finally
+ {
+ if (edit != null)
+ {
+ edit.dispose();
+ }
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteNavigationRuleTestCase_1_2.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteNavigationRuleTestCase_1_2.java
new file mode 100644
index 000000000..55edada13
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteNavigationRuleTestCase_1_2.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2006 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.facesconfig.tests.write;
+
+import org.eclipse.jst.jsf.facesconfig.emf.DynamicElement;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
+import org.eclipse.jst.jsf.facesconfig.emf.NavigationRuleExtensionType;
+import org.eclipse.jst.jsf.facesconfig.emf.NavigationRuleType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.CommonStructuresUtil;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+/**
+ * @author cbateman
+ *
+ */
+public class WriteNavigationRuleTestCase_1_2 extends
+ WriteNavigationRuleTestCase {
+ private final static String EXTENDED_NAVIGATION_RULE_ID = "extended-navigation-rule-id";
+
+ private final static String NAVIGATION_RULE_EXTENSION = CommonStructuresUtil
+ .createPreficedString(NAVIGATION_RULE, "extension");
+ private final static String NAVIGATION_RULE_EXTENSION_ID = CommonStructuresUtil
+ .createPreficedString(NAVIGATION_RULE_EXTENSION, "id");
+ private final static String NAVIGATION_RULE_EXTENSION_TAG = CommonStructuresUtil
+ .createPreficedString(NAVIGATION_RULE_EXTENSION, "tag");
+
+ public WriteNavigationRuleTestCase_1_2(String name) {
+ super(name);
+ }
+
+ public void testNavigationRuleExtension() {
+ FacesConfigArtifactEdit edit = null;
+
+ try {
+ edit = getArtifactEditForWrite();
+ assertNotNull(edit.getFacesConfig());
+ FacesConfigPackage facesConfigPackage = FacesConfigPackage.eINSTANCE;
+ FacesConfigFactory facesConfigFactory = facesConfigPackage
+ .getFacesConfigFactory();
+
+ NavigationRuleType navigationRule = facesConfigFactory.createNavigationRuleType();
+ navigationRule.setId(EXTENDED_NAVIGATION_RULE_ID);
+
+ NavigationRuleExtensionType extensionType = facesConfigFactory
+ .createNavigationRuleExtensionType();
+ extensionType.setId(NAVIGATION_RULE_EXTENSION_ID);
+
+ extensionType.getChildNodes().add(
+ createDynamicElement(NAVIGATION_RULE_EXTENSION_TAG));
+
+ navigationRule.getNavigationRuleExtension().add(extensionType);
+ edit.getFacesConfig().getNavigationRule().add(navigationRule);
+ edit.save(null);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ assertTrue(edit.isDisposed());
+ edit = null;
+ }
+ }
+
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ NavigationRuleType navigationRule = (NavigationRuleType) FacesConfigModelUtil
+ .findEObjectElementById(edit.getFacesConfig()
+ .getNavigationRule(), EXTENDED_NAVIGATION_RULE_ID);
+ assertNotNull(navigationRule);
+
+ assertEquals(1, navigationRule.getNavigationRuleExtension().size());
+ NavigationRuleExtensionType extensionType = (NavigationRuleExtensionType) navigationRule
+ .getNavigationRuleExtension().get(0);
+ assertEquals(NAVIGATION_RULE_EXTENSION_ID, extensionType.getId());
+
+ assertEquals(1, extensionType.getChildNodes().size());
+ DynamicElement element = (DynamicElement) extensionType
+ .getChildNodes().get(0);
+ assertEquals(NAVIGATION_RULE_EXTENSION_TAG, element.getName());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteNavigationRuleTestCase_2_0.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteNavigationRuleTestCase_2_0.java
new file mode 100644
index 000000000..28dc8dcdc
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteNavigationRuleTestCase_2_0.java
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2006 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.facesconfig.tests.write;
+
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
+import org.eclipse.jst.jsf.facesconfig.emf.IfType;
+import org.eclipse.jst.jsf.facesconfig.emf.NameType;
+import org.eclipse.jst.jsf.facesconfig.emf.NavigationCaseType;
+import org.eclipse.jst.jsf.facesconfig.emf.NavigationRuleType;
+import org.eclipse.jst.jsf.facesconfig.emf.RedirectType;
+import org.eclipse.jst.jsf.facesconfig.emf.RedirectViewParamType;
+import org.eclipse.jst.jsf.facesconfig.emf.ValueType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+/**
+ * @author cbateman
+ *
+ */
+public class WriteNavigationRuleTestCase_2_0 extends
+ WriteNavigationRuleTestCase_1_2 {
+ private final static String NAVIGATION_RULE_ID = "navigation-rule-id-20";
+ private final static String NAVIGATION_CASE_ID = "navigation-case-id-20";
+ private final static String IFEXPRESSION = "if-expr";
+ private final static String NAME = "name";
+ private final static String VALUE = "value";
+
+ public WriteNavigationRuleTestCase_2_0(String name) {
+ super(name);
+ }
+
+ public void testNavigationRule20() {
+ FacesConfigArtifactEdit edit = null;
+
+ try {
+ edit = getArtifactEditForWrite();
+ assertNotNull(edit.getFacesConfig());
+ FacesConfigPackage facesConfigPackage = FacesConfigPackage.eINSTANCE;
+ FacesConfigFactory facesConfigFactory = facesConfigPackage.getFacesConfigFactory();
+
+ NavigationRuleType navigationRule = facesConfigFactory.createNavigationRuleType();
+ navigationRule.setId(NAVIGATION_RULE_ID);
+
+ NavigationCaseType navigationCase = facesConfigFactory.createNavigationCaseType();
+ navigationCase.setId(NAVIGATION_CASE_ID);
+ navigationRule.getNavigationCase().add(navigationCase);
+
+ IfType ifexpr = facesConfigFactory.createIfType();
+ ifexpr.setTextContent(IFEXPRESSION);
+ navigationCase.setIf(ifexpr);
+
+ RedirectType redirect = facesConfigFactory.createRedirectType();
+ redirect.setIncludeViewParams(true);
+ navigationCase.setRedirect(redirect);
+
+ RedirectViewParamType viewParam = facesConfigFactory.createRedirectViewParamType();
+ redirect.getViewParam().add(viewParam);
+
+ NameType name = facesConfigFactory.createNameType();
+ name.setTextContent(NAME);
+ viewParam.setName(name);
+ ValueType value = facesConfigFactory.createValueType();
+ value.setTextContent(VALUE);
+ viewParam.setValue(value);
+
+ edit.getFacesConfig().getNavigationRule().add(navigationRule);
+ edit.save(null);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ assertTrue(edit.isDisposed());
+ edit = null;
+ }
+ }
+
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ NavigationRuleType navigationRule = (NavigationRuleType) FacesConfigModelUtil
+ .findEObjectElementById(edit.getFacesConfig()
+ .getNavigationRule(), NAVIGATION_RULE_ID);
+ assertNotNull(navigationRule);
+
+ NavigationCaseType navigationCase = (NavigationCaseType) FacesConfigModelUtil
+ .findEObjectElementById(navigationRule.getNavigationCase(), NAVIGATION_CASE_ID);
+ assertNotNull(navigationCase);
+
+ IfType ifexpr = navigationCase.getIf();
+ assertNotNull(ifexpr);
+ assertEquals(IFEXPRESSION, ifexpr.getTextContent().trim());
+
+ RedirectType redirect = navigationCase.getRedirect();
+ assertNotNull(redirect);
+ assertEquals(true, redirect.isIncludeViewParams());
+
+ assertEquals(1, redirect.getViewParam().size());
+ RedirectViewParamType viewParam = (RedirectViewParamType)redirect.getViewParam().get(0);
+ assertEquals(NAME, viewParam.getName().getTextContent().trim());
+ assertEquals(VALUE, viewParam.getValue().getTextContent().trim());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteReferencedBeanTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteReferencedBeanTestCase.java
new file mode 100644
index 000000000..0ec475faf
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteReferencedBeanTestCase.java
@@ -0,0 +1,131 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests.write;
+
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.emf.ReferencedBeanClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.ReferencedBeanNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.ReferencedBeanType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.CommonStructuresUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+
+public class WriteReferencedBeanTestCase extends BaseWriteTestCase {
+ private final static String REFERENCED_BEAN = "referenced-bean";
+ private final static String REFERENCED_BEAN_NAME =
+ CommonStructuresUtil.createPreficedString(REFERENCED_BEAN, CommonStructuresUtil.NAME);
+ private final static String REFERENCED_BEAN_CLASS =
+ CommonStructuresUtil.createPreficedString(REFERENCED_BEAN, CommonStructuresUtil.CLASS);
+
+ public WriteReferencedBeanTestCase(String name) {
+ super(name);
+ }
+
+ public void testWriteReferencedBeanToFileTwo()
+ {
+ FacesConfigArtifactEdit edit = null;
+
+ try
+ {
+ edit = getArtifactEditForWrite();
+ assertNotNull(edit.getFacesConfig());
+
+ FacesConfigPackage facesConfigPackage = FacesConfigPackage.eINSTANCE;
+ FacesConfigFactory facesConfigFactory = facesConfigPackage.getFacesConfigFactory();
+
+ ReferencedBeanType referencedBean = facesConfigFactory.createReferencedBeanType();
+
+ referencedBean.getDescription().add(CommonStructuresUtil.createDescription(REFERENCED_BEAN));
+ referencedBean.getDisplayName().add(CommonStructuresUtil.createDisplayName(REFERENCED_BEAN));
+ referencedBean.getIcon().add(CommonStructuresUtil.createIcon(REFERENCED_BEAN));
+
+ {
+ ReferencedBeanNameType referencedBeanNameType =
+ facesConfigFactory.createReferencedBeanNameType();
+ referencedBeanNameType.setTextContent(REFERENCED_BEAN_NAME);
+ referencedBeanNameType.setId(
+ CommonStructuresUtil.createPreficedString(
+ REFERENCED_BEAN_NAME, CommonStructuresUtil.ID));
+ referencedBean.setReferencedBeanName(referencedBeanNameType);
+ }
+
+ {
+ ReferencedBeanClassType referencedBeanClassType =
+ facesConfigFactory.createReferencedBeanClassType();
+ referencedBeanClassType.setTextContent(REFERENCED_BEAN_CLASS);
+ referencedBeanClassType.setId(
+ CommonStructuresUtil.createPreficedString(
+ REFERENCED_BEAN_CLASS, CommonStructuresUtil.ID));
+ referencedBean.setReferencedBeanClass(referencedBeanClassType);
+ }
+
+ referencedBean.setId(
+ CommonStructuresUtil.createPreficedString(REFERENCED_BEAN,CommonStructuresUtil.ID));
+
+ edit.getFacesConfig().getReferencedBean().add(referencedBean);
+ edit.save(null);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ assertTrue(edit.isDisposed());
+ edit = null;
+ }
+ }
+
+ try
+ {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ assertEquals(1, edit.getFacesConfig().getReferencedBean().size());
+ ReferencedBeanType referencedBean = (ReferencedBeanType)
+ edit.getFacesConfig().getReferencedBean().get(0);
+
+ CommonStructuresUtil.assertMatchesDescription(REFERENCED_BEAN
+ , (DescriptionType) referencedBean.getDescription().get(0));
+ CommonStructuresUtil.assertMatchesDisplayName(REFERENCED_BEAN
+ , (DisplayNameType) referencedBean.getDisplayName().get(0));
+ CommonStructuresUtil.assertMatchesIcon(REFERENCED_BEAN
+ , (IconType) referencedBean.getIcon().get(0));
+
+ {
+ ReferencedBeanNameType referencedBeanNameType =
+ referencedBean.getReferencedBeanName();
+ assertEquals(REFERENCED_BEAN_NAME, referencedBeanNameType.getTextContent());
+ assertEquals(CommonStructuresUtil.createPreficedString(
+ REFERENCED_BEAN_NAME, CommonStructuresUtil.ID)
+ , referencedBeanNameType.getId());
+ }
+
+ {
+ ReferencedBeanClassType referencedBeanClassType =
+ referencedBean.getReferencedBeanClass();
+ assertEquals(REFERENCED_BEAN_CLASS, referencedBeanClassType.getTextContent());
+ assertEquals(CommonStructuresUtil.createPreficedString(
+ REFERENCED_BEAN_CLASS, CommonStructuresUtil.ID)
+ , referencedBeanClassType.getId());
+ }
+
+ assertEquals(CommonStructuresUtil.createPreficedString(REFERENCED_BEAN,CommonStructuresUtil.ID)
+ , referencedBean.getId());
+ }
+ finally
+ {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteRenderKitTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteRenderKitTestCase.java
new file mode 100644
index 000000000..45368381d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteRenderKitTestCase.java
@@ -0,0 +1,231 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests.write;
+
+import org.eclipse.jst.jsf.facesconfig.emf.AttributeType;
+import org.eclipse.jst.jsf.facesconfig.emf.ComponentFamilyType;
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
+import org.eclipse.jst.jsf.facesconfig.emf.FacetType;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.emf.RenderKitClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.RenderKitIdType;
+import org.eclipse.jst.jsf.facesconfig.emf.RenderKitType;
+import org.eclipse.jst.jsf.facesconfig.emf.RendererClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.RendererType;
+import org.eclipse.jst.jsf.facesconfig.emf.RendererTypeType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.CommonStructuresUtil;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+
+public class WriteRenderKitTestCase extends BaseWriteTestCase
+{
+ protected final static String RENDER_KIT = "render-kit";
+ private final static String RENDER_KIT_ID =
+ CommonStructuresUtil.createPreficedString(RENDER_KIT, CommonStructuresUtil.ID);
+ private final static String RENDER_KIT_CLASS =
+ CommonStructuresUtil.createPreficedString(RENDER_KIT, CommonStructuresUtil.CLASS);
+ private final static String RENDERER = "renderer";
+ private final static String COMPONENT_FAMILY = "component-family";
+ private final static String RENDERER_COMPONENT_FAMILY =
+ CommonStructuresUtil.createPreficedString(RENDERER, COMPONENT_FAMILY);
+ private final static String RENDERER_TYPE =
+ CommonStructuresUtil.createPreficedString(RENDERER, "type");
+ private final static String RENDERER_CLASS =
+ CommonStructuresUtil.createPreficedString(RENDERER, CommonStructuresUtil.CLASS);
+
+ public WriteRenderKitTestCase(String name) {
+ super(name);
+ }
+
+ public void testWriteRenderKit() {
+ //IProject project = WizardUtil.getTestProject();
+ FacesConfigArtifactEdit edit = null;
+
+ try
+ {
+ edit = getArtifactEditForWrite();
+ assertNotNull(edit.getFacesConfig());
+ FacesConfigPackage facesConfigPackage = FacesConfigPackage.eINSTANCE;
+ FacesConfigFactory facesConfigFactory = facesConfigPackage.getFacesConfigFactory();
+
+ RenderKitType renderKit = facesConfigFactory.createRenderKitType();
+
+ renderKit.getDescription().add(CommonStructuresUtil.createDescription(RENDER_KIT));
+ renderKit.getDisplayName().add(CommonStructuresUtil.createDisplayName(RENDER_KIT));
+ renderKit.getIcon().add(CommonStructuresUtil.createIcon(RENDER_KIT));
+
+ {
+ RenderKitIdType renderKitIdType = facesConfigFactory.createRenderKitIdType();
+ renderKitIdType.setTextContent(RENDER_KIT);
+ renderKitIdType.setId
+ (CommonStructuresUtil.createPreficedString(RENDER_KIT, CommonStructuresUtil.ID));
+ renderKit.setRenderKitId(renderKitIdType);
+ }
+
+ {
+ RenderKitClassType renderKitClassType = facesConfigFactory.createRenderKitClassType();
+ renderKitClassType.setTextContent(RENDER_KIT_CLASS);
+ renderKitClassType.setId(
+ CommonStructuresUtil.createPreficedString(RENDER_KIT_CLASS, CommonStructuresUtil.ID));
+ renderKit.setRenderKitClass(renderKitClassType);
+ }
+
+ RendererType renderer = facesConfigFactory.createRendererType();
+
+ renderer.getDescription().add(CommonStructuresUtil.createDescription(RENDERER));
+ renderer.getDisplayName().add(CommonStructuresUtil.createDisplayName(RENDERER));
+ renderer.getIcon().add(CommonStructuresUtil.createIcon(RENDERER));
+
+ {
+ ComponentFamilyType componentFamily =
+ facesConfigFactory.createComponentFamilyType();
+ componentFamily.setTextContent(RENDERER_COMPONENT_FAMILY);
+ componentFamily.setId(
+ CommonStructuresUtil.createPreficedString(RENDERER_COMPONENT_FAMILY, CommonStructuresUtil.ID));
+ renderer.setComponentFamily(componentFamily);
+ }
+
+ {
+ RendererTypeType rendererTypeType = facesConfigFactory.createRendererTypeType();
+ rendererTypeType.setTextContent(RENDERER_TYPE);
+ rendererTypeType.setId(
+ CommonStructuresUtil.createPreficedString(RENDERER_TYPE, CommonStructuresUtil.ID));
+ renderer.setRendererType(rendererTypeType);
+ }
+
+ {
+ RendererClassType rendererClassType = facesConfigFactory.createRendererClassType();
+ rendererClassType.setTextContent(RENDERER_CLASS);
+ rendererClassType.setId(
+ CommonStructuresUtil.createPreficedString(RENDERER_CLASS, CommonStructuresUtil.ID));
+ renderer.setRendererClass(rendererClassType);
+ }
+
+ renderer.getAttribute().add(CommonStructuresUtil.createAttribute(RENDERER));
+ renderer.getFacet().add(CommonStructuresUtil.createFacet(RENDERER));
+ renderer.setId(CommonStructuresUtil.createPreficedString(RENDERER, CommonStructuresUtil.ID));
+
+ renderKit.getRenderer().add(renderer);
+ renderKit.setId(RENDER_KIT_ID);
+
+ edit.getFacesConfig().getRenderKit().add(renderKit);
+ edit.save(null);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ assertTrue(edit.isDisposed());
+ edit = null;
+ }
+ }
+
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ RenderKitType renderKit = (RenderKitType) FacesConfigModelUtil
+ .findEObjectElementById(edit.getFacesConfig()
+ .getRenderKit(), RENDER_KIT_ID);
+ assertNotNull(renderKit);
+
+ assertEquals(1, renderKit.getDescription().size());
+ CommonStructuresUtil.assertMatchesDescription(RENDER_KIT,
+ (DescriptionType) renderKit.getDescription().get(0));
+
+ assertEquals(1, renderKit.getDisplayName().size());
+ CommonStructuresUtil.assertMatchesDisplayName(RENDER_KIT,
+ (DisplayNameType) renderKit.getDisplayName().get(0));
+
+ assertEquals(1, renderKit.getIcon().size());
+ CommonStructuresUtil.assertMatchesIcon(RENDER_KIT,
+ (IconType) renderKit.getIcon().get(0));
+
+ {
+
+ RenderKitIdType renderKitIdType = renderKit.getRenderKitId();
+ assertEquals(RENDER_KIT, renderKitIdType.getTextContent());
+ assertEquals(CommonStructuresUtil.createPreficedString(RENDER_KIT, CommonStructuresUtil.ID)
+ , renderKitIdType.getId());
+ }
+
+ {
+ RenderKitClassType renderKitClassType = renderKit.getRenderKitClass();
+ assertEquals(RENDER_KIT_CLASS, renderKitClassType.getTextContent());
+ assertEquals(
+ CommonStructuresUtil.createPreficedString(RENDER_KIT_CLASS, CommonStructuresUtil.ID)
+ ,renderKitClassType.getId());
+ }
+
+ assertEquals(1, renderKit.getRenderer().size());
+ RendererType renderer = (RendererType) renderKit.getRenderer().get(0);
+
+ assertEquals(1, renderer.getDescription().size());
+ CommonStructuresUtil.assertMatchesDescription(RENDERER
+ ,(DescriptionType) renderer.getDescription().get(0));
+
+ assertEquals(1, renderer.getDisplayName().size());
+ CommonStructuresUtil.assertMatchesDisplayName(RENDERER
+ , (DisplayNameType) renderer.getDisplayName().get(0));
+
+ assertEquals(1, renderer.getIcon().size());
+ CommonStructuresUtil.assertMatchesIcon(RENDERER
+ , (IconType) renderer.getIcon().get(0));
+
+ {
+ ComponentFamilyType componentFamily = renderer.getComponentFamily();
+
+ assertEquals(RENDERER_COMPONENT_FAMILY
+ , componentFamily.getTextContent());
+
+ assertEquals(CommonStructuresUtil.createPreficedString(RENDERER_COMPONENT_FAMILY, CommonStructuresUtil.ID)
+ , componentFamily.getId());
+ }
+
+ {
+ RendererTypeType rendererTypeType = renderer.getRendererType();
+ assertEquals(RENDERER_TYPE
+ , rendererTypeType.getTextContent());
+
+ assertEquals(CommonStructuresUtil.createPreficedString(RENDERER_TYPE, CommonStructuresUtil.ID)
+ , rendererTypeType.getId());
+ }
+
+ {
+ RendererClassType rendererClassType = renderer.getRendererClass();
+ assertEquals(RENDERER_CLASS, rendererClassType.getTextContent());
+ assertEquals(CommonStructuresUtil.createPreficedString(RENDERER_CLASS, CommonStructuresUtil.ID)
+ , rendererClassType.getId());
+ }
+
+ assertEquals(1, renderer.getAttribute().size());
+ CommonStructuresUtil.assertMatchAttribute(RENDERER
+ , (AttributeType) renderer.getAttribute().get(0));
+
+ assertEquals(1, renderer.getFacet().size());
+ CommonStructuresUtil.assertMatchFacet(RENDERER
+ , (FacetType) renderer.getFacet().get(0));
+
+ assertEquals(CommonStructuresUtil.createPreficedString(RENDERER, CommonStructuresUtil.ID)
+ , renderer.getId());
+
+ assertEquals(CommonStructuresUtil.createPreficedString(RENDER_KIT, CommonStructuresUtil.ID)
+ , renderKit.getId());
+
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteRenderKitTestCase_1_2.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteRenderKitTestCase_1_2.java
new file mode 100644
index 000000000..550a150f5
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteRenderKitTestCase_1_2.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2006 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.facesconfig.tests.write;
+
+import org.eclipse.jst.jsf.facesconfig.emf.DynamicElement;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
+import org.eclipse.jst.jsf.facesconfig.emf.RenderKitExtensionType;
+import org.eclipse.jst.jsf.facesconfig.emf.RenderKitType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.CommonStructuresUtil;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class WriteRenderKitTestCase_1_2 extends WriteRenderKitTestCase
+{
+ private final static String EXTENDED_RENDERKIT_ID = "extended-renderkit-rule-id";
+
+ private final static String RENDERKIT_EXTENSION = CommonStructuresUtil
+ .createPreficedString(RENDER_KIT, "extension");
+ private final static String RENDERKIT_EXTENSION_ID = CommonStructuresUtil
+ .createPreficedString(RENDERKIT_EXTENSION, "id");
+ private final static String RENDERKIT_EXTENSION_TAG = CommonStructuresUtil
+ .createPreficedString(RENDERKIT_EXTENSION, "tag");
+
+ public WriteRenderKitTestCase_1_2(String name) {
+ super(name);
+ }
+
+ public void testRenderKitExtension() {
+ FacesConfigArtifactEdit edit = null;
+
+ try {
+ edit = getArtifactEditForWrite();
+ assertNotNull(edit.getFacesConfig());
+ FacesConfigPackage facesConfigPackage = FacesConfigPackage.eINSTANCE;
+ FacesConfigFactory facesConfigFactory = facesConfigPackage
+ .getFacesConfigFactory();
+
+ RenderKitType renderKit = facesConfigFactory.createRenderKitType();
+ renderKit.setId(EXTENDED_RENDERKIT_ID);
+
+ RenderKitExtensionType extensionType = facesConfigFactory
+ .createRenderKitExtensionType();
+ extensionType.setId(RENDERKIT_EXTENSION_ID);
+
+ extensionType.getChildNodes().add(
+ createDynamicElement(RENDERKIT_EXTENSION_TAG));
+
+ renderKit.getRenderKitExtension().add(extensionType);
+ edit.getFacesConfig().getRenderKit().add(renderKit);
+ edit.save(null);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ assertTrue(edit.isDisposed());
+ edit = null;
+ }
+ }
+
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ RenderKitType renderKit = (RenderKitType) FacesConfigModelUtil
+ .findEObjectElementById(edit.getFacesConfig()
+ .getRenderKit(), EXTENDED_RENDERKIT_ID);
+ assertNotNull(renderKit);
+
+ assertEquals(1, renderKit.getRenderKitExtension().size());
+ RenderKitExtensionType extensionType = (RenderKitExtensionType) renderKit
+ .getRenderKitExtension().get(0);
+ assertEquals(RENDERKIT_EXTENSION_ID, extensionType.getId());
+
+ assertEquals(1, extensionType.getChildNodes().size());
+ DynamicElement element = (DynamicElement) extensionType
+ .getChildNodes().get(0);
+ assertEquals(RENDERKIT_EXTENSION_TAG, element.getName());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteRenderKitTestCase_2_0.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteRenderKitTestCase_2_0.java
new file mode 100644
index 000000000..98568344b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteRenderKitTestCase_2_0.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2006 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.facesconfig.tests.write;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jst.jsf.facesconfig.emf.ClientBehaviorRendererClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.ClientBehaviorRendererType;
+import org.eclipse.jst.jsf.facesconfig.emf.ClientBehaviorRendererTypeType;
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.emf.RenderKitType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.CommonStructuresUtil;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+
+public class WriteRenderKitTestCase_2_0 extends WriteRenderKitTestCase_1_2
+{
+ private final static String RENDER_KIT_ID =
+ CommonStructuresUtil.createPreficedString(RENDER_KIT+"20", CommonStructuresUtil.ID);
+// private final static String CLIENT_BEHAVIOR_RENDERER= "client-behavior-renderer";
+ private final static String CLIENT_BEHAVIOR_RENDERER_TYPE= "client-behavior-renderer-type";
+ private final static String CLIENT_BEHAVIOR_RENDERER_CLASS= "client-behavior-renderer-class";
+
+ public WriteRenderKitTestCase_2_0(String name) {
+ super(name);
+ }
+
+ public void testRenderKit20() {
+ FacesConfigArtifactEdit edit = null;
+
+ try
+ {
+ edit = getArtifactEditForWrite();
+ assertNotNull(edit.getFacesConfig());
+ FacesConfigPackage facesConfigPackage = FacesConfigPackage.eINSTANCE;
+ FacesConfigFactory facesConfigFactory = facesConfigPackage.getFacesConfigFactory();
+
+ RenderKitType renderKit = facesConfigFactory.createRenderKitType();
+
+ renderKit.getDescription().add(CommonStructuresUtil.createDescription(RENDER_KIT));
+ renderKit.getDisplayName().add(CommonStructuresUtil.createDisplayName(RENDER_KIT));
+ renderKit.getIcon().add(CommonStructuresUtil.createIcon(RENDER_KIT));
+
+ {
+ ClientBehaviorRendererType clientBehaviorRenderer = facesConfigFactory.createClientBehaviorRendererType();
+// clientBehaviorRenderer.setId
+// (CommonStructuresUtil.createPreficedString(CLIENT_BEHAVIOR_RENDERER, CommonStructuresUtil.ID));
+ renderKit.getClientBehaviorRenderer().add(clientBehaviorRenderer);
+ ClientBehaviorRendererTypeType clientBehaviorRendererType = facesConfigFactory.createClientBehaviorRendererTypeType();
+ clientBehaviorRendererType.setTextContent(CLIENT_BEHAVIOR_RENDERER_TYPE);
+ clientBehaviorRenderer.setClientBehaviorRendererType(clientBehaviorRendererType);
+ ClientBehaviorRendererClassType clientBehaviorRendererClass = facesConfigFactory.createClientBehaviorRendererClassType();
+ clientBehaviorRendererClass.setTextContent(CLIENT_BEHAVIOR_RENDERER_CLASS);
+ clientBehaviorRenderer.setClientBehaviorRendererClass(clientBehaviorRendererClass);
+ }
+
+ renderKit.setId(RENDER_KIT_ID);
+ EList list = edit.getFacesConfig().getRenderKit();
+ list.add(renderKit);
+ edit.save(null);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ assertTrue(edit.isDisposed());
+ edit = null;
+ }
+ }
+
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ RenderKitType renderKit = (RenderKitType) FacesConfigModelUtil
+ .findEObjectElementById(edit.getFacesConfig()
+ .getRenderKit(), RENDER_KIT_ID);
+ assertNotNull(renderKit);
+
+ assertEquals(1, renderKit.getDescription().size());
+ CommonStructuresUtil.assertMatchesDescription(RENDER_KIT,
+ (DescriptionType) renderKit.getDescription().get(0));
+
+ assertEquals(1, renderKit.getDisplayName().size());
+ CommonStructuresUtil.assertMatchesDisplayName(RENDER_KIT,
+ (DisplayNameType) renderKit.getDisplayName().get(0));
+
+ assertEquals(1, renderKit.getIcon().size());
+ CommonStructuresUtil.assertMatchesIcon(RENDER_KIT,
+ (IconType) renderKit.getIcon().get(0));
+
+ {
+ assertEquals(1, renderKit.getClientBehaviorRenderer().size());
+ ClientBehaviorRendererType clientBehaviorRenderer = (ClientBehaviorRendererType)renderKit.getClientBehaviorRenderer().get(0);
+ ClientBehaviorRendererTypeType clientBehaviorRendererType = clientBehaviorRenderer.getClientBehaviorRendererType();
+ assertEquals(CLIENT_BEHAVIOR_RENDERER_TYPE, clientBehaviorRendererType.getTextContent());
+ ClientBehaviorRendererClassType clientBehaviorRendererClass = clientBehaviorRenderer.getClientBehaviorRendererClass();
+ assertEquals(CLIENT_BEHAVIOR_RENDERER_CLASS, clientBehaviorRendererClass.getTextContent());
+ }
+ assertEquals(RENDER_KIT_ID, renderKit.getId());
+
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteValidatorTestCase.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteValidatorTestCase.java
new file mode 100644
index 000000000..17e429351
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteValidatorTestCase.java
@@ -0,0 +1,158 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.tests.write;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jst.jsf.facesconfig.emf.AttributeType;
+import org.eclipse.jst.jsf.facesconfig.emf.DescriptionType;
+import org.eclipse.jst.jsf.facesconfig.emf.DisplayNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
+import org.eclipse.jst.jsf.facesconfig.emf.IconType;
+import org.eclipse.jst.jsf.facesconfig.emf.PropertyType;
+import org.eclipse.jst.jsf.facesconfig.emf.ValidatorClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.ValidatorIdType;
+import org.eclipse.jst.jsf.facesconfig.emf.ValidatorType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.CommonStructuresUtil;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.tests.util.WizardUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class WriteValidatorTestCase extends BaseWriteTestCase {
+ IProject project = null;
+
+ protected final static String VALIDATOR = "validator";
+ private final static String VALIDATOR_CLASS =
+ CommonStructuresUtil.createPreficedString(VALIDATOR, CommonStructuresUtil.CLASS);
+ private final static String VALIDATOR_ID =
+ CommonStructuresUtil.createPreficedString(VALIDATOR, CommonStructuresUtil.ID);
+
+ public WriteValidatorTestCase(String name) {
+ super(name);
+ }
+ protected void setUp() throws Exception {
+ super.setUp();
+ WizardUtil.createProject(getName());
+ project = WizardUtil.getTestProject(getName());
+ }
+
+ public void testWriteValidator()
+ {
+ FacesConfigArtifactEdit edit = null;
+
+ try
+ {
+ edit = getArtifactEditForWrite();
+ assertNotNull(edit.getFacesConfig());
+
+ FacesConfigPackage facesConfigPackage = FacesConfigPackage.eINSTANCE;
+ FacesConfigFactory facesConfigFactory = facesConfigPackage.getFacesConfigFactory();
+
+ ValidatorType validator = facesConfigFactory.createValidatorType();
+
+ {
+ ValidatorIdType validatorIdType = facesConfigFactory.createValidatorIdType();
+ validatorIdType.setTextContent(VALIDATOR_ID);
+ validatorIdType.setId(
+ CommonStructuresUtil.createPreficedString(VALIDATOR_ID, CommonStructuresUtil.ID));
+ validator.setValidatorId(validatorIdType);
+ }
+
+ {
+ ValidatorClassType validatorClassType = facesConfigFactory.createValidatorClassType();
+ validatorClassType.setTextContent(VALIDATOR_CLASS);
+ validatorClassType.setId(
+ CommonStructuresUtil.createPreficedString(VALIDATOR_CLASS, CommonStructuresUtil.ID));
+ validator.setValidatorClass(validatorClassType);
+ }
+
+ validator.getDescription().add(
+ CommonStructuresUtil.createDescription(VALIDATOR));
+ validator.getDisplayName().add(
+ CommonStructuresUtil.createDisplayName(VALIDATOR));
+ validator.getIcon().add(
+ CommonStructuresUtil.createIcon(VALIDATOR));
+
+ validator.getAttribute().add(
+ CommonStructuresUtil.createAttribute(VALIDATOR));
+ validator.getProperty().add(
+ CommonStructuresUtil.createProperty(VALIDATOR));
+
+ validator.setId(VALIDATOR_ID);
+
+ edit.getFacesConfig().getValidator().add(validator);
+ edit.save(null);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ assertTrue(edit.isDisposed());
+ edit = null;
+ }
+ }
+
+ try
+ {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ ValidatorType validator = (ValidatorType) FacesConfigModelUtil
+ .findEObjectElementById(edit.getFacesConfig()
+ .getValidator(), VALIDATOR_ID);
+ assertNotNull(validator);
+
+ {
+ ValidatorIdType validatorIdType = validator.getValidatorId();
+ assertEquals(VALIDATOR_ID, validatorIdType.getTextContent());
+ assertEquals(
+ CommonStructuresUtil.createPreficedString(VALIDATOR_ID, CommonStructuresUtil.ID)
+ , validatorIdType.getId()
+ );
+ }
+
+ {
+ ValidatorClassType validatorClassType = validator.getValidatorClass();
+
+ assertEquals(VALIDATOR_CLASS, validatorClassType.getTextContent());
+ assertEquals(
+ CommonStructuresUtil.createPreficedString(VALIDATOR_CLASS, CommonStructuresUtil.ID)
+ , validatorClassType.getId());
+ }
+
+ assertEquals(1, validator.getDescription().size());
+ CommonStructuresUtil.assertMatchesDescription(VALIDATOR
+ , (DescriptionType) validator.getDescription().get(0));
+
+ assertEquals(1, validator.getDisplayName().size());
+ CommonStructuresUtil.assertMatchesDisplayName(VALIDATOR
+ , (DisplayNameType) validator.getDisplayName().get(0));
+
+ assertEquals(1, validator.getIcon().size());
+ CommonStructuresUtil.assertMatchesIcon(VALIDATOR
+ , (IconType) validator.getIcon().get(0));
+
+ assertEquals(1, validator.getAttribute().size());
+ CommonStructuresUtil.assertMatchAttribute(VALIDATOR
+ , (AttributeType) validator.getAttribute().get(0));
+
+ assertEquals(1, validator.getProperty().size());
+ CommonStructuresUtil.assertMatchProperty(VALIDATOR
+ , (PropertyType) validator.getProperty().get(0));
+
+ assertEquals(CommonStructuresUtil.createPreficedString(VALIDATOR, CommonStructuresUtil.ID)
+ , validator.getId());
+
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteValidatorTestCase_1_2.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteValidatorTestCase_1_2.java
new file mode 100644
index 000000000..e6a272b67
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/src/org/eclipse/jst/jsf/facesconfig/tests/write/WriteValidatorTestCase_1_2.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2006 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.facesconfig.tests.write;
+
+import org.eclipse.jst.jsf.facesconfig.emf.DynamicElement;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
+import org.eclipse.jst.jsf.facesconfig.emf.ValidatorExtensionType;
+import org.eclipse.jst.jsf.facesconfig.emf.ValidatorType;
+import org.eclipse.jst.jsf.facesconfig.tests.util.CommonStructuresUtil;
+import org.eclipse.jst.jsf.facesconfig.tests.util.FacesConfigModelUtil;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+
+public class WriteValidatorTestCase_1_2 extends WriteValidatorTestCase {
+ private final static String EXTENDED_VALIDATOR_ID = "extended-validator-id";
+
+ private final static String VALIDATOR_EXTENSION = CommonStructuresUtil
+ .createPreficedString(VALIDATOR, "extension");
+ private final static String VALIDATOR_EXTENSION_ID = CommonStructuresUtil
+ .createPreficedString(VALIDATOR_EXTENSION, "id");
+ private final static String VALIDATOR_EXTENSION_TAG = CommonStructuresUtil
+ .createPreficedString(VALIDATOR_EXTENSION, "tag");
+
+ public WriteValidatorTestCase_1_2(String name) {
+ super(name);
+ }
+
+ public void testValidatorExtension() {
+ FacesConfigArtifactEdit edit = null;
+
+ try {
+ edit = getArtifactEditForWrite();
+ assertNotNull(edit.getFacesConfig());
+ FacesConfigPackage facesConfigPackage = FacesConfigPackage.eINSTANCE;
+ FacesConfigFactory facesConfigFactory = facesConfigPackage
+ .getFacesConfigFactory();
+
+ ValidatorType validator = facesConfigFactory.createValidatorType();
+ validator.setId(EXTENDED_VALIDATOR_ID);
+
+ ValidatorExtensionType extensionType = facesConfigFactory
+ .createValidatorExtensionType();
+ extensionType.setId(VALIDATOR_EXTENSION_ID);
+
+ extensionType.getChildNodes().add(
+ createDynamicElement(VALIDATOR_EXTENSION_TAG));
+
+ validator.getValidatorExtension().add(extensionType);
+ edit.getFacesConfig().getValidator().add(validator);
+ edit.save(null);
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ assertTrue(edit.isDisposed());
+ edit = null;
+ }
+ }
+
+ try {
+ edit = getArtifactEditForRead();
+ assertNotNull(edit.getFacesConfig());
+
+ ValidatorType validator = (ValidatorType) FacesConfigModelUtil
+ .findEObjectElementById(edit.getFacesConfig()
+ .getValidator(), EXTENDED_VALIDATOR_ID);
+ assertNotNull(validator);
+
+ assertEquals(1, validator.getValidatorExtension().size());
+ ValidatorExtensionType extensionType = (ValidatorExtensionType) validator
+ .getValidatorExtension().get(0);
+ assertEquals(VALIDATOR_EXTENSION_ID, extensionType.getId());
+
+ assertEquals(1, extensionType.getChildNodes().size());
+ DynamicElement element = (DynamicElement) extensionType
+ .getChildNodes().get(0);
+ assertEquals(VALIDATOR_EXTENSION_TAG, element.getName());
+ } finally {
+ if (edit != null) {
+ edit.dispose();
+ }
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/template/faces-config-ext-data1.xml b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/template/faces-config-ext-data1.xml
new file mode 100644
index 000000000..db514ec03
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/template/faces-config-ext-data1.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE faces-config PUBLIC
+ "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+
+<!-- =========== FULL CONFIGURATION FILE ================================== -->
+
+<faces-config>
+ <component id="component1">
+ <component-type>component</component-type>
+ <component-class>componentClass</component-class>
+ <component-extension id="singleRootComponentExt">
+ <any-data attribute="any-data-attribute">
+ <first-child>someData</first-child>
+ <second-child>second Child's data</second-child>
+ </any-data>
+ </component-extension>
+ </component>
+
+</faces-config> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/template/faces-config.xml b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/template/faces-config.xml
new file mode 100644
index 000000000..a9c8a5244
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/template/faces-config.xml
@@ -0,0 +1,411 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE faces-config PUBLIC
+ "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+
+<!-- =========== FULL CONFIGURATION FILE ================================== -->
+
+<faces-config>
+
+ <lifecycle id="lifecycle1">
+ <phase-listener id="phaseListener1">
+ org.eclipse.wtp.jsf.tests.ValueResourcePhaseListener
+ </phase-listener>
+ </lifecycle>
+
+
+ <factory id="factory1">
+ <application-factory id="applicationFactory1">application-factory</application-factory>
+ <faces-context-factory id="facesContextFactory1">
+ faces-context-factory
+ </faces-context-factory>
+ <lifecycle-factory id="lifecycleFactory1">lifecycle-factory</lifecycle-factory>
+ <render-kit-factory id="renderKitFactory1">render-kit-factory</render-kit-factory>
+ </factory>
+
+ <!-- Component -->
+ <component id="component1">
+ <description id="componentDescription1">my component</description>
+ <display-name id="componentDisplayName1">My component</display-name>
+ <icon id="componentIcon1">
+ <small-icon>small-icon</small-icon>
+ <large-icon>large-icon</large-icon>
+ </icon>
+ <component-type>component-type</component-type>
+ <component-class>ComponentClass</component-class>
+ <facet id="componentFacet1">
+ <description id="componentFacet1_descripton1">Facet1 Description</description>
+ <display-name id="componentFacet1_displayName1">Component Facet 1</display-name>
+ <icon id="componentFacet1_icon1">
+ <small-icon>facet-small-icon</small-icon>
+ <large-icon>facet-large-icon</large-icon>
+ </icon>
+ <facet-name>facetName_chieb_sieb</facet-name>
+ <facet-extension><extendedBlah></extendedBlah></facet-extension>
+ </facet>
+ <attribute id="componentAttribute1">
+ <description id="componentAttribute1_descripton1">attribute-description</description>
+ <display-name id="componentAttribute1_displayName1">attribute-display-name</display-name>
+ <icon id="componentAttribute1_icon1">
+ <small-icon>attribute-small-icon</small-icon>
+ <large-icon>attribute-large-icon</large-icon>
+ </icon>
+ <attribute-name>attribute-name</attribute-name>
+ <attribute-class>attribute-class</attribute-class>
+ <default-value>value5</default-value>
+ <suggested-value>attribute-suggested-value</suggested-value>
+ <attribute-extension><attr-extension/></attribute-extension>
+ </attribute>
+ <property id="componentProperty1">
+ <description id="componentProperty1_descripton1">myDescript blah blah</description>
+ <display-name id="componentProperty1_displayName1">Component Property 1</display-name>
+ <icon id="componentProperty1_icon1">
+ <small-icon>property-small-icon</small-icon>
+ <large-icon>property-large-icon</large-icon>
+ </icon>
+ <property-name id="componentProperty1_propertyName">property1</property-name>
+ <property-class id="componentProperty1_propertyClass">ComponentProperty</property-class>
+ <default-value>defaultValue6</default-value>
+ <suggested-value>suggestedValue</suggested-value>
+ </property>
+ <component-extension id="componentExtension1"><foo></foo></component-extension>
+ </component>
+
+
+ <!-- managed-bean -->
+ <managed-bean id="managedBean1">
+ <description id="managedBean1Description">managed-bean-description</description>
+ <display-name id="managedBean1DisplayName">managed-bean-display-name</display-name>
+ <icon id="managedBean1Icon">
+ <small-icon>managedBean1-small-icon</small-icon>
+ <large-icon>managedBean1-large-icon</large-icon>
+ </icon>
+ <managed-bean-name>managedBeanName</managed-bean-name>
+ <managed-bean-class>managed-bean-class</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property id="managedBean1Property1">
+ <description id="managedBean1Property1_description">managed-property-description</description>
+ <display-name id="managedBean1Property1_displayName">managed-property-display-name</display-name>
+ <icon id="managedBean1Property1_icon">
+ <small-icon>managedBean1-property-small-icon</small-icon>
+ <large-icon>managedBean1-property-large-icon</large-icon>
+ </icon>
+ <property-name>bean-property-name</property-name>
+ <property-class>bean-property-class</property-class>
+ <value>bean-propertyValue1</value>
+ </managed-property>
+ <managed-property id="managedBean1Property2">
+ <property-name>bean-property2-name</property-name>
+ <property-class>bean-property2-class</property-class>
+ <null-value/>
+ </managed-property>
+ <managed-property id="managedBeanMapProperty">
+ <property-name>map-bean-name</property-name>
+ <property-class>map-bean-class</property-class>
+ <map-entries>
+ <key-class>propertyMapEntryKey</key-class>
+ <value-class>propertyMapEntryValueClass</value-class>
+ <map-entry id="mapPropertyEntryWithValue">
+ <key>propertyMapKey1</key>
+ <value>propertyMapValue1</value>
+ </map-entry>
+ <map-entry id="mapPropertyEntryWithNullValue">
+ <key>propertyMapKey2</key>
+ <null-value/>
+ </map-entry>
+ </map-entries>
+ </managed-property>
+ <managed-property id="managedBeanListProperty">
+ <property-name>list-bean-name</property-name>
+ <property-class>list-bean-class</property-class>
+ <list-entries>
+ <value-class>managedBeanListPropertyClass</value-class>
+ <value id="managedBeanListProperty_value">managedBeanListPropertyValue</value>
+ <null-value/>
+ </list-entries>
+ </managed-property>
+ </managed-bean>
+
+ <managed-bean id="mapBean1">
+ <managed-bean-name>mapBean1</managed-bean-name>
+ <managed-bean-class>mapBean1-class</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <map-entries>
+ <key-class>mapBeanEntryKey</key-class>
+ <value-class>mapBeanEntryValueClass</value-class>
+ <map-entry id="mapBeanEntryWithValue">
+ <key>mapBeanKey1</key>
+ <value>mapBeanValue1</value>
+ </map-entry>
+ <map-entry id="mapBeanEntryWithNullValue">
+ <key>mapBeanKey2</key>
+ <null-value/>
+ </map-entry>
+ </map-entries>
+ </managed-bean>
+
+ <managed-bean id="listBean1">
+ <managed-bean-name>listBean1</managed-bean-name>
+ <managed-bean-class>listBean1-class</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <list-entries>
+ <value-class>listBeanListPropertyClass</value-class>
+ <value id="listBeanListProperty_value">listBeanListPropertyValue</value>
+ <null-value/>
+ </list-entries>
+ </managed-bean>
+
+ <converter id="converter1">
+ <description id="converter1Description">converter-description</description>
+ <display-name id="converter1DisplayName">converter-display-name</display-name>
+ <icon id="converter1Icon">
+ <small-icon>converter-small-icon</small-icon>
+ <large-icon>converter-large-icon</large-icon>
+ </icon>
+ <converter-for-class>converter-for-class</converter-for-class>
+ <converter-class>converter-class</converter-class>
+ <attribute id="converter1Attribute">
+ <description id="converter1_attribute_description">converter-attribute-description</description>
+ <display-name id="converter1_attribute_display-name">converter-attribute-display-name</display-name>
+ <icon id="converter1_attribute_icon">
+ <small-icon>converter1-attribute-small-icon</small-icon>
+ <large-icon>converter1-attribute-large-icon</large-icon>
+ </icon>
+ <attribute-name>converter1-attribute-name</attribute-name>
+ <attribute-class>converter1-attribute-class</attribute-class>
+ <default-value>converter1-default-value</default-value>
+ <suggested-value>converter1-attribute-suggested-value</suggested-value>
+ <attribute-extension>
+ <attr-extension/>
+ </attribute-extension>
+ </attribute>
+ <property id="converter1Property">
+ <description id="converter1_property_description">converter-property-description</description>
+ <display-name id="converter1_property_display-name">converter-property-display-name</display-name>
+ <icon id="converter1_property_icon">
+ <small-icon>converter1-property-small-icon</small-icon>
+ <large-icon>converter1-property-large-icon</large-icon>
+ </icon>
+ <property-name>converter-property-name</property-name>
+ <property-class>converter-property-propertyClass</property-class>
+ <default-value>converter-property-default-value</default-value>
+ <suggested-value>converter-property-suggested-value</suggested-value>
+ </property>
+ </converter>
+
+ <converter id="converter2">
+ <converter-id>converter2-id</converter-id>
+ <converter-class>converter2-class</converter-class>
+ </converter>
+
+ <!-- Referenced-bean -->
+ <referenced-bean id="referencedBean1">
+ <description id="referencedBean1Description">Referenced Bean Desc</description>
+ <display-name id="referencedBean1DisplayName">referenced-bean-display</display-name>
+ <icon id="referencedBean1Icon">
+ <small-icon>referenced-bean-small-icon</small-icon>
+ <large-icon>referenced-bean-large-icon</large-icon>
+ </icon>
+ <referenced-bean-name>
+ referencedBeanName
+ </referenced-bean-name>
+ <referenced-bean-class>
+ referenced-bean-class
+ </referenced-bean-class>
+ </referenced-bean>
+
+ <!-- Render kit -->
+ <render-kit id="renderKit1">
+ <description id="renderKit1Description">Render kit Desc</description>
+ <display-name id="renderKit1DisplayName">Render kit disp name</display-name>
+ <icon id="renderKit1Icon">
+ <small-icon>small-renderkit-icon</small-icon>
+ <large-icon>large-renderkit-icon</large-icon>
+ </icon>
+ <render-kit-id>render-kit-Id</render-kit-id>
+ <render-kit-class>render-kit-class</render-kit-class>
+ <renderer id="renderKit1Renderer">
+ <description id="renderKit1RendererDescription">my renderer description</description>
+ <display-name id="renderKit1RendererDisplayName">my renderer display name</display-name>
+ <icon id="renderKit1RendererIcon">
+ <small-icon>renderer-small-icon</small-icon>
+ <large-icon>renderer-large-icon</large-icon>
+ </icon>
+ <component-family>component-family</component-family>
+ <renderer-type>renderer-type</renderer-type>
+ <renderer-class>renderer-class</renderer-class>
+ <facet id="renderKit1Renderer1Facet1">
+ <description id="renderKit1Renderer1Facet1Description">RendererFacetDescription</description>
+ <display-name id="renderKit1Renderer1Facet1DisplayName">RendererFacetDisplayName</display-name>
+ <icon id="renderKit1Renderer1Facet1Icon">
+ <small-icon>facet-renderer-small-icon</small-icon>
+ <large-icon>facet-renderer-large-icon</large-icon>
+ </icon>
+ <facet-name>rendererFacetName</facet-name>
+ <facet-extension></facet-extension>
+ </facet>
+ <attribute id="renderKit1RendererAttribute1">
+ <description id="renderKit1RendererAttribute1Description">renderer-attribute-attribute-description</description>
+ <display-name id="renderKit1RendererAttribute1DisplayName">renderer-attribute-display-name</display-name>
+ <icon id="renderKit1RendererAttribute1Icon">
+ <small-icon>renderer-attribute-small-icon</small-icon>
+ <large-icon>renderer-attribute-large-icon</large-icon>
+ </icon>
+ <attribute-name>renderer attribute name</attribute-name>
+ <attribute-class>renderer Attribute Class</attribute-class>
+ <default-value>renderer attribute default value</default-value>
+ <suggested-value>renderer attribute suggested value</suggested-value>
+ <attribute-extension>
+ <renderer-extension/>
+ </attribute-extension>
+ <attribute-extension>
+ <blah-extension/>
+ </attribute-extension>
+ </attribute>
+ <renderer-extension>
+ <renderer-extension-1/>
+ </renderer-extension>
+ <renderer-extension>
+ <renderer-extension-2/>
+ </renderer-extension>
+ <renderer-extension>
+ <renderer-extension-3/>
+ </renderer-extension>
+
+ </renderer>
+ </render-kit>
+
+ <!-- Validator rules -->
+ <validator id="validator1">
+ <description id="validator1_description">validator-description</description>
+ <display-name id="validator1_displayName">validator-display-name</display-name>
+ <icon id="validator1_icon">
+ <small-icon>validator-small-icon</small-icon>
+ <large-icon>validator-large-icon</large-icon>
+ </icon>
+ <validator-id>validator-Id</validator-id>
+ <validator-class>validator-class</validator-class>
+ <attribute id="validator1_attribute">
+ <description id="validator1_attribute_description">validator-attribute-description</description>
+ <display-name id="validator1_attribute_displayName">validator-attribute-display-name</display-name>
+ <icon id="validator1_attribute_icon">
+ <small-icon>validator-attribute-small-icon</small-icon>
+ <large-icon>validator-attribute-large-icon</large-icon>
+ </icon>
+ <attribute-name>validator-attribute-name</attribute-name>
+ <attribute-class>validator-attribute-class</attribute-class>
+ <default-value>validator-default-value</default-value>
+ <suggested-value>validator-attribute-suggested-value</suggested-value>
+ <attribute-extension>
+ <attribute-extension/>
+ </attribute-extension>
+ </attribute>
+ <property id="validator1_property">
+ <description id="validator1_property_description">validator-property-description</description>
+ <display-name id="validator1_property_displayName">validator-property-display-name</display-name>
+ <icon id="validator1_property_icon">
+ <small-icon>validator-property-small-icon</small-icon>
+ <large-icon>validator-property-large-icon</large-icon>
+ </icon>
+ <property-name>validator-property-name</property-name>
+ <property-class>validator-property-class</property-class>
+ <default-value>validator property default value</default-value>
+ <suggested-value>validator property suggested value</suggested-value>
+ <property-extension><future/></property-extension>
+ </property>
+ </validator>
+
+ <!-- variable/property resolver registration -->
+ <application id="application1">
+ <action-listener id="actionListener1">Action listener</action-listener>
+ <variable-resolver id="variableResolver1">
+ com.ibm.faces.databind.SelectItemsVarResolver
+ </variable-resolver>
+ <default-render-kit-id id="defaultRenderKit1">some renderer kit</default-render-kit-id>
+ <message-bundle id="messageBundle1">some messeage bundle goes here</message-bundle>
+ <navigation-handler id="navigationHandler1">navigation handler</navigation-handler>
+ <view-handler id="viewHandler1">view handler</view-handler>
+ <state-manager id="stateManager1">state manager</state-manager>
+
+ <property-resolver id="propertyResolver1">
+ com.ibm.faces.databind.SelectItemsPropResolver
+ </property-resolver>
+ <locale-config id="localeConfig1">
+ <default-locale id="defaultLocale1">en</default-locale>
+ <supported-locale id="supportedLocale_en">en</supported-locale>
+ <supported-locale id="supportedLocale_de">de</supported-locale>
+ </locale-config>
+ </application>
+
+ <navigation-rule>
+ <description>Descri 1</description>
+ <display-name>display name 1</display-name>
+ <icon>
+ <small-icon>myicon</small-icon>
+ </icon>
+ <from-view-id>/Page1.jsp</from-view-id>
+ <navigation-case>
+ <description>nav case descr 2</description>
+ <description>nav case descr 2</description>
+ <description>nav case descr 2</description>
+ <description>nav case descr 2</description>
+
+ <display-name>what display name</display-name>
+ <icon>
+ <small-icon>small-icon</small-icon>
+ </icon>
+ <from-action>#{from-action}</from-action>
+ <from-outcome>drilldown</from-outcome>
+ <to-view-id>/edit.jsp</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <description>nav case descr 2</description>
+ <description>nav case descr 2</description>
+ <description>nav case descr 2</description>
+ <description>nav case descr 2</description>
+ <display-name>second navigation case</display-name>
+ <icon>
+ <small-icon>small-icon</small-icon>
+ </icon>
+ <from-action>#{action2}</from-action>
+ <from-outcome>outcome2</from-outcome>
+ <to-view-id>/edit2.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+ <description xml:lang="en">A navigation rule with lang attributes</description>
+ <description xml:lang="en-US">What color is it?</description>
+ <description xml:lang="en-GB">What colour is it?</description>
+ <description xml:lang="fr">Quelle couleur est lui?</description>
+ <display-name xml:lang="en">English Display Name</display-name>
+ <display-name xml:lang="fr">Nom D'Affichage De Francais</display-name>
+
+ <icon xml:lang="en">
+ <small-icon>en_small-icon</small-icon>
+ <large-icon>en_large-icon</large-icon>
+ </icon>
+ <icon>
+ <small-icon>small-icon</small-icon>
+ <large-icon>large-icon</large-icon>
+ </icon>
+ <from-view-id>/Page1.jsp</from-view-id>
+ <navigation-case>
+ <description>nav case descr 2</description>
+ <description>nav case descr 2</description>
+ <description>nav case descr 2</description>
+ <description>nav case descr 2</description>
+ <display-name>second navigation rule navcase</display-name>
+ <icon>
+ <small-icon>small-icon</small-icon>
+ </icon>
+ <from-action>#{action3}</from-action>
+ <from-outcome>outcome3</from-outcome>
+ <to-view-id>/edit3.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+</faces-config>
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/template/faces-config1.xml b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/template/faces-config1.xml
new file mode 100644
index 000000000..c26e90f50
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/template/faces-config1.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE faces-config PUBLIC
+ "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+
+<!-- =========== FULL CONFIGURATION FILE ================================== -->
+
+<faces-config>
+
+
+</faces-config>
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/template/faces-config2.xml b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/template/faces-config2.xml
new file mode 100644
index 000000000..48018098d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/template/faces-config2.xml
@@ -0,0 +1,14 @@
+<?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">
+
+
+<!-- =========== FULL CONFIGURATION FILE ================================== -->
+
+
+
+</faces-config>
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/template/faces-config3.xml b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/template/faces-config3.xml
new file mode 100644
index 000000000..0a611ce23
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/template/faces-config3.xml
@@ -0,0 +1,14 @@
+<?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">
+
+
+<!-- =========== FULL CONFIGURATION FILE ================================== -->
+
+
+
+</faces-config>
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/template/faces-config_1_2.xml b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/template/faces-config_1_2.xml
new file mode 100644
index 000000000..89fb9b1a4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/template/faces-config_1_2.xml
@@ -0,0 +1,433 @@
+<?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">
+<!-- =========== FULL CONFIGURATION FILE ================================== -->
+
+ <lifecycle id="lifecycle1">
+ <phase-listener id="phaseListener1">
+ org.eclipse.wtp.jsf.tests.ValueResourcePhaseListener
+ </phase-listener>
+ <lifecycle-extension><lifecycle-extension-tag/></lifecycle-extension>
+ </lifecycle>
+
+
+ <factory id="factory1">
+ <application-factory id="applicationFactory1">application-factory</application-factory>
+ <faces-context-factory id="facesContextFactory1">
+ faces-context-factory
+ </faces-context-factory>
+ <lifecycle-factory id="lifecycleFactory1">lifecycle-factory</lifecycle-factory>
+ <render-kit-factory id="renderKitFactory1">render-kit-factory</render-kit-factory>
+ <factory-extension><factory-extension-tag/></factory-extension>
+ </factory>
+
+ <!-- Component -->
+ <component id="component1">
+ <description id="componentDescription1">my component</description>
+ <display-name id="componentDisplayName1">My component</display-name>
+ <icon id="componentIcon1">
+ <small-icon>small-icon</small-icon>
+ <large-icon>large-icon</large-icon>
+ </icon>
+ <component-type>component-type</component-type>
+ <component-class>ComponentClass</component-class>
+ <facet id="componentFacet1">
+ <description id="componentFacet1_descripton1">Facet1 Description</description>
+ <display-name id="componentFacet1_displayName1">Component Facet 1</display-name>
+ <icon id="componentFacet1_icon1">
+ <small-icon>facet-small-icon</small-icon>
+ <large-icon>facet-large-icon</large-icon>
+ </icon>
+ <facet-name>facetName_chieb_sieb</facet-name>
+ <facet-extension><extendedBlah></extendedBlah></facet-extension>
+ </facet>
+ <attribute id="componentAttribute1">
+ <description id="componentAttribute1_descripton1">attribute-description</description>
+ <display-name id="componentAttribute1_displayName1">attribute-display-name</display-name>
+ <icon id="componentAttribute1_icon1">
+ <small-icon>attribute-small-icon</small-icon>
+ <large-icon>attribute-large-icon</large-icon>
+ </icon>
+ <attribute-name>attribute-name</attribute-name>
+ <attribute-class>attribute-class</attribute-class>
+ <default-value>value5</default-value>
+ <suggested-value>attribute-suggested-value</suggested-value>
+ <attribute-extension><attr-extension/></attribute-extension>
+ </attribute>
+ <property id="componentProperty1">
+ <description id="componentProperty1_descripton1">myDescript blah blah</description>
+ <display-name id="componentProperty1_displayName1">Component Property 1</display-name>
+ <icon id="componentProperty1_icon1">
+ <small-icon>property-small-icon</small-icon>
+ <large-icon>property-large-icon</large-icon>
+ </icon>
+ <property-name id="componentProperty1_propertyName">property1</property-name>
+ <property-class id="componentProperty1_propertyClass">ComponentProperty</property-class>
+ <default-value>defaultValue6</default-value>
+ <suggested-value>suggestedValue</suggested-value>
+ </property>
+ <component-extension id="componentExtension1"><foo></foo></component-extension>
+ </component>
+
+
+ <!-- managed-bean -->
+ <managed-bean id="managedBean1">
+ <description id="managedBean1Description">managed-bean-description</description>
+ <display-name id="managedBean1DisplayName">managed-bean-display-name</display-name>
+ <icon id="managedBean1Icon">
+ <small-icon>managedBean1-small-icon</small-icon>
+ <large-icon>managedBean1-large-icon</large-icon>
+ </icon>
+ <managed-bean-name>managedBeanName</managed-bean-name>
+ <managed-bean-class>managed-bean-class</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property id="managedBean1Property1">
+ <description id="managedBean1Property1_description">managed-property-description</description>
+ <display-name id="managedBean1Property1_displayName">managed-property-display-name</display-name>
+ <icon id="managedBean1Property1_icon">
+ <small-icon>managedBean1-property-small-icon</small-icon>
+ <large-icon>managedBean1-property-large-icon</large-icon>
+ </icon>
+ <property-name>bean-property-name</property-name>
+ <property-class>bean-property-class</property-class>
+ <value>bean-propertyValue1</value>
+ </managed-property>
+ <managed-property id="managedBean1Property2">
+ <property-name>bean-property2-name</property-name>
+ <property-class>bean-property2-class</property-class>
+ <null-value/>
+ </managed-property>
+ <managed-property id="managedBeanMapProperty">
+ <property-name>map-bean-name</property-name>
+ <property-class>map-bean-class</property-class>
+ <map-entries>
+ <key-class>propertyMapEntryKey</key-class>
+ <value-class>propertyMapEntryValueClass</value-class>
+ <map-entry id="mapPropertyEntryWithValue">
+ <key>propertyMapKey1</key>
+ <value>propertyMapValue1</value>
+ </map-entry>
+ <map-entry id="mapPropertyEntryWithNullValue">
+ <key>propertyMapKey2</key>
+ <null-value/>
+ </map-entry>
+ </map-entries>
+ </managed-property>
+ <managed-property id="managedBeanListProperty">
+ <property-name>list-bean-name</property-name>
+ <property-class>list-bean-class</property-class>
+ <list-entries>
+ <value-class>managedBeanListPropertyClass</value-class>
+ <value id="managedBeanListProperty_value">managedBeanListPropertyValue</value>
+ <null-value/>
+ </list-entries>
+ </managed-property>
+ <managed-bean-extension><managed-bean-extension-tag/></managed-bean-extension>
+ </managed-bean>
+
+ <managed-bean id="mapBean1">
+ <managed-bean-name>mapBean1</managed-bean-name>
+ <managed-bean-class>mapBean1-class</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <map-entries>
+ <key-class>mapBeanEntryKey</key-class>
+ <value-class>mapBeanEntryValueClass</value-class>
+ <map-entry id="mapBeanEntryWithValue">
+ <key>mapBeanKey1</key>
+ <value>mapBeanValue1</value>
+ </map-entry>
+ <map-entry id="mapBeanEntryWithNullValue">
+ <key>mapBeanKey2</key>
+ <null-value/>
+ </map-entry>
+ </map-entries>
+ </managed-bean>
+
+ <managed-bean id="listBean1">
+ <managed-bean-name>listBean1</managed-bean-name>
+ <managed-bean-class>listBean1-class</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <list-entries>
+ <value-class>listBeanListPropertyClass</value-class>
+ <value id="listBeanListProperty_value">listBeanListPropertyValue</value>
+ <null-value/>
+ </list-entries>
+ </managed-bean>
+
+ <converter id="converter1">
+ <description id="converter1Description">converter-description</description>
+ <display-name id="converter1DisplayName">converter-display-name</display-name>
+ <icon id="converter1Icon">
+ <small-icon>converter-small-icon</small-icon>
+ <large-icon>converter-large-icon</large-icon>
+ </icon>
+ <converter-for-class>converter-for-class</converter-for-class>
+ <converter-class>converter-class</converter-class>
+ <attribute id="converter1Attribute">
+ <description id="converter1_attribute_description">converter-attribute-description</description>
+ <display-name id="converter1_attribute_display-name">converter-attribute-display-name</display-name>
+ <icon id="converter1_attribute_icon">
+ <small-icon>converter1-attribute-small-icon</small-icon>
+ <large-icon>converter1-attribute-large-icon</large-icon>
+ </icon>
+ <attribute-name>converter1-attribute-name</attribute-name>
+ <attribute-class>converter1-attribute-class</attribute-class>
+ <default-value>converter1-default-value</default-value>
+ <suggested-value>converter1-attribute-suggested-value</suggested-value>
+ <attribute-extension>
+ <attr-extension/>
+ </attribute-extension>
+ </attribute>
+ <property id="converter1Property">
+ <description id="converter1_property_description">converter-property-description</description>
+ <display-name id="converter1_property_display-name">converter-property-display-name</display-name>
+ <icon id="converter1_property_icon">
+ <small-icon>converter1-property-small-icon</small-icon>
+ <large-icon>converter1-property-large-icon</large-icon>
+ </icon>
+ <property-name>converter-property-name</property-name>
+ <property-class>converter-property-propertyClass</property-class>
+ <default-value>converter-property-default-value</default-value>
+ <suggested-value>converter-property-suggested-value</suggested-value>
+ </property>
+ <converter-extension><converter-extension-tag/></converter-extension>
+ </converter>
+
+ <converter id="converter2">
+ <converter-id>converter2-id</converter-id>
+ <converter-class>converter2-class</converter-class>
+ </converter>
+
+ <!-- Referenced-bean -->
+ <referenced-bean id="referencedBean1">
+ <description id="referencedBean1Description">Referenced Bean Desc</description>
+ <display-name id="referencedBean1DisplayName">referenced-bean-display</display-name>
+ <icon id="referencedBean1Icon">
+ <small-icon>referenced-bean-small-icon</small-icon>
+ <large-icon>referenced-bean-large-icon</large-icon>
+ </icon>
+ <referenced-bean-name>
+ referencedBeanName
+ </referenced-bean-name>
+ <referenced-bean-class>
+ referenced-bean-class
+ </referenced-bean-class>
+ </referenced-bean>
+
+ <!-- Render kit -->
+ <render-kit id="renderKit1">
+ <description id="renderKit1Description">Render kit Desc</description>
+ <display-name id="renderKit1DisplayName">Render kit disp name</display-name>
+ <icon id="renderKit1Icon">
+ <small-icon>small-renderkit-icon</small-icon>
+ <large-icon>large-renderkit-icon</large-icon>
+ </icon>
+ <render-kit-id>render-kit-Id</render-kit-id>
+ <render-kit-class>render-kit-class</render-kit-class>
+ <renderer id="renderKit1Renderer">
+ <description id="renderKit1RendererDescription">my renderer description</description>
+ <display-name id="renderKit1RendererDisplayName">my renderer display name</display-name>
+ <icon id="renderKit1RendererIcon">
+ <small-icon>renderer-small-icon</small-icon>
+ <large-icon>renderer-large-icon</large-icon>
+ </icon>
+ <component-family>component-family</component-family>
+ <renderer-type>renderer-type</renderer-type>
+ <renderer-class>renderer-class</renderer-class>
+ <facet id="renderKit1Renderer1Facet1">
+ <description id="renderKit1Renderer1Facet1Description">RendererFacetDescription</description>
+ <display-name id="renderKit1Renderer1Facet1DisplayName">RendererFacetDisplayName</display-name>
+ <icon id="renderKit1Renderer1Facet1Icon">
+ <small-icon>facet-renderer-small-icon</small-icon>
+ <large-icon>facet-renderer-large-icon</large-icon>
+ </icon>
+ <facet-name>rendererFacetName</facet-name>
+ <facet-extension></facet-extension>
+ </facet>
+ <attribute id="renderKit1RendererAttribute1">
+ <description id="renderKit1RendererAttribute1Description">renderer-attribute-attribute-description</description>
+ <display-name id="renderKit1RendererAttribute1DisplayName">renderer-attribute-display-name</display-name>
+ <icon id="renderKit1RendererAttribute1Icon">
+ <small-icon>renderer-attribute-small-icon</small-icon>
+ <large-icon>renderer-attribute-large-icon</large-icon>
+ </icon>
+ <attribute-name>renderer attribute name</attribute-name>
+ <attribute-class>renderer Attribute Class</attribute-class>
+ <default-value>renderer attribute default value</default-value>
+ <suggested-value>renderer attribute suggested value</suggested-value>
+ <attribute-extension>
+ <renderer-extension/>
+ </attribute-extension>
+ <attribute-extension>
+ <blah-extension/>
+ </attribute-extension>
+ </attribute>
+ <renderer-extension>
+ <renderer-extension-1/>
+ </renderer-extension>
+ <renderer-extension>
+ <renderer-extension-2/>
+ </renderer-extension>
+ <renderer-extension>
+ <renderer-extension-3/>
+ </renderer-extension>
+ </renderer>
+ <render-kit-extension><render-kit-extension-tag/></render-kit-extension>
+ </render-kit>
+
+ <!-- Validator rules -->
+ <validator id="validator1">
+ <description id="validator1_description">validator-description</description>
+ <display-name id="validator1_displayName">validator-display-name</display-name>
+ <icon id="validator1_icon">
+ <small-icon>validator-small-icon</small-icon>
+ <large-icon>validator-large-icon</large-icon>
+ </icon>
+ <validator-id>validator-Id</validator-id>
+ <validator-class>validator-class</validator-class>
+ <attribute id="validator1_attribute">
+ <description id="validator1_attribute_description">validator-attribute-description</description>
+ <display-name id="validator1_attribute_displayName">validator-attribute-display-name</display-name>
+ <icon id="validator1_attribute_icon">
+ <small-icon>validator-attribute-small-icon</small-icon>
+ <large-icon>validator-attribute-large-icon</large-icon>
+ </icon>
+ <attribute-name>validator-attribute-name</attribute-name>
+ <attribute-class>validator-attribute-class</attribute-class>
+ <default-value>validator-default-value</default-value>
+ <suggested-value>validator-attribute-suggested-value</suggested-value>
+ <attribute-extension>
+ <attribute-extension/>
+ </attribute-extension>
+ </attribute>
+ <property id="validator1_property">
+ <description id="validator1_property_description">validator-property-description</description>
+ <display-name id="validator1_property_displayName">validator-property-display-name</display-name>
+ <icon id="validator1_property_icon">
+ <small-icon>validator-property-small-icon</small-icon>
+ <large-icon>validator-property-large-icon</large-icon>
+ </icon>
+ <property-name>validator-property-name</property-name>
+ <property-class>validator-property-class</property-class>
+ <default-value>validator property default value</default-value>
+ <suggested-value>validator property suggested value</suggested-value>
+ <property-extension><future/></property-extension>
+ </property>
+ <validator-extension><validator-extension-tag/></validator-extension>
+ </validator>
+
+ <!-- variable/property resolver registration -->
+ <application id="application1">
+ <action-listener id="actionListener1">Action listener</action-listener>
+ <variable-resolver id="variableResolver1">
+ com.ibm.faces.databind.SelectItemsVarResolver
+ </variable-resolver>
+ <default-render-kit-id id="defaultRenderKit1">some renderer kit</default-render-kit-id>
+ <message-bundle id="messageBundle1">some messeage bundle goes here</message-bundle>
+ <navigation-handler id="navigationHandler1">navigation handler</navigation-handler>
+ <view-handler id="viewHandler1">view handler</view-handler>
+ <state-manager id="stateManager1">state manager</state-manager>
+
+ <property-resolver id="propertyResolver1">
+ com.ibm.faces.databind.SelectItemsPropResolver
+ </property-resolver>
+ <locale-config id="localeConfig1">
+ <default-locale id="defaultLocale1">en</default-locale>
+ <supported-locale id="supportedLocale_en">en</supported-locale>
+ <supported-locale id="supportedLocale_de">de</supported-locale>
+ </locale-config>
+ <el-resolver id="el-resolver-id">com.test.MyELResolver</el-resolver>
+ <resource-bundle id="resourceBundleId1">
+ <description id="resourceBundleDesc">Resource Bundle description blah</description>
+ <display-name id="resourceBundleDisplayName">Resource Bundle display name blah</display-name>
+ <icon id="resourceBundleId">
+ <small-icon>resourceBundle-smallIcon</small-icon>
+ <large-icon>resourceBundle-largeIcon</large-icon>
+ </icon>
+ <base-name>com.test.Bundle</base-name>
+ <var>bundleVar</var>
+ </resource-bundle>
+ <application-extension id="applicatinExtension1">
+ <some-extension-data/>
+ </application-extension>
+ </application>
+
+ <navigation-rule>
+ <description>Descri 1</description>
+ <display-name>display name 1</display-name>
+ <icon>
+ <small-icon>myicon</small-icon>
+ </icon>
+ <from-view-id>/Page1.jsp</from-view-id>
+ <navigation-case>
+ <description>nav case descr 2</description>
+ <description>nav case descr 2</description>
+ <description>nav case descr 2</description>
+ <description>nav case descr 2</description>
+
+ <display-name>what display name</display-name>
+ <icon>
+ <small-icon>small-icon</small-icon>
+ </icon>
+ <from-action>#{from-action}</from-action>
+ <from-outcome>drilldown</from-outcome>
+ <to-view-id>/edit.jsp</to-view-id>
+ <redirect/>
+ </navigation-case>
+
+ <navigation-case>
+ <description>nav case descr 2</description>
+ <description>nav case descr 2</description>
+ <description>nav case descr 2</description>
+ <description>nav case descr 2</description>
+ <display-name>second navigation case</display-name>
+ <icon>
+ <small-icon>small-icon</small-icon>
+ </icon>
+ <from-action>#{action2}</from-action>
+ <from-outcome>outcome2</from-outcome>
+ <to-view-id>/edit2.jsp</to-view-id>
+ </navigation-case>
+
+ <navigation-rule-extension><navigation-extension-tag/></navigation-rule-extension>
+ </navigation-rule>
+
+ <navigation-rule>
+ <description xml:lang="en">A navigation rule with lang attributes</description>
+ <description xml:lang="en-US">What color is it?</description>
+ <description xml:lang="en-GB">What colour is it?</description>
+ <description xml:lang="fr">Quelle couleur est lui?</description>
+ <display-name xml:lang="en">English Display Name</display-name>
+ <display-name xml:lang="fr">Nom D'Affichage De Francais</display-name>
+
+ <icon xml:lang="en">
+ <small-icon>en_small-icon</small-icon>
+ <large-icon>en_large-icon</large-icon>
+ </icon>
+ <icon>
+ <small-icon>small-icon</small-icon>
+ <large-icon>large-icon</large-icon>
+ </icon>
+ <from-view-id>/Page1.jsp</from-view-id>
+ <navigation-case>
+ <description>nav case descr 2</description>
+ <description>nav case descr 2</description>
+ <description>nav case descr 2</description>
+ <description>nav case descr 2</description>
+ <display-name>second navigation rule navcase</display-name>
+ <icon>
+ <small-icon>small-icon</small-icon>
+ </icon>
+ <from-action>#{action3}</from-action>
+ <from-outcome>outcome3</from-outcome>
+ <to-view-id>/edit3.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <faces-config-extension>
+ <faces-config-extended-data/>
+ </faces-config-extension>
+</faces-config>
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/template/faces-config_2_0.xml b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/template/faces-config_2_0.xml
new file mode 100644
index 000000000..f42756af6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/template/faces-config_2_0.xml
@@ -0,0 +1,521 @@
+<?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" metadata-complete="true">
+<!-- =========== FULL CONFIGURATION FILE ================================== -->
+
+ <ordering id="ordering-id">
+ <after>
+ <name>afterName</name>
+ <others id="after-others-id"></others>
+ </after>
+ <before>
+ <name>beforeName</name>
+ <others id="before-others-id"></others>
+ </before>
+ </ordering>
+
+ <absolute-ordering id="absolute-ordering-id">
+ <name>absoluteOrderingName</name>
+ <others id="absolute-ordering-others-id"></others>
+ </absolute-ordering>
+
+ <name>facesconfigName</name>
+
+ <behavior id="behavior-id">
+ <description id="behaviorDescription1">my behavior</description>
+ <display-name id="behaviorDisplayName1">My behavior</display-name>
+ <icon id="behaviorIcon1">
+ <small-icon>small-icon</small-icon>
+ <large-icon>large-icon</large-icon>
+ </icon>
+ <behavior-id>behavior-id-id</behavior-id>
+ <behavior-class>behavior-class</behavior-class>
+ <attribute id="behavior1Attribute">
+ <description id="behavior1AttributeDescription1">behavior1AttributeDescription1</description>
+ <description id="behavior1AttributeDescription2">behavior1AttributeDescription2</description>
+ <display-name id="behavior1AttributeDisplayName1" xml:lang="fr">behavior1AttributeDisplayName1</display-name>
+ <display-name id="behavior1AttributeDisplayName2">behavior1AttributeDisplayName2</display-name>
+ <icon id="behavior1AttributeIcon" >
+ <small-icon id="behavior1AttributeSmallIcon">behavior1AttributeSmallIcon</small-icon>
+ <large-icon id="behavior1AttributeLargeIcon" >behavior1AttributeLargeIcon</large-icon>
+ </icon>
+ <attribute-name id="behavior1AttributeName">behavior1AttributeName</attribute-name>
+ <attribute-class id="behavior1AttributeClass">behavior1AttributeClass</attribute-class>
+ <default-value id="behavior1AttributeDefaultValue">behavior1AttributeDefaultValue</default-value>
+ <suggested-value id="behavior1AttributeSuggestedValue">behavior1AttributeSuggestedValue</suggested-value>
+ <attribute-extension id="behavior1AttributeExtension1"><a>B</a></attribute-extension>
+ <attribute-extension id="behavior1AttributeExtension2">
+ <faces-config version="2.0"></faces-config>
+ </attribute-extension>
+ </attribute>
+ <property id="behavior1Property">
+ <description>behavior1PropertyDescription</description>
+ <display-name>behavior1PropertyDisplayName</display-name>
+ <icon id="behavior1PropertyIcon" >
+ <small-icon id="behavior1PropertySmallIcon">behavior1PropertySmallIcon</small-icon>
+ </icon>
+ <property-name>behavior1PropertyName</property-name>
+ <property-class>behavior1PropertyClass</property-class>
+ </property>
+ <behavior-extension>
+ <a>B</a>
+ <behavior-extension-tag/>
+ </behavior-extension>
+
+ </behavior>
+
+ <lifecycle id="lifecycle1">
+ <phase-listener id="phaseListener1">
+ org.eclipse.wtp.jsf.tests.ValueResourcePhaseListener
+ </phase-listener>
+ <lifecycle-extension><lifecycle-extension-tag/></lifecycle-extension>
+ </lifecycle>
+
+
+ <factory id="factory1">
+ <application-factory id="applicationFactory1">application-factory</application-factory>
+ <exception-handler-factory id="exceptionHandlerFactory1">exception-handler-factory</exception-handler-factory>
+ <external-context-factory id="externalContextFactory1">external-context-factory</external-context-factory>
+ <partial-view-context-factory id="partialViewContextFactory1">partial-view-context-factory</partial-view-context-factory>
+ <faces-context-factory id="facesContextFactory1">faces-context-factory</faces-context-factory>
+ <lifecycle-factory id="lifecycleFactory1">lifecycle-factory</lifecycle-factory>
+ <view-declaration-language-factory id="viewDeclarationLanguageFactory1">view-declaration-language-factory</view-declaration-language-factory>
+ <tag-handler-delegate-factory id="tagHandlerDelegateFactory1">tag-handler-delegate-factory</tag-handler-delegate-factory>
+ <render-kit-factory id="renderKitFactory1">render-kit-factory</render-kit-factory>
+ <visit-context-factory id="visitContextFactory1">visit-context-factory</visit-context-factory>
+ <factory-extension><factory-extension-tag/></factory-extension>
+ </factory>
+
+ <!-- Component -->
+ <component id="component1">
+ <description id="componentDescription1">my component</description>
+ <display-name id="componentDisplayName1">My component</display-name>
+ <icon id="componentIcon1">
+ <small-icon>small-icon</small-icon>
+ <large-icon>large-icon</large-icon>
+ </icon>
+ <component-type>component-type</component-type>
+ <component-class>ComponentClass</component-class>
+ <facet id="componentFacet1">
+ <description id="componentFacet1_descripton1">Facet1 Description</description>
+ <display-name id="componentFacet1_displayName1">Component Facet 1</display-name>
+ <icon id="componentFacet1_icon1">
+ <small-icon>facet-small-icon</small-icon>
+ <large-icon>facet-large-icon</large-icon>
+ </icon>
+ <facet-name>facetName_chieb_sieb</facet-name>
+ <facet-extension><extendedBlah></extendedBlah></facet-extension>
+ </facet>
+ <attribute id="componentAttribute1">
+ <description id="componentAttribute1_descripton1">attribute-description</description>
+ <display-name id="componentAttribute1_displayName1">attribute-display-name</display-name>
+ <icon id="componentAttribute1_icon1">
+ <small-icon>attribute-small-icon</small-icon>
+ <large-icon>attribute-large-icon</large-icon>
+ </icon>
+ <attribute-name>attribute-name</attribute-name>
+ <attribute-class>attribute-class</attribute-class>
+ <default-value>value5</default-value>
+ <suggested-value>attribute-suggested-value</suggested-value>
+ <attribute-extension><attr-extension/></attribute-extension>
+ </attribute>
+ <property id="componentProperty1">
+ <description id="componentProperty1_descripton1">myDescript blah blah</description>
+ <display-name id="componentProperty1_displayName1">Component Property 1</display-name>
+ <icon id="componentProperty1_icon1">
+ <small-icon>property-small-icon</small-icon>
+ <large-icon>property-large-icon</large-icon>
+ </icon>
+ <property-name id="componentProperty1_propertyName">property1</property-name>
+ <property-class id="componentProperty1_propertyClass">ComponentProperty</property-class>
+ <default-value>defaultValue6</default-value>
+ <suggested-value>suggestedValue</suggested-value>
+ </property>
+ <component-extension id="componentExtension1"><foo></foo></component-extension>
+ </component>
+
+
+ <!-- managed-bean -->
+ <managed-bean id="managedBean1" eager="true">
+ <description id="managedBean1Description">managed-bean-description</description>
+ <display-name id="managedBean1DisplayName">managed-bean-display-name</display-name>
+ <icon id="managedBean1Icon">
+ <small-icon>managedBean1-small-icon</small-icon>
+ <large-icon>managedBean1-large-icon</large-icon>
+ </icon>
+ <managed-bean-name>managedBeanName</managed-bean-name>
+ <managed-bean-class>managed-bean-class</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property id="managedBean1Property1">
+ <description id="managedBean1Property1_description">managed-property-description</description>
+ <display-name id="managedBean1Property1_displayName">managed-property-display-name</display-name>
+ <icon id="managedBean1Property1_icon">
+ <small-icon>managedBean1-property-small-icon</small-icon>
+ <large-icon>managedBean1-property-large-icon</large-icon>
+ </icon>
+ <property-name>bean-property-name</property-name>
+ <property-class>bean-property-class</property-class>
+ <value>bean-propertyValue1</value>
+ </managed-property>
+ <managed-property id="managedBean1Property2">
+ <property-name>bean-property2-name</property-name>
+ <property-class>bean-property2-class</property-class>
+ <null-value/>
+ </managed-property>
+ <managed-property id="managedBeanMapProperty">
+ <property-name>map-bean-name</property-name>
+ <property-class>map-bean-class</property-class>
+ <map-entries>
+ <key-class>propertyMapEntryKey</key-class>
+ <value-class>propertyMapEntryValueClass</value-class>
+ <map-entry id="mapPropertyEntryWithValue">
+ <key>propertyMapKey1</key>
+ <value>propertyMapValue1</value>
+ </map-entry>
+ <map-entry id="mapPropertyEntryWithNullValue">
+ <key>propertyMapKey2</key>
+ <null-value/>
+ </map-entry>
+ </map-entries>
+ </managed-property>
+ <managed-property id="managedBeanListProperty">
+ <property-name>list-bean-name</property-name>
+ <property-class>list-bean-class</property-class>
+ <list-entries id="x">
+ <value-class>managedBeanListPropertyClass</value-class>
+ <value>managedBeanListPropertyValue</value>
+ <null-value/>
+ </list-entries>
+ </managed-property>
+ <managed-bean-extension><managed-bean-extension-tag/></managed-bean-extension>
+ </managed-bean>
+
+ <managed-bean id="mapBean1">
+ <managed-bean-name>mapBean1</managed-bean-name>
+ <managed-bean-class>mapBean1-class</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <map-entries>
+ <key-class>mapBeanEntryKey</key-class>
+ <value-class>mapBeanEntryValueClass</value-class>
+ <map-entry id="mapBeanEntryWithValue">
+ <key>mapBeanKey1</key>
+ <value>mapBeanValue1</value>
+ </map-entry>
+ <map-entry id="mapBeanEntryWithNullValue">
+ <key>mapBeanKey2</key>
+ <null-value/>
+ </map-entry>
+ </map-entries>
+ </managed-bean>
+
+ <managed-bean id="listBean1">
+ <managed-bean-name>listBean1</managed-bean-name>
+ <managed-bean-class>listBean1-class</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <list-entries>
+ <value-class>listBeanListPropertyClass</value-class>
+ <value>listBeanListPropertyValue</value>
+ <null-value/>
+ </list-entries>
+ </managed-bean>
+
+ <converter id="converter1">
+ <description id="converter1Description">converter-description</description>
+ <display-name id="converter1DisplayName">converter-display-name</display-name>
+ <icon id="converter1Icon">
+ <small-icon>converter-small-icon</small-icon>
+ <large-icon>converter-large-icon</large-icon>
+ </icon>
+ <converter-for-class>converter-for-class</converter-for-class>
+ <converter-class>converter-class</converter-class>
+ <attribute id="converter1Attribute">
+ <description id="converter1_attribute_description">converter-attribute-description</description>
+ <display-name id="converter1_attribute_display-name">converter-attribute-display-name</display-name>
+ <icon id="converter1_attribute_icon">
+ <small-icon>converter1-attribute-small-icon</small-icon>
+ <large-icon>converter1-attribute-large-icon</large-icon>
+ </icon>
+ <attribute-name>converter1-attribute-name</attribute-name>
+ <attribute-class>converter1-attribute-class</attribute-class>
+ <default-value>converter1-default-value</default-value>
+ <suggested-value>converter1-attribute-suggested-value</suggested-value>
+ <attribute-extension>
+ <attr-extension/>
+ </attribute-extension>
+ </attribute>
+ <property id="converter1Property">
+ <description id="converter1_property_description">converter-property-description</description>
+ <display-name id="converter1_property_display-name">converter-property-display-name</display-name>
+ <icon id="converter1_property_icon">
+ <small-icon>converter1-property-small-icon</small-icon>
+ <large-icon>converter1-property-large-icon</large-icon>
+ </icon>
+ <property-name>converter-property-name</property-name>
+ <property-class>converter-property-propertyClass</property-class>
+ <default-value>converter-property-default-value</default-value>
+ <suggested-value>converter-property-suggested-value</suggested-value>
+ </property>
+ <converter-extension><converter-extension-tag/></converter-extension>
+ </converter>
+
+ <converter id="converter2">
+ <converter-id>converter2-id</converter-id>
+ <converter-class>converter2-class</converter-class>
+ </converter>
+
+ <!-- Referenced-bean -->
+ <referenced-bean id="referencedBean1">
+ <description id="referencedBean1Description">Referenced Bean Desc</description>
+ <display-name id="referencedBean1DisplayName">referenced-bean-display</display-name>
+ <icon id="referencedBean1Icon">
+ <small-icon>referenced-bean-small-icon</small-icon>
+ <large-icon>referenced-bean-large-icon</large-icon>
+ </icon>
+ <referenced-bean-name>
+ referencedBeanName
+ </referenced-bean-name>
+ <referenced-bean-class>
+ referenced-bean-class
+ </referenced-bean-class>
+ </referenced-bean>
+
+ <!-- Render kit -->
+ <render-kit id="renderKit1">
+ <description id="renderKit1Description">Render kit Desc</description>
+ <display-name id="renderKit1DisplayName">Render kit disp name</display-name>
+ <icon id="renderKit1Icon">
+ <small-icon>small-renderkit-icon</small-icon>
+ <large-icon>large-renderkit-icon</large-icon>
+ </icon>
+ <render-kit-id>render-kit-Id</render-kit-id>
+ <render-kit-class>render-kit-class</render-kit-class>
+ <renderer id="renderKit1Renderer">
+ <description id="renderKit1RendererDescription">my renderer description</description>
+ <display-name id="renderKit1RendererDisplayName">my renderer display name</display-name>
+ <icon id="renderKit1RendererIcon">
+ <small-icon>renderer-small-icon</small-icon>
+ <large-icon>renderer-large-icon</large-icon>
+ </icon>
+ <component-family>component-family</component-family>
+ <renderer-type>renderer-type</renderer-type>
+ <renderer-class>renderer-class</renderer-class>
+ <facet id="renderKit1Renderer1Facet1">
+ <description id="renderKit1Renderer1Facet1Description">RendererFacetDescription</description>
+ <display-name id="renderKit1Renderer1Facet1DisplayName">RendererFacetDisplayName</display-name>
+ <icon id="renderKit1Renderer1Facet1Icon">
+ <small-icon>facet-renderer-small-icon</small-icon>
+ <large-icon>facet-renderer-large-icon</large-icon>
+ </icon>
+ <facet-name>rendererFacetName</facet-name>
+ <facet-extension></facet-extension>
+ </facet>
+ <attribute id="renderKit1RendererAttribute1">
+ <description id="renderKit1RendererAttribute1Description">renderer-attribute-attribute-description</description>
+ <display-name id="renderKit1RendererAttribute1DisplayName">renderer-attribute-display-name</display-name>
+ <icon id="renderKit1RendererAttribute1Icon">
+ <small-icon>renderer-attribute-small-icon</small-icon>
+ <large-icon>renderer-attribute-large-icon</large-icon>
+ </icon>
+ <attribute-name>renderer attribute name</attribute-name>
+ <attribute-class>renderer Attribute Class</attribute-class>
+ <default-value>renderer attribute default value</default-value>
+ <suggested-value>renderer attribute suggested value</suggested-value>
+ <attribute-extension>
+ <renderer-extension/>
+ </attribute-extension>
+ <attribute-extension>
+ <blah-extension/>
+ </attribute-extension>
+ </attribute>
+ <renderer-extension>
+ <renderer-extension-1/>
+ </renderer-extension>
+ <renderer-extension>
+ <renderer-extension-2/>
+ </renderer-extension>
+ <renderer-extension>
+ <renderer-extension-3/>
+ </renderer-extension>
+ </renderer>
+ <client-behavior-renderer id="client-behavior-renderer-id">
+ <client-behavior-renderer-type id="client-behavior-renderer-type-id">MyClientBehaviorRendererType</client-behavior-renderer-type>
+ <client-behavior-renderer-class id="client-behavior-renderer-class-id">com.test.MyClientBehaviorRenderer</client-behavior-renderer-class>
+ </client-behavior-renderer>
+ <render-kit-extension><render-kit-extension-tag/></render-kit-extension>
+ </render-kit>
+
+ <!-- Validator rules -->
+ <validator id="validator1">
+ <description id="validator1_description">validator-description</description>
+ <display-name id="validator1_displayName">validator-display-name</display-name>
+ <icon id="validator1_icon">
+ <small-icon>validator-small-icon</small-icon>
+ <large-icon>validator-large-icon</large-icon>
+ </icon>
+ <validator-id>validator-Id</validator-id>
+ <validator-class>validator-class</validator-class>
+ <attribute id="validator1_attribute">
+ <description id="validator1_attribute_description">validator-attribute-description</description>
+ <display-name id="validator1_attribute_displayName">validator-attribute-display-name</display-name>
+ <icon id="validator1_attribute_icon">
+ <small-icon>validator-attribute-small-icon</small-icon>
+ <large-icon>validator-attribute-large-icon</large-icon>
+ </icon>
+ <attribute-name>validator-attribute-name</attribute-name>
+ <attribute-class>validator-attribute-class</attribute-class>
+ <default-value>validator-default-value</default-value>
+ <suggested-value>validator-attribute-suggested-value</suggested-value>
+ <attribute-extension>
+ <attribute-extension/>
+ </attribute-extension>
+ </attribute>
+ <property id="validator1_property">
+ <description id="validator1_property_description">validator-property-description</description>
+ <display-name id="validator1_property_displayName">validator-property-display-name</display-name>
+ <icon id="validator1_property_icon">
+ <small-icon>validator-property-small-icon</small-icon>
+ <large-icon>validator-property-large-icon</large-icon>
+ </icon>
+ <property-name>validator-property-name</property-name>
+ <property-class>validator-property-class</property-class>
+ <default-value>validator property default value</default-value>
+ <suggested-value>validator property suggested value</suggested-value>
+ <property-extension><future/></property-extension>
+ </property>
+ <validator-extension><validator-extension-tag/></validator-extension>
+ </validator>
+
+ <!-- variable/property resolver registration -->
+ <application id="application1">
+ <action-listener id="actionListener1">Action listener</action-listener>
+ <variable-resolver id="variableResolver1">
+ com.ibm.faces.databind.SelectItemsVarResolver
+ </variable-resolver>
+ <default-render-kit-id id="defaultRenderKit1">some renderer kit</default-render-kit-id>
+ <message-bundle id="messageBundle1">some messeage bundle goes here</message-bundle>
+ <navigation-handler id="navigationHandler1">navigation handler</navigation-handler>
+ <view-handler id="viewHandler1">view handler</view-handler>
+ <state-manager id="stateManager1">state manager</state-manager>
+
+ <property-resolver id="propertyResolver1">
+ com.ibm.faces.databind.SelectItemsPropResolver
+ </property-resolver>
+ <locale-config id="localeConfig1">
+ <default-locale id="defaultLocale1">en</default-locale>
+ <supported-locale id="supportedLocale_en">en</supported-locale>
+ <supported-locale id="supportedLocale_de">de</supported-locale>
+ </locale-config>
+ <el-resolver id="el-resolver-id">com.test.MyELResolver</el-resolver>
+<!--
+ <partial-traversal id="partial-traversal-id">com.test.MyPartialTraversal</partial-traversal>
+-->
+ <resource-handler id="resource-handler-id">com.test.MyResourceHandler</resource-handler>
+ <system-event-listener id="system-event-listener-id">
+ <system-event-listener-class id="system-event-listener-class-id">com.test.MySystemEventListener</system-event-listener-class>
+ <system-event-class id="system-event-class-id">com.test.MySystemEvent</system-event-class>
+ <source-class id="source-class-id">com.test.MySource</source-class>
+ </system-event-listener>
+ <default-validators id="default-validators-id">
+ <validator-id id="validator-id-id">MyValidator</validator-id>
+ </default-validators>
+ <resource-bundle id="resourceBundleId1">
+ <description id="resourceBundleDesc">Resource Bundle description blah</description>
+ <display-name id="resourceBundleDisplayName">Resource Bundle display name blah</display-name>
+ <icon id="resourceBundleId">
+ <small-icon>resourceBundle-smallIcon</small-icon>
+ <large-icon>resourceBundle-largeIcon</large-icon>
+ </icon>
+ <base-name>com.test.Bundle</base-name>
+ <var>bundleVar</var>
+ </resource-bundle>
+ <application-extension id="applicatinExtension1">
+ <some-extension-data/>
+ </application-extension>
+ </application>
+
+ <navigation-rule>
+ <description>Descri 1</description>
+ <display-name>display name 1</display-name>
+ <icon>
+ <small-icon>myicon</small-icon>
+ </icon>
+ <from-view-id>/Page1.jsp</from-view-id>
+ <navigation-case>
+ <description>nav case descr 2</description>
+ <description>nav case descr 2</description>
+ <description>nav case descr 2</description>
+ <description>nav case descr 2</description>
+
+ <display-name>what display name</display-name>
+ <icon>
+ <small-icon>small-icon</small-icon>
+ </icon>
+ <from-action>#{from-action}</from-action>
+ <from-outcome>drilldown</from-outcome>
+ <if>#{el-expression}</if>
+ <to-view-id>/edit.jsp</to-view-id>
+ <redirect include-view-params="true">
+ <view-param id="view-param-id">
+ <name>viewParamName</name>
+ <value>viewParamValue</value>
+ </view-param>
+ </redirect>
+ </navigation-case>
+
+ <navigation-case>
+ <description>nav case descr 2</description>
+ <description>nav case descr 2</description>
+ <description>nav case descr 2</description>
+ <description>nav case descr 2</description>
+ <display-name>second navigation case</display-name>
+ <icon>
+ <small-icon>small-icon</small-icon>
+ </icon>
+ <from-action>#{action2}</from-action>
+ <from-outcome>outcome2</from-outcome>
+ <if>s</if>
+ <to-view-id>/edit2.jsp</to-view-id>
+ </navigation-case>
+
+ <navigation-rule-extension><navigation-extension-tag/></navigation-rule-extension>
+ </navigation-rule>
+
+ <navigation-rule>
+ <description xml:lang="en">A navigation rule with lang attributes</description>
+ <description xml:lang="en-US">What color is it?</description>
+ <description xml:lang="en-GB">What colour is it?</description>
+ <description xml:lang="fr">Quelle couleur est lui?</description>
+ <display-name xml:lang="en">English Display Name</display-name>
+ <display-name xml:lang="fr">Nom D'Affichage De Francais</display-name>
+
+ <icon xml:lang="en">
+ <small-icon>en_small-icon</small-icon>
+ <large-icon>en_large-icon</large-icon>
+ </icon>
+ <icon>
+ <small-icon>small-icon</small-icon>
+ <large-icon>large-icon</large-icon>
+ </icon>
+ <from-view-id>/Page1.jsp</from-view-id>
+ <navigation-case>
+ <description>nav case descr 2</description>
+ <description>nav case descr 2</description>
+ <description>nav case descr 2</description>
+ <description>nav case descr 2</description>
+ <display-name>second navigation rule navcase</display-name>
+ <icon>
+ <small-icon>small-icon</small-icon>
+ </icon>
+ <from-action>#{action3}</from-action>
+ <from-outcome>outcome3</from-outcome>
+ <to-view-id>/edit3.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <faces-config-extension>
+ <faces-config-extended-data/>
+ </faces-config-extension>
+</faces-config>
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/test.xml b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/test.xml
new file mode 100644
index 000000000..22483be50
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.tests/test.xml
@@ -0,0 +1,50 @@
+<?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.facesconfig.tests"/>
+ <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml"/>
+ <property name="extraVMargs" value="-ea"/>
+ <echo message="extraVMargs ${extraVMargs}" />
+ <!-- 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.facesconfig.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.facesconfig.tests.AllFacesConfigTests" />
+ <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.facesconfig.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.facesconfig.ui.test/.classpath b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/.classpath
new file mode 100644
index 000000000..304e86186
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.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.facesconfig.ui.test/.cvsignore b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/.cvsignore
new file mode 100644
index 000000000..9e0583796
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/.cvsignore
@@ -0,0 +1,2 @@
+temp.folder
+@dot
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/.project b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/.project
new file mode 100644
index 000000000..256ea3873
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jst.jsf.facesconfig.ui.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/.settings/org.eclipse.core.resources.prefs b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 000000000..6f7ae6b04
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Sun May 27 16:03:34 EDT 2007
+eclipse.preferences.version=1
+encoding/<project>=ISO-8859-1
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/.settings/org.eclipse.jdt.core.prefs b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..d0f6e8823
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,62 @@
+#Thu Sep 27 19:45:35 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.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+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.facesconfig.ui.test/META-INF/MANIFEST.MF b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..d09e84c10
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/META-INF/MANIFEST.MF
@@ -0,0 +1,12 @@
+Manifest-Version: 2.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %plugin.name
+Bundle-SymbolicName: org.eclipse.jst.jsf.facesconfig.ui.test
+Bundle-Version: 1.4.0.qualifier
+Bundle-Vendor: %plugin.provider
+Fragment-Host: org.eclipse.jst.jsf.facesconfig.ui;bundle-version="[1.0.0,2.0.0)"
+Bundle-Localization: plugin
+Require-Bundle: org.junit;bundle-version="3.8.1",
+ org.eclipse.jst.jsf.test.util;bundle-version="[1.0.0,2.0.0)"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/about.html b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/about.html
new file mode 100644
index 000000000..72f94ad86
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/about.html
@@ -0,0 +1,22 @@
+<!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 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.facesconfig.ui.test/build.properties b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/build.properties
new file mode 100644
index 000000000..1b8e39976
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/build.properties
@@ -0,0 +1,20 @@
+###############################################################################
+# 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
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ test-file/,\
+ test.xml,\
+ about.html
+javacSource=1.5
+javacTarget=1.5
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/launch/AllFacesConfigUITests.launch b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/launch/AllFacesConfigUITests.launch
new file mode 100644
index 000000000..8b05f5480
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/launch/AllFacesConfigUITests.launch
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/AllTestCases.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.jst.jsf.facesconfig.ui.test.AllTestCases"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jst.jsf.facesconfig.ui.test"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx512m -XX:MaxPermSize=512M"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/plugin.properties b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/plugin.properties
new file mode 100644
index 000000000..9f8477a18
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/plugin.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# Copyright (c) 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
+###############################################################################
+
+plugin.name=JSF Tools - FacesConfig UI Tests
+plugin.provider=Eclipse Web Tools Platform
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/pom.xml b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/pom.xml
new file mode 100644
index 000000000..5c8583b0c
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/pom.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012, 2013 Eclipse Foundation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Distribution License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/org/documents/edl-v10.php
+
+ Contributors:
+ Thanh Ha (Eclipse Foundation) - initial implementation
+ Ian Trimble (Oracle) - initial tests configuration
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.webtools.jsf</groupId>
+ <artifactId>org.eclipse.webtools.jsf.tests</artifactId>
+ <version>3.6.0-SNAPSHOT</version>
+ <relativePath>../../../</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.webtools.jsf</groupId>
+ <artifactId>org.eclipse.jst.jsf.facesconfig.ui.test</artifactId>
+ <version>1.4.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ <useUIHarness>true</useUIHarness>
+ <testSuite>${project.artifactId}</testSuite>
+ <testClass>org.eclipse.jst.jsf.facesconfig.ui.test.AllTestCases</testClass>
+ <argLine>-DjsfRuntimeJarsDirectoryV1.1=${project.basedir}/../jsfRuntimeJarsDirectory/V1.1 -DjsfRuntimeJarsDirectoryV1.2=${project.basedir}/../jsfRuntimeJarsDirectory/V1.2 -DjsfRuntimeJarsDirectoryV2.0=${project.basedir}/../jsfRuntimeJarsDirectory/V2.0</argLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/section/ComponentsPageTest.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/section/ComponentsPageTest.java
new file mode 100644
index 000000000..ab09b7ba5
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/section/ComponentsPageTest.java
@@ -0,0 +1,168 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 Sybase, Inc. and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jst.jsf.facesconfig.ui.section;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
+import org.eclipse.jst.jsf.facesconfig.ui.page.ComponentsPage;
+import org.eclipse.jst.jsf.facesconfig.ui.page.detail.FacesConfigDetailsPage;
+import org.eclipse.jst.jsf.facesconfig.ui.test.FacesConfigEditorTest;
+
+/**
+ * The test case for the master sections in ComponentsPage.
+ *
+ * @author sfshi
+ *
+ */
+public class ComponentsPageTest extends FacesConfigEditorTest {
+
+ ComponentsPage componentsPage;
+
+ FacesConfigMasterSection[] facesConfigMasterSections;
+
+ FacesConfigType facesConfig;
+
+ /**
+ * Open the faces config file, then switch to "Components" page.
+ *
+ * @see org.eclipse.jst.jsf.facesconfig.ui.test.FacesConfigEditorTest#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ editor.setActiveEditorPage(ComponentsPage.PAGE_ID);
+ componentsPage = (ComponentsPage) editor.getActiveEditor();
+ assertNotNull(componentsPage);
+ facesConfigMasterSections = componentsPage
+ .getFacesConfigMasterSections();
+ assertEquals(facesConfigMasterSections.length, 4);
+
+ facesConfig = editor.getFacesConfig();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.jsf.facesconfig.ui.test.FacesConfigEditorTest#tearDown()
+ */
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ public void testComponentMasterSection() {
+ /** Expand the "Component" secton, then click "Add" button */
+ ComponentMasterSection componentSection = (ComponentMasterSection) facesConfigMasterSections[0];
+ componentSection.getSection().setExpanded(true);
+ assertFalse(componentSection.getRemoveButton().isEnabled());
+ componentSection.addButtonSelected(null);
+ ISelection selection = componentSection.getSelection();
+ assertTrue(selection != null && !selection.isEmpty());
+ assertEquals(facesConfig.getComponent().size(), 1);
+
+ assertTrue(selection instanceof StructuredSelection);
+ FacesConfigDetailsPage detailPage = (FacesConfigDetailsPage)componentsPage
+ .getPage(componentsPage
+ .getPageKey(((StructuredSelection) selection)
+ .getFirstElement()));
+ assertNotNull(detailPage);
+
+ assertTrue(componentSection.getRemoveButton().isEnabled());
+ componentSection.removeButtonSelected(null);
+ componentSection.refresh();
+ selection = componentSection.getSelection();
+ assertTrue(selection == null || selection.isEmpty());
+ assertEquals(facesConfig.getComponent().size(), 0);
+ assertFalse(componentSection.getRemoveButton().isEnabled());
+ }
+
+ public void testConverterMasterSection() {
+
+ /** Expand the "Converter" secton, then click "Add" button */
+ ConverterMasterSection converterSection = (ConverterMasterSection) facesConfigMasterSections[1];
+ converterSection.getSection().setExpanded(true);
+ assertFalse(converterSection.getRemoveButton().isEnabled());
+ converterSection.addButtonSelected(null);
+ ISelection selection = converterSection.getSelection();
+ assertTrue(selection != null && !selection.isEmpty());
+ assertEquals(facesConfig.getConverter().size(), 1);
+
+ assertTrue(selection instanceof StructuredSelection);
+ FacesConfigDetailsPage detailPage = (FacesConfigDetailsPage)componentsPage
+ .getPage(componentsPage
+ .getPageKey(((StructuredSelection) selection)
+ .getFirstElement()));
+ assertNotNull(detailPage);
+
+ assertTrue(converterSection.getRemoveButton().isEnabled());
+ converterSection.removeButtonSelected(null);
+ converterSection.refresh();
+ selection = converterSection.getSelection();
+ assertTrue(selection == null || selection.isEmpty());
+ assertEquals(facesConfig.getConverter().size(), 0);
+ assertFalse(converterSection.getRemoveButton().isEnabled());
+ }
+
+ public void testRenderKitMasterSection() {
+
+ /** Expand the "RenderKit" secton, then click "Add" button */
+ RenderkitMasterSection renderkitSection = (RenderkitMasterSection) facesConfigMasterSections[2];
+ renderkitSection.getSection().setExpanded(true);
+ assertFalse(renderkitSection.getRemoveButton().isEnabled());
+ renderkitSection.addButtonSelected(null);
+ ISelection selection = renderkitSection.getSelection();
+ assertTrue(selection != null && !selection.isEmpty());
+ assertEquals(facesConfig.getRenderKit().size(), 1);
+
+ assertTrue(selection instanceof StructuredSelection);
+ FacesConfigDetailsPage detailPage = (FacesConfigDetailsPage)componentsPage
+ .getPage(componentsPage
+ .getPageKey(((StructuredSelection) selection)
+ .getFirstElement()));
+ assertNotNull(detailPage);
+
+ assertTrue(renderkitSection.getRemoveButton().isEnabled());
+ renderkitSection.removeButtonSelected(null);
+ renderkitSection.refresh();
+ selection = renderkitSection.getSelection();
+ assertTrue(selection == null || selection.isEmpty());
+ assertEquals(facesConfig.getRenderKit().size(), 0);
+ assertFalse(renderkitSection.getRemoveButton().isEnabled());
+ }
+
+ public void testValidatorMasterSection() {
+
+ /** Expand the "Validator" secton, then click "Add" button */
+ ValidatorMasterSection section = (ValidatorMasterSection) facesConfigMasterSections[3];
+ section.getSection().setExpanded(true);
+ assertFalse(section.getRemoveButton().isEnabled());
+ section.addButtonSelected(null);
+ ISelection selection = section.getSelection();
+ assertTrue(selection != null && !selection.isEmpty());
+ assertEquals(facesConfig.getValidator().size(), 1);
+
+ assertTrue(selection instanceof StructuredSelection);
+ FacesConfigDetailsPage detailPage = (FacesConfigDetailsPage)componentsPage
+ .getPage(componentsPage
+ .getPageKey(((StructuredSelection) selection)
+ .getFirstElement()));
+ assertNotNull(detailPage);
+
+ assertTrue(section.getRemoveButton().isEnabled());
+ section.removeButtonSelected(null);
+ section.refresh();
+ selection = section.getSelection();
+ assertTrue(selection == null || selection.isEmpty());
+ assertEquals(facesConfig.getValidator().size(), 0);
+ assertFalse(section.getRemoveButton().isEnabled());
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/AllTestCases.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/AllTestCases.java
new file mode 100644
index 000000000..69f421c23
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/AllTestCases.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 Sybase, Inc. and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jst.jsf.facesconfig.ui.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.jst.jsf.facesconfig.ui.section.ComponentsPageTest;
+import org.eclipse.jst.jsf.facesconfig.ui.wizard.NewManagedBeanWizardTest;
+
+/**
+ * The test suite for faces config editor. Before run it, make sure that this
+ * plugin is in the same folder with "org.eclipse.jst.jsf.facesconfig.ui"
+ * plugin.
+ *
+ * @author sfshi
+ *
+ */
+public class AllTestCases {
+ public static Test suite() {
+ TestSuite suite = new TestSuite("Test Suite for FacesConfig Editor");
+
+ suite.addTestSuite(OpenADFDemoFacesConfigTest.class);
+
+ suite.addTestSuite(ComponentsPageTest.class);
+
+ suite.addTestSuite(WebrootUtilTest.class);
+
+ suite.addTestSuite(ManagedBeanUtilTest.class);
+
+ suite.addTestSuite(JSPUtilTest.class);
+
+ suite.addTestSuite(GEMPreferencesTest.class);
+
+ suite.addTestSuite(NewManagedBeanWizardTest.class);
+
+ suite.addTestSuite(PageflowEditorTest.class);
+
+// 246164 - Invalid JUnit test - to be uncommented when test is fixed
+// suite.addTestSuite(TestNotificationsOnNonUIThread.class);
+ return suite;
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/FacesConfigEditorTest.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/FacesConfigEditorTest.java
new file mode 100644
index 000000000..97f8ef0aa
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/FacesConfigEditorTest.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 Sybase, Inc. and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jst.jsf.facesconfig.ui.test;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jst.jsf.facesconfig.ui.FacesConfigEditor;
+import org.eclipse.jst.jsf.facesconfig.ui.test.util.TestUtil;
+import org.eclipse.jst.jsf.test.util.JSFTestUtil;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IPerspectiveDescriptor;
+import org.eclipse.ui.IPerspectiveRegistry;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+
+/**
+ * The base class for test cases, other test cases could extends this. In this
+ * test case, an empty jsf project will be created and the default faces config
+ * file will be opened with FacesConfig Editor.
+ *
+ * @author sfshi
+ *
+ */
+public abstract class FacesConfigEditorTest extends TestCase {
+ public IProject project;
+
+ public FacesConfigEditor editor;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see junit.framework.TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ JSFTestUtil.setInternetProxyPreferences(true, "www-proxy.us.oracle.com", "80");
+
+ project = TestUtil.createProjectFromZip("emptyjsfproject",
+ "emptyjsfproject.zip");
+ IPerspectiveRegistry reg = PlatformUI.getWorkbench()
+ .getPerspectiveRegistry();
+
+ IPerspectiveDescriptor j2eePersp = reg
+ .findPerspectiveWithId("org.eclipse.jst.j2ee.J2EEPerspective");
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+ .setPerspective(j2eePersp);
+ openEditor();
+
+ }
+
+ protected void openEditor() throws PartInitException, InterruptedException {
+ editor = (FacesConfigEditor) openWithEditor("WebContent/WEB-INF/faces-config.xml");
+
+ // wait for pages to load for up to 30s
+ editor.doPageLoad(60000);
+ }
+
+ protected IEditorPart openWithEditor(String name) throws PartInitException {
+ IPath filePath = new Path(name);
+ IFile facesConfigFile = project.getFile(filePath);
+ assertNotNull(facesConfigFile);
+ assertTrue("The facesconfig file doesn't exists.", facesConfigFile
+ .exists());
+ IEditorInput fileInput = new FileEditorInput(facesConfigFile);
+ IEditorPart editor1 = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().openEditor(
+ fileInput, FacesConfigEditor.EDITOR_ID);
+ assertNotNull(editor1);
+
+ return editor1;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see junit.framework.TestCase#tearDown()
+ */
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ closeEditor();
+ TestUtil.removeResource(project);
+// JSFTestUtil.safeDelete(project, 10, 200);
+ }
+
+ protected void closeEditor() throws Exception {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+ .closeEditor(editor, false);
+
+ editor = null;
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/GEMPreferencesTest.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/GEMPreferencesTest.java
new file mode 100644
index 000000000..1f96e139c
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/GEMPreferencesTest.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 Sybase, Inc. and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jst.jsf.facesconfig.ui.test;
+
+import java.util.Iterator;
+
+import junit.framework.Assert;
+
+import org.eclipse.jface.preference.IPreferenceNode;
+import org.eclipse.jface.preference.PreferenceDialog;
+import org.eclipse.jface.preference.PreferenceManager;
+import org.eclipse.jst.jsf.facesconfig.ui.preference.GEMPreferences;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * @author sfshi
+ *
+ */
+public class GEMPreferencesTest extends FacesConfigEditorTest {
+
+ private String GEM_PREFERENCE_ID = "org.eclipse.jst.jsf.facesconfig.ui.preference.GEMPreferences";
+
+ private static class PreferenceDialogWrapper extends PreferenceDialog {
+ public PreferenceDialogWrapper(Shell parentShell,
+ PreferenceManager manager) {
+ super(parentShell, manager);
+ }
+
+ protected boolean showPage(IPreferenceNode node) {
+ return super.showPage(node);
+ }
+ }
+
+ /**
+ * Test method for
+ * {@link org.eclipse.jst.jsf.facesconfig.ui.preference.GEMPreferences#GEMPreferences()}.
+ */
+ public void testGEMPreferences() {
+
+ PreferenceDialog dialog = null;
+ PreferenceManager manager = PlatformUI.getWorkbench()
+ .getPreferenceManager();
+ dialog = new PreferenceDialogWrapper(getShell(), manager);
+ dialog.create();
+
+ for (Iterator<?> iterator = manager.getElements(
+ PreferenceManager.PRE_ORDER).iterator(); iterator.hasNext();) {
+ IPreferenceNode node = (IPreferenceNode) iterator.next();
+ if (node.getId().equals(GEM_PREFERENCE_ID)) {
+ ((PreferenceDialogWrapper) dialog).showPage(node);
+ }
+ }
+ Assert.assertNotNull(dialog);
+ dialog.setBlockOnOpen(false);
+ dialog.open();
+
+ Assert.assertTrue(dialog.getSelectedPage() instanceof GEMPreferences);
+ GEMPreferences page = (GEMPreferences) dialog.getSelectedPage();
+ assertNotNull(page);
+ // there is no much open mehtods for testing....
+
+ dialog.close();
+ }
+
+ protected static Shell getShell() {
+ return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/JSPUtilTest.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/JSPUtilTest.java
new file mode 100644
index 000000000..5829037a8
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/JSPUtilTest.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 Sybase, Inc. and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jst.jsf.facesconfig.ui.test;
+
+import java.util.List;
+
+import org.eclipse.jst.jsf.facesconfig.ui.pageflow.util.JSPUtil;
+import org.eclipse.jst.jsf.facesconfig.ui.test.util.TestUtil;
+
+/**
+ * @author sfshi
+ *
+ */
+public class JSPUtilTest extends FacesConfigEditorTest {
+
+ /**
+ * Test method for {@link org.eclipse.jst.jsf.facesconfig.ui.pageflow.util.JSPUtil#getActionListInJSPFile(java.lang.String)}.
+ * @throws Exception
+ */
+ public void testGetActionListInJSPFile() throws Exception {
+ TestUtil.copyFile(project, "WebContent", "page1.jsp");
+
+ List<?> actionNodes = JSPUtil.getActionListInJSPFile("/emptyjsfproject/WebContent/page1.jsp");
+ assertEquals(3, actionNodes.size());
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/ManagedBeanUtilTest.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/ManagedBeanUtilTest.java
new file mode 100644
index 000000000..23b8a5898
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/ManagedBeanUtilTest.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 Sybase, Inc. and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jst.jsf.facesconfig.ui.test;
+
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.ManagedBeanNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.ManagedBeanType;
+import org.eclipse.jst.jsf.facesconfig.ui.util.ManagedBeanUtil;
+
+/**
+ * @author sfshi
+ *
+ */
+public class ManagedBeanUtilTest extends FacesConfigEditorTest {
+
+ /**
+ * Test method for
+ * {@link org.eclipse.jst.jsf.facesconfig.ui.util.ManagedBeanUtil#isBeanDuplicate(org.eclipse.core.resources.IProject, java.lang.String)}.
+ */
+ @SuppressWarnings("unchecked")
+ public void testIsBeanDuplicate() {
+ String mbeanName = "testBean";
+ assertFalse(ManagedBeanUtil.isBeanDuplicate(project, mbeanName));
+
+ FacesConfigType facesConfig = editor.getFacesConfig();
+ ManagedBeanType bean1 = FacesConfigFactory.eINSTANCE
+ .createManagedBeanType();
+ ManagedBeanNameType bean1Name = FacesConfigFactory.eINSTANCE
+ .createManagedBeanNameType();
+ bean1Name.setTextContent(mbeanName);
+ bean1.setManagedBeanName(bean1Name);
+ facesConfig.getManagedBean().add(bean1);
+
+ assertTrue(ManagedBeanUtil.isBeanDuplicate(project, mbeanName));
+ }
+
+ /**
+ * Test method for
+ * {@link org.eclipse.jst.jsf.facesconfig.ui.util.ManagedBeanUtil#getDefaultManagedBeanName(org.eclipse.core.resources.IProject, java.lang.String)}.
+ */
+ @SuppressWarnings("unchecked")
+ public void testGetDefaultManagedBeanName() {
+ String mbeanName = "testBean";
+ assertEquals(mbeanName, ManagedBeanUtil.getDefaultManagedBeanName(
+ project, mbeanName));
+
+ FacesConfigType facesConfig = editor.getFacesConfig();
+ ManagedBeanType bean1 = FacesConfigFactory.eINSTANCE
+ .createManagedBeanType();
+ ManagedBeanNameType bean1Name = FacesConfigFactory.eINSTANCE
+ .createManagedBeanNameType();
+ bean1Name.setTextContent(mbeanName);
+ bean1.setManagedBeanName(bean1Name);
+ facesConfig.getManagedBean().add(bean1);
+
+ assertEquals("testBean1", ManagedBeanUtil.getDefaultManagedBeanName(
+ project, mbeanName));
+
+
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/OpenADFDemoFacesConfigTest.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/OpenADFDemoFacesConfigTest.java
new file mode 100644
index 000000000..02a0658a5
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/OpenADFDemoFacesConfigTest.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 Sybase, Inc. and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jst.jsf.facesconfig.ui.test;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+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.jst.jsf.facesconfig.ui.FacesConfigEditor;
+import org.eclipse.jst.jsf.facesconfig.ui.test.util.TestUtil;
+import org.eclipse.jst.jsf.test.util.JSFTestUtil;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+
+/**
+ * @author sfshi
+ *
+ */
+public class OpenADFDemoFacesConfigTest extends TestCase {
+
+ IProject project;
+
+ FacesConfigEditor editor;
+
+ /**
+ * Create the ADF Demo project from zip file.
+ *
+ * @see junit.framework.TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ JSFTestUtil.setInternetProxyPreferences(true, "www-proxy.us.oracle.com", "80");
+
+
+ project = TestUtil.createProjectFromZip("adfDemoProject",
+ "adfDemoProject.zip");
+ }
+
+ /**
+ * Close the editor without saving, then remove the project.
+ *
+ * @see junit.framework.TestCase#tearDown()
+ */
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+ .closeEditor(editor, false);
+ project.close(null);
+// project.delete(IProject.FORCE | IProject.ALWAYS_DELETE_PROJECT_CONTENT,
+// new MockProgressMonitor());
+ }
+
+ /**
+ * Use FacesConfigEditor to open the faces-config.xml file.
+ *
+ * @throws CoreException
+ */
+ public void testOpenFacesConfigFile() throws CoreException, InterruptedException {
+ IPath filePath = new Path("WebContent/WEB-INF/faces-config.xml");
+ IFile facesConfigFile = project.getFile(filePath);
+ assertNotNull(facesConfigFile);
+ assertTrue("The facesconfig file doesn't exists.", facesConfigFile
+ .exists());
+ IEditorInput fileInput = new FileEditorInput(facesConfigFile);
+ editor = (FacesConfigEditor) PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().openEditor(
+ fileInput, FacesConfigEditor.EDITOR_ID);
+ assertNotNull(editor);
+
+ // wait for the editor to signal its pages have been loaded.
+ // throw exception of wait is longer than
+ editor.doPageLoad(60000);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/PageflowEditorTest.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/PageflowEditorTest.java
new file mode 100644
index 000000000..182f6e3d6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/PageflowEditorTest.java
@@ -0,0 +1,264 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 Sybase, Inc. and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.ui.test;
+
+
+
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.NavigationCaseType;
+import org.eclipse.jst.jsf.facesconfig.emf.NavigationRuleType;
+import org.eclipse.jst.jsf.facesconfig.emf.ToViewIdType;
+import org.eclipse.jst.jsf.facesconfig.ui.FacesConfigEditor;
+import org.eclipse.jst.jsf.facesconfig.ui.page.IntroductionPage;
+import org.eclipse.jst.jsf.facesconfig.ui.pageflow.PageflowEditor;
+import org.eclipse.jst.jsf.facesconfig.ui.pageflow.command.AddConnectionCommand;
+import org.eclipse.jst.jsf.facesconfig.ui.pageflow.command.AddNodeCommand;
+import org.eclipse.jst.jsf.facesconfig.ui.pageflow.command.DelegatingCommandStack;
+import org.eclipse.jst.jsf.facesconfig.ui.pageflow.command.DeleteConnectionCommand;
+import org.eclipse.jst.jsf.facesconfig.ui.pageflow.command.DeleteNodeCommand;
+import org.eclipse.jst.jsf.facesconfig.ui.pageflow.command.ReconnectConnectionCommand;
+import org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.Pageflow;
+import org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.PageflowFactory;
+import org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.PageflowLink;
+import org.eclipse.jst.jsf.facesconfig.ui.pageflow.model.PageflowPage;
+import org.eclipse.jst.jsf.facesconfig.ui.pageflow.synchronization.TransformUtil;
+import org.eclipse.ui.actions.ActionFactory;
+
+/**
+ * @author hmeng
+ */
+
+public class PageflowEditorTest extends FacesConfigEditorTest {
+ private static final String LIST_JSP = "/list.jsp";
+
+ private static final String INDEX_JSP = "/index.jsp";
+
+ private static final String INDEX1_JSP = "/index1.jsp";
+
+ protected void setUp() throws Exception {
+ // TODO Auto-generated method stub
+ super.setUp();
+ editor.setActiveEditorPage(PageflowEditor.PAGE_ID);
+ }
+
+ public void testAddElements() {
+ editor.setActiveEditorPage(PageflowEditor.PAGE_ID);
+ Pageflow pageflow = getPageflow();
+ PageflowPage source = createPage(INDEX_JSP);
+ assertTrue(pageflow.getNodes().contains(source));
+
+ PageflowPage target = createPage(LIST_JSP);
+ assertTrue(pageflow.getNodes().contains(target));
+
+ PageflowLink link = createLink(source, target);
+
+ assertTrue(pageflow.getLinks().contains(link));
+ FacesConfigType facesConfig = getFacesConfig();
+ NavigationRuleType rule = (NavigationRuleType) facesConfig
+ .getNavigationRule().get(0);
+ NavigationCaseType caseType = (NavigationCaseType) rule
+ .getNavigationCase().get(0);
+ assertTrue(rule.getFromViewId().getTextContent().equals(INDEX_JSP));
+ assertTrue(caseType.getToViewId().getTextContent().equals(LIST_JSP));
+ }
+
+ private PageflowLink createLink(PageflowPage source, PageflowPage target) {
+ AddConnectionCommand connectionCommand = new AddConnectionCommand();
+ connectionCommand.setSource(source);
+ connectionCommand.setTarget(target);
+ PageflowLink link = PageflowFactory.eINSTANCE.createPFLink();
+ connectionCommand.setPFLink(link);
+ editor.getDelegatingCommandStack().execute(
+ connectionCommand);
+ return link;
+ }
+
+ private PageflowPage createPage(String sourcePath) {
+ PageflowPage source = PageflowFactory.eINSTANCE.createPFPage();
+ source.setPath(sourcePath);
+ AddNodeCommand command = new AddNodeCommand();
+ command.setParent(getPageflow());
+ command.setChild(source);
+ DelegatingCommandStack stack = getDelegatingCommandStack(60000);
+ assertNotNull("PageflowPage will not be added to the Pageflow, as the editor's delegating command stack is null", stack);
+ assertNotNull("PageflowPage will not be added to the Pageflow, as the current command stack is null", stack.getCurrentCommandStack());
+ stack.execute(command);
+ return source;
+ }
+
+ private DelegatingCommandStack getDelegatingCommandStack(int msToWait) {
+ final int INTERVAL_MS = 1500;
+ DelegatingCommandStack dcStack = null;
+ CommandStack ccStack = null;
+ int msWaited = 0;
+ while ((dcStack == null || ccStack == null) && msWaited < msToWait) {
+ dcStack = editor.getDelegatingCommandStack();
+ if (dcStack != null) {
+ ccStack = dcStack.getCurrentCommandStack();
+ }
+ if (dcStack == null || ccStack == null) {
+ try {
+ Thread.sleep(INTERVAL_MS);
+ msWaited += INTERVAL_MS;
+ } catch(InterruptedException iex) {
+ msWaited = msToWait;
+ }
+ }
+ }
+ if (msWaited > 0) {
+ System.out.printf("[PageflowEditorTest.getDelegatingCommandStack(...)] waited %dms for a valid CommandStack\n", msWaited);
+ }
+ return dcStack;
+ }
+
+ private FacesConfigType getFacesConfig() {
+ return editor.getFacesConfig();
+ }
+
+ public void testDeleteNode() {
+ testAddElements();
+ Pageflow pageflow = getPageflow();
+ DeleteNodeCommand command = new DeleteNodeCommand(pageflow);
+ command.setParent(pageflow);
+ PageflowPage page = TransformUtil.findPage(INDEX_JSP, pageflow);
+ command.setChild(page);
+ command.execute();
+ assertTrue(!pageflow.getNodes().contains(page));
+ assertTrue(pageflow.getLinks().size() == 0);
+ assertTrue(getFacesConfig().getNavigationRule().size() == 0);
+ }
+
+ public void testDeleteLink() {
+ testAddElements();
+ Pageflow pageflow = getPageflow();
+ DeleteConnectionCommand command = new DeleteConnectionCommand();
+ PageflowPage page = TransformUtil.findPage(INDEX_JSP, pageflow);
+ PageflowLink link = (PageflowLink) page.getOutlinks().get(0);
+ command.setSource(link.getSource());
+ command.setTarget(link.getTarget());
+ command.setPFLink(link);
+ command.execute();
+ assertTrue(link.getFCElements().isEmpty());
+ assertTrue(link.eAdapters().size() == 0);
+ assertTrue(!pageflow.getLinks().contains(link));
+ assertTrue(pageflow.getLinks().size() == 0);
+ assertTrue(getFacesConfig().getNavigationRule().size() == 0);
+ }
+
+ public void testAddNavigationCase() {
+ testAddElements();
+ NavigationRuleType rule = (NavigationRuleType) getFacesConfig()
+ .getNavigationRule().get(0);
+ rule.getNavigationCase().remove(0);
+ assertTrue(getPageflow().getLinks().size() == 0);
+ }
+
+ public void testSetPFProperty() {
+ testAddElements();
+ PageflowPage page = TransformUtil.findPage(INDEX_JSP, getPageflow());
+ page.setPath(INDEX1_JSP);
+ NavigationRuleType rule = (NavigationRuleType) getFacesConfig()
+ .getNavigationRule().get(0);
+ assertTrue(getFacesConfig().getNavigationRule().size() == 1);
+ assertTrue(rule.getFromViewId().getTextContent().equals(INDEX1_JSP));
+ }
+
+ public void testSetFCProperty() {
+ testAddElements();
+ NavigationRuleType rule = (NavigationRuleType) getFacesConfig()
+ .getNavigationRule().get(0);
+ rule.getFromViewId().setTextContent(INDEX1_JSP);
+ assertTrue(getPageflow().getLinks().size() == 1);
+ assertTrue(((PageflowPage) ((PageflowLink) getPageflow().getLinks()
+ .get(0)).getSource()).getPath().equals(INDEX1_JSP));
+ }
+
+ private Pageflow getPageflow() {
+ return editor.getPageflowPage().getPageflow();
+ }
+
+ public void testChangeLinkTarget() {
+ testAddElements();
+ ReconnectConnectionCommand command = new ReconnectConnectionCommand();
+ PageflowPage page = createPage(INDEX1_JSP);
+ command.setSource(page);
+ PageflowLink link = (PageflowLink) getPageflow().getLinks().get(0);
+ command.setPFLink(link);
+ command.execute();
+ NavigationRuleType rule = (NavigationRuleType) getFacesConfig()
+ .getNavigationRule().get(0);
+ Object element1 = link.getSource().getFCElements().getData().get(0);
+ Object element2 = link.getTarget().getFCElements().getData().get(0);
+ assertTrue(link.getSource().getFCElements().getData().size() == 1);
+ assertTrue(link.getTarget().getFCElements().getData().size() == 1);
+ assertTrue(element1 == rule.getFromViewId());
+
+ assertTrue(((ToViewIdType) element2).eContainer().eContainer() == rule);
+ assertTrue(getFacesConfig().getNavigationRule().size() == 1);
+ assertTrue(rule.getFromViewId().getTextContent().equals(INDEX1_JSP));
+ }
+
+ public void testUndo() {
+ testAddElements();
+ Pageflow pageflow = getPageflow();
+ DeleteConnectionCommand command = new DeleteConnectionCommand();
+ PageflowPage page = TransformUtil.findPage(INDEX_JSP, pageflow);
+ PageflowLink link = (PageflowLink) page.getOutlinks().get(0);
+ command.setPFLink(link);
+ editor.setActiveEditorPage(PageflowEditor.PAGE_ID);
+ editor.getDelegatingCommandStack().execute(command);
+ assertTrue(getFacesConfig().getNavigationRule().size() == 0);
+ assertTrue(getPageflow().getLinks().size() == 0);
+ editor.getDelegatingCommandStack().undo();
+ assertTrue(getFacesConfig().getNavigationRule().size() == 1);
+ assertTrue(getPageflow().getLinks().size() == 1);
+ }
+
+ public void testRedo() {
+ testUndo();
+ editor.getDelegatingCommandStack().redo();
+ assertTrue(getFacesConfig().getNavigationRule().size() == 0);
+ assertTrue(getPageflow().getLinks().size() == 0);
+ }
+
+ public void testEditorSwitch() throws Exception {
+ editor.setFocus();
+ editor.setActivePage(IntroductionPage.class.getName());
+ assertTrue(editor.getActionBarContributor().getActionBars()
+ .getGlobalActionHandler(ActionFactory.UNDO.getId()) == null);
+ assertTrue(editor.getActionBarContributor().getActionBars()
+ .getGlobalActionHandler(ActionFactory.REDO.getId()) == null);
+ testAddElements();
+ editor.setActivePage(PageflowEditor.PAGE_ID);
+ assertTrue(editor.getActionBarContributor().getActionBars()
+ .getGlobalActionHandler(ActionFactory.UNDO.getId())
+ .isEnabled());
+
+ editor.setActivePage(IntroductionPage.class.getName());
+ assertTrue(editor.getActionBarContributor().getActionBars()
+ .getGlobalActionHandler(ActionFactory.UNDO.getId()) == null);
+ assertTrue(editor.getActionBarContributor().getActionBars()
+ .getGlobalActionHandler(ActionFactory.REDO.getId()) == null);
+ FacesConfigEditor anotherEditor = (FacesConfigEditor) openWithEditor("WebContent/WEB-INF/faces-config1.xml");
+ anotherEditor.setFocus();
+ assertTrue(anotherEditor.getActionBarContributor().getActionBars()
+ .getGlobalActionHandler(ActionFactory.UNDO.getId()) == null);
+ assertTrue(anotherEditor.getActionBarContributor().getActionBars()
+ .getGlobalActionHandler(ActionFactory.REDO.getId()) == null);
+ editor.setFocus();
+ editor.setActiveEditorPage(PageflowEditor.PAGE_ID);
+ assertTrue(editor.getActionBarContributor().getActionBars()
+ .getGlobalActionHandler(ActionFactory.UNDO.getId())
+ .isEnabled());
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/TestNotificationsOnNonUIThread.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/TestNotificationsOnNonUIThread.java
new file mode 100644
index 000000000..ec0dd2143
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/TestNotificationsOnNonUIThread.java
@@ -0,0 +1,537 @@
+package org.eclipse.jst.jsf.facesconfig.ui.test;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.jsf.facesconfig.emf.ActionListenerType;
+import org.eclipse.jst.jsf.facesconfig.emf.ApplicationFactoryType;
+import org.eclipse.jst.jsf.facesconfig.emf.ApplicationType;
+import org.eclipse.jst.jsf.facesconfig.emf.AttributeClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.AttributeNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.AttributeType;
+import org.eclipse.jst.jsf.facesconfig.emf.ComponentClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.ComponentFamilyType;
+import org.eclipse.jst.jsf.facesconfig.emf.ComponentType;
+import org.eclipse.jst.jsf.facesconfig.emf.ComponentTypeType;
+import org.eclipse.jst.jsf.facesconfig.emf.ConverterClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.ConverterForClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.ConverterType;
+import org.eclipse.jst.jsf.facesconfig.emf.DefaultLocaleType;
+import org.eclipse.jst.jsf.facesconfig.emf.DefaultRenderKitIdType;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
+import org.eclipse.jst.jsf.facesconfig.emf.FacesContextFactoryType;
+import org.eclipse.jst.jsf.facesconfig.emf.FactoryType;
+import org.eclipse.jst.jsf.facesconfig.emf.FromOutcomeType;
+import org.eclipse.jst.jsf.facesconfig.emf.FromViewIdType;
+import org.eclipse.jst.jsf.facesconfig.emf.LifecycleFactoryType;
+import org.eclipse.jst.jsf.facesconfig.emf.LifecycleType;
+import org.eclipse.jst.jsf.facesconfig.emf.LocaleConfigType;
+import org.eclipse.jst.jsf.facesconfig.emf.ManagedBeanClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.ManagedBeanNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.ManagedBeanScopeType;
+import org.eclipse.jst.jsf.facesconfig.emf.ManagedBeanType;
+import org.eclipse.jst.jsf.facesconfig.emf.MessageBundleType;
+import org.eclipse.jst.jsf.facesconfig.emf.NavigationCaseType;
+import org.eclipse.jst.jsf.facesconfig.emf.NavigationHandlerType;
+import org.eclipse.jst.jsf.facesconfig.emf.NavigationRuleType;
+import org.eclipse.jst.jsf.facesconfig.emf.PhaseListenerType;
+import org.eclipse.jst.jsf.facesconfig.emf.PropertyClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.PropertyNameType;
+import org.eclipse.jst.jsf.facesconfig.emf.PropertyResolverType;
+import org.eclipse.jst.jsf.facesconfig.emf.PropertyType;
+import org.eclipse.jst.jsf.facesconfig.emf.RenderKitClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.RenderKitFactoryType;
+import org.eclipse.jst.jsf.facesconfig.emf.RenderKitIdType;
+import org.eclipse.jst.jsf.facesconfig.emf.RenderKitType;
+import org.eclipse.jst.jsf.facesconfig.emf.RendererClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.RendererType;
+import org.eclipse.jst.jsf.facesconfig.emf.RendererTypeType;
+import org.eclipse.jst.jsf.facesconfig.emf.StateManagerType;
+import org.eclipse.jst.jsf.facesconfig.emf.ToViewIdType;
+import org.eclipse.jst.jsf.facesconfig.emf.ValidatorClassType;
+import org.eclipse.jst.jsf.facesconfig.emf.ValidatorIdType;
+import org.eclipse.jst.jsf.facesconfig.emf.ValidatorType;
+import org.eclipse.jst.jsf.facesconfig.emf.VariableResolverType;
+import org.eclipse.jst.jsf.facesconfig.emf.ViewHandlerType;
+import org.eclipse.jst.jsf.facesconfig.ui.FacesConfigEditor;
+import org.eclipse.jst.jsf.facesconfig.ui.page.ComponentsPage;
+import org.eclipse.jst.jsf.facesconfig.ui.page.ManagedBeanPage;
+import org.eclipse.jst.jsf.facesconfig.ui.page.OthersPage;
+import org.eclipse.jst.jsf.facesconfig.ui.page.OverviewPage;
+import org.eclipse.jst.jsf.facesconfig.ui.pageflow.PageflowEditor;
+import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.WorkbenchPlugin;
+import org.eclipse.ui.progress.UIJob;
+
+/**
+ * This test covers :
+ * [Bug 233506] [hotbug_request] SWTException in Faces config. file editor
+ * [Bug 244486] [hotbug_request] JSF Tools: widget disposed exception, when model shared with other editors
+ *
+ */
+public class TestNotificationsOnNonUIThread extends FacesConfigEditorTest {
+
+ public void setUp()throws Exception {
+ super.setUp();
+ initializeEditor();
+ }
+
+ private void initializeEditor() {
+ UIJob job = new UIJob("Initialize FCE Editor Pages") {
+
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ //the following should ensure that all of the adapters and listeners on the pages are initialized
+ editor.setActiveEditorPage(OverviewPage.PAGE_ID);
+ editor.setActiveEditorPage(PageflowEditor.PAGE_ID);
+ editor.setActiveEditorPage(ManagedBeanPage.PAGE_ID);
+ editor.setActiveEditorPage(ComponentsPage.PAGE_ID);
+ editor.setActiveEditorPage(OthersPage.PAGE_ID);
+ editor.setActiveEditorPage(FacesConfigEditor.SOURCE_PAGE_ID);
+ return Status.OK_STATUS;
+ }
+
+ };
+ job.runInUIThread(new NullProgressMonitor());
+
+ }
+
+ private void executeTest(FCRunnable runnable) throws Exception {
+ FacesConfigArtifactEdit edit = null;
+ try {
+ edit = FacesConfigArtifactEdit.getFacesConfigArtifactEditForWrite(project, "WEB-INF/faces-config.xml");
+ runnable.setFCEdit(edit);
+ Thread execThread = new Thread(runnable);
+ assert (PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell().getDisplay().getThread() != Thread.currentThread());
+ execThread.run();
+ execThread.join();
+ } finally {
+ if (edit != null){
+ edit.save(null);
+ edit.dispose();
+ edit = null;
+ }
+ }
+
+ }
+
+ public void testCreateFCElementsWithEditorOpen () throws Exception {
+ internalCreateNavigationElements();
+ closeAndReopenEditor();
+ internalCreateComponentElements();
+ closeAndReopenEditor();
+ internalCreateManagedBeanElement();
+ closeAndReopenEditor();
+ internalCreateOtherPageElements();
+ }
+
+ public void testCreateFCElementsWithEditorOpenedThenClosed () throws Exception {
+ internalCreateNavigationElements();
+ closeEditor();
+ internalCreateComponentElements();
+// closeAndReopenEditor();
+ internalCreateManagedBeanElement();
+// closeAndReopenEditor();
+ internalCreateOtherPageElements();
+ }
+
+ public void testCreateFCElementsWithEditorSometimesOpen () throws Exception {
+ closeEditor();
+ internalCreateNavigationElements();
+ closeAndReopenEditor();
+ internalCreateComponentElements();
+ closeEditor();
+ internalCreateManagedBeanElement();
+ closeAndReopenEditor();
+ internalCreateOtherPageElements();
+ }
+
+ private void closeAndReopenEditor() throws Exception {
+ closeEditor();
+ openEditor();
+ initializeEditor();
+ }
+
+ private void internalCreateNavigationElements() throws Exception{
+ WorkbenchPlugin.log("internalCreateNavigationElements");
+ if (editor!= null)
+ this.editor.setActiveEditorPage(PageflowEditor.PAGE_ID);
+ executeTest(new FCRunnable() {
+ public void run(FacesConfigArtifactEdit edit){
+ createNavRule(edit);
+ }
+ });
+ }
+
+ private void internalCreateComponentElements() throws Exception{
+ WorkbenchPlugin.log("internalCreateComponentElements");
+ if (editor!= null)
+ editor.setActiveEditorPage(ComponentsPage.PAGE_ID);
+ executeTest(new FCRunnable() {
+ public void run(FacesConfigArtifactEdit edit){
+ createComp(edit);
+ createConv(edit);
+ createRenderkit(edit);
+ createVal(edit);
+ }
+
+ });
+ }
+
+ private void internalCreateManagedBeanElement() throws Exception{
+ WorkbenchPlugin.log("internalCreateManagedBeanElement");
+ if (editor!= null)
+ editor.setActiveEditorPage(ManagedBeanPage.PAGE_ID);
+ executeTest(new FCRunnable() {
+ public void run(FacesConfigArtifactEdit edit){
+ createMBean(edit);
+ }
+
+ });
+ }
+
+ private void internalCreateOtherPageElements() throws Exception{
+ WorkbenchPlugin.log("internalCreateOtherPageElements");
+ if (editor!= null)
+ editor.setActiveEditorPage(OthersPage.PAGE_ID);
+ executeTest(new FCRunnable() {
+ public void run(FacesConfigArtifactEdit edit){
+ createActionListener(edit);
+ createDefRenderKit(edit);
+ createLocaleConfig(edit);
+ createMessageBundle(edit);
+ createNavHandler(edit);
+ createPropertyResolver(edit);
+ createStateManager(edit);
+ createVarResolver(edit);
+ createViewHandler(edit);
+ createAppFactory(edit);
+ createFCFactory(edit);
+ createLCFactory(edit);
+ createRKFactory(edit);
+ createPhaseListener(edit);
+ }
+
+ });
+ }
+
+ @SuppressWarnings("unchecked")
+ private void createPhaseListener(FacesConfigArtifactEdit edit){
+ LifecycleType app = getOrCreateLCType(edit);
+ FacesConfigFactory fac = FacesConfigFactory.eINSTANCE;
+ PhaseListenerType t = fac.createPhaseListenerType();
+ t.setTextContent("PhaseListener"+System.currentTimeMillis());
+ app.getPhaseListener().add(t);
+ }
+
+ @SuppressWarnings("unchecked")
+ private LifecycleType getOrCreateLCType(
+ FacesConfigArtifactEdit edit) {
+
+ List<LifecycleType> lcs = edit.getFacesConfig().getLifecycle();
+ if (lcs == null || lcs.size() == 0){
+ LifecycleType lc = FacesConfigFactory.eINSTANCE.createLifecycleType();
+ edit.getFacesConfig().getLifecycle().add(lc);
+ return lc;
+ }
+ return lcs.get(0);
+ }
+
+ @SuppressWarnings("unchecked")
+ private void createRKFactory(FacesConfigArtifactEdit edit) {
+ FactoryType app = getOrCreateFactoryType(edit);
+ FacesConfigFactory fac = FacesConfigFactory.eINSTANCE;
+ RenderKitFactoryType t = fac.createRenderKitFactoryType();
+ t.setTextContent("RKFac");
+ app.getRenderKitFactory().add(t);
+ }
+
+ @SuppressWarnings("unchecked")
+ private void createLCFactory(FacesConfigArtifactEdit edit) {
+ FactoryType app = getOrCreateFactoryType(edit);
+ FacesConfigFactory fac = FacesConfigFactory.eINSTANCE;
+ LifecycleFactoryType t = fac.createLifecycleFactoryType();
+ t.setTextContent("lifeCycleFac");
+ app.getLifecycleFactory().add(t);
+ }
+
+ @SuppressWarnings("unchecked")
+ private void createFCFactory(FacesConfigArtifactEdit edit) {
+ FactoryType app = getOrCreateFactoryType(edit);
+ FacesConfigFactory fac = FacesConfigFactory.eINSTANCE;
+ FacesContextFactoryType t = fac.createFacesContextFactoryType();
+ t.setTextContent("FCFac");
+ app.getFacesContextFactory().add(t);
+ }
+
+ @SuppressWarnings("unchecked")
+ private void createAppFactory(FacesConfigArtifactEdit edit) {
+ FactoryType app = getOrCreateFactoryType(edit);
+ FacesConfigFactory fac = FacesConfigFactory.eINSTANCE;
+ ApplicationFactoryType t = fac.createApplicationFactoryType();
+ t.setTextContent("appFac");
+ app.getApplicationFactory().add(t);
+ }
+
+ @SuppressWarnings("unchecked")
+ private FactoryType getOrCreateFactoryType(
+ FacesConfigArtifactEdit edit) {
+ List<FactoryType> facs = edit.getFacesConfig().getFactory();
+ if (facs == null || facs.size() == 0){
+ FactoryType fac = FacesConfigFactory.eINSTANCE.createFactoryType();
+ edit.getFacesConfig().getFactory().add(fac);
+ return fac;
+ }
+ return facs.get(0);
+
+ }
+
+ @SuppressWarnings("unchecked")
+ private void createViewHandler(FacesConfigArtifactEdit edit) {
+ ApplicationType app = getOrCreateAppType(edit);
+ FacesConfigFactory fac = FacesConfigFactory.eINSTANCE;
+ ViewHandlerType t = fac.createViewHandlerType();
+ t.setTextContent("ViewHandler");
+ app.getViewHandler().add(t);
+ }
+
+ @SuppressWarnings("unchecked")
+ private void createVarResolver(FacesConfigArtifactEdit edit) {
+ ApplicationType app = getOrCreateAppType(edit);
+ FacesConfigFactory fac = FacesConfigFactory.eINSTANCE;
+ VariableResolverType t = fac.createVariableResolverType();
+ t.setTextContent("VarResolver");
+ app.getVariableResolver().add(t);
+ }
+
+ @SuppressWarnings("unchecked")
+ private void createStateManager(FacesConfigArtifactEdit edit) {
+ ApplicationType app = getOrCreateAppType(edit);
+ FacesConfigFactory fac = FacesConfigFactory.eINSTANCE;
+ StateManagerType t = fac.createStateManagerType();
+ t.setTextContent("StateMgr");
+ app.getStateManager().add(t);
+ }
+
+ @SuppressWarnings("unchecked")
+ private void createPropertyResolver(FacesConfigArtifactEdit edit) {
+ ApplicationType app = getOrCreateAppType(edit);
+ FacesConfigFactory fac = FacesConfigFactory.eINSTANCE;
+ PropertyResolverType t = fac.createPropertyResolverType();
+ t.setTextContent("PropResolver");
+ app.getPropertyResolver().add(t);
+ }
+
+ @SuppressWarnings("unchecked")
+ private void createNavHandler(FacesConfigArtifactEdit edit) {
+ ApplicationType app = getOrCreateAppType(edit);
+ FacesConfigFactory fac = FacesConfigFactory.eINSTANCE;
+ NavigationHandlerType t = fac.createNavigationHandlerType();
+ t.setTextContent("NavHdlr");
+ app.getNavigationHandler().add(t);
+ }
+
+ @SuppressWarnings("unchecked")
+ private void createMessageBundle(FacesConfigArtifactEdit edit) {
+ ApplicationType app = getOrCreateAppType(edit);
+ FacesConfigFactory fac = FacesConfigFactory.eINSTANCE;
+ MessageBundleType t = fac.createMessageBundleType();
+ t.setTextContent("messageBundle");
+ app.getMessageBundle().add(t);
+ }
+
+ @SuppressWarnings("unchecked")
+ private void createLocaleConfig(FacesConfigArtifactEdit edit) {
+ ApplicationType app = getOrCreateAppType(edit);
+ FacesConfigFactory fac = FacesConfigFactory.eINSTANCE;
+ LocaleConfigType t = fac.createLocaleConfigType();
+ DefaultLocaleType lc = fac.createDefaultLocaleType();
+ lc.setTextContent("en");
+ t.setDefaultLocale(lc);
+ app.getLocaleConfig().add(t);
+ }
+
+ @SuppressWarnings("unchecked")
+ private void createActionListener(FacesConfigArtifactEdit edit) {
+ ApplicationType app = getOrCreateAppType(edit);
+ FacesConfigFactory fac = FacesConfigFactory.eINSTANCE;
+ ActionListenerType t = fac.createActionListenerType();
+ t.setTextContent("actionListener");
+ app.getActionListener().add(t);
+ }
+
+ @SuppressWarnings("unchecked")
+ private void createDefRenderKit(FacesConfigArtifactEdit edit) {
+ ApplicationType app = getOrCreateAppType(edit);
+ FacesConfigFactory fac = FacesConfigFactory.eINSTANCE;
+ DefaultRenderKitIdType t = fac.createDefaultRenderKitIdType();
+ t.setTextContent("defRenderKit");
+ app.getDefaultRenderKitId().add(t);
+ }
+
+ @SuppressWarnings("unchecked")
+ private ApplicationType getOrCreateAppType(
+ FacesConfigArtifactEdit edit) {
+ List<ApplicationType> apps = edit.getFacesConfig().getApplication();
+ if (apps == null || apps.size() == 0){
+ ApplicationType app = FacesConfigFactory.eINSTANCE.createApplicationType();
+ edit.getFacesConfig().getApplication().add(app);
+ return app;
+ }
+ return apps.get(0);
+ }
+
+ @SuppressWarnings("unchecked")
+ private void createComp(FacesConfigArtifactEdit edit) {
+ FacesConfigFactory fac = FacesConfigFactory.eINSTANCE;
+ ComponentType comp = fac.createComponentType();
+ ComponentTypeType ttype = fac.createComponentTypeType();
+ ttype.setTextContent("comp"+String.valueOf(System.currentTimeMillis()));
+ comp.setComponentType(ttype);
+ ComponentClassType klass = fac.createComponentClassType();
+ klass.setTextContent("com.foo.burger");
+ comp.setComponentClass(klass);
+ edit.getFacesConfig().getComponent().add(comp);
+ }
+
+ @SuppressWarnings("unchecked")
+ private void createConv(FacesConfigArtifactEdit edit) {
+ FacesConfigFactory fac = FacesConfigFactory.eINSTANCE;
+ ConverterType conv = fac.createConverterType();
+ ConverterClassType klass = fac.createConverterClassType();
+ klass.setTextContent("com.foo.burger");
+ conv.setConverterClass(klass);
+// ConverterIdType id= fac.createConverterIdType();
+// id.setTextContent("Conv"+System.currentTimeMillis());
+// conv.setConverterId(id);
+ ConverterForClassType forKlass = fac.createConverterForClassType();
+ forKlass.setTextContent("com.foo.burger.converter");
+ conv.setConverterForClass(forKlass);
+
+ AttributeType attr = fac.createAttributeType();
+ AttributeClassType aKlass = fac.createAttributeClassType();
+ AttributeNameType aName = fac.createAttributeNameType();
+ aName.setTextContent("foo");
+ aKlass.setTextContent("com.foo.burger");
+ attr.setAttributeClass(aKlass);
+ attr.setAttributeName(aName);
+ conv.getAttribute().add(attr);
+
+ PropertyType prop = fac.createPropertyType();
+ PropertyClassType pKlass = fac.createPropertyClassType();
+ PropertyNameType pName = fac.createPropertyNameType();
+ pKlass.setTextContent("aProp");
+ pName.setTextContent("com.foo.Bar");
+ prop.setPropertyClass(pKlass);
+ prop.setPropertyName(pName);
+ conv.getProperty().add(prop);
+
+ edit.getFacesConfig().getConverter().add(conv);
+ }
+
+
+ @SuppressWarnings("unchecked")
+ private void createVal(FacesConfigArtifactEdit edit) {
+ FacesConfigFactory fac = FacesConfigFactory.eINSTANCE;
+ ValidatorType val = fac.createValidatorType();
+ ValidatorClassType klass = fac.createValidatorClassType();
+ klass.setTextContent("com.foo.burger");
+ val.setValidatorClass(klass);
+ ValidatorIdType id= fac.createValidatorIdType();
+ id.setTextContent("Conv"+System.currentTimeMillis());
+ val.setValidatorId(id);
+
+ AttributeType attr = fac.createAttributeType();
+ AttributeClassType aKlass = fac.createAttributeClassType();
+ AttributeNameType aName = fac.createAttributeNameType();
+ aName.setTextContent("foo");
+ aKlass.setTextContent("com.foo.burger");
+ attr.setAttributeClass(aKlass);
+ attr.setAttributeName(aName);
+ val.getAttribute().add(attr);
+
+ PropertyType prop = fac.createPropertyType();
+ PropertyClassType pKlass = fac.createPropertyClassType();
+ PropertyNameType pName = fac.createPropertyNameType();
+ pKlass.setTextContent("aProp");
+ pName.setTextContent("com.foo.Bar");
+ prop.setPropertyClass(pKlass);
+ prop.setPropertyName(pName);
+ val.getProperty().add(prop);
+
+ edit.getFacesConfig().getValidator().add(val);
+ }
+
+ @SuppressWarnings("unchecked")
+ private void createRenderkit(FacesConfigArtifactEdit edit) {
+ FacesConfigFactory fac = FacesConfigFactory.eINSTANCE;
+ RenderKitType rt = fac.createRenderKitType();
+ RenderKitIdType id = fac.createRenderKitIdType();
+ id.setTextContent("foo"+System.currentTimeMillis());
+ rt.setRenderKitId(id);
+ RenderKitClassType klass = fac.createRenderKitClassType();
+ klass.setTextContent("fooClass");
+ rt.setRenderKitClass(klass);
+
+ RendererType r = fac.createRendererType();
+ RendererClassType rk = fac.createRendererClassType();
+ rk.setTextContent("com.fooey");
+ r.setRendererClass(rk);
+ RendererTypeType rtt = fac.createRendererTypeType();
+ rtt.setTextContent("rendererTypeType");
+ r.setRendererType(rtt);
+ ComponentFamilyType c = fac.createComponentFamilyType();
+ c.setTextContent("componentFamilyType");
+ r.setComponentFamily(c);
+ rt.getRenderer().add(r);
+
+ edit.getFacesConfig().getRenderKit().add(rt);
+ }
+
+ @SuppressWarnings("unchecked")
+ private void createNavRule(FacesConfigArtifactEdit edit) {
+ NavigationRuleType newNavRule = FacesConfigFactory.eINSTANCE.createNavigationRuleType();
+ FromViewIdType fromView = FacesConfigFactory.eINSTANCE.createFromViewIdType();
+ fromView.setTextContent("JSP"+String.valueOf(System.currentTimeMillis()));
+ newNavRule.setFromViewId(fromView);
+ NavigationCaseType newCase = FacesConfigFactory.eINSTANCE.createNavigationCaseType();
+ ToViewIdType view = FacesConfigFactory.eINSTANCE.createToViewIdType();
+ view.setTextContent("jsp2");
+ newCase.setToViewId(view);
+ FromOutcomeType fromOutcome = FacesConfigFactory.eINSTANCE.createFromOutcomeType();
+ fromOutcome.setTextContent("la-la-la");
+ newCase.setFromOutcome(fromOutcome);
+ newNavRule.getNavigationCase().add(newCase);
+ edit.getFacesConfig().getNavigationRule().add(newNavRule);
+ }
+
+ @SuppressWarnings("unchecked")
+ private void createMBean(FacesConfigArtifactEdit edit) {
+ ManagedBeanType newBean = FacesConfigFactory.eINSTANCE.createManagedBeanType();
+ ManagedBeanNameType name = FacesConfigFactory.eINSTANCE.createManagedBeanNameType();
+ ManagedBeanScopeType scope = FacesConfigFactory.eINSTANCE.createManagedBeanScopeType();
+ scope.setTextContent("session");
+ name.setTextContent("Foobar"+String.valueOf(System.currentTimeMillis()));
+ ManagedBeanClassType klass = FacesConfigFactory.eINSTANCE.createManagedBeanClassType();
+ klass.setTextContent("com.foo.Bar");
+ newBean.setManagedBeanName(name);
+ newBean.setManagedBeanClass(klass);
+ newBean.setManagedBeanScope(scope);
+ edit.getFacesConfig().getManagedBean().add(newBean);
+ }
+
+ abstract class FCRunnable implements Runnable {
+ FacesConfigArtifactEdit _edit;
+ public void setFCEdit(FacesConfigArtifactEdit edit) {
+ _edit = edit;
+ }
+ protected abstract void run(FacesConfigArtifactEdit edit);
+ public final void run() {
+ run(_edit);
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/WebrootUtilTest.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/WebrootUtilTest.java
new file mode 100644
index 000000000..888339e64
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/WebrootUtilTest.java
@@ -0,0 +1,133 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 Sybase, Inc. and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jst.jsf.facesconfig.ui.test;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jst.jsf.facesconfig.ui.util.WebrootUtil;
+
+/**
+ * @author sfshi
+ *
+ */
+public class WebrootUtilTest extends FacesConfigEditorTest {
+
+ private static final String WEB_CONTENT_PATH = "/emptyjsfproject/WebContent";
+
+ /**
+ * Test method for
+ * {@link org.eclipse.jst.jsf.common.ui.internal.utils.WebrootUtil#getWebPath(org.eclipse.core.runtime.IPath)}.
+ */
+ public void testGetWebPathIPath() {
+ // TODO:
+ }
+
+ /**
+ * Test method for
+ * {@link org.eclipse.jst.jsf.common.ui.internal.utils.WebrootUtil#isUnderWebContentFolder(org.eclipse.core.resources.IResource)}.
+ *
+ * @throws CoreException
+ */
+ public void testIsUnderWebContentFolder() throws CoreException {
+ IResource resource = project.getFile(new Path("WebContent/web.xml"));
+ assertTrue(WebrootUtil.isUnderWebContentFolder(resource));
+
+ IContainer container = WebrootUtil.getWebContentContainer(project);
+ IFile page1 = container.getFile(new Path("page1.jsp"));
+ page1.create(null, true, new NullProgressMonitor());
+
+ assertTrue(WebrootUtil.isUnderWebContentFolder(page1));
+
+ IFile file1 = project.getFile("file1.txt");
+ file1.create(null, true, new NullProgressMonitor());
+
+ assertFalse(WebrootUtil.isUnderWebContentFolder(file1));
+ }
+
+ /**
+ * Test method for
+ * {@link org.eclipse.jst.jsf.common.ui.internal.utils.WebrootUtil#getWebContentPath(org.eclipse.core.resources.IProject)}.
+ */
+ public void testGetWebContentPath() {
+
+ IPath path = WebrootUtil.getWebContentPath(project);
+ assertNotNull(path);
+ assertEquals(path.toString(), WEB_CONTENT_PATH);
+ }
+
+ /**
+ * Test method for
+ * {@link org.eclipse.jst.jsf.common.ui.internal.utils.WebrootUtil#getWebContentContainer(org.eclipse.core.resources.IProject)}.
+ */
+ public void testGetWebContentContainer() {
+ IContainer container = WebrootUtil.getWebContentContainer(project);
+ assertNotNull(container);
+ assertTrue(container.exists());
+ assertEquals(container.getFullPath().toString(), WEB_CONTENT_PATH);
+ }
+
+ /**
+ * Test method for
+ * {@link org.eclipse.jst.jsf.common.ui.internal.utils.WebrootUtil#getWebContentFolderDepth(org.eclipse.core.resources.IProject)}.
+ */
+ public void testGetWebContentFolderDepth() {
+ assertEquals(2, WebrootUtil.getWebContentFolderDepth(project));
+ }
+
+ /**
+ * Test method for
+ * {@link org.eclipse.jst.jsf.common.ui.internal.utils.WebrootUtil#isValidWebFile(org.eclipse.core.runtime.IPath)}.
+ * @throws CoreException
+ */
+ public void testIsValidWebFile() throws CoreException {
+
+ IContainer container = WebrootUtil.getWebContentContainer(project);
+ IFile page1 = container.getFile(new Path("page1.jsp"));
+ page1.create(null, true, new NullProgressMonitor());
+
+ assertTrue(WebrootUtil.isValidWebFile(page1.getFullPath()));
+
+ IFile page2 = container.getFile(new Path("page2.jsv"));
+ page2.create(null, true, new NullProgressMonitor());
+ assertTrue(WebrootUtil.isValidWebFile(page2.getFullPath()));
+
+ IFile file1 = project.getFile("file1.txt");
+ file1.create(null, true, new NullProgressMonitor());
+
+ assertFalse(WebrootUtil.isValidWebFile(file1.getFullPath()));
+
+ }
+
+ /**
+ * Test method for
+ * {@link org.eclipse.jst.jsf.common.ui.internal.utils.WebrootUtil#getWebPath(java.lang.String)}.
+ */
+ public void testGetWebPathString() {
+ // TODO:
+ }
+
+ /**
+ * Test method for
+ * {@link org.eclipse.jst.jsf.common.ui.internal.utils.WebrootUtil#getPageNameFromWebPath(java.lang.String)}.
+ */
+ public void testGetPageNameFromWebPath() {
+ // TODO:
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/util/TestUtil.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/util/TestUtil.java
new file mode 100644
index 000000000..05ea790a2
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/util/TestUtil.java
@@ -0,0 +1,306 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 Sybase, Inc. and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.ui.test.util;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.internal.core.builder.JavaBuilder;
+import org.eclipse.jst.jsf.facesconfig.ui.EditorPlugin;
+
+/**
+ * Test utility to create project and its files.
+ *
+ * @author Yang Liu, Xiao-guang Zhang
+ *
+ * @version
+ */
+public class TestUtil {
+ //private static final String TEST_FILE_FOLDER = "../org.eclipse.jst.jsf.facesconfig.ui.test/test-file/";
+ private static final String TEST_FILE_FOLDER = "/test-file/";
+ /**
+ *
+ * @param prjname
+ * @param path
+ * relative to this plugin's "casefiles/projects" folder.
+ * @return
+ * @throws Exception
+ */
+ public static IProject createProjectFromZip(String prjname, String path)
+ throws Exception {
+
+ URL url = FileLocator.find(EditorPlugin.getDefault().getBundle(), new Path(TEST_FILE_FOLDER + path), null);
+
+ InputStream stream = url.openStream();
+ return createProjectFromZip(prjname, stream);
+ }
+
+ /**
+ * create a project from a zip file.
+ *
+ * @param prjname
+ * @param zipStream
+ * @throws Exception
+ */
+ public static IProject createProjectFromZip(final String prjname,
+ final InputStream zipStream) throws Exception {
+ final IProject[] holder = new IProject[1];
+ IWorkspaceRunnable r = new IWorkspaceRunnable() {
+ public void run(IProgressMonitor monitor) throws CoreException {
+ IProject prj = ResourcesPlugin.getWorkspace().getRoot()
+ .getProject(prjname);
+ if (!prj.exists()) {
+ prj.create(null);
+ }
+ prj.open(null);
+ try {
+ expandZip(zipStream, prj);
+ } catch (Exception ex) {
+ throw new CoreException(new Status(0,
+ "org.eclipse.jst.jsf.facesconfig.ui.test", 0, ex
+ .getMessage(), ex));
+ }
+ holder[0] = prj;
+ }
+ };
+
+ ResourcesPlugin.getWorkspace().run(r, null);
+ return holder[0];
+ }
+
+ /**
+ * build a project
+ *
+ * @param project
+ * @param monitor
+ */
+ public static void buildProject(IProject project, IProgressMonitor monitor) {
+ try {
+ project.build(IncrementalProjectBuilder.FULL_BUILD, monitor);
+ } catch (CoreException e) {
+ e.printStackTrace(System.err);
+ }
+ }
+
+ /**
+ * expand the zip stream into the specified folder.
+ *
+ * @param zipStream
+ * @param dir
+ * @throws Exception
+ */
+ public static void expandZip(InputStream zipStream, IContainer dir)
+ throws Exception {
+ ZipInputStream zis = null;
+
+ try {
+ // first, count number of items in zip file
+ zis = new ZipInputStream(zipStream);
+ ZipEntry ze = zis.getNextEntry();
+ while (ze != null) {
+ if (ze.isDirectory()) {
+ IFolder folder = dir.getFolder(new Path(ze.getName()));
+ if (!folder.exists()) {
+ ensurePath(folder);
+ folder.create(true, true, null);
+ }
+ } else {
+ IFile file = dir.getFile(new Path(ze.getName()));
+ ensurePath(file);
+ // use ZipStreamWrapper to prevent zis being closed
+ if (file.exists()) {
+ file.setContents(new ZipStreamWrapper(zis),
+ IResource.NONE, null);
+ } else {
+ file.create(new ZipStreamWrapper(zis), true, null);
+ }
+ }
+
+ ze = zis.getNextEntry();
+ }
+ } finally {
+ try {
+ if (zis != null)
+ zis.close();
+ } catch (Exception ex) {
+ // ignore
+ }
+ }
+ }
+
+ /**
+ * @param file
+ * @throws CoreException
+ */
+ private static void ensurePath(IResource file) throws CoreException {
+ IContainer container = file.getParent();
+ if (!container.exists()) {
+ ensurePath(container);
+ ((IFolder) container).create(true, true, null);
+ }
+ }
+
+ /**
+ * this method will copy file from the sourcePath folder of this plugin into
+ * the target path related with the destination project.
+ *
+ * @param project
+ * @param sourcePath -
+ * Source path, must be a relative path to test plugin
+ * @param targetPath -
+ * Target path, must be relative path to eclispe project.
+ *
+ * @return
+ */
+ public static IFile copyFile(IProject project, String targetPath,
+ String sourcePath) throws Exception {
+
+ URL url = FileLocator.find(EditorPlugin.getDefault().getBundle(), new Path(TEST_FILE_FOLDER + sourcePath), null);
+ InputStream stream = url.openStream();
+
+ IFile file = null;
+ IPath path = new Path(sourcePath);
+ if (targetPath != null && targetPath.length() > 0) {
+ IFolder folder = project.getFolder(targetPath);
+ file = folder.getFile(path.lastSegment());
+ } else {
+ file = project.getFile(path.lastSegment());
+ }
+
+ if (!file.exists()) {
+ ensurePath(file);
+ file.create(stream, true, null);
+ } else {
+ file.setContents(stream, IFile.FORCE, null);
+ }
+
+ return file;
+ }
+
+ /**
+ * this method will create page file from the "pages" folder of this plugin
+ * into the webroot folder of the destination project.
+ *
+ * @param filePath -
+ * file path, must be relative path to destination project.
+ *
+ * @return
+ */
+ public static IFile createFile(IProject project, String filePath,
+ String content) throws Exception {
+ IFile file = project.getFile(filePath);
+ ensurePath(file);
+ ByteArrayInputStream stream = new ByteArrayInputStream(content
+ .getBytes());
+ file.create(stream, true, null);
+ return file;
+ }
+
+ /**
+ * this method will get the page file from the "pages" folder of this plugin
+ * as a string.
+ *
+ * @param path -
+ * related with plugin
+ * @return
+ * @throws Exception
+ */
+ public static String getFileAsString(String path) throws Exception {
+
+ URL url = FileLocator.find(EditorPlugin.getDefault().getBundle(), new Path(TEST_FILE_FOLDER + path), null);
+ InputStream stream = url.openStream();
+ BufferedReader reader = new BufferedReader(
+ new InputStreamReader(stream));
+ StringBuffer buffer = new StringBuffer();
+ char[] temp = new char[256];
+ int count;
+ while ((count = reader.read(temp)) > 0) {
+ buffer.append(temp, 0, count);
+ }
+ reader.close();
+ stream.close();
+ return buffer.toString();
+ }
+
+ public static String removeAllWhitespace(String s) {
+ StringBuffer buffer = new StringBuffer(s.length());
+ for (int i = 0, length = s.length(); i < length; i++) {
+ if (!Character.isWhitespace(s.charAt(i))) {
+ buffer.append(s.charAt(i));
+ }
+ }
+ return buffer.toString();
+ }
+
+ /**
+ * remove resource, following schedule rule.
+ *
+ * @param prj
+ * @throws CoreException
+ */
+ public static void removeResource(final IResource prj) throws CoreException {
+ if (prj instanceof IFile) {
+ ((IFile) prj).delete(true, false, null);
+ return;
+ }
+ IWorkspaceRunnable r = new IWorkspaceRunnable() {
+ public void run(IProgressMonitor monitor) throws CoreException {
+ prj.delete(true, monitor);
+ }
+ };
+ ResourcesPlugin.getWorkspace().run(r, prj, 0, null);
+ }
+
+ /**
+ * To verify if this java resource(such as project or folder) can be
+ * compiled.
+ *
+ * @param javaFile
+ * @return true if the resource contains no error, otherwise return false.
+ */
+ public static boolean isValidJavaResource(IResource resource) {
+ IMarker[] markers = JavaBuilder.getProblemsFor(resource);
+ if (markers != null && markers.length > 0) {
+ for (int i = 0; i < markers.length; i++) {
+ IMarker curr = markers[i];
+ if (curr == null) {
+ continue;
+ }
+ if (curr.getAttribute(IMarker.SEVERITY, -1) == IMarker.SEVERITY_ERROR) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/util/ZipStreamWrapper.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/util/ZipStreamWrapper.java
new file mode 100644
index 000000000..6eed1f584
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/test/util/ZipStreamWrapper.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 Sybase, Inc. and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.jsf.facesconfig.ui.test.util;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.zip.ZipInputStream;
+
+/**
+ * @author Yang Liu
+ * @version
+ */
+public class ZipStreamWrapper extends InputStream
+{
+
+ private ZipInputStream zipStream;
+
+ /**
+ *
+ */
+ public ZipStreamWrapper(ZipInputStream stream)
+ {
+ super();
+ this.zipStream = stream;
+ }
+
+ /* (non-Javadoc)
+ * @see java.io.InputStream#read()
+ */
+ public int read() throws IOException
+ {
+ return zipStream.read();
+ }
+
+ /* (non-Javadoc)
+ * @see java.io.InputStream#read(byte[])
+ */
+ public int read(byte[] b) throws IOException
+ {
+ return zipStream.read(b);
+ }
+
+ /* (non-Javadoc)
+ * @see java.io.InputStream#read(byte[], int, int)
+ */
+ public int read(byte[] b, int off, int len) throws IOException
+ {
+ return zipStream.read(b, off, len);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/wizard/NewManagedBeanWizardTest.java b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/wizard/NewManagedBeanWizardTest.java
new file mode 100644
index 000000000..6e464a361
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/src/org/eclipse/jst/jsf/facesconfig/ui/wizard/NewManagedBeanWizardTest.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 Sybase, Inc. and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jst.jsf.facesconfig.ui.wizard;
+
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.jst.jsf.facesconfig.ui.EditorPlugin;
+import org.eclipse.jst.jsf.facesconfig.ui.test.FacesConfigEditorTest;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * @author sfshi
+ *
+ */
+public class NewManagedBeanWizardTest extends FacesConfigEditorTest {
+
+ NewManagedBeanWizard wizard;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.jsf.facesconfig.ui.test.FacesConfigEditorTest#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.jsf.facesconfig.ui.test.FacesConfigEditorTest#tearDown()
+ */
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ public void testManagedBeanWizard() {
+ NewManagedBeanWizard wizard1 = new NewManagedBeanWizard(project);
+ wizard1.setForcePreviousAndNextButtons(true);
+
+ Shell shell = EditorPlugin.getActiveShell();
+ WizardDialog wizardDialog = new WizardDialog(shell, wizard1);
+ wizardDialog.create();
+ wizardDialog.setBlockOnOpen(true);
+
+ assertTrue(wizard1.getStartingPage() instanceof ManagedBeanClassSelectionPage);
+ ManagedBeanClassSelectionPage page1 = (ManagedBeanClassSelectionPage) wizard1
+ .getStartingPage();
+ IWizardPage page2 = wizard1.getNextPage(page1);
+ assertTrue(page2 instanceof ManagedBeanPropertyPage);
+ // page1.searchRadioButton.setSelection(true);
+ // assertFalse(page1.isPageComplete());
+ // page1.createRadioButton.setSelection(true);
+
+ // assertTrue(page1.isPageComplete());
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/test-file/adfDemoProject.zip b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/test-file/adfDemoProject.zip
new file mode 100644
index 000000000..7db028f2d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/test-file/adfDemoProject.zip
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/test-file/emptyjsfproject.zip b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/test-file/emptyjsfproject.zip
new file mode 100644
index 000000000..269f899d2
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/test-file/emptyjsfproject.zip
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/test-file/page1.jsp b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/test-file/page1.jsp
new file mode 100644
index 000000000..32753e12e
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/test-file/page1.jsp
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+
+<HTML>
+
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1">
+<TITLE>CarStore</TITLE>
+<link rel="stylesheet" type="text/css"
+ href='<%= request.getContextPath() + "/stylesheet.css" %>'>
+</HEAD>
+
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+
+<BODY BGCOLOR="white">
+
+<f:view>
+
+ <h:form>
+
+ <h:commandButton value="Button 1" action="action1" />
+
+ <h:commandButton action="action2" value="Button 2" />
+
+ <h:commandLink value="Link 1" action="action3" />
+
+ </h:form>
+
+ <jsp:include page="bottomMatter.jsp" />
+
+</f:view>
+</BODY>
+
+</HTML>
diff --git a/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/test.xml b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/test.xml
new file mode 100644
index 000000000..4e4f46fdb
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.facesconfig.ui.test/test.xml
@@ -0,0 +1,49 @@
+<?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.facesconfig.ui.test"/>
+ <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.facesconfig.ui.test.*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.facesconfig.ui.test.AllTestCases" />
+ <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.facesconfig.ui.test.*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.metadata.tests/.classpath b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/.classpath
new file mode 100644
index 000000000..304e86186
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.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.metadata.tests/.cvsignore b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/.cvsignore
new file mode 100644
index 000000000..9bffb0f35
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/.cvsignore
@@ -0,0 +1,4 @@
+bin
+temp.folder
+build.xml
+javaCompiler.jsfmetadatatests.jar.args
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/.project b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/.project
new file mode 100644
index 000000000..6f604a61e
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jst.jsf.metadata.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.metadata.tests/.settings/org.eclipse.core.resources.prefs b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 000000000..e4ba2d681
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Sun May 27 16:03:48 EDT 2007
+eclipse.preferences.version=1
+encoding/<project>=ISO-8859-1
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/.settings/org.eclipse.jdt.core.prefs b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..e5bbef2ea
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,61 @@
+#Thu Aug 23 17:19:35 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.metadata.tests/META-INF/MANIFEST.MF b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..206dc5584
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,41 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name.0
+Bundle-SymbolicName: org.eclipse.jst.jsf.metadata.tests;singleton:=true
+Bundle-Version: 1.5.110.qualifier
+Bundle-Activator: org.eclipse.jst.jsf.metadata.tests.MetadataTestsPlugin
+Bundle-Localization: plugin
+Bundle-ClassPath: jsfmetadatatests.jar
+Require-Bundle: org.eclipse.jst.jsf.common;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.jst.jsf.core;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.core.resources;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.wst.sse.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.jsp.core;bundle-version="[1.1.0,1.3.0)",
+ org.eclipse.jst.pagedesigner;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.jface;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.wst.html.core;bundle-version="[1.1.0,1.3.0)",
+ org.eclipse.wst.xml.core;bundle-version="[1.1.0,1.2.0)",
+ org.eclipse.jface.text;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.jdt.core;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.common.frameworks;bundle-version="[1.1.0,1.2.0)",
+ org.eclipse.jst.jsf.core.tests;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.wst.validation,
+ org.eclipse.jst.pagedesigner.jsf.ui;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.ui.views.properties.tabbed;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.gef;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.jst.common.project.facet.core,
+ org.eclipse.jst.jsf.common.runtime;bundle-version="[1.0.201,2.0.0)"
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.jst.jsf.common.metadata.tests;x-internal:=true,
+ org.eclipse.jst.jsf.metadata.tests;x-internal:=true,
+ org.eclipse.jst.jsf.metadata.tests.metadataprocessing;x-internal:=true,
+ org.eclipse.jst.jsf.metadata.tests.metadataprocessing.features;x-internal:=true,
+ org.eclipse.jst.jsf.metadata.tests.metadataprocessing.types;x-internal:=true,
+ org.eclipse.jst.jsf.metadata.tests.taglibprocessing;x-internal:=true
+Plugin-Class: org.eclipse.jst.jsf.metadata.tests.MetadataTestsPlugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Vendor: %Bundle-Vendor.0
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/RootOfPluginTest.properties b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/RootOfPluginTest.properties
new file mode 100644
index 000000000..b76f72b03
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/RootOfPluginTest.properties
@@ -0,0 +1,11 @@
+###############################################################################
+# 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
+###############################################################################
+NLS=This is externalized text \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/RootOfPluginTest.xml b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/RootOfPluginTest.xml
new file mode 100644
index 000000000..7464182e0
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/RootOfPluginTest.xml
@@ -0,0 +1,10 @@
+<metadatamodel
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ id="RootOfPluginTest">
+
+ <trait id="T1">
+ <value>%NLS</value>
+ </trait>
+
+</metadatamodel>
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/about.html b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/about.html
new file mode 100644
index 000000000..04d4782f4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/about.html
@@ -0,0 +1,22 @@
+<!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.metadata.tests/build.properties b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/build.properties
new file mode 100644
index 000000000..2bf449e57
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/build.properties
@@ -0,0 +1,22 @@
+###############################################################################
+# 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
+#
+###############################################################################
+bin.includes = META-INF/,\
+ jsfmetadatatests.jar,\
+ testfiles/,\
+ plugin.xml,\
+ test.xml,\
+ about.html,\
+ plugin.properties,\
+ RootOfPluginTest.properties,\
+ RootOfPluginTest.xml
+source.jsfmetadatatests.jar = src/
+output.jsfmetadatatests.jar = bin/
+jars.compile.order = jsfmetadatatests.jar
+javacSource=1.5
+javacTarget=1.5
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/launch/AllMetadataTests.launch b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/launch/AllMetadataTests.launch
new file mode 100644
index 000000000..c83b4635f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/launch/AllMetadataTests.launch
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/AllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.jst.jsf.metadata.tests.AllTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jst.jsf.metadata.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx512m -XX:MaxPermSize=512M"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="false"/>
+</launchConfiguration>
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/plugin.properties b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/plugin.properties
new file mode 100644
index 000000000..6371461b9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/plugin.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# 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=JSF Tools - Metadata Tests
+Bundle-Vendor.0=Eclipse Web Tools Platform
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/plugin.xml b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/plugin.xml
new file mode 100644
index 000000000..f6bf1b298
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/plugin.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+ <extension
+ point="org.eclipse.jst.jsf.common.standardMetaDataFiles">
+ <standardMetaDataFile
+ location="/testfiles/metadata/jsf_test.xml"
+ uri="http://org.eclipse.jsf/test"/>
+ <standardMetaDataFile
+ location="/testfiles/metadata/jsf_test.xml"
+ uri="http://org.eclipse.jsf/test2"/>
+ <standardMetaDataFile
+ location="/testfiles/metadata/FileA.xml"
+ uri="http://org.eclipse.jsf/mergetest1"/>
+ <standardMetaDataFile
+ location="/testfiles/metadata/FileB.xml"
+ uri="http://org.eclipse.jsf/mergetest1"/>
+ <standardMetaDataFile
+ location="/testfiles/metadata/FileIncludeExternalModel.xml"
+ uri="http://org.eclipse.jsf/mergetest2"/>
+ <standardMetaDataFile
+ location="/testfiles/metadata/FileIncludeExternalModel2.xml"
+ uri="http://org.eclipse.jsf/mergetest3"/>
+ <standardMetaDataFile
+ location="/testfiles/metadata/doesntexist.xml"
+ uri=" http://org.eclipse.jsf/missingFile "/>
+ <standardMetaDataFile
+ location="/testfiles/metadata/jsf_metadataprocessing.xml"
+ uri=" http://org.eclipse.jsf/metadataprocessing"/>
+ <standardMetaDataFile
+ location="/testfiles/metadata/jsf_tagprocessing.xml"
+ uri="http://org.eclipse.jsf/tagprocessing"/>
+ <standardMetaDataFile
+ location="/testfiles/metadata/jsf_tinytest.xml"
+ uri="http://org.eclipse.jsf/tinytest"/>
+ <standardMetaDataFile
+ location="testfiles/metadata/TinyIncludeTest.xml"
+ uri="TinyIncludeTest"/>
+ <standardMetaDataFile
+ location="./RootOfPluginTest.xml"
+ uri="RootOfPluginTest"/>
+ <standardMetaDataFile
+ location="/testfiles/metadata/traithelpertest.xml"
+ locator="org.eclipse.jst.jsf.common.metadata.tests.MyMDLocator"
+ uri="http://org.eclipse.jsf/traithelpertest"/>
+ <standardMetaDataFile
+ location="/testfiles/metadata/quickEditSectionTest.xml"
+ uri="http://org.eclipse.jsf/quickEditSectionTest"/>
+ <standardMetaDataFile
+ location="/testfiles/metadata/propertyDescriptorTest.xml"
+ uri="http://org.eclipse.jsf/propertyDescriptorTest"/>
+ <standardMetaDataFile
+ location="/testfiles/metadata/missingMDModelTest.xml"
+ uri="http://org.eclipse.jsf/missingMDModelTest"/>
+
+ </extension>
+ <extension
+ point="org.eclipse.jst.jsf.core.AttributeValueRuntimeTypes">
+ <attributeValueRuntimeType
+ class="org.eclipse.jst.jsf.taglibprocessing.attributevalues.StringType"
+ id="MyStringArrayType"/>
+ <attributeValueRuntimeType
+ class="org.eclipse.jst.jsf.metadata.tests.metadataprocessing.types.MyBooleanType"
+ id="MyBooleanType"/>
+ <attributeValueRuntimeType
+ class="org.eclipse.jst.jsf.taglibprocessing.attributevalues.LongType"
+ id="MyLongType"/>
+ <attributeValueRuntimeType id="NoImplType"/>
+ </extension>
+ <extension
+ point="org.eclipse.jst.jsf.core.MetaDataEnabledFeatures">
+ <MetaDataEnabledFeature
+ class="org.eclipse.jst.jsf.metadata.tests.metadataprocessing.MetaDataEnabledBarkAdapter"
+ typeid="org.eclipse.jst.jsf.core.attributevalues.BooleanType"/>
+ <MetaDataEnabledFeature
+ class="org.eclipse.jst.jsf.metadata.tests.metadataprocessing.MetaDataEnabledBarkAdapter"
+ typeid="org.eclipse.jst.jsf.metadata.tests.MyBooleanType"/>
+ </extension>
+ <extension
+ point="org.eclipse.jst.jsf.common.domainQueryFactory">
+ <factory
+ class="org.eclipse.jst.jsf.common.metadata.tests.updated.FakeDomainQueryFactory">
+ </factory>
+ </extension>
+
+<!--
+ <extension
+ point="org.eclipse.jst.jsf.common.mdModelManagerFactory">
+ <factory
+ class="org.eclipse.jst.jsf.common.metadata.tests.updated.TestMDModelManagerFactory">
+ </factory>
+ </extension>
+-->
+</plugin>
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/pom.xml b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/pom.xml
new file mode 100644
index 000000000..651e9918b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/pom.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012, 2013 Eclipse Foundation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Distribution License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/org/documents/edl-v10.php
+
+ Contributors:
+ Thanh Ha (Eclipse Foundation) - initial implementation
+ Ian Trimble (Oracle) - initial tests configuration
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.webtools.jsf</groupId>
+ <artifactId>org.eclipse.webtools.jsf.tests</artifactId>
+ <version>3.6.0-SNAPSHOT</version>
+ <relativePath>../../../</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.webtools.jsf</groupId>
+ <artifactId>org.eclipse.jst.jsf.metadata.tests</artifactId>
+ <version>1.5.110-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ <useUIHarness>true</useUIHarness>
+ <testSuite>${project.artifactId}</testSuite>
+ <testClass>org.eclipse.jst.jsf.metadata.tests.AllTests</testClass>
+ <dependencies>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.jst.j2ee.ejb</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ </dependencies>
+ <argLine>-DjsfRuntimeJarsDirectoryV1.1=${project.basedir}/../jsfRuntimeJarsDirectory/V1.1 -DjsfRuntimeJarsDirectoryV1.2=${project.basedir}/../jsfRuntimeJarsDirectory/V1.2 -DjsfRuntimeJarsDirectoryV2.0=${project.basedir}/../jsfRuntimeJarsDirectory/V2.0</argLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/AbstractBaseMetaDataTestCase.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/AbstractBaseMetaDataTestCase.java
new file mode 100644
index 000000000..87b8e67fd
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/AbstractBaseMetaDataTestCase.java
@@ -0,0 +1,161 @@
+/*******************************************************************************
+ * 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.common.metadata.tests;
+
+import java.util.Iterator;
+import java.util.List;
+
+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.jsf.common.metadata.Entity;
+import org.eclipse.jst.jsf.common.metadata.Trait;
+import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataDomainContext;
+import org.eclipse.jst.jsf.common.metadata.internal.TraitValueHelper;
+import org.eclipse.jst.jsf.common.metadata.traittypes.traittypes.ListOfValues;
+import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext;
+import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContextFactory;
+import org.eclipse.jst.jsf.metadata.tests.MetadataTestsPlugin;
+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.IModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+
+public abstract class AbstractBaseMetaDataTestCase extends TestCase {
+ protected static final String projName = "TestCommonMetadataProject";
+ protected static final String domain = IMetaDataDomainContext.TAGLIB_DOMAIN_CONTEXT_ID;
+ protected static final String badDomain = "TagLibDomain";
+ protected static final String baseTestUri = "http://org.eclipse.jsf/test";
+
+ protected static final String TYPE_TAG_FILE = "tagFile";
+ protected static final String TYPE_TAG = "tag";
+ protected static final String TYPE_TAG_ATTRIBUTE = "attribute";
+
+ protected IProject project;
+ protected WebProjectTestEnvironment projectTestEnvironment;
+ protected IStructuredDocumentContext docContext;
+
+ private boolean debug_info = false;
+ private long startTime;
+ private String debugTitle;
+
+ public void setUp() throws Exception {
+ super.setUp();
+
+ debug_info = false;
+
+ JSFTestUtil.setInternetProxyPreferences(true, "www-proxy.us.oracle.com", "80");
+
+ JSFTestUtil.setValidationEnabled(false);
+
+ projectTestEnvironment =
+ new WebProjectTestEnvironment(projName/*+"_"+getClass().getName()+"_"+getName()*/);
+ projectTestEnvironment.createProject(true);
+
+ project = projectTestEnvironment.getTestProject();
+
+ projectTestEnvironment.loadResourceInWebRoot(MetadataTestsPlugin.getDefault().getBundle(),
+ "/testfiles/metadata/TestJSP.jsp",
+ "/TestJSP.jsp");
+
+ String path = "/WebContent/TestJSP.jsp";
+ int offset = 33;// # not important to tests
+
+ docContext = getDocContext(path, offset);
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+// projectTestEnvironment.getTestProject().close(null);
+// projectTestEnvironment.getTestProject().delete(true, null);
+ }
+
+
+
+ private IStructuredDocumentContext getDocContext(String path, int offset) throws Exception{
+ IFile jspFile = project.getFile(new Path(path));
+ assertTrue(jspFile.exists());
+
+ final IModelManager modelManager = StructuredModelManager
+ .getModelManager();
+
+ IStructuredModel model = null;
+
+ model = modelManager.getModelForRead(jspFile);
+ assertTrue(model instanceof DOMModelForJSP);
+
+ return IStructuredDocumentContextFactory.INSTANCE.getContext(
+ model.getStructuredDocument(), offset);
+
+ }
+
+ protected void showDebugInfo(boolean show){
+ debug_info = show;
+ }
+
+ protected void dumpMDTree(Entity entity, int indent) {
+ if (debug_info){
+ printLine("Entity: "+entity.getId(),indent);
+ indent++;
+ for(Iterator<?> it=entity.getTraits().iterator();it.hasNext();){
+ Trait t = (Trait)it.next();
+ printLine("Trait: "+t.getId()+"["+ getValue(t)+ "]", indent);
+ }
+ for (Iterator<?> it=entity.getChildEntities().iterator();it.hasNext();){
+ dumpMDTree((Entity)it.next(), indent);
+ }
+ }
+ }
+
+ private String getValue(Trait trait) {
+ if (trait.getValue() instanceof ListOfValues){
+ List<?> l = TraitValueHelper.getValueAsListOfStrings(trait);
+ StringBuffer buf = new StringBuffer();
+ for (Iterator<?> it=l.iterator();it.hasNext();){
+ buf.append((String)it.next());
+ buf.append(", ");
+ }
+ if (buf.toString().length() > 0)
+ return buf.toString().substring(0, buf.toString().length() - 2);
+ return null;
+ }
+ return TraitValueHelper.getValueAsString(trait);
+ }
+
+ private void printLine(String line, int indent) {
+ StringBuffer buf = new StringBuffer();
+ for (int i=0;i<indent;i++){
+ buf.append(" ");
+ }
+ buf.append(line);
+ System.out.println(buf.toString());
+ }
+
+ protected void endTime() {
+ if (debug_info){
+ long delta = System.nanoTime() - startTime;
+ printLine("Time for "+debugTitle+"(ms)= "+String.valueOf(delta/1000000), 0);
+ }
+ }
+
+ protected void startTime(String debugTitle) {
+ if (debug_info){
+ this.debugTitle = debugTitle;
+ startTime = System.nanoTime();
+ printLine("",0);
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/AbstractEntityQueryVisitorTest.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/AbstractEntityQueryVisitorTest.java
new file mode 100644
index 000000000..fe4a21c9b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/AbstractEntityQueryVisitorTest.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 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.common.metadata.tests;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.eclipse.jst.jsf.common.metadata.Entity;
+import org.eclipse.jst.jsf.common.metadata.query.AbstractEntityQueryVisitor;
+import org.eclipse.jst.jsf.common.metadata.query.EmptyResultSet;
+
+public class AbstractEntityQueryVisitorTest extends TestCase {
+ private NullEntityQueryVisitor visitor;
+ protected void setUp() throws Exception {
+ super.setUp();
+ visitor = new NullEntityQueryVisitor();
+ }
+
+ public void testFindEntities() {
+ Assert.assertNotNull(visitor);
+ Assert.assertEquals(EmptyResultSet.class, visitor.findEntities(null, null).getClass());
+ }
+
+ private class NullEntityQueryVisitor extends AbstractEntityQueryVisitor{
+
+ @Override
+ public void visit(Entity entity) {
+ // nada
+ }
+
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/AbstractMetaDataVisitorTest.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/AbstractMetaDataVisitorTest.java
new file mode 100644
index 000000000..3e07d83ad
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/AbstractMetaDataVisitorTest.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 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.common.metadata.tests;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.eclipse.jst.jsf.common.metadata.query.AbstractMetaDataVisitor;
+
+public class AbstractMetaDataVisitorTest extends TestCase {
+ private NullMetaDataVisitor visitor;
+ protected void setUp() throws Exception {
+ super.setUp();
+ visitor = new NullMetaDataVisitor();
+ }
+
+ public void testFindTraits() {
+ Assert.assertNotNull(visitor);
+ Assert.assertEquals(false, visitor.stopVisiting());
+ }
+
+ private class NullMetaDataVisitor extends AbstractMetaDataVisitor{
+ //
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/AbstractTraitQueryVisitorTest.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/AbstractTraitQueryVisitorTest.java
new file mode 100644
index 000000000..707de5440
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/AbstractTraitQueryVisitorTest.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 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.common.metadata.tests;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.eclipse.jst.jsf.common.metadata.Trait;
+import org.eclipse.jst.jsf.common.metadata.query.AbstractTraitQueryVisitor;
+import org.eclipse.jst.jsf.common.metadata.query.EmptyResultSet;
+
+public class AbstractTraitQueryVisitorTest extends TestCase {
+ private NullTraitQueryVisitor visitor;
+ protected void setUp() throws Exception {
+ super.setUp();
+ visitor = new NullTraitQueryVisitor();
+ }
+
+ public void testFindTraits() {
+ Assert.assertNotNull(visitor);
+ Assert.assertEquals(EmptyResultSet.class, visitor.findTraits(null, null).getClass());
+ }
+
+ private class NullTraitQueryVisitor extends AbstractTraitQueryVisitor{
+
+ @Override
+ public void visit(Trait trait) {
+ //nada
+ }
+
+
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/AllDeprecatedMetadataTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/AllDeprecatedMetadataTests.java
new file mode 100644
index 000000000..28892704f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/AllDeprecatedMetadataTests.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * 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.common.metadata.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllDeprecatedMetadataTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite(
+ "Tests for org.eclipse.jst.jsf.common.metadata (deprecated)");
+ //$JUnit-BEGIN$
+ suite.addTestSuite(EmptyResultSetTest.class);
+ suite.addTestSuite(MetaDataExceptionTest.class);
+ suite.addTestSuite(AbstractMetaDataVisitorTest.class);
+ suite.addTestSuite(AbstractEntityQueryVisitorTest.class);
+ suite.addTestSuite(AbstractTraitQueryVisitorTest.class);
+ suite.addTestSuite(TraitValueHelperTests.class);
+ suite.addTestSuite(MetaDataQueryHelperTests.class);
+ suite.addTestSuite(ModelProviderAdapterTests.class);
+
+ suite.addTestSuite(TraitImplTests.class);
+ suite.addTestSuite(IncludeEntityGroupImplTests.class);
+ suite.addTestSuite(EntityImplTests.class);
+ suite.addTestSuite(ModelImplTests.class);
+ suite.addTestSuite(MergeTests.class);
+ suite.addTestSuite(TinyTestTests.class);
+
+ //$JUnit-END$
+ return suite;
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/EmptyResultSetTest.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/EmptyResultSetTest.java
new file mode 100644
index 000000000..0065d20cf
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/EmptyResultSetTest.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 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.common.metadata.tests;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.eclipse.jst.jsf.common.metadata.query.EmptyResultSet;
+import org.eclipse.jst.jsf.common.metadata.query.IResultSet;
+import org.eclipse.jst.jsf.common.metadata.query.MetaDataException;
+
+public class EmptyResultSetTest extends TestCase {
+ private IResultSet _results;
+
+ public void setUp() throws Exception {
+ _results = new EmptyResultSet();
+ }
+
+ public void testCloseAndIsClosed() {
+ Assert.assertFalse(_results.isClosed());
+ try {
+ _results.close();
+ Assert.assertTrue(_results.isClosed());
+ } catch (MetaDataException e) {
+ fail("testCloseAndIsClosed with Exception: "+e.getMessage());
+ }
+ }
+
+ public void testGetResults() {
+ try {
+ Assert.assertEquals(0, _results.getResults().size());
+ } catch (MetaDataException e) {
+ fail("testGetResults: should NOT be MetaDataException");
+ }
+ try {
+ _results.close();
+ Assert.assertEquals(0, _results.getResults().size());
+ fail("testGetResults: should be MetaDataException");
+ } catch (MetaDataException e) {
+ //test passes
+ }
+ }
+
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/EntityImplTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/EntityImplTests.java
new file mode 100644
index 000000000..89bc3c93e
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/EntityImplTests.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * 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.common.metadata.tests;
+
+import org.eclipse.jst.jsf.common.metadata.Entity;
+import org.eclipse.jst.jsf.common.metadata.Model;
+import org.eclipse.jst.jsf.common.metadata.internal.TaglibDomainMetaDataModelContextImpl;
+import org.eclipse.jst.jsf.common.metadata.query.ITaglibDomainMetaDataModelContext;
+import org.eclipse.jst.jsf.common.metadata.query.TaglibDomainMetaDataQueryHelper;
+
+public class EntityImplTests extends AbstractBaseMetaDataTestCase {
+ protected ITaglibDomainMetaDataModelContext baseContext;
+ Model model;
+ Entity entity;
+ public void setUp() throws Exception {
+ super.setUp();
+
+ baseContext = new TaglibDomainMetaDataModelContextImpl(domain, project, baseTestUri);
+ model = TaglibDomainMetaDataQueryHelper.getModel(baseContext);
+ assertNotNull(model);
+ entity = TaglibDomainMetaDataQueryHelper.getEntity(baseContext, "loaded");
+ assertNotNull(entity);
+ }
+
+ public void testGetChildEntities() {
+ //childEntities
+ assertNotNull(entity.getChildEntities());
+ //should be 1 from eg2, plus 3
+ assertEquals(4, entity.getChildEntities().size());
+ }
+
+ public void testGetTraits() {
+ //traits
+ assertNotNull(entity.getTraits());
+ //should be 1 from eg2, plus 3
+ assertEquals(4, entity.getTraits().size());
+ }
+
+ public void testGetIncludeGroups() {
+ //IncludeGroups
+ assertNotNull(entity.getIncludeGroups());
+ assertEquals(1, entity.getIncludeGroups().size());
+ }
+
+ public void testGetId() {
+ assertNotNull(entity.getId());
+ assertEquals("loaded", entity.getId() );
+ }
+
+ public void testSetId() {
+ String id = entity.getId();
+ entity.setId("new");
+ assertEquals("new",entity.getId());
+ entity.setId(id);
+ }
+
+ public void testGetType() {
+ //type
+ assertNotNull(entity.getType());
+ assertEquals(entity.getType(), TYPE_TAG);
+ }
+
+ public void testSetType() {
+ String type = entity.getType();
+ entity.setType("new");
+ assertEquals("new",entity.getType());
+ entity.setType(type);
+ }
+
+ public void testAccept() {
+// Query tests excercises this
+ }
+
+ public void testGetModel() {
+ assertNotNull(entity.getModel());
+ assertEquals(model, entity.getModel());
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/IncludeEntityGroupImplTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/IncludeEntityGroupImplTests.java
new file mode 100644
index 000000000..69062d22d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/IncludeEntityGroupImplTests.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * 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.common.metadata.tests;
+
+import org.eclipse.jst.jsf.common.metadata.Entity;
+import org.eclipse.jst.jsf.common.metadata.IncludeEntityGroup;
+import org.eclipse.jst.jsf.common.metadata.internal.TaglibDomainMetaDataModelContextImpl;
+import org.eclipse.jst.jsf.common.metadata.query.ITaglibDomainMetaDataModelContext;
+import org.eclipse.jst.jsf.common.metadata.query.TaglibDomainMetaDataQueryHelper;
+
+public class IncludeEntityGroupImplTests extends AbstractBaseMetaDataTestCase {
+ protected ITaglibDomainMetaDataModelContext baseContext;
+ IncludeEntityGroup group;
+
+ public void setUp() throws Exception {
+ super.setUp();
+
+ baseContext = new TaglibDomainMetaDataModelContextImpl(domain, project, baseTestUri);
+ Entity entity = TaglibDomainMetaDataQueryHelper.getEntity(baseContext, "loaded");
+ assertNotNull(entity);
+ group = (IncludeEntityGroup)entity.getIncludeGroups().get(0);
+ }
+ public void testGetId() {
+ assertEquals("eg2", group.getId());
+ }
+
+ public void testSetId() {
+ String id = group.getId();
+ group.setId("new");
+ assertEquals("new",group.getId());
+ group.setId(id);
+ }
+
+ public void testGetModelUri() {
+ assertNull(group.getModelUri());
+ }
+
+ public void testSetModelUri() {
+ String uri = null;
+ group.setModelUri("new");
+ assertEquals("new",group.getModelUri());
+ group.setModelUri(uri);
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/MergeTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/MergeTests.java
new file mode 100644
index 000000000..b91ed5358
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/MergeTests.java
@@ -0,0 +1,202 @@
+/*******************************************************************************
+ * Copyright (c) 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.common.metadata.tests;
+
+import org.eclipse.jst.jsf.common.metadata.Entity;
+import org.eclipse.jst.jsf.common.metadata.Model;
+import org.eclipse.jst.jsf.common.metadata.Trait;
+import org.eclipse.jst.jsf.common.metadata.internal.TraitValueHelper;
+import org.eclipse.jst.jsf.common.metadata.query.ITaglibDomainMetaDataModelContext;
+import org.eclipse.jst.jsf.common.metadata.query.TaglibDomainMetaDataQueryHelper;
+
+public class MergeTests extends AbstractBaseMetaDataTestCase {
+ private boolean _debugInfo = false;
+
+ public void testIncludeMerge(){
+ showDebugInfo(_debugInfo);
+ String uri = "TinyIncludeTest";
+ ITaglibDomainMetaDataModelContext modelContext
+ = TaglibDomainMetaDataQueryHelper.createMetaDataModelContext(project, uri);
+ startTime(uri);
+ Model model = TaglibDomainMetaDataQueryHelper.getModel(modelContext);
+ endTime();
+ assertNotNull(model);
+
+ dumpMDTree(model, 0);
+
+ //expect 0 model traits and 1 entity
+ assertEquals(0, model.getTraits().size());
+ assertEquals(1, model.getChildEntities().size());
+
+
+ //expect 2 traits on A
+ Entity A_Entity = TaglibDomainMetaDataQueryHelper.getEntity(model, "A");
+ assertEquals(2, A_Entity.getTraits().size());
+ Trait t = TaglibDomainMetaDataQueryHelper.getTrait(A_Entity, "T1");
+ assertNotNull(t);
+ assertEquals("A1", TraitValueHelper.getValueAsString(t));
+ t = TaglibDomainMetaDataQueryHelper.getTrait(A_Entity, "T2");
+ assertNotNull(t);
+ assertEquals("T2FromEG", TraitValueHelper.getValueAsString(t));
+
+ //expect 2 child entities for A
+ assertEquals(2, A_Entity.getChildEntities().size());
+ Entity a_Entity = TaglibDomainMetaDataQueryHelper.getEntity(A_Entity, "a");
+ assertNotNull(a_Entity);
+ assertEquals(1, a_Entity.getTraits().size());
+ assertEquals(2, a_Entity.getChildEntities().size());
+ Entity subA_Entity = TaglibDomainMetaDataQueryHelper.getEntity(A_Entity, "sub-A");
+ assertNotNull(subA_Entity);
+ Entity subSubA_Entity = TaglibDomainMetaDataQueryHelper.getEntity(subA_Entity, "sub-sub-A");
+ assertNotNull(subSubA_Entity);
+
+ }
+
+
+
+ public void testMergeOfFileAandFileB(){
+ showDebugInfo(_debugInfo);
+ String uri = "http://org.eclipse.jsf/mergetest1";
+ ITaglibDomainMetaDataModelContext modelContext = TaglibDomainMetaDataQueryHelper.createMetaDataModelContext(project, uri);
+ startTime(uri);
+ Model model = TaglibDomainMetaDataQueryHelper.getModel(modelContext);
+ assertNotNull(model);
+ endTime();
+
+ dumpMDTree(model, 0);
+
+ //check model traits -
+ assertEquals(3, model.getTraits().size());
+ Trait trait = TaglibDomainMetaDataQueryHelper.getTrait(model, "Dupe");
+ assertNotNull(trait);
+ assertEquals("dupe from A", TraitValueHelper.getValueAsString(trait));
+
+ //check model entities
+ assertEquals(5, model.getChildEntities().size());
+ Entity entity = TaglibDomainMetaDataQueryHelper.getEntity(model, "A");
+ assertNotNull(entity);
+ entity = TaglibDomainMetaDataQueryHelper.getEntity(model, "B");
+ assertNotNull(entity);
+
+ //check merge of traits within entities
+ entity = TaglibDomainMetaDataQueryHelper.getEntity(model, "Dupe");
+ assertNotNull(entity);
+ assertEquals(2, entity.getTraits().size());
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "A1");
+ assertNotNull(trait);
+ assertEquals("A1FromA", TraitValueHelper.getValueAsString(trait));
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "B1");
+ assertNotNull(trait);
+
+ //check merge of entities within entities
+ assertEquals(2, entity.getChildEntities().size());
+ Entity secondEntity = TaglibDomainMetaDataQueryHelper.getEntity(entity, "a");
+ assertNotNull(secondEntity);
+ assertEquals(2, secondEntity.getTraits().size());
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(secondEntity, "A1");
+ assertNotNull(trait);
+ assertEquals("A1FromA", TraitValueHelper.getValueAsString(trait));
+
+ //check merge of traits with included entities
+ entity = TaglibDomainMetaDataQueryHelper.getEntity(model, "DupeWithInclude");
+ assertNotNull(entity);
+ assertEquals(2, entity.getTraits().size());
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "A1");
+ assertNotNull(trait);
+ assertEquals("A1", TraitValueHelper.getValueAsString(trait));
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "B");
+ assertNotNull(trait);
+ assertEquals("trait SHOULD appear in merge from eg2", TraitValueHelper.getValueAsString(trait));
+
+ //check merge of entities with includes
+ assertEquals(2, entity.getChildEntities().size());
+ secondEntity = TaglibDomainMetaDataQueryHelper.getEntity(entity, "a");
+ assertNotNull(secondEntity);
+ //assertEquals(1, secondEntity.getTraits().size());//do not expect 2 as extra trait from include group is not included
+ assertEquals(2, secondEntity.getTraits().size());//do NOW expect 2 as extra trait from include group IS included (https://bugs.eclipse.org/bugs/show_bug.cgi?id=191564)
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "A1");
+ assertNotNull(trait);
+ assertEquals("A1", TraitValueHelper.getValueAsString(trait));
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "A1");
+ assertNotNull(trait);
+
+ //check merge of entities with includes where all come from include
+ entity = TaglibDomainMetaDataQueryHelper.getEntity(model, "DupeWithInclude2");
+ assertNotNull(entity);
+ assertEquals(1, entity.getTraits().size());
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "A1");
+ assertNotNull(trait);
+ assertEquals("A1FromEG1", TraitValueHelper.getValueAsString(trait));
+
+ assertEquals(1, entity.getChildEntities().size());
+ secondEntity = TaglibDomainMetaDataQueryHelper.getEntity(entity, "a");
+ assertNotNull(secondEntity);
+ assertEquals(2, secondEntity.getTraits().size());
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "A1");
+ assertNotNull(trait);
+ assertEquals("A1FromEG1", TraitValueHelper.getValueAsString(trait));
+
+ }
+
+ /**
+ * All entities and traits come from external model in this test
+ */
+ public void testIncludeExternalModel(){
+ showDebugInfo(_debugInfo);
+ String uri = "http://org.eclipse.jsf/mergetest2";
+ ITaglibDomainMetaDataModelContext modelContext = TaglibDomainMetaDataQueryHelper.createMetaDataModelContext(project, uri);
+ startTime(uri);
+ Model model = TaglibDomainMetaDataQueryHelper.getModel(modelContext);
+ endTime();
+ assertNotNull(model);
+
+ dumpMDTree(model, 0);
+
+ //check model traits
+ assertEquals(1, model.getTraits().size());
+ Trait trait = TaglibDomainMetaDataQueryHelper.getTrait(model, "A1");
+ assertNotNull(trait);
+ assertEquals("A1FromEG1", TraitValueHelper.getValueAsString(trait));
+
+ //check model entities
+ assertEquals(1, model.getChildEntities().size());
+ Entity entity = TaglibDomainMetaDataQueryHelper.getEntity(model, "a");
+ assertNotNull(entity);
+ assertEquals(0, entity.getChildEntities().size());
+ assertEquals(2, entity.getTraits().size());
+ }
+
+ public void testLoadJSFCore(){
+ showDebugInfo(_debugInfo);
+ String uri = "http://java.sun.com/jsf/core";
+ ITaglibDomainMetaDataModelContext modelContext =
+ TaglibDomainMetaDataQueryHelper.createMetaDataModelContext(project, uri);
+ startTime(uri);
+ Model model = TaglibDomainMetaDataQueryHelper.getModel(modelContext);
+ endTime();
+ assertNotNull(model);
+
+// dumpMDTree(model, 0);
+ }
+
+ public void testLoadJSFHTML(){
+ showDebugInfo(_debugInfo);
+ String uri = "http://java.sun.com/jsf/html";
+ ITaglibDomainMetaDataModelContext modelContext =
+ TaglibDomainMetaDataQueryHelper.createMetaDataModelContext(project, uri);
+ startTime(uri);
+ Model model = TaglibDomainMetaDataQueryHelper.getModel(modelContext);
+ endTime();
+ assertNotNull(model);
+
+// dumpMDTree(model, 0);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/MetaDataExceptionTest.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/MetaDataExceptionTest.java
new file mode 100644
index 000000000..acd51dcc2
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/MetaDataExceptionTest.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 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.common.metadata.tests;
+
+import java.io.IOException;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.eclipse.jst.jsf.common.metadata.query.MetaDataException;
+
+public class MetaDataExceptionTest extends TestCase {
+
+ public void testMetaDataException() {
+ MetaDataException e = new MetaDataException();
+ Assert.assertNotNull(e);
+ }
+
+ public void testMetaDataExceptionString() {
+ MetaDataException e = new MetaDataException("Foo");
+ Assert.assertNotNull(e);
+ Assert.assertEquals("Foo", e.getMessage());
+ }
+
+ public void testMetaDataExceptionStringThrowable() {
+ IOException cause = new IOException("FooBar");
+ MetaDataException e = new MetaDataException("Foo", cause );
+ Assert.assertNotNull(e);
+ Assert.assertEquals(cause, e.getCause());
+ Assert.assertNotNull(e.getCause());
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/MetaDataQueryHelperTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/MetaDataQueryHelperTests.java
new file mode 100644
index 000000000..64cbaa7aa
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/MetaDataQueryHelperTests.java
@@ -0,0 +1,286 @@
+/*******************************************************************************
+ * Copyright (c) 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.common.metadata.tests;
+
+import org.eclipse.jst.jsf.common.metadata.Entity;
+import org.eclipse.jst.jsf.common.metadata.Model;
+import org.eclipse.jst.jsf.common.metadata.Trait;
+import org.eclipse.jst.jsf.common.metadata.internal.TaglibDomainMetaDataModelContextImpl;
+import org.eclipse.jst.jsf.common.metadata.query.EmptyResultSet;
+import org.eclipse.jst.jsf.common.metadata.query.IEntityQueryVisitor;
+import org.eclipse.jst.jsf.common.metadata.query.IResultSet;
+import org.eclipse.jst.jsf.common.metadata.query.ITaglibDomainMetaDataModelContext;
+import org.eclipse.jst.jsf.common.metadata.query.ITraitQueryVisitor;
+import org.eclipse.jst.jsf.common.metadata.query.MetaDataException;
+import org.eclipse.jst.jsf.common.metadata.query.TaglibDomainMetaDataQueryHelper;
+import org.eclipse.jst.jsf.common.metadata.query.internal.HierarchicalSearchControl;
+import org.eclipse.jst.jsf.common.metadata.query.internal.SearchControl;
+import org.eclipse.jst.jsf.common.metadata.query.internal.SimpleEntityQueryVisitorImpl;
+import org.eclipse.jst.jsf.common.metadata.query.internal.SimpleTraitQueryVisitorImpl;
+
+/**
+ * Thoroughly excercises the TaglibDomainMetaDataQueryHelper APIs that will end up touching many of the metadata areas in normal circumstances
+ * where there is only a single standard metadata model for a given URI.
+ *
+ */
+/*******************************************************************************
+ * 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 and/or initial documentation
+ *******************************************************************************/
+
+@SuppressWarnings("deprecation")
+public class MetaDataQueryHelperTests extends AbstractBaseMetaDataTestCase {
+
+ protected ITaglibDomainMetaDataModelContext baseContext;
+ protected ITaglibDomainMetaDataModelContext nullProjectContext;
+ protected ITaglibDomainMetaDataModelContext negativeContextBadUri;
+ protected ITaglibDomainMetaDataModelContext negativeContextBadDomain;
+
+ public void setUp() throws Exception {
+ super.setUp();
+
+ //setup model contexts
+ baseContext = new TaglibDomainMetaDataModelContextImpl(domain, project, baseTestUri);
+ nullProjectContext = new TaglibDomainMetaDataModelContextImpl(domain, null, baseTestUri);
+ negativeContextBadUri = new TaglibDomainMetaDataModelContextImpl(domain, project, "blah");
+ negativeContextBadDomain = new TaglibDomainMetaDataModelContextImpl(badDomain, project, baseTestUri);
+ }
+
+ /**
+ * Test getModel method but also performs basic read unit tests on Model
+ */
+ public void testGetModel() {
+ //base
+ //positive test
+ Model model = TaglibDomainMetaDataQueryHelper.getModel(baseContext);
+ assertNotNull(baseTestUri+" model should not be null.",model);
+
+ //null proj
+
+ model = TaglibDomainMetaDataQueryHelper.getModel(nullProjectContext);
+ assertNotNull(baseTestUri+" model should not be null.",model);
+ //id
+ assertNotNull(model.getId());
+ assertEquals(baseTestUri+" is not same as model.getId()",baseTestUri, model.getId() );
+
+
+
+ //negative tests
+ model = TaglibDomainMetaDataQueryHelper.getModel(negativeContextBadUri);
+ assertNull(model);
+
+ model = TaglibDomainMetaDataQueryHelper.getModel(negativeContextBadDomain);
+ assertNotNull(model);//will use default strategy to load
+ }
+
+ public void testGetEntityIMetaDataModelContextString() {
+ //positive
+ Entity entity = TaglibDomainMetaDataQueryHelper.getEntity(baseContext, "loaded");
+ assertNotNull(entity);
+
+ entity = TaglibDomainMetaDataQueryHelper.getEntity(baseContext, "loaded/att3");
+ assertNotNull(entity);
+
+ //negative
+ entity = TaglibDomainMetaDataQueryHelper.getEntity(baseContext, "doesnotexist");
+ assertNull(entity);
+ }
+
+ /**
+ * Return multiple entities
+ * Partially tests SimpleEntityQueryVisitorImpl searchControl
+ */
+ public void testGetEntitiesIMetaDataModelContextStringIEntityQueryVisitor() {
+ IEntityQueryVisitor visitor = new SimpleEntityQueryVisitorImpl(new HierarchicalSearchControl(1, HierarchicalSearchControl.SCOPE_ALL_LEVELS));
+ IResultSet rs = TaglibDomainMetaDataQueryHelper.getEntities(baseContext, "loaded", visitor);
+ assertNotNull(rs);
+ Entity entity = null;
+ try {
+ assertFalse(rs instanceof EmptyResultSet);
+ assertEquals(1, rs.getResults().size());
+ entity = (Entity)rs.getResults().get(0);
+ assertNotNull(entity);
+ assertEquals(entity.getId(), "loaded");
+ rs.close();
+ } catch (MetaDataException e) {
+ //MetaDataException not currently being thrown
+ fail(e.getMessage());
+ }
+
+ //test returning multiple (2)
+ visitor = new SimpleEntityQueryVisitorImpl(new HierarchicalSearchControl(SearchControl.COUNT_LIMIT_NONE, HierarchicalSearchControl.SCOPE_ALL_LEVELS));
+ rs = TaglibDomainMetaDataQueryHelper.getEntities(baseContext, "loaded", visitor);
+ assertNotNull(rs);
+ try {
+ assertFalse(rs instanceof EmptyResultSet);
+ assertEquals(2, rs.getResults().size());
+ entity = (Entity)rs.getResults().get(0);
+ assertNotNull(entity);
+ assertEquals(entity.getId(), "loaded");
+ Entity secondentity = (Entity)rs.getResults().get(1);
+ assertNotNull(secondentity);
+ assertEquals("loaded", secondentity.getId());
+ assertFalse(secondentity == entity);
+ rs.close();
+ } catch (MetaDataException e) {
+ //MetaDataException not currently being thrown
+ fail(e.getMessage());
+ }
+ }
+
+ public void testGetTraitEntityString() {
+ Entity entity = TaglibDomainMetaDataQueryHelper.getEntity(baseContext, "loaded/att3");
+
+ //positive
+ Trait trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "A3");
+ assertNotNull(trait);
+
+ //negative
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "Z3");
+ assertNull(trait);
+ }
+
+ /**
+ * Return multiple traits
+ * Also tests SimpleEntityQueryVisitorImpl and IResultSet
+ */
+ public void testGetTraits() {
+ //TEST with 1 count
+ ITraitQueryVisitor visitor = new SimpleTraitQueryVisitorImpl(new SearchControl(1));
+ Model model = TaglibDomainMetaDataQueryHelper.getModel(baseContext);
+ IResultSet rs = TaglibDomainMetaDataQueryHelper.getTraits(model, "model-trait", visitor);
+ assertNotNull(rs);
+ Trait trait = null;
+ try {
+ assertFalse(rs instanceof EmptyResultSet);
+ assertEquals(1, rs.getResults().size());
+ trait = (Trait)rs.getResults().get(0);
+ assertNotNull(trait);
+ assertEquals("model-trait", trait.getId());
+ rs.close();
+ } catch (MetaDataException e) {
+ //MetaDataException not currently being thrown
+ fail(e.getMessage());
+ }
+
+ //test with COUNT_LIMIT_NONE
+ visitor = new SimpleTraitQueryVisitorImpl(new SearchControl(SearchControl.COUNT_LIMIT_NONE));
+ rs = TaglibDomainMetaDataQueryHelper.getTraits(model, "model-trait", visitor);
+ assertNotNull(rs);
+ try {
+ assertFalse(rs instanceof EmptyResultSet);
+ assertEquals(2, rs.getResults().size());
+ trait = (Trait)rs.getResults().get(0);
+ assertNotNull(trait);
+ assertEquals("model-trait", trait.getId());
+ Trait secondTrait = (Trait)rs.getResults().get(1);
+ assertNotNull(secondTrait);
+ assertEquals("model-trait", secondTrait.getId());
+ assertFalse(trait == secondTrait);
+ rs.close();
+ } catch (MetaDataException e) {
+ //MetaDataException not currently being thrown
+ fail(e.getMessage());
+ }
+
+ }
+
+ public void testGetEntityEntityString() {
+ Entity entity = TaglibDomainMetaDataQueryHelper.getEntity(baseContext, "loaded");
+ //positive
+ entity = TaglibDomainMetaDataQueryHelper.getEntity(entity, "att3");
+ assertNotNull(entity);
+
+ //negative
+ entity = TaglibDomainMetaDataQueryHelper.getEntity(entity, "zzz");
+ assertNull(entity);
+ }
+
+ public void testGetEntitiesEntityStringIEntityQueryVisitor() {
+ //negative test
+
+ IResultSet rs = TaglibDomainMetaDataQueryHelper.getEntities(negativeContextBadUri, "foo", new SimpleEntityQueryVisitorImpl());
+ assertNotNull(rs);
+ try {
+ assertEquals(0, rs.getResults().size());
+ } catch (MetaDataException e) {
+ fail(e.getMessage());
+ }
+ }
+
+ public void testGetTraitIMetaDataModelContextStringString() {
+ //positive
+ Trait trait = TaglibDomainMetaDataQueryHelper.getTrait(baseContext, "loaded/att3", "A3");
+ assertNotNull(trait);
+
+ //negative
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(baseContext, "loaded/att3", "zzz");
+ assertNull(trait);
+
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(baseContext, "doesnotexist", "A3");
+ assertNull(trait);
+
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(negativeContextBadDomain, "doesnotexist", "A3");
+ assertNull(trait);
+ }
+
+ public void testResultSets() {
+ IResultSet rs = TaglibDomainMetaDataQueryHelper.getEntities(baseContext, "loaded", new SimpleEntityQueryVisitorImpl());
+ assertNotNull(rs);
+ try {
+ assertEquals(2, rs.getResults().size());
+ assertFalse(rs.isClosed());
+ rs.close();
+ assertTrue(rs.isClosed());
+ } catch (MetaDataException e1) {
+ fail(e1.getMessage());
+ }
+
+ try {
+ rs.getResults();
+ fail("Expected MetaDataException ");
+ } catch (MetaDataException e2) {
+ //pass
+ }
+ }
+
+ public void testGetEntityBeyondMDDepth() {
+ Entity entity = TaglibDomainMetaDataQueryHelper.getEntity(baseContext, "loaded/does_not_exist/nor_this");
+ assertNull(entity);
+ }
+
+ public void testGetEntityBadEntityKey() {
+ Entity entity = TaglibDomainMetaDataQueryHelper.getEntity(baseContext, "");
+ assertNull(entity);
+
+ entity = TaglibDomainMetaDataQueryHelper.getEntity(baseContext, null);
+ assertNull(entity);
+
+ entity = TaglibDomainMetaDataQueryHelper.getEntity(baseContext, "/");
+ assertNull(entity);
+
+ }
+
+ public void testNullProject() {
+ Model model = TaglibDomainMetaDataQueryHelper.getModel(nullProjectContext);
+ assertNotNull(model);
+ Model model1 = TaglibDomainMetaDataQueryHelper.getModel(nullProjectContext);
+ assertEquals(model, model1);
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/MissingMDExtensionModelTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/MissingMDExtensionModelTests.java
new file mode 100644
index 000000000..1f1dd1cc2
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/MissingMDExtensionModelTests.java
@@ -0,0 +1,122 @@
+/*******************************************************************************
+ * 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.metadata.tests;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.ILogListener;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jst.jsf.common.JSFCommonPlugin;
+import org.eclipse.jst.jsf.common.metadata.Entity;
+import org.eclipse.jst.jsf.common.metadata.Model;
+import org.eclipse.jst.jsf.common.metadata.Trait;
+import org.eclipse.jst.jsf.common.metadata.internal.TaglibDomainMetaDataModelContextImpl;
+import org.eclipse.jst.jsf.common.metadata.internal.TraitValueHelper;
+import org.eclipse.jst.jsf.common.metadata.query.ITaglibDomainMetaDataModelContext;
+import org.eclipse.jst.jsf.common.metadata.query.TaglibDomainMetaDataQueryHelper;
+
+/**
+ * Tests loading of models when an emf model extension is missing.
+ * <p/>
+ * Expected behavior is for model to load all entities and traits even if extension model is not
+ * loaded. The trait values will be missing where the trait value model is missing.
+ * In these cases, an error should be logged to the JSFCommonPlugin.
+ * <p>
+ *
+ * <p/>
+ * Note: if xsi:type prefix is bad, or no uri to model was provided, then model will NOT load.
+ * This JUnit does not test for the model not loading in this case.
+ *
+ */
+public class MissingMDExtensionModelTests extends AbstractBaseMetaDataTestCase {
+ protected ITaglibDomainMetaDataModelContext baseContext;
+ Model model;
+ Trait trait;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ String uri = "http://org.eclipse.jsf/missingMDModelTest";
+
+ LogListener logListener = new LogListener();
+ try {
+
+ JSFCommonPlugin.getPlugin().getLog().addLogListener(logListener);
+ baseContext = new TaglibDomainMetaDataModelContextImpl(domain, project, uri);
+ model = TaglibDomainMetaDataQueryHelper.getModel(baseContext);
+ assertNotNull(model);
+ if (JSFCommonPlugin.getPlugin().isDebugging() &&
+ Boolean.valueOf(Platform.getDebugOption(JSFCommonPlugin.PLUGIN_ID+"/debug/metadataload")).booleanValue()){
+ //assert log entries
+ assertTrue(logListener.getMessages().size() > 2);
+ }
+ } finally {
+ JSFCommonPlugin.getPlugin().getLog().removeLogListener(logListener);
+ }
+ }
+
+ public void testModelLoadWithMissingECoreExtensionModel() {
+ Entity entity = TaglibDomainMetaDataQueryHelper.getEntity(baseContext, "Tag/Attr1");
+ assertNotNull(entity);
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "attribute-value-runtime-type");
+ assertNotNull(trait);
+ assertNotNull(trait.getValue());
+ assertEquals("org.eclipse.jst.jsf.core.attributevalues.StringType", TraitValueHelper.getValueAsString(trait));
+
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "bogusTrait");
+ //trait ain't bogus, but value will be
+ assertNotNull(trait);
+ //value should be null
+ assertNull(trait.getValue());
+
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "reallybogusTrait");
+ //trait ain't bogus, but value will be
+ assertNotNull(trait);
+ //value should be null
+ assertNull(trait.getValue());
+
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "valid-values");
+ assertNotNull(trait);
+ assertNotNull(trait.getValue());
+
+
+ entity = TaglibDomainMetaDataQueryHelper.getEntity(baseContext, "Tag/DefaultAttr");
+ assertNotNull(entity);
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "attribute-value-runtime-type");
+ assertNotNull(trait);
+ assertNotNull(trait.getValue());
+ assertEquals("org.eclipse.jst.jsf.core.attributevalues.StringType", TraitValueHelper.getValueAsString(trait));
+
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "bogusTrait");
+ //trait ain't bogus, but value will be
+ assertNotNull(trait);
+ //value should be null
+ assertNull(trait.getValue());
+ }
+
+ class LogListener implements ILogListener {
+
+ private List<IStatus> statusMsgs;
+ public LogListener(){
+ this.statusMsgs = new ArrayList<IStatus>();
+ }
+ public void logging(IStatus status, String plugin) {
+ statusMsgs.add(status);
+ }
+
+ public List<IStatus> getMessages(){
+ return statusMsgs;
+ }
+
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/ModelImplTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/ModelImplTests.java
new file mode 100644
index 000000000..66025da8c
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/ModelImplTests.java
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * 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.common.metadata.tests;
+
+import org.eclipse.jst.jsf.common.metadata.Model;
+import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataSourceModelProvider;
+import org.eclipse.jst.jsf.common.metadata.internal.TaglibDomainMetaDataModelContextImpl;
+import org.eclipse.jst.jsf.common.metadata.query.ITaglibDomainMetaDataModelContext;
+import org.eclipse.jst.jsf.common.metadata.query.TaglibDomainMetaDataQueryHelper;
+
+public class ModelImplTests extends AbstractBaseMetaDataTestCase {
+ protected ITaglibDomainMetaDataModelContext baseContext;
+ Model model;
+ public void setUp() throws Exception {
+ super.setUp();
+
+ baseContext = new TaglibDomainMetaDataModelContextImpl(domain, project, baseTestUri);
+ model = TaglibDomainMetaDataQueryHelper.getModel(baseContext);
+ assertNotNull(model);
+ }
+ public void testAccept() {
+// fail("Not yet implemented");
+ }
+
+ public void testGetModel() {
+ assertNotNull(model.getModel());
+ assertEquals(model.getModel(), model);
+ assertEquals(baseTestUri, model.getId());
+ }
+
+ public void testGetSourceModelProvider() {
+ //getSourceModelProvider
+ assertNotNull(model.getSourceModelProvider());
+ assertTrue(model.getSourceModelProvider() instanceof IMetaDataSourceModelProvider);
+ }
+
+ public void testSetSourceModelProvider() {
+// fail("Not yet implemented");
+ }
+
+ public void testGetCurrentModelContext() {
+ //context
+ assertNotNull(model.getCurrentModelContext());
+ assertEquals(model.getCurrentModelContext().getProject(), project);
+ assertEquals(model.getCurrentModelContext().getDomain(), domain);
+ assertEquals(model.getCurrentModelContext().getUri(), baseTestUri);
+ }
+
+ public void testSetCurrentModelContext() {
+// fail("Not yet implemented");
+ }
+
+ public void testGetEntityGroups() {
+ //EntityGroups
+ assertNotNull(model.getEntityGroups());
+ assertEquals(2, model.getEntityGroups().size());
+
+ //test containment
+ assertEquals(model, model.getEntityGroups().get(0).getModel());
+ }
+
+ public void testFindIncludeGroup() {
+ assertNotNull(model.findIncludeGroup("eg1"));
+ }
+
+ public void testGetChildEntities() {
+ //childEntities
+ assertNotNull(model.getChildEntities());
+ assertEquals(6, model.getChildEntities().size());
+ }
+
+ public void testGetTraits() {
+ //traits
+ assertNotNull(model.getTraits());
+ assertEquals(2, model.getTraits().size());
+ }
+
+ public void testGetIncludeGroups() {
+ //IncludeGroups
+ assertNotNull(model.getIncludeGroups());
+ assertEquals(0, model.getIncludeGroups().size());
+ }
+
+ public void testGetId() {
+ //id
+ assertNotNull(model.getId());
+ assertEquals(baseTestUri+" is not same as model.getId()",baseTestUri, model.getId() );
+ }
+
+ public void testSetId() {
+ String id = model.getId();
+ model.setId("newid");
+ assertEquals("newid",model.getId());
+ model.setId(id);
+ }
+
+ public void testGetType() {
+ //type
+ assertNotNull(model.getType());
+ assertEquals(model.getType(), TYPE_TAG_FILE);
+ }
+
+ public void testSetType() {
+ String type = model.getType();
+ model.setType("newid");
+ assertEquals("newid",model.getType());
+ model.setType(type);
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/ModelProviderAdapterTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/ModelProviderAdapterTests.java
new file mode 100644
index 000000000..09b9bb647
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/ModelProviderAdapterTests.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+
+package org.eclipse.jst.jsf.common.metadata.tests;
+
+import java.util.ResourceBundle;
+
+import junit.framework.TestCase;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jst.jsf.common.metadata.Model;
+import org.eclipse.jst.jsf.common.metadata.Trait;
+import org.eclipse.jst.jsf.common.metadata.internal.IClassLoaderProvider;
+import org.eclipse.jst.jsf.common.metadata.internal.IImageDescriptorProvider;
+import org.eclipse.jst.jsf.common.metadata.internal.IResourceBundleProvider;
+import org.eclipse.jst.jsf.common.metadata.query.ITaglibDomainMetaDataModelContext;
+import org.eclipse.jst.jsf.common.metadata.query.TaglibDomainMetaDataQueryHelper;
+import org.eclipse.swt.graphics.Image;
+
+public class ModelProviderAdapterTests extends TestCase {
+ private final String JSF_HTML_URI = "http://java.sun.com/jsf/html";
+ private final String IMAGES_BASE = "/icons/palette/JSFHTML/small/";
+
+ private Trait _trait;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ ITaglibDomainMetaDataModelContext context = TaglibDomainMetaDataQueryHelper.createMetaDataModelContext(null, JSF_HTML_URI);
+ Model model = TaglibDomainMetaDataQueryHelper.getModel(context);
+ assertNotNull(model);
+ //get the trait that was defined by the "palette" md file. This will establish the correct sourceModelProvider.
+ _trait = TaglibDomainMetaDataQueryHelper.getTrait(model, "display-label");
+ assertNotNull(_trait);
+ }
+
+ public void testImageDescriptorProvider() {
+
+ IImageDescriptorProvider imageProvider = (IImageDescriptorProvider)_trait.getSourceModelProvider().getAdapter(IImageDescriptorProvider.class);
+ assertNotNull(imageProvider);
+ ImageDescriptor id = imageProvider.getImageDescriptor(IMAGES_BASE+"JSF_COMMANDBUTTON");
+ assertNotNull(id);
+ Image image = id.createImage();
+ assertNotNull(image);
+ image.dispose();
+
+ }
+
+//Comment out till resourceBundleHelper issues on Linux is resolved: https://bugs.eclipse.org/bugs/show_bug.cgi?id=202537
+ public void testResourceBundlerProvider() {
+
+ IResourceBundleProvider bundleProvider = (IResourceBundleProvider)_trait.getSourceModelProvider().getAdapter(IResourceBundleProvider.class);
+ assertNotNull(bundleProvider);
+
+ ResourceBundle bundle = bundleProvider.getResourceBundle();
+ assertNotNull(bundle);
+
+ assertNotNull(bundle.getString("JSFHTML.display-label"));
+ assertEquals("JSF HTML", bundle.getString("JSFHTML.display-label"));
+ assertNotNull(bundle.getString("column.display-label"));
+ assertEquals("Column", bundle.getString("column.display-label"));
+
+ //
+ ITaglibDomainMetaDataModelContext context = TaglibDomainMetaDataQueryHelper.createMetaDataModelContext(null, "RootOfPluginTest");
+ Model model = TaglibDomainMetaDataQueryHelper.getModel(context);
+ assertNotNull(model);
+ _trait = TaglibDomainMetaDataQueryHelper.getTrait(model, "T1");
+ assertNotNull(_trait);
+ bundleProvider = (IResourceBundleProvider)_trait.getSourceModelProvider().getAdapter(IResourceBundleProvider.class);
+ assertNotNull(bundleProvider);
+ bundle = bundleProvider.getResourceBundle();
+ assertNotNull(bundle.getString("NLS"));
+ assertEquals("This is externalized text", bundle.getString("NLS"));
+ }
+
+ @SuppressWarnings({ })
+ public void testClassloaderProvider() {
+
+ IClassLoaderProvider classLoaderProvider = (IClassLoaderProvider)_trait.getSourceModelProvider().getAdapter(IClassLoaderProvider.class);
+ assertNotNull(classLoaderProvider);
+ Class<?> klass = classLoaderProvider.loadClass("java.lang.String");
+ assertNotNull(klass);
+
+ // when all MD was moved from WPE to tagsupport plugin, there was no longer a plugin specific class to load here. FIX ME later.
+// klass = classLoaderProvider.loadClass("org.eclipse.jst.pagedesigner.jsf.ui.util.JSFUIPluginResourcesUtil");
+// assertNotNull(klass);
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/MyMDLocator.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/MyMDLocator.java
new file mode 100644
index 000000000..cb701d03e
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/MyMDLocator.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 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.common.metadata.tests;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.eclipse.jst.jsf.common.metadata.internal.PluginRelativeStandardMetaDataSourceFileLocator;
+
+/**
+ * Simple class extending PluginRelativeStandardMetaDataSourceFileLocator to test locator extension on ext-pt.
+ *
+ */
+public class MyMDLocator extends PluginRelativeStandardMetaDataSourceFileLocator {
+ public MyMDLocator(){
+ super();
+ }
+
+ @Override
+ public InputStream getInputStream() throws IOException {
+ this.getFileInfo().toString();//doing this just to get code coverage
+ return super.getInputStream();
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/TinyTestTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/TinyTestTests.java
new file mode 100644
index 000000000..814568451
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/TinyTestTests.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * 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.common.metadata.tests;
+
+import org.eclipse.emf.ecore.xml.type.AnyType;
+import org.eclipse.jst.jsf.common.metadata.Entity;
+import org.eclipse.jst.jsf.common.metadata.Model;
+import org.eclipse.jst.jsf.common.metadata.Trait;
+import org.eclipse.jst.jsf.common.metadata.internal.TaglibDomainMetaDataModelContextImpl;
+import org.eclipse.jst.jsf.common.metadata.internal.TraitValueHelper;
+import org.eclipse.jst.jsf.common.metadata.query.ITaglibDomainMetaDataModelContext;
+import org.eclipse.jst.jsf.common.metadata.query.TaglibDomainMetaDataQueryHelper;
+
+public class TinyTestTests extends AbstractBaseMetaDataTestCase {
+ protected ITaglibDomainMetaDataModelContext baseContext;
+ Model model;
+ Trait trait;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ String uri = "http://org.eclipse.jsf/tinytest";
+
+ baseContext = new TaglibDomainMetaDataModelContextImpl(domain, project, uri);
+ model = TaglibDomainMetaDataQueryHelper.getModel(baseContext);
+ assertNotNull(model);
+ }
+
+ public void testGetValue() {
+ Entity entity = TaglibDomainMetaDataQueryHelper.getEntity(baseContext, "A/copy1");
+ assertNotNull(entity);
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "model-trait");
+ assertNotNull(trait);
+ assertNotNull(trait.getValue());
+ assertTrue(trait.getValue() instanceof AnyType);
+ assertEquals("ATrait", TraitValueHelper.getValueAsString(trait));
+
+ entity = TaglibDomainMetaDataQueryHelper.getEntity(baseContext, "B/copy1");
+ assertNotNull(entity);
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "model-trait");
+ assertNotNull(trait);
+ assertNotNull(trait.getValue());
+ assertTrue(trait.getValue() instanceof AnyType);
+ assertEquals("ATrait", TraitValueHelper.getValueAsString(trait));
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/TraitImplTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/TraitImplTests.java
new file mode 100644
index 000000000..a07b8f8c4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/TraitImplTests.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * 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.common.metadata.tests;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jst.jsf.common.metadata.Model;
+import org.eclipse.jst.jsf.common.metadata.Trait;
+import org.eclipse.jst.jsf.common.metadata.internal.TaglibDomainMetaDataModelContextImpl;
+import org.eclipse.jst.jsf.common.metadata.internal.TraitValueHelper;
+import org.eclipse.jst.jsf.common.metadata.query.ITaglibDomainMetaDataModelContext;
+import org.eclipse.jst.jsf.common.metadata.query.TaglibDomainMetaDataQueryHelper;
+
+public class TraitImplTests extends AbstractBaseMetaDataTestCase {
+ protected ITaglibDomainMetaDataModelContext baseContext;
+ Model model;
+ Trait trait;
+
+ public void setUp() throws Exception {
+ super.setUp();
+
+ baseContext = new TaglibDomainMetaDataModelContextImpl(domain, project, baseTestUri);
+ model = TaglibDomainMetaDataQueryHelper.getModel(baseContext);
+ assertNotNull(model);
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(baseContext, "loaded", "A");
+ assertNotNull(trait);
+ }
+
+ public void testGetValue() {
+ assertNotNull(trait.getValue());
+ assertTrue(trait.getValue() instanceof EObject);
+ assertEquals("a", TraitValueHelper.getValueAsString(trait));
+ }
+
+ public void testSetValue() {
+// fail("Not yet implemented");
+ }
+
+ public void testGetSourceModel() {
+ assertNotNull(trait.getSourceModelProvider());
+ assertTrue(trait.getSourceModelProvider().getSourceModel() instanceof Model);
+ }
+
+ public void testSetSourceModel() {
+// Set during model load. no need to test.
+ }
+
+ public void testGetId() {
+ //id
+ assertNotNull(trait.getId());
+ assertEquals("A", trait.getId() );
+ }
+
+ public void testSetId() {
+ String id = trait.getId();
+ trait.setId("new");
+ assertEquals("new",trait.getId());
+ trait.setId(id);
+ }
+
+ public void testAccept() {
+// Excercised by Query tests
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/TraitValueHelperTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/TraitValueHelperTests.java
new file mode 100644
index 000000000..e407dd3f8
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/TraitValueHelperTests.java
@@ -0,0 +1,265 @@
+/*******************************************************************************
+ * Copyright (c) 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.common.metadata.tests;
+
+import java.util.List;
+import java.util.Locale;
+
+import junit.framework.Assert;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.xml.type.SimpleAnyType;
+import org.eclipse.jst.jsf.common.metadata.Entity;
+import org.eclipse.jst.jsf.common.metadata.Model;
+import org.eclipse.jst.jsf.common.metadata.Trait;
+import org.eclipse.jst.jsf.common.metadata.internal.TraitValueHelper;
+import org.eclipse.jst.jsf.common.metadata.query.ITaglibDomainMetaDataModelContext;
+import org.eclipse.jst.jsf.common.metadata.query.TaglibDomainMetaDataQueryHelper;
+import org.eclipse.jst.jsf.common.metadata.traittypes.traittypes.ListOfValues;
+import org.eclipse.jst.jsf.test.util.ConfigurableTestCase;
+
+public class TraitValueHelperTests extends ConfigurableTestCase {
+ private final String uri = "http://org.eclipse.jsf/traithelpertest";
+ private Entity entity;
+ private Entity nlsEntity;
+
+ public TraitValueHelperTests(){
+ super();
+ }
+
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ ITaglibDomainMetaDataModelContext context = TaglibDomainMetaDataQueryHelper.createMetaDataModelContext(null, uri);
+ entity = TaglibDomainMetaDataQueryHelper.getEntity(context, "tag/attr1");
+ Assert.assertNotNull(entity);
+
+ nlsEntity = TaglibDomainMetaDataQueryHelper.getEntity(context, "NLS/NLS");
+ Assert.assertNotNull(nlsEntity);
+ }
+
+ public void testGetValueType() {
+ //singleString
+ Trait trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "singleString");
+ Assert.assertNotNull(trait);
+ Assert.assertEquals("AnyType", TraitValueHelper.getValueType(trait).getName());
+
+ //anInteger
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "anInteger");
+ Assert.assertNotNull(trait);
+ Assert.assertEquals("AnyType", TraitValueHelper.getValueType(trait).getName());
+
+ //multivalStrings
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "multivalStrings");
+ Assert.assertNotNull(trait);
+ Assert.assertEquals("ListOfValues", TraitValueHelper.getValueType(trait).getName());
+
+ //multivalIntegers
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "multivalIntegers");
+ Assert.assertNotNull(trait);
+ Assert.assertEquals("ListOfValues", TraitValueHelper.getValueType(trait).getName());
+
+ //null tests
+ Assert.assertNull( TraitValueHelper.getValueType(null));
+ EObject val = trait.getValue();
+ trait.setValue(null);
+ Assert.assertNull( TraitValueHelper.getValueType(trait));
+ trait.setValue(val);
+
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "NullVal");
+ Assert.assertNotNull(trait);
+ Assert.assertEquals("AnyType", TraitValueHelper.getValueType(trait).getName());
+ }
+
+ public void testGetValue() {
+ //singleString
+ Trait trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "singleString");
+ Assert.assertNotNull(trait);
+ Assert.assertEquals("AString", (String)TraitValueHelper.getValue(trait));
+
+ //anInteger
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "anInteger");
+ Assert.assertNotNull(trait);
+ Assert.assertEquals(1, Integer.parseInt((String)TraitValueHelper.getValue(trait)));
+
+ //aTrueInt
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "aTrueInt");
+ Assert.assertNotNull(trait);
+ Assert.assertNotNull(trait.getValue());
+ Assert.assertTrue(trait.getValue() instanceof SimpleAnyType);
+ Assert.assertTrue(((SimpleAnyType)trait.getValue()).getInstanceType().getInstanceClassName().equals("int"));
+ Assert.assertEquals("1", TraitValueHelper.getValue(trait));
+
+ //null tests
+ Assert.assertNull( TraitValueHelper.getValue(null));
+ EObject val = trait.getValue();
+ trait.setValue(null);
+ Assert.assertNull( TraitValueHelper.getValue(trait));
+ //reset
+ trait.setValue(val);
+
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "NullVal");
+ Assert.assertNotNull(trait);
+ Assert.assertNull(TraitValueHelper.getValue(trait));
+ }
+
+ public void testGetValueAsString() {
+ //singleString
+ Trait trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "singleString");
+ Assert.assertNotNull(trait);
+ Assert.assertEquals("AString", TraitValueHelper.getValueAsString(trait));
+
+ //anInteger
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "anInteger");
+ Assert.assertNotNull(trait);
+ Assert.assertEquals("1", TraitValueHelper.getValueAsString(trait));
+
+
+ //null tests
+ Assert.assertNull( TraitValueHelper.getValue(null));
+ EObject val = trait.getValue();
+ trait.setValue(null);
+ Assert.assertNull( TraitValueHelper.getValue(trait));
+ trait.setValue(val);
+
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "NullVal");
+ Assert.assertNotNull(trait);
+ Assert.assertEquals(null, TraitValueHelper.getValueAsString(trait));
+ }
+
+ public void testGetValueAsListOfStrings() {
+ //multivalStrings
+ Trait trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "multivalStrings");
+ Assert.assertNotNull(trait);
+ Assert.assertTrue(TraitValueHelper.getValueAsListOfStrings(trait) instanceof List<?>);
+ List<?> vals = TraitValueHelper.getValueAsListOfStrings(trait);
+ Assert.assertEquals(3, vals.size());
+ Assert.assertTrue(vals.get(0) instanceof String);
+ Assert.assertEquals("A", (String)vals.get(0));
+ Assert.assertEquals("B", (String)vals.get(1));
+ Assert.assertEquals("C", (String)vals.get(2));
+
+ //multivalIntegers
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "multivalIntegers");
+ Assert.assertNotNull(trait);
+ Assert.assertTrue(TraitValueHelper.getValueAsListOfStrings(trait) instanceof List<?>);
+ vals = TraitValueHelper.getValueAsListOfStrings(trait);
+ Assert.assertEquals(3, vals.size());
+ Assert.assertTrue(vals.get(0) instanceof String);
+ Assert.assertEquals("1", (String)vals.get(0));
+ Assert.assertEquals("2", (String)vals.get(1));
+ Assert.assertEquals("3", (String)vals.get(2));
+ }
+
+ public void testGetNLSValue() {
+ //single NLS String
+ Trait trait = TaglibDomainMetaDataQueryHelper.getTrait(nlsEntity, "NLS");
+ Assert.assertNotNull(trait);
+ Assert.assertEquals("%NLS1", TraitValueHelper.getValue(trait));
+ if (Locale.getDefault().getCountry().equalsIgnoreCase("us") &&
+ Locale.getDefault().getLanguage().equalsIgnoreCase("en")) {
+ Assert.assertEquals("a day in the life(en_US)", TraitValueHelper.getValueAsString(trait));
+ }
+
+ //multiple NLS Strings
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(nlsEntity, "multivalNLS");
+ Assert.assertNotNull(trait);
+ Assert.assertNotNull(trait.getValue());
+ Assert.assertTrue(trait.getValue() instanceof ListOfValues);
+ List<?> vals = TraitValueHelper.getValueAsListOfStrings(trait);
+ Assert.assertEquals(2, vals.size());
+ if (Locale.getDefault().getCountry().equalsIgnoreCase("us") &&
+ Locale.getDefault().getLanguage().equalsIgnoreCase("en")) {
+ Assert.assertEquals("a day in the life(en_US)", vals.get(0));
+ Assert.assertEquals("another string(en_US)", vals.get(1));
+ }
+
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "NullVal");
+ Assert.assertNotNull(trait);
+ Assert.assertEquals(null, TraitValueHelper.getValueAsString(trait));
+ }
+
+ public void testGetValueAsBoolean() {
+ //valid true
+ Trait trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "BooleanVal");
+ Assert.assertNotNull(trait);
+ Assert.assertNotNull(trait.getValue());
+ Assert.assertEquals(true, TraitValueHelper.getValueAsBoolean(trait));
+
+ trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "NullBooleanVal");
+ Assert.assertNotNull(trait);
+ Assert.assertNotNull(trait.getValue());
+ Assert.assertEquals(false, TraitValueHelper.getValueAsBoolean(trait));
+ }
+
+ public void testStringValueType() {
+ final ITaglibDomainMetaDataModelContext context = TaglibDomainMetaDataQueryHelper.createMetaDataModelContext(null, uri);
+ final Model m = TaglibDomainMetaDataQueryHelper.getModel(context);
+ assertNotNull(m);
+
+ final Trait t = TaglibDomainMetaDataQueryHelper.getTrait( m, "TraitId");
+ assertNotNull(t);
+
+ final EObject obj = (EObject)t.getValue();
+ assertEquals("StringValue", obj.eClass().getName());
+ assertEquals("TraitValue", TraitValueHelper.getValueAsString(t));
+
+ }
+
+ public void testBooleanValueType() {
+ final ITaglibDomainMetaDataModelContext context = TaglibDomainMetaDataQueryHelper.createMetaDataModelContext(null, uri);
+ final Model m = TaglibDomainMetaDataQueryHelper.getModel(context);
+ assertNotNull(m);
+
+ //true
+ final Trait t2 = TaglibDomainMetaDataQueryHelper.getTrait( m, "TraitId2");
+ assertNotNull(t2);
+
+ final EObject obj2 = (EObject)t2.getValue();
+ assertEquals("BooleanValue", obj2.eClass().getName());
+ assertEquals(true, TraitValueHelper.getValueAsBoolean(t2));
+ assertEquals("true", TraitValueHelper.getValueAsString(t2));
+
+ //false
+ final Trait t3 = TaglibDomainMetaDataQueryHelper.getTrait( m, "TraitId3");
+ assertNotNull(t3);
+
+ final EObject obj3 = (EObject)t3.getValue();
+ assertEquals("BooleanValue", obj3.eClass().getName());
+ assertEquals(false, TraitValueHelper.getValueAsBoolean(t3));
+
+ }
+
+// @SuppressWarnings("restriction")
+// public void testGetValueInstanceClassName() {
+// Trait trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "singleString");
+// Assert.assertNotNull(trait);
+// Assert.assertNotNull(trait.getValue());
+// Assert.assertEquals("java.lang.String", TraitValueHelper.getValueInstanceClassName(trait));
+//
+// trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "anInteger");
+// Assert.assertNotNull(trait);
+// Assert.assertNotNull(trait.getValue());
+// Assert.assertEquals("java.lang.String", TraitValueHelper.getValueInstanceClassName(trait));
+//
+// trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "aTrueInt");
+// Assert.assertNotNull(trait);
+// Assert.assertNotNull(trait.getValue());
+// Assert.assertEquals("int", TraitValueHelper.getValueInstanceClassName(trait));
+//
+// trait = TaglibDomainMetaDataQueryHelper.getTrait(entity, "multivalStrings");
+// Assert.assertNotNull(trait);
+// Assert.assertNotNull(trait.getValue());
+// Assert.assertEquals("org.eclipse.jst.jsf.common.metadata.traittypes.traittypes.internal.impl.ListOfValuesImpl", TraitValueHelper.getValueInstanceClassName(trait));
+//
+// }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/AbstractBaseMetaDataTestCase.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/AbstractBaseMetaDataTestCase.java
new file mode 100644
index 000000000..07adcd14d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/AbstractBaseMetaDataTestCase.java
@@ -0,0 +1,171 @@
+/*******************************************************************************
+ * 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.common.metadata.tests.updated;
+
+import java.util.Iterator;
+import java.util.List;
+
+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.jsf.common.metadata.Entity;
+import org.eclipse.jst.jsf.common.metadata.Trait;
+import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataDomainContext;
+import org.eclipse.jst.jsf.common.metadata.internal.TraitValueHelper;
+import org.eclipse.jst.jsf.common.metadata.traittypes.traittypes.ListOfValues;
+import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext;
+import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContextFactory;
+import org.eclipse.jst.jsf.metadata.tests.MetadataTestsPlugin;
+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.IModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+
+public abstract class AbstractBaseMetaDataTestCase extends TestCase {
+ protected static final String projName = "TestCommonMetadataProject";
+ protected static final String domain = IMetaDataDomainContext.TAGLIB_DOMAIN_CONTEXT_ID;
+ protected static final String badDomain = "TagLibDomain";
+ protected static final String baseTestUri = "http://org.eclipse.jsf/test";
+
+ protected static final String TYPE_TAG_FILE = "tagFile";
+ protected static final String TYPE_TAG = "tag";
+ protected static final String TYPE_TAG_ATTRIBUTE = "attribute";
+
+ protected IProject project;
+ protected WebProjectTestEnvironment projectTestEnvironment;
+ protected IStructuredDocumentContext docContext;
+
+ private boolean debug_info = false;
+ private long startTime;
+ private String debugTitle;
+
+ public void setUp() throws Exception {
+ String path = "/WebContent/TestJSP.jsp";
+ int offset = 33;// # not important to tests
+
+// MockWorkspaceContext context = new MockWorkspaceContext();
+// project = context.createProject("TestCommonMetadataProject"+"_"+getName());
+// IFolder folder = project.getFolder("/WebContent");
+// MockResource webContentFolder = context.getResource(folder.getFullPath());
+// assertNotNull(webContentFolder);
+// IFile myJsp = project.getFile(path);
+// URL url = FileLocator.find(MetadataTestsPlugin.getDefault().getBundle(), new Path("/testfiles/metadata/TestJSP.jsp"), null);
+// URL fileUrl = FileLocator.toFileURL(url);
+// File file = new File(fileUrl.toURI());
+//// File file = new File(MetadataTestsPlugin.getDefault().getBundle().getLocation()+ "/testfiles/metadata/TestJSP.jsp");
+// if (file.exists())
+// myJsp.setContents(new FileInputStream(file), 0, null);
+
+
+ super.setUp();
+
+ debug_info = false;
+
+ JSFTestUtil.setInternetProxyPreferences(true, "www-proxy.us.oracle.com", "80");
+
+ JSFTestUtil.setValidationEnabled(false);
+
+ projectTestEnvironment =
+ new WebProjectTestEnvironment(projName/*+"_"+getClass().getName()+"_"+getName()*/);
+ projectTestEnvironment.createProject(true);
+
+ project = projectTestEnvironment.getTestProject();
+
+ projectTestEnvironment.loadResourceInWebRoot(MetadataTestsPlugin.getDefault().getBundle(),
+ "/testfiles/metadata/TestJSP.jsp",
+ "/TestJSP.jsp");
+
+
+
+ docContext = getDocContext(path, offset);
+
+
+ }
+
+
+ private IStructuredDocumentContext getDocContext(String path, int offset) throws Exception{
+ IFile jspFile = project.getFile(new Path(path));
+ assertTrue(jspFile.exists());
+
+ final IModelManager modelManager = StructuredModelManager
+ .getModelManager();
+
+ IStructuredModel model = null;
+
+ model = modelManager.getModelForRead(jspFile);
+ assertTrue(model instanceof DOMModelForJSP);
+
+ return IStructuredDocumentContextFactory.INSTANCE.getContext(
+ model.getStructuredDocument(), offset);
+
+ }
+
+ protected void showDebugInfo(boolean show){
+ debug_info = show;
+ }
+
+ protected void dumpMDTree(Entity entity, int indent) {
+ if (debug_info){
+ printLine("Entity: "+entity.getId(),indent);
+ indent++;
+ for(Iterator<?> it=entity.getTraits().iterator();it.hasNext();){
+ Trait t = (Trait)it.next();
+ printLine("Trait: "+t.getId()+"["+ getValue(t)+ "]", indent);
+ }
+ for (Iterator<?> it=entity.getChildEntities().iterator();it.hasNext();){
+ dumpMDTree((Entity)it.next(), indent);
+ }
+ }
+ }
+
+ private String getValue(Trait trait) {
+ if (trait.getValue() instanceof ListOfValues){
+ List<?> l = TraitValueHelper.getValueAsListOfStrings(trait);
+ StringBuffer buf = new StringBuffer();
+ for (Iterator<?> it=l.iterator();it.hasNext();){
+ buf.append((String)it.next());
+ buf.append(", ");
+ }
+ if (buf.toString().length() > 0)
+ return buf.toString().substring(0, buf.toString().length() - 2);
+ return null;
+ }
+ return TraitValueHelper.getValueAsString(trait);
+ }
+
+ private void printLine(String line, int indent) {
+ StringBuffer buf = new StringBuffer();
+ for (int i=0;i<indent;i++){
+ buf.append(" ");
+ }
+ buf.append(line);
+ System.out.println(buf.toString());
+ }
+
+ protected void endTime() {
+ if (debug_info){
+ long delta = System.nanoTime() - startTime;
+ printLine("Time for "+debugTitle+"(ms)= "+String.valueOf(delta/1000000), 0);
+ }
+ }
+
+ protected void startTime(String debugTitle) {
+ if (debug_info){
+ this.debugTitle = debugTitle;
+ startTime = System.nanoTime();
+ printLine("",0);
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/AbstractEntityQueryVisitorTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/AbstractEntityQueryVisitorTests.java
new file mode 100644
index 000000000..3709eef5f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/AbstractEntityQueryVisitorTests.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 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.common.metadata.tests.updated;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.eclipse.jst.jsf.common.metadata.Entity;
+import org.eclipse.jst.jsf.common.metadata.query.AbstractEntityQueryVisitor;
+import org.eclipse.jst.jsf.common.metadata.query.EmptyResultSet;
+
+public class AbstractEntityQueryVisitorTests extends TestCase {
+ private NullEntityQueryVisitor visitor;
+ protected void setUp() throws Exception {
+ super.setUp();
+ visitor = new NullEntityQueryVisitor();
+ }
+
+ public void testFindEntities() {
+ Assert.assertNotNull(visitor);
+ Assert.assertEquals(EmptyResultSet.class, visitor.findEntities(null, null).getClass());
+ }
+
+ private class NullEntityQueryVisitor extends AbstractEntityQueryVisitor{
+
+ @Override
+ public void visit(Entity entity) {
+ // nada
+ }
+
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/AbstractMetaDataVisitorTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/AbstractMetaDataVisitorTests.java
new file mode 100644
index 000000000..7d06cc089
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/AbstractMetaDataVisitorTests.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 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.common.metadata.tests.updated;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.eclipse.jst.jsf.common.metadata.query.AbstractMetaDataVisitor;
+
+public class AbstractMetaDataVisitorTests extends TestCase {
+ private NullMetaDataVisitor visitor;
+ protected void setUp() throws Exception {
+ super.setUp();
+ visitor = new NullMetaDataVisitor();
+ }
+
+ public void testFindTraits() {
+ Assert.assertNotNull(visitor);
+ Assert.assertEquals(false, visitor.stopVisiting());
+ }
+
+ private class NullMetaDataVisitor extends AbstractMetaDataVisitor{
+ //
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/AbstractTraitQueryVisitorTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/AbstractTraitQueryVisitorTests.java
new file mode 100644
index 000000000..3c4595dfb
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/AbstractTraitQueryVisitorTests.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 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.common.metadata.tests.updated;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.eclipse.jst.jsf.common.metadata.Trait;
+import org.eclipse.jst.jsf.common.metadata.query.AbstractTraitQueryVisitor;
+import org.eclipse.jst.jsf.common.metadata.query.EmptyResultSet;
+
+public class AbstractTraitQueryVisitorTests extends TestCase {
+ private NullTraitQueryVisitor visitor;
+ protected void setUp() throws Exception {
+ super.setUp();
+ visitor = new NullTraitQueryVisitor();
+ }
+
+ public void testFindTraits() {
+ Assert.assertNotNull(visitor);
+ Assert.assertEquals(EmptyResultSet.class, visitor.findTraits(null, null).getClass());
+ }
+
+ private class NullTraitQueryVisitor extends AbstractTraitQueryVisitor{
+
+ @Override
+ public void visit(Trait trait) {
+ //nada
+ }
+
+
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/AllUpdatedMetadataTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/AllUpdatedMetadataTests.java
new file mode 100644
index 000000000..7e8b2ae10
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/AllUpdatedMetadataTests.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * 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.common.metadata.tests.updated;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllUpdatedMetadataTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite(
+ "Test for updated org.eclipse.jst.jsf.common.metadata.tests");
+ //$JUnit-BEGIN$
+ //model
+ suite.addTestSuite(ModelImplTests.class);
+ suite.addTestSuite(EntityImplTests.class);
+ suite.addTestSuite(TraitImplTests.class);
+ suite.addTestSuite(IncludeEntityGroupImplTests.class);
+
+ suite.addTestSuite(MergeTests.class);
+ suite.addTestSuite(TinyTestTests.class);
+
+ suite.addTestSuite(MetaDataModelManagerFactoryTests.class);
+ suite.addTestSuite(ModelProviderAdapterTests.class);
+
+ //query
+ suite.addTestSuite(EmptyResultSetTests.class);
+ suite.addTestSuite(MetaDataExceptionTests.class);
+ suite.addTestSuite(AbstractMetaDataVisitorTests.class);
+ suite.addTestSuite(AbstractEntityQueryVisitorTests.class);
+ suite.addTestSuite(AbstractTraitQueryVisitorTests.class);
+ suite.addTestSuite(TraitValueHelperTests.class);
+ suite.addTestSuite(MetaDataQueryFactoryTests.class);
+ suite.addTestSuite(MetaDataQueryContextFactoryTests.class);
+ suite.addTestSuite(MetaDataQueryHelperTests.class);
+
+ suite.addTestSuite(MissingMDExtensionModelTests.class);
+
+ //taglib query
+ suite.addTestSuite(TaglibMetaDataQueryTests.class);
+
+ //$JUnit-END$
+ return suite;
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/EmptyResultSetTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/EmptyResultSetTests.java
new file mode 100644
index 000000000..a15e2cdc4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/EmptyResultSetTests.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 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.common.metadata.tests.updated;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.eclipse.jst.jsf.common.metadata.query.EmptyResultSet;
+import org.eclipse.jst.jsf.common.metadata.query.IResultSet;
+import org.eclipse.jst.jsf.common.metadata.query.MetaDataException;
+
+public class EmptyResultSetTests extends TestCase {
+ private IResultSet _results;
+
+ public void setUp() throws Exception {
+ _results = new EmptyResultSet();
+ }
+
+ public void testCloseAndIsClosed() {
+ Assert.assertFalse(_results.isClosed());
+ try {
+ _results.close();
+ Assert.assertTrue(_results.isClosed());
+ } catch (MetaDataException e) {
+ fail("testCloseAndIsClosed with Exception: "+e.getMessage());
+ }
+ }
+
+ public void testGetResults() {
+ try {
+ Assert.assertEquals(0, _results.getResults().size());
+ } catch (MetaDataException e) {
+ fail("testGetResults: should NOT be MetaDataException");
+ }
+ try {
+ _results.close();
+ Assert.assertEquals(0, _results.getResults().size());
+ fail("testGetResults: should be MetaDataException");
+ } catch (MetaDataException e) {
+ //test passes
+ }
+ }
+
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/EntityImplTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/EntityImplTests.java
new file mode 100644
index 000000000..01d3ceb9c
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/EntityImplTests.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 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.common.metadata.tests.updated;
+
+import org.eclipse.jst.jsf.common.metadata.Entity;
+import org.eclipse.jst.jsf.common.metadata.Model;
+import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataDomainContext;
+import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataModelContext;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryContextFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.taglib.ITaglibDomainMetaDataQuery;
+
+public class EntityImplTests extends AbstractBaseMetaDataTestCase {
+ protected IMetaDataModelContext baseContext;
+ Model model;
+ Entity entity;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ IMetaDataDomainContext context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext(project);
+ ITaglibDomainMetaDataQuery query = MetaDataQueryFactory.getInstance().createQuery(context);
+ model = query.findTagLibraryModel(baseTestUri);
+ assertNotNull(model);
+ entity = query.findTagEntity(model, "loaded");
+ assertNotNull(entity);
+ }
+
+ public void testGetChildEntities() {
+ //childEntities
+ assertNotNull(entity.getChildEntities());
+ //should be 1 from eg2, plus 3
+ assertEquals(4, entity.getChildEntities().size());
+ }
+
+ public void testGetTraits() {
+ //traits
+ assertNotNull(entity.getTraits());
+ //should be 1 from eg2, plus 3
+ assertEquals(4, entity.getTraits().size());
+ }
+
+ public void testGetIncludeGroups() {
+ //IncludeGroups
+ assertNotNull(entity.getIncludeGroups());
+ assertEquals(1, entity.getIncludeGroups().size());
+ }
+
+ public void testGetId() {
+ assertNotNull(entity.getId());
+ assertEquals("loaded", entity.getId() );
+ }
+
+ public void testSetId() {
+ String id = entity.getId();
+ entity.setId("new");
+ assertEquals("new",entity.getId());
+ entity.setId(id);
+ }
+
+ public void testGetType() {
+ //type
+ assertNotNull(entity.getType());
+ assertEquals(entity.getType(), TYPE_TAG);
+ }
+
+ public void testSetType() {
+ String type = entity.getType();
+ entity.setType("new");
+ assertEquals("new",entity.getType());
+ entity.setType(type);
+ }
+
+ public void testAccept() {
+// Query tests excercises this
+ }
+
+ public void testGetModel() {
+ assertNotNull(entity.getModel());
+ assertEquals(model, entity.getModel());
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/FakeDomainQueryFactory.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/FakeDomainQueryFactory.java
new file mode 100644
index 000000000..f6bb280ff
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/FakeDomainQueryFactory.java
@@ -0,0 +1,40 @@
+package org.eclipse.jst.jsf.common.metadata.tests.updated;
+
+import org.eclipse.jst.jsf.common.metadata.Entity;
+import org.eclipse.jst.jsf.common.metadata.Trait;
+import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataDomainContext;
+import org.eclipse.jst.jsf.common.metadata.query.IResultSet;
+import org.eclipse.jst.jsf.common.metadata.query.internal.AbstractMetaDataDomainQueryFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.AbstractMetaDataQuery;
+import org.eclipse.jst.jsf.common.metadata.query.internal.IEntityPredicateMatcher;
+import org.eclipse.jst.jsf.common.metadata.query.internal.IMetaDataQuery;
+import org.eclipse.jst.jsf.common.metadata.query.internal.ITraitPredicateMatcher;
+
+public class FakeDomainQueryFactory extends AbstractMetaDataDomainQueryFactory {
+
+ public static final String FAKE_MD_DOMAIN = "MyFakeDomain";
+
+ public FakeDomainQueryFactory() {
+ super(FAKE_MD_DOMAIN);
+ }
+
+ public IMetaDataQuery createQuery(IMetaDataDomainContext context) {
+ return new AbstractMetaDataQuery(null, context) {
+
+ public IResultSet<Entity> findEntities(
+ IEntityPredicateMatcher entityMatcher) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public IResultSet<Trait> findTraits(
+ IEntityPredicateMatcher entityMatcher,
+ ITraitPredicateMatcher traitMatcher)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+ };
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/IncludeEntityGroupImplTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/IncludeEntityGroupImplTests.java
new file mode 100644
index 000000000..877d5eb8a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/IncludeEntityGroupImplTests.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * 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.common.metadata.tests.updated;
+
+import org.eclipse.jst.jsf.common.metadata.Entity;
+import org.eclipse.jst.jsf.common.metadata.IncludeEntityGroup;
+import org.eclipse.jst.jsf.common.metadata.Model;
+import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataDomainContext;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryContextFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.taglib.ITaglibDomainMetaDataQuery;
+import org.eclipse.jst.jsf.common.metadata.tests.AbstractBaseMetaDataTestCase;
+
+public class IncludeEntityGroupImplTests extends AbstractBaseMetaDataTestCase {
+ IncludeEntityGroup group;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ IMetaDataDomainContext context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext(project);
+ ITaglibDomainMetaDataQuery query = MetaDataQueryFactory.getInstance().createQuery(context);
+ Model model = query.findTagLibraryModel(baseTestUri);
+ assertNotNull(model);
+ Entity entity = query.findTagEntity(model, "loaded");
+ assertNotNull(entity);
+ group = (IncludeEntityGroup)entity.getIncludeGroups().get(0);
+ }
+ public void testGetId() {
+ assertEquals("eg2", group.getId());
+ }
+
+ public void testSetId() {
+ String id = group.getId();
+ group.setId("new");
+ assertEquals("new",group.getId());
+ group.setId(id);
+ }
+
+ public void testGetModelUri() {
+ assertNull(group.getModelUri());
+ }
+
+ public void testSetModelUri() {
+ String uri = null;
+ group.setModelUri("new");
+ assertEquals("new",group.getModelUri());
+ group.setModelUri(uri);
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/MergeTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/MergeTests.java
new file mode 100644
index 000000000..1fbb427a7
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/MergeTests.java
@@ -0,0 +1,234 @@
+/*******************************************************************************
+ * Copyright (c) 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.common.metadata.tests.updated;
+
+import org.eclipse.jst.jsf.common.metadata.Entity;
+import org.eclipse.jst.jsf.common.metadata.Model;
+import org.eclipse.jst.jsf.common.metadata.Trait;
+import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataDomainContext;
+import org.eclipse.jst.jsf.common.metadata.internal.TraitValueHelper;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryContextFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.taglib.ITaglibDomainMetaDataQuery;
+import org.eclipse.jst.jsf.common.metadata.tests.AbstractBaseMetaDataTestCase;
+
+public class MergeTests extends AbstractBaseMetaDataTestCase {
+ private boolean _debugInfo = false;
+
+ public void testIncludeMerge(){
+ showDebugInfo(_debugInfo);
+ String uri = "TinyIncludeTest";
+ startTime(uri);
+ IMetaDataDomainContext context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext(project);
+ ITaglibDomainMetaDataQuery query = MetaDataQueryFactory.getInstance().createQuery(context);
+ Model model = query.findTagLibraryModel(uri);
+ endTime();
+ assertNotNull(model);
+
+ dumpMDTree(model, 0);
+
+ //expect 0 model traits and 1 entity
+ assertEquals(0, model.getTraits().size());
+ assertEquals(1, model.getChildEntities().size());
+
+
+ //expect 2 traits on A
+ Entity A_Entity = query.findTagEntity(model, "A");
+ assertEquals(2, A_Entity.getTraits().size());
+ Trait t = query.findTrait(A_Entity, "T1");
+ assertNotNull(t);
+ assertEquals("A1", TraitValueHelper.getValueAsString(t));
+ t = query.findTrait(A_Entity, "T2");
+ assertNotNull(t);
+ assertEquals("T2FromEG", TraitValueHelper.getValueAsString(t));
+
+ //expect 2 child entities for A
+ assertEquals(2, A_Entity.getChildEntities().size());
+ Entity a_Entity = query.findTagAttributeEntity(A_Entity, "a");
+ assertNotNull(a_Entity);
+ assertEquals(1, a_Entity.getTraits().size());
+ assertEquals(2, a_Entity.getChildEntities().size());
+ Entity subA_Entity = query.getQueryHelper().getEntity(A_Entity, "sub-A");
+ assertNotNull(subA_Entity);
+ Entity subSubA_Entity = query.getQueryHelper().getEntity(subA_Entity, "sub-sub-A");
+ assertNotNull(subSubA_Entity);
+
+ }
+
+
+
+ public void testMergeOfFileAandFileB(){
+ showDebugInfo(_debugInfo);
+ String uri = "http://org.eclipse.jsf/mergetest1";
+ startTime(uri);
+ IMetaDataDomainContext context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext(project);
+ ITaglibDomainMetaDataQuery query = MetaDataQueryFactory.getInstance().createQuery(context);
+ Model model = query.findTagLibraryModel(uri);
+ assertNotNull(model);
+ endTime();
+
+ dumpMDTree(model, 0);
+
+ //check model traits -
+ assertEquals(3, model.getTraits().size());
+ Trait trait = query.findTrait(model, "Dupe");
+ assertNotNull(trait);
+ assertEquals("dupe from A", TraitValueHelper.getValueAsString(trait));
+
+ //check model entities
+ assertEquals(5, model.getChildEntities().size());
+ Entity entity = query.findTagEntity(model, "A");
+ assertNotNull(entity);
+ entity = query.findTagEntity(model, "B");
+ assertNotNull(entity);
+
+ //check merge of traits within entities
+ entity = query.findTagEntity(model, "Dupe");
+ assertNotNull(entity);
+ assertEquals(2, entity.getTraits().size());
+ trait = query.findTrait(entity, "A1");
+ assertNotNull(trait);
+ assertEquals("A1FromA", TraitValueHelper.getValueAsString(trait));
+ trait = query.findTrait(entity, "B1");
+ assertNotNull(trait);
+
+ //check merge of entities within entities
+ assertEquals(2, entity.getChildEntities().size());
+ Entity secondEntity = query.findTagAttributeEntity(entity, "a");
+ assertNotNull(secondEntity);
+ assertEquals(2, secondEntity.getTraits().size());
+ trait = query.findTrait(secondEntity, "A1");
+ assertNotNull(trait);
+ assertEquals("A1FromA", TraitValueHelper.getValueAsString(trait));
+
+ //check merge of traits with included entities
+ entity = query.findTagEntity(model, "DupeWithInclude");
+ assertNotNull(entity);
+ assertEquals(2, entity.getTraits().size());
+ trait = query.findTrait(entity, "A1");
+ assertNotNull(trait);
+ assertEquals("A1", TraitValueHelper.getValueAsString(trait));
+ trait = query.findTrait(entity, "B");
+ assertNotNull(trait);
+ assertEquals("trait SHOULD appear in merge from eg2", TraitValueHelper.getValueAsString(trait));
+
+ //check merge of entities with includes
+ assertEquals(2, entity.getChildEntities().size());
+ secondEntity = query.findTagAttributeEntity(entity, "a");
+ assertNotNull(secondEntity);
+ //assertEquals(1, secondEntity.getTraits().size());//do not expect 2 as extra trait from include group is not included
+ assertEquals(2, secondEntity.getTraits().size());//do NOW expect 2 as extra trait from include group IS included (https://bugs.eclipse.org/bugs/show_bug.cgi?id=191564)
+ trait = query.findTrait(entity, "A1");
+ assertNotNull(trait);
+ assertEquals("A1", TraitValueHelper.getValueAsString(trait));
+ trait = query.findTrait(entity, "A1");
+ assertNotNull(trait);
+
+ //check merge of entities with includes where all come from include
+ entity = query.findTagEntity(model, "DupeWithInclude2");
+ assertNotNull(entity);
+ assertEquals(1, entity.getTraits().size());
+ trait = query.findTrait(entity, "A1");
+ assertNotNull(trait);
+ assertEquals("A1FromEG1", TraitValueHelper.getValueAsString(trait));
+
+ assertEquals(1, entity.getChildEntities().size());
+ secondEntity = query.findTagAttributeEntity(entity, "a");
+ assertNotNull(secondEntity);
+ assertEquals(2, secondEntity.getTraits().size());
+ trait = query.findTrait(entity, "A1");
+ assertNotNull(trait);
+ assertEquals("A1FromEG1", TraitValueHelper.getValueAsString(trait));
+
+ }
+
+ /**
+ * All entities and traits come from external model in this test
+ */
+ public void testIncludeExternalModel(){
+ showDebugInfo(_debugInfo);
+ String uri = "http://org.eclipse.jsf/mergetest2";
+ startTime(uri);
+ IMetaDataDomainContext context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext(project);
+ ITaglibDomainMetaDataQuery query = MetaDataQueryFactory.getInstance().createQuery(context);
+ Model model = query.findTagLibraryModel(uri);
+ endTime();
+ assertNotNull(model);
+
+ dumpMDTree(model, 0);
+
+ //check model traits
+ assertEquals(1, model.getTraits().size());
+ Trait trait = query.findTrait(model, "A1");
+ assertNotNull(trait);
+ assertEquals("A1FromEG1", TraitValueHelper.getValueAsString(trait));
+
+ //check model entities
+ assertEquals(1, model.getChildEntities().size());
+ Entity entity = query.findTagEntity(model, "a");
+ assertNotNull(entity);
+ assertEquals(0, entity.getChildEntities().size());
+ assertEquals(2, entity.getTraits().size());
+
+ //do it again with another model to ensure that entity group from external model is still intact
+ uri = "http://org.eclipse.jsf/mergetest3";
+ startTime(uri);
+ model = query.findTagLibraryModel(uri);
+ endTime();
+ assertNotNull(model);
+
+ dumpMDTree(model, 0);
+
+ //check model traits
+ assertEquals(1, model.getTraits().size());
+ trait = query.findTrait(model, "A1");
+ assertNotNull(trait);
+ assertEquals("A1FromEG1", TraitValueHelper.getValueAsString(trait));
+
+ //check model entities
+ assertEquals(1, model.getChildEntities().size());
+ entity = query.findTagEntity(model, "a");
+ assertNotNull(entity);
+ assertEquals(0, entity.getChildEntities().size());
+ assertEquals(2, entity.getTraits().size());
+
+ model = query.getQueryHelper().getModel("http://org.eclipse.jsf/mergetest1");
+ assertNotNull(model);
+ assertEquals(2, model.getEntityGroups().size());
+
+ }
+
+ public void testLoadJSFCore(){
+ showDebugInfo(_debugInfo);
+ String uri = "http://java.sun.com/jsf/core";
+ startTime(uri);
+ IMetaDataDomainContext context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext(project);
+ ITaglibDomainMetaDataQuery query = MetaDataQueryFactory.getInstance().createQuery(context);
+ Model model = query.findTagLibraryModel(uri);
+ endTime();
+ assertNotNull(model);
+
+// dumpMDTree(model, 0);
+ }
+
+ public void testLoadJSFHTML(){
+ showDebugInfo(_debugInfo);
+ String uri = "http://java.sun.com/jsf/html";
+ startTime(uri);
+ IMetaDataDomainContext context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext(project);
+ ITaglibDomainMetaDataQuery query = MetaDataQueryFactory.getInstance().createQuery(context);
+ Model model = query.findTagLibraryModel(uri);
+ endTime();
+ assertNotNull(model);
+
+// dumpMDTree(model, 0);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/MetaDataExceptionTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/MetaDataExceptionTests.java
new file mode 100644
index 000000000..4f313e043
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/MetaDataExceptionTests.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 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.common.metadata.tests.updated;
+
+import java.io.IOException;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.eclipse.jst.jsf.common.metadata.query.MetaDataException;
+
+public class MetaDataExceptionTests extends TestCase {
+
+ public void testMetaDataException() {
+ MetaDataException e = new MetaDataException();
+ Assert.assertNotNull(e);
+ }
+
+ public void testMetaDataExceptionString() {
+ MetaDataException e = new MetaDataException("Foo");
+ Assert.assertNotNull(e);
+ Assert.assertEquals("Foo", e.getMessage());
+ }
+
+ public void testMetaDataExceptionStringThrowable() {
+ IOException cause = new IOException("FooBar");
+ MetaDataException e = new MetaDataException("Foo", cause );
+ Assert.assertNotNull(e);
+ Assert.assertEquals(cause, e.getCause());
+ Assert.assertNotNull(e.getCause());
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/MetaDataModelManagerFactoryTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/MetaDataModelManagerFactoryTests.java
new file mode 100644
index 000000000..9182423bb
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/MetaDataModelManagerFactoryTests.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * 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 and/or initial documentation
+ *******************************************************************************/
+
+package org.eclipse.jst.jsf.common.metadata.tests.updated;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataModelManager;
+import org.eclipse.jst.jsf.common.metadata.internal.MetaDataModelManagerFactory;
+import org.eclipse.jst.jsf.test.util.mock.IWorkspaceContext;
+import org.eclipse.jst.jsf.test.util.mock.MockWorkspaceContext;
+
+public class MetaDataModelManagerFactoryTests extends TestCase {
+
+ private IProject _project;
+
+ public void setUp() throws Exception {
+ IWorkspaceContext context = new MockWorkspaceContext();
+ _project = context.createProject("MetaDataModelManagerFactoryTests"+"_"+getName());
+ }
+
+ public void testDefaultMDModelManagerSetup() {
+ //test extension must be removed for this to work
+ IMetaDataModelManager mgr = MetaDataModelManagerFactory.getMetaDataModelManagerInstance(_project);
+ assertNotNull(mgr);
+ assertEquals("org.eclipse.jst.jsf.common.metadata.internal.MetaDataModelManager", mgr.getClass().getName());
+
+ //verify getting same instance when called the second time
+ IMetaDataModelManager mgr2 = MetaDataModelManagerFactory.getMetaDataModelManagerInstance(_project);
+ assertNotNull(mgr2);
+ assertEquals(mgr, mgr2);
+
+ }
+
+//// test extension disabled becuz it screws up tests
+// public void testExtPtMDModelManagerSetup() {
+// IMetaDataModelManager mgr = MetaDataModelManagerFactory.getMetaDataModelManagerInstance(_project);
+// assertNotNull(mgr);
+// assertEquals("TestMDModelManager", mgr.getClass().getSimpleName());;
+// }
+
+ public void testTestableMDModelManagerSetup() throws Exception {
+ _project.setSessionProperty(MetaDataModelManagerFactory.TESTABLE_FACTORY_SESSION_KEY, new TestMDModelManagerFactory());
+ IMetaDataModelManager mgr = MetaDataModelManagerFactory.getMetaDataModelManagerInstance(_project);
+ assertNotNull(mgr);
+ assertEquals("TestMDModelManager", mgr.getClass().getSimpleName());
+
+ IMetaDataModelManager mgr2 = MetaDataModelManagerFactory.getMetaDataModelManagerInstance(_project);
+ assertNotNull(mgr2);
+ assertEquals(mgr, mgr2);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/MetaDataQueryContextFactoryTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/MetaDataQueryContextFactoryTests.java
new file mode 100644
index 000000000..0406d5b05
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/MetaDataQueryContextFactoryTests.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * 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 and/or initial documentation
+ *******************************************************************************/
+
+package org.eclipse.jst.jsf.common.metadata.tests.updated;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataDomainContext;
+import org.eclipse.jst.jsf.common.metadata.query.internal.IMetaDataModelManagerContext;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryContextFactory;
+import org.eclipse.jst.jsf.test.util.mock.MockWorkspaceContext;
+import org.junit.Test;
+
+public class MetaDataQueryContextFactoryTests extends TestCase{
+
+ @Test
+ public void testGetInstance() {
+ MetaDataQueryContextFactory factory = MetaDataQueryContextFactory.getInstance();
+ assertNotNull(factory);
+ MetaDataQueryContextFactory factory2 = MetaDataQueryContextFactory.getInstance();
+ assertNotNull(factory2);
+ assertSame(factory, factory2);
+ }
+
+ @Test
+ public void testCreateTaglibDomainContext() {
+ MetaDataQueryContextFactory factory = MetaDataQueryContextFactory.getInstance();
+ assertNotNull(factory);
+
+ IProject project = new MockWorkspaceContext().createProject("test");
+ IMetaDataDomainContext context = factory.createTaglibDomainModelContext(project);
+ assertNotNull(context);
+ assertEquals(IMetaDataDomainContext.TAGLIB_DOMAIN_CONTEXT_ID, context.getDomainId());
+ assertNotNull(context.getAdapter((IProject.class)));
+ assertTrue(context instanceof IMetaDataModelManagerContext);
+ assertSame(((IMetaDataModelManagerContext)context).getProject(), project);
+
+// tests deprecated null project taglibdomain... even though not supposed to pass null project
+ context = factory.createTaglibDomainModelContext((IProject)null);
+ assertNotNull(context);
+ assertEquals(IMetaDataDomainContext.TAGLIB_DOMAIN_CONTEXT_ID, context.getDomainId());
+ assertNull(context.getAdapter((IProject.class)));
+ assertTrue(context instanceof IMetaDataModelManagerContext);
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/MetaDataQueryFactoryTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/MetaDataQueryFactoryTests.java
new file mode 100644
index 000000000..4f5d35cff
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/MetaDataQueryFactoryTests.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * 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 and/or initial documentation
+ *******************************************************************************/
+
+package org.eclipse.jst.jsf.common.metadata.tests.updated;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataDomainContext;
+import org.eclipse.jst.jsf.common.metadata.query.internal.IMetaDataModelManagerContext;
+import org.eclipse.jst.jsf.common.metadata.query.internal.IMetaDataQuery;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryContextFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.taglib.ITaglibDomainMetaDataQuery;
+import org.eclipse.jst.jsf.test.util.mock.IWorkspaceContext;
+import org.eclipse.jst.jsf.test.util.mock.MockWorkspaceContext;
+import org.junit.Test;
+
+public class MetaDataQueryFactoryTests extends TestCase {
+
+ private IProject _project;
+
+ public void setUp() throws Exception {
+ IWorkspaceContext context = new MockWorkspaceContext();
+ _project = context.createProject("MetaDataQueryFactoryTests"+"_"+getName());
+ }
+
+ @Test
+ public void testGetInstance() {
+ final MetaDataQueryFactory factory = MetaDataQueryFactory.getInstance();
+ assertNotNull(factory);
+
+ final MetaDataQueryFactory factory2 = MetaDataQueryFactory.getInstance();
+ assertNotNull(factory2);
+ assertSame(factory, factory2);
+ }
+
+// @Test
+// public void testCreateQueryWithNullProject() {
+// //tested null project query... may not be valid anymore
+// IMetaDataDomainContext context = MetaDataQueryContextFactory.getInstance().createTaglibDomainContext(null);
+// final IMetaDataQuery q = MetaDataQueryFactory.getInstance().createQuery(context);
+// assertNotNull(q);
+// assertTrue(q instanceof ITaglibMetaDataQuery);
+//
+// //check get new instance on each call
+// final ITaglibMetaDataQuery q2 = MetaDataQueryFactory.getInstance().createQuery(context);
+// assertNotNull(q2);
+// assertNotSame(q, q2);
+//
+// }
+
+ @Test
+ public void testCreateQuery() {
+
+ IMetaDataDomainContext context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext(_project);
+ final IMetaDataQuery q = MetaDataQueryFactory.getInstance().createQuery(context);
+ assertNotNull(q);
+ assertTrue(q instanceof ITaglibDomainMetaDataQuery);
+
+ //check get new instance on each call
+ final ITaglibDomainMetaDataQuery q2 = MetaDataQueryFactory.getInstance().createQuery(context);
+ assertNotNull(q2);
+ assertNotSame(q, q2);
+
+ //the following verifies that the query factory ext-pt is working properly
+ IMetaDataModelManagerContext fakeDomainContext = new IMetaDataModelManagerContext() {
+
+ @SuppressWarnings("rawtypes")
+ public Object getAdapter(final Class adapter) {
+ if (adapter == IProject.class)
+ return _project;
+ return null;
+ }
+
+ public String getDomainId() {
+ return FakeDomainQueryFactory.FAKE_MD_DOMAIN;
+ }
+
+ public IProject getProject() {
+ return _project;
+ }
+ };
+
+ final IMetaDataQuery q3 = MetaDataQueryFactory.getInstance().createQuery(fakeDomainContext);
+ assertNotNull(q3);
+ assertNotSame(q, q3);
+
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/MetaDataQueryHelperTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/MetaDataQueryHelperTests.java
new file mode 100644
index 000000000..535ecb18b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/MetaDataQueryHelperTests.java
@@ -0,0 +1,315 @@
+/*******************************************************************************
+ * 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 and/or initial documentation
+ *******************************************************************************/
+
+package org.eclipse.jst.jsf.common.metadata.tests.updated;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.jsf.common.metadata.Entity;
+import org.eclipse.jst.jsf.common.metadata.Model;
+import org.eclipse.jst.jsf.common.metadata.Trait;
+import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataDomainContext;
+import org.eclipse.jst.jsf.common.metadata.query.EmptyResultSet;
+import org.eclipse.jst.jsf.common.metadata.query.IEntityQueryVisitor;
+import org.eclipse.jst.jsf.common.metadata.query.IResultSet;
+import org.eclipse.jst.jsf.common.metadata.query.ITraitQueryVisitor;
+import org.eclipse.jst.jsf.common.metadata.query.MetaDataException;
+import org.eclipse.jst.jsf.common.metadata.query.internal.AbstractMetaDataQuery;
+import org.eclipse.jst.jsf.common.metadata.query.internal.HierarchicalSearchControl;
+import org.eclipse.jst.jsf.common.metadata.query.internal.IMetaDataModelManagerContext;
+import org.eclipse.jst.jsf.common.metadata.query.internal.IMetaDataQuery;
+import org.eclipse.jst.jsf.common.metadata.query.internal.IMetaDataQueryHelper;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryContextFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryHelper;
+import org.eclipse.jst.jsf.common.metadata.query.internal.SearchControl;
+import org.eclipse.jst.jsf.common.metadata.query.internal.SimpleEntityQueryVisitorImpl;
+import org.eclipse.jst.jsf.common.metadata.query.internal.SimpleTraitQueryVisitorImpl;
+import org.eclipse.jst.jsf.metadata.tests.MetadataTestsPlugin;
+import org.junit.Before;
+import org.junit.Test;
+
+public class MetaDataQueryHelperTests extends AbstractBaseMetaDataTestCase {
+
+ private IMetaDataQuery _query;
+ private MetaDataQueryHelper _helper;
+ @Before
+ public void setUp() throws Exception {
+ super.setUp();
+ IMetaDataDomainContext context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext(project);
+ _query = MetaDataQueryFactory.getInstance().createQuery(context);
+ assertNotNull(_query);
+ _helper = (MetaDataQueryHelper)_query.getQueryHelper();
+ assertNotNull(_helper);
+
+// baseContext = new TaglibDomainMetaDataModelContextImpl(domain, project, baseTestUri);
+// nullProjectContext = new TaglibDomainMetaDataModelContextImpl(domain, null, baseTestUri);
+// negativeContextBadUri = new TaglibDomainMetaDataModelContextImpl(domain, project, "blah");
+// negativeContextBadDomain = new TaglibDomainMetaDataModelContextImpl(badDomain, project, baseTestUri);
+ }
+
+ /**
+ * Test getModel method but also performs basic read unit tests on Model
+ */
+ public void testGetModel() {
+ //base
+ //positive test
+ Model model = _helper.getModel(baseTestUri);
+ assertNotNull(baseTestUri+" model should not be null.",model);
+
+ //null proj
+ IMetaDataDomainContext context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext((IProject)null);
+ IMetaDataQuery nullProjectQuery = MetaDataQueryFactory.getInstance().createQuery(context);
+ model = nullProjectQuery.getQueryHelper().getModel(baseTestUri);
+ assertNotNull(baseTestUri+" model should not be null.",model);
+ //id
+ assertNotNull(model.getId());
+ assertEquals(baseTestUri+" is not same as model.getId()",baseTestUri, model.getId() );
+
+
+
+ //negative tests
+ context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext(project);
+ IMetaDataQuery badUriQuery = MetaDataQueryFactory.getInstance().createQuery(context);
+ model = badUriQuery.getQueryHelper().getModel("blah");
+ assertNull(model);
+
+ IMetaDataModelManagerContext badContext = new IMetaDataModelManagerContext() {
+
+ @SuppressWarnings("rawtypes")
+ public Object getAdapter(Class adapter) {
+ if (adapter == IProject.class)
+ return project;
+ return null;
+ }
+
+ public String getDomainId() {
+ return "badDomainKey";
+ }
+
+ public IProject getProject() {
+ return project;
+ }
+ };
+
+ MetadataTestsPlugin.getDefault().getLog().log(new Status(IStatus.INFO, MetadataTestsPlugin.ID_BUNDLE, "***** UnsupportedOperationException about to occur because of Test ! *****")); //$NON-NLS-1$
+ IMetaDataQuery badDomainQuery = MetaDataQueryFactory.getInstance().createQuery(badContext);
+ assertNull(badDomainQuery);
+ }
+
+ public void testGetEntityIMetaDataModelContextString() {
+ Model model = _helper.getModel(baseTestUri);
+ //positive
+ Entity entity = _helper.getEntity(model, "loaded");
+ assertNotNull(entity);
+
+ entity = _helper.getEntity(model, "loaded/att3");
+ assertNotNull(entity);
+
+ //negative
+ entity = _helper.getEntity(model, "doesnotexist");
+ assertNull(entity);
+ }
+
+ /**
+ * Return multiple entities
+ * Partially tests SimpleEntityQueryVisitorImpl searchControl
+ */
+ public void testGetEntitiesIMetaDataModelContextStringIEntityQueryVisitor() {
+ Model model = _helper.getModel(baseTestUri);
+ IEntityQueryVisitor visitor = new SimpleEntityQueryVisitorImpl(new HierarchicalSearchControl(1, HierarchicalSearchControl.SCOPE_ALL_LEVELS));
+ IResultSet rs = _helper.getEntities(model, "loaded", visitor);
+ assertNotNull(rs);
+ Entity entity = null;
+ try {
+ assertFalse(rs instanceof EmptyResultSet);
+ assertEquals(1, rs.getResults().size());
+ entity = (Entity)rs.getResults().get(0);
+ assertNotNull(entity);
+ assertEquals(entity.getId(), "loaded");
+ rs.close();
+ } catch (MetaDataException e) {
+ //MetaDataException not currently being thrown
+ fail(e.getMessage());
+ }
+
+ //test returning multiple (2)
+ visitor = new SimpleEntityQueryVisitorImpl(new HierarchicalSearchControl(SearchControl.COUNT_LIMIT_NONE, HierarchicalSearchControl.SCOPE_ALL_LEVELS));
+ rs = _helper.getEntities(model, "loaded", visitor);
+ assertNotNull(rs);
+ try {
+ assertFalse(rs instanceof EmptyResultSet);
+ assertEquals(2, rs.getResults().size());
+ entity = (Entity)rs.getResults().get(0);
+ assertNotNull(entity);
+ assertEquals(entity.getId(), "loaded");
+ Entity secondentity = (Entity)rs.getResults().get(1);
+ assertNotNull(secondentity);
+ assertEquals("loaded", secondentity.getId());
+ assertFalse(secondentity == entity);
+ rs.close();
+ } catch (MetaDataException e) {
+ //MetaDataException not currently being thrown
+ fail(e.getMessage());
+ }
+ }
+
+ public void testGetTraitEntityString() {
+ Model model = _helper.getModel(baseTestUri);
+ Entity entity = _helper.getEntity(model, "loaded/att3");
+
+ //positive
+ Trait trait = _helper.getTrait(entity, "A3");
+ assertNotNull(trait);
+
+ //negative
+ trait = _helper.getTrait(entity, "Z3");
+ assertNull(trait);
+ }
+
+ /**
+ * Return multiple traits
+ * Also tests SimpleEntityQueryVisitorImpl and IResultSet
+ */
+ public void testGetTraits() {
+ //TEST with 1 count
+ ITraitQueryVisitor visitor = new SimpleTraitQueryVisitorImpl(new SearchControl(1));
+ Model model = _helper.getModel(baseTestUri);
+ IResultSet rs = _helper.getTraits(model, "model-trait", visitor);
+ assertNotNull(rs);
+ Trait trait = null;
+ try {
+ assertFalse(rs instanceof EmptyResultSet);
+ assertEquals(1, rs.getResults().size());
+ trait = (Trait)rs.getResults().get(0);
+ assertNotNull(trait);
+ assertEquals("model-trait", trait.getId());
+ rs.close();
+ } catch (MetaDataException e) {
+ //MetaDataException not currently being thrown
+ fail(e.getMessage());
+ }
+
+ //test with COUNT_LIMIT_NONE
+ visitor = new SimpleTraitQueryVisitorImpl(new SearchControl(SearchControl.COUNT_LIMIT_NONE));
+ rs = _helper.getTraits(model, "model-trait", visitor);
+ assertNotNull(rs);
+ try {
+ assertFalse(rs instanceof EmptyResultSet);
+ assertEquals(2, rs.getResults().size());
+ trait = (Trait)rs.getResults().get(0);
+ assertNotNull(trait);
+ assertEquals("model-trait", trait.getId());
+ Trait secondTrait = (Trait)rs.getResults().get(1);
+ assertNotNull(secondTrait);
+ assertEquals("model-trait", secondTrait.getId());
+ assertFalse(trait == secondTrait);
+ rs.close();
+ } catch (MetaDataException e) {
+ //MetaDataException not currently being thrown
+ fail(e.getMessage());
+ }
+
+ }
+
+ public void testGetEntityEntityString() {
+ Model model = _helper.getModel(baseTestUri);
+ Entity entity = _helper.getEntity(model, "loaded");
+ //positive
+ entity = _helper.getEntity(entity, "att3");
+ assertNotNull(entity);
+
+ //negative
+ entity = _helper.getEntity(entity, "zzz");
+ assertNull(entity);
+ }
+
+ public void testGetEntitiesEntityStringIEntityQueryVisitor() {
+
+ //negative test
+
+ IResultSet rs = _helper.getEntities("badURI", "foo", new SimpleEntityQueryVisitorImpl());
+ assertNotNull(rs);
+ try {
+ assertEquals(0, rs.getResults().size());
+ } catch (MetaDataException e) {
+ fail(e.getMessage());
+ }
+ }
+
+ public void testGetTraitIMetaDataModelContextStringString() {
+ //positive
+ Trait trait = _helper.getTrait(baseTestUri, "loaded/att3", "A3");
+ assertNotNull(trait);
+
+ //negative
+ trait = _helper.getTrait(baseTestUri, "loaded/att3", "zzz");
+ assertNull(trait);
+
+ trait = _helper.getTrait(baseTestUri, "doesnotexist", "A3");
+ assertNull(trait);
+
+ trait = _helper.getTrait("badDomain", "doesnotexist", "A3");
+ assertNull(trait);
+ }
+
+ public void testResultSets() {
+ IResultSet rs = _helper.getEntities(baseTestUri, "loaded", new SimpleEntityQueryVisitorImpl());
+ assertNotNull(rs);
+ try {
+ assertEquals(2, rs.getResults().size());
+ assertFalse(rs.isClosed());
+ rs.close();
+ assertTrue(rs.isClosed());
+ } catch (MetaDataException e1) {
+ fail(e1.getMessage());
+ }
+
+ try {
+ rs.getResults();
+ fail("Expected MetaDataException ");
+ } catch (MetaDataException e2) {
+ //pass
+ }
+ }
+
+ public void testGetEntityBeyondMDDepth() {
+ Entity entity = _helper.getEntity(baseTestUri, "loaded/does_not_exist/nor_this");
+ assertNull(entity);
+ }
+
+ public void testGetEntityBadEntityKey() {
+ Entity entity = _helper.getEntity(baseTestUri, "");
+ assertNull(entity);
+
+ entity = _helper.getEntity(baseTestUri, null);
+ assertNull(entity);
+
+ entity = _helper.getEntity(baseTestUri, "/");
+ assertNull(entity);
+
+ }
+
+ @Test
+ public void testSubclassability() {
+ IMetaDataQueryHelper myHelper = new MyMetaDataQueryHelper();
+ _query.setQueryHelper(myHelper);
+ assertSame(_query.getQueryHelper(), myHelper);
+
+ }
+
+ private class MyMetaDataQueryHelper extends MetaDataQueryHelper {
+ MyMetaDataQueryHelper() {
+ super(((AbstractMetaDataQuery)_query).getManager(), ((AbstractMetaDataQuery)_query).getDomainContext());
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/MissingMDExtensionModelTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/MissingMDExtensionModelTests.java
new file mode 100644
index 000000000..8597179e4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/MissingMDExtensionModelTests.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * 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.metadata.tests.updated;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.ILogListener;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jst.jsf.common.JSFCommonPlugin;
+import org.eclipse.jst.jsf.common.metadata.Entity;
+import org.eclipse.jst.jsf.common.metadata.Model;
+import org.eclipse.jst.jsf.common.metadata.Trait;
+import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataDomainContext;
+import org.eclipse.jst.jsf.common.metadata.internal.TraitValueHelper;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryContextFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.taglib.ITaglibDomainMetaDataQuery;
+import org.eclipse.jst.jsf.common.metadata.tests.AbstractBaseMetaDataTestCase;
+
+/**
+ * Tests loading of models when an emf model extension is missing.
+ * <p/>
+ * Expected behavior is for model to load all entities and traits even if extension model is not
+ * loaded. The trait values will be missing where the trait value model is missing.
+ * In these cases, an error should be logged to the JSFCommonPlugin.
+ * <p>
+ *
+ * <p/>
+ * Note: if xsi:type prefix is bad, or no uri to model was provided, then model will NOT load.
+ * This JUnit does not test for the model not loading in this case.
+ *
+ */
+public class MissingMDExtensionModelTests extends AbstractBaseMetaDataTestCase {
+ private ITaglibDomainMetaDataQuery _query;
+ Model model;
+ Trait trait;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ String uri = "http://org.eclipse.jsf/missingMDModelTest";
+
+ LogListener logListener = new LogListener();
+ try {
+
+ JSFCommonPlugin.getPlugin().getLog().addLogListener(logListener);
+ IMetaDataDomainContext context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext(project);
+ _query = MetaDataQueryFactory.getInstance().createQuery(context);
+ model = _query.findTagLibraryModel(uri);
+ assertNotNull(model);
+ if (JSFCommonPlugin.getPlugin().isDebugging() &&
+ Boolean.valueOf(Platform.getDebugOption(JSFCommonPlugin.PLUGIN_ID+"/debug/metadataload")).booleanValue()){
+ //assert log entries
+ assertTrue(logListener.getMessages().size() > 2);
+ }
+ } finally {
+ JSFCommonPlugin.getPlugin().getLog().removeLogListener(logListener);
+ }
+ }
+
+ public void testModelLoadWithMissingECoreExtensionModel() {
+ Entity entity = _query.getQueryHelper().getEntity(model, "Tag/Attr1");
+ assertNotNull(entity);
+ trait = _query.findTrait(entity, "attribute-value-runtime-type");
+ assertNotNull(trait);
+ assertNotNull(trait.getValue());
+ assertEquals("org.eclipse.jst.jsf.core.attributevalues.StringType", TraitValueHelper.getValueAsString(trait));
+
+ trait = _query.findTrait(entity, "bogusTrait");
+ //trait ain't bogus, but value will be
+ assertNotNull(trait);
+ //value should be null
+ assertNull(trait.getValue());
+
+ trait = _query.findTrait(entity, "reallybogusTrait");
+ //trait ain't bogus, but value will be
+ assertNotNull(trait);
+ //value should be null
+ assertNull(trait.getValue());
+
+ trait = _query.findTrait(entity, "valid-values");
+ assertNotNull(trait);
+ assertNotNull(trait.getValue());
+
+
+ entity = _query.getQueryHelper().getEntity(model, "Tag/DefaultAttr");
+ assertNotNull(entity);
+ trait = _query.findTrait(entity, "attribute-value-runtime-type");
+ assertNotNull(trait);
+ assertNotNull(trait.getValue());
+ assertEquals("org.eclipse.jst.jsf.core.attributevalues.StringType", TraitValueHelper.getValueAsString(trait));
+
+ trait = _query.findTrait(entity, "bogusTrait");
+ //trait ain't bogus, but value will be
+ assertNotNull(trait);
+ //value should be null
+ assertNull(trait.getValue());
+ }
+
+ class LogListener implements ILogListener {
+
+ private List<IStatus> statusMsgs;
+ public LogListener(){
+ this.statusMsgs = new ArrayList<IStatus>();
+ }
+ public void logging(IStatus status, String plugin) {
+ statusMsgs.add(status);
+ }
+
+ public List<IStatus> getMessages(){
+ return statusMsgs;
+ }
+
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/ModelImplTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/ModelImplTests.java
new file mode 100644
index 000000000..e04c7ae78
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/ModelImplTests.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * 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.common.metadata.tests.updated;
+
+import org.eclipse.jst.jsf.common.metadata.Model;
+import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataDomainContext;
+import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataSourceModelProvider;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryContextFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.taglib.ITaglibDomainMetaDataQuery;
+import org.eclipse.jst.jsf.common.metadata.tests.AbstractBaseMetaDataTestCase;
+
+public class ModelImplTests extends AbstractBaseMetaDataTestCase {
+
+ Model model;
+ public void setUp() throws Exception {
+ super.setUp();
+
+ IMetaDataDomainContext context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext(project);
+ ITaglibDomainMetaDataQuery query = MetaDataQueryFactory.getInstance().createQuery(context);
+ model = query.findTagLibraryModel(baseTestUri);
+ assertNotNull(model);
+ }
+
+ public void testGetModel() {
+ assertNotNull(model.getModel());
+ assertEquals(model.getModel(), model);
+ }
+
+ public void testGetModelId() {
+ assertEquals(baseTestUri, model.getId());
+ }
+
+ public void testGetSourceModelProvider() {
+ //getSourceModelProvider
+ assertNotNull(model.getSourceModelProvider());
+ assertTrue(model.getSourceModelProvider() instanceof IMetaDataSourceModelProvider);
+ }
+
+ public void testSetSourceModelProvider() {
+// fail("Not yet implemented");
+ }
+
+ public void testSetCurrentModelContext() {
+// fail("Not yet implemented");
+ }
+
+ public void testGetEntityGroups() {
+ //EntityGroups
+ assertNotNull(model.getEntityGroups());
+ assertEquals(2, model.getEntityGroups().size());
+ }
+
+ public void testFindIncludeGroup() {
+ assertNotNull(model.findIncludeGroup("eg1"));
+ }
+
+ public void testGetChildEntities() {
+ //childEntities
+ assertNotNull(model.getChildEntities());
+ assertEquals(6, model.getChildEntities().size());
+ }
+
+ public void testGetTraits() {
+ //traits
+ assertNotNull(model.getTraits());
+ assertEquals(2, model.getTraits().size());
+ }
+
+ public void testGetIncludeGroups() {
+ //IncludeGroups
+ assertNotNull(model.getIncludeGroups());
+ assertEquals(0, model.getIncludeGroups().size());
+ }
+
+ public void testGetId() {
+ //id
+ assertNotNull(model.getId());
+ assertEquals(baseTestUri+" is not same as model.getId()", baseTestUri, model.getId() );
+ }
+
+ public void testSetId() {
+ String id = model.getId();
+ model.setId("newid");
+ assertEquals("newid",model.getId());
+ model.setId(id);
+ }
+
+ public void testGetType() {
+ //type
+ assertNotNull(model.getType());
+ assertEquals(model.getType(), TYPE_TAG_FILE);
+ }
+
+ public void testSetType() {
+ String type = model.getType();
+ model.setType("newid");
+ assertEquals("newid",model.getType());
+ model.setType(type);
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/ModelProviderAdapterTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/ModelProviderAdapterTests.java
new file mode 100644
index 000000000..08a16b633
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/ModelProviderAdapterTests.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+
+package org.eclipse.jst.jsf.common.metadata.tests.updated;
+
+import java.util.ResourceBundle;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jst.jsf.common.metadata.Model;
+import org.eclipse.jst.jsf.common.metadata.Trait;
+import org.eclipse.jst.jsf.common.metadata.internal.IClassLoaderProvider;
+import org.eclipse.jst.jsf.common.metadata.internal.IImageDescriptorProvider;
+import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataDomainContext;
+import org.eclipse.jst.jsf.common.metadata.internal.IResourceBundleProvider;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryContextFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.taglib.ITaglibDomainMetaDataQuery;
+import org.eclipse.jst.jsf.test.util.mock.MockWorkspaceContext;
+import org.eclipse.swt.graphics.Image;
+
+public class ModelProviderAdapterTests extends TestCase {
+ private final String JSF_HTML_URI = "http://java.sun.com/jsf/html";
+ private final String IMAGES_BASE = "/icons/palette/JSFHTML/small/";
+
+ private Trait _trait;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ IProject project = new MockWorkspaceContext().createProject("testProject");
+ IMetaDataDomainContext context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext(project);
+ ITaglibDomainMetaDataQuery query = MetaDataQueryFactory.getInstance().createQuery(context);
+ Model model = query.findTagLibraryModel(JSF_HTML_URI);
+ assertNotNull(model);
+ //get the trait that was defined by the "palette" md file. This will establish the correct sourceModelProvider.
+ _trait = query.findTrait(model, "display-label");
+ assertNotNull(_trait);
+ }
+
+ public void testImageDescriptorProvider() {
+
+ IImageDescriptorProvider imageProvider = (IImageDescriptorProvider)_trait.getSourceModelProvider().getAdapter(IImageDescriptorProvider.class);
+ assertNotNull(imageProvider);
+ ImageDescriptor id = imageProvider.getImageDescriptor(IMAGES_BASE+"JSF_COMMANDBUTTON");
+ assertNotNull(id);
+ Image image = id.createImage();
+ assertNotNull(image);
+ image.dispose();
+
+ }
+
+//Comment out till resourceBundleHelper issues on Linux is resolved: https://bugs.eclipse.org/bugs/show_bug.cgi?id=202537
+ public void testResourceBundlerProvider() {
+
+ IResourceBundleProvider bundleProvider = (IResourceBundleProvider)_trait.getSourceModelProvider().getAdapter(IResourceBundleProvider.class);
+ assertNotNull(bundleProvider);
+
+ ResourceBundle bundle = bundleProvider.getResourceBundle();
+ assertNotNull(bundle);
+
+ assertNotNull(bundle.getString("JSFHTML.display-label"));
+ assertEquals("JSF HTML", bundle.getString("JSFHTML.display-label"));
+ assertNotNull(bundle.getString("column.display-label"));
+ assertEquals("Column", bundle.getString("column.display-label"));
+
+ //
+ IProject project = new MockWorkspaceContext().createProject("testProject");
+ IMetaDataDomainContext context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext(project);
+ ITaglibDomainMetaDataQuery query = MetaDataQueryFactory.getInstance().createQuery(context);
+ Model model = query.findTagLibraryModel("RootOfPluginTest");
+ assertNotNull(model);
+ _trait = query.findTrait(model, "T1");
+ assertNotNull(_trait);
+ bundleProvider = (IResourceBundleProvider)_trait.getSourceModelProvider().getAdapter(IResourceBundleProvider.class);
+ assertNotNull(bundleProvider);
+ bundle = bundleProvider.getResourceBundle();
+ assertNotNull(bundle.getString("NLS"));
+ assertEquals("This is externalized text", bundle.getString("NLS"));
+ }
+
+ @SuppressWarnings({ })
+ public void testClassloaderProvider() {
+
+ IClassLoaderProvider classLoaderProvider = (IClassLoaderProvider)_trait.getSourceModelProvider().getAdapter(IClassLoaderProvider.class);
+ assertNotNull(classLoaderProvider);
+ Class<?> klass = classLoaderProvider.loadClass("java.lang.String");
+ assertNotNull(klass);
+
+ // when all MD was moved from WPE to tagsupport plugin, there was no longer a plugin specific class to load here. FIX ME later.
+// klass = classLoaderProvider.loadClass("org.eclipse.jst.pagedesigner.jsf.ui.util.JSFUIPluginResourcesUtil");
+// assertNotNull(klass);
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/TaglibMetaDataQueryTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/TaglibMetaDataQueryTests.java
new file mode 100644
index 000000000..a6a7f8909
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/TaglibMetaDataQueryTests.java
@@ -0,0 +1,279 @@
+/*******************************************************************************
+ * 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 and/or initial documentation
+ *******************************************************************************/
+
+package org.eclipse.jst.jsf.common.metadata.tests.updated;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jst.jsf.common.metadata.Entity;
+import org.eclipse.jst.jsf.common.metadata.Model;
+import org.eclipse.jst.jsf.common.metadata.Trait;
+import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataDomainContext;
+import org.eclipse.jst.jsf.common.metadata.query.IResultSet;
+import org.eclipse.jst.jsf.common.metadata.query.MetaDataException;
+import org.eclipse.jst.jsf.common.metadata.query.internal.AbstractMetaDataQuery;
+import org.eclipse.jst.jsf.common.metadata.query.internal.IPredicateMatcher;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryContextFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.taglib.ITaglibDomainEntityPredicateMatcher;
+import org.eclipse.jst.jsf.common.metadata.query.internal.taglib.ITaglibDomainMetaDataQuery;
+import org.eclipse.jst.jsf.common.metadata.query.internal.taglib.ITaglibDomainPredicateMatcherFactory;
+import org.junit.Before;
+import org.junit.Test;
+
+public class TaglibMetaDataQueryTests extends AbstractBaseMetaDataTestCase {
+
+ private ITaglibDomainMetaDataQuery _query;
+
+ @Before
+ public void setUp() throws Exception {
+ super.setUp();
+ IMetaDataDomainContext context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext(project);
+ _query = MetaDataQueryFactory.getInstance().createQuery(context);
+ assertNotNull(_query);
+ }
+
+ @Test
+ public void testFindTagLibraryModel() {
+ Model model = _query.findTagLibraryModel(baseTestUri);
+ assertNotNull(model);
+ assertEquals(baseTestUri, model.getId());
+
+ Model model2 = _query.findTagLibraryModel(baseTestUri);
+ assertNotNull(model2);
+ assertSame(model, model2);
+
+ Model model3 = _query.findTagLibraryModel("http://org.eclipse.jsf/test2");
+ assertNotNull(model3);
+ assertNotSame(model, model3);
+ }
+
+ @Test
+ public void testFindTagEntity() {
+ Model tagLib = _query.findTagLibraryModel(baseTestUri);
+ assertNotNull(tagLib);
+ Entity tag = _query.findTagEntity(tagLib, "loaded");
+ assertNotNull(tag);
+ assertEquals("loaded", tag.getId());
+ }
+
+ @Test
+ public void testFindTagAttributeEntity() {
+ Model tagLib = _query.findTagLibraryModel(baseTestUri);
+ assertNotNull(tagLib);
+ Entity tag = _query.findTagEntity(tagLib, "loaded");
+ assertNotNull(tag);
+ Entity attr = _query.findTagAttributeEntity(tag, "att2");
+ assertNotNull(attr);
+ assertEquals("att2", attr.getId());
+ }
+
+ @Test
+ public void testFindTrait() {
+ Model tagLib = _query.findTagLibraryModel(baseTestUri);
+ assertNotNull(tagLib);
+ Trait trait = _query.findTrait(tagLib, "model-trait");
+ assertNotNull(trait);
+ }
+
+ @Test
+ public void testAbstractSuper() {
+ assertNotNull(((AbstractMetaDataQuery)_query).getManager());
+ IMetaDataDomainContext context = ((AbstractMetaDataQuery)_query).getDomainContext();
+ assertNotNull(context);
+ assertEquals(domain, context.getDomainId());
+ assertNotNull(context.getAdapter(IProject.class));
+ assertSame(project, context.getAdapter(IProject.class));
+ }
+
+ @Test
+ public void testHelperAvailable() {
+ assertNotNull(_query.getQueryHelper());
+ }
+
+// -----------------------------------------------------------------------------------------------------------------------
+// --- Tests below are implicitly testing the TaglibDomainRegexQueryMatcherFactory and the predicate matchers it produces:
+// --- * TaglibDomainEntityIdRegexPredicateMatcher
+// --- * TaglibDomainTraitIdRegexPredicateMatcher
+
+ @Test
+ public void testFindModelWithQuerySpec() {
+ ITaglibDomainPredicateMatcherFactory matcherFactory = MetaDataQueryContextFactory.getInstance().getTaglibDomainPredicateMatcherFactory();
+ ITaglibDomainEntityPredicateMatcher matcher = matcherFactory.createTagLibraryModelMatcher(baseTestUri);
+ try {
+ IResultSet<Entity> models = _query.findEntities(matcher);
+ assertNotNull(models);
+ assertEquals(1, models.getResults().size());
+ } catch (MetaDataException e) {
+ fail();
+ }
+ }
+
+ @Test
+ public void testFindSingleTagWithQuerySpec() {
+ ITaglibDomainPredicateMatcherFactory matcherFactory = MetaDataQueryContextFactory.getInstance().getTaglibDomainPredicateMatcherFactory();
+ ITaglibDomainEntityPredicateMatcher matcher = matcherFactory.createTagEntityMatcher(baseTestUri, "NLS");
+ try {
+ IResultSet<Entity> entities = _query.findEntities(matcher);
+ assertNotNull(entities);
+ assertEquals(1, entities.getResults().size());
+ } catch (MetaDataException e) {
+ fail();
+ }
+ }
+
+ @Test
+ public void testFindMultipleTagsWithQuerySpec() {
+ ITaglibDomainPredicateMatcherFactory matcherFactory = MetaDataQueryContextFactory.getInstance().getTaglibDomainPredicateMatcherFactory();
+ ITaglibDomainEntityPredicateMatcher matcher = matcherFactory.createTagEntityMatcher(baseTestUri, "loaded");
+ try {
+ IResultSet<Entity> tagEntities = _query.findEntities(matcher);
+ assertNotNull(tagEntities);
+ assertTrue(tagEntities.getResults().size() == 2);
+ } catch (MetaDataException e) {
+ fail();
+ }
+
+ matcher = matcherFactory.createTagEntityMatcher(baseTestUri, ".*");
+ try {
+ IResultSet<Entity> tagEntities = _query.findEntities(matcher);
+ assertNotNull(tagEntities);
+ assertTrue(tagEntities.getResults().size() == 6);
+ } catch (MetaDataException e) {
+ fail();
+ }
+ }
+
+ @Test
+ public void testFindSingleTagAttributeWithQuerySpec() {
+ ITaglibDomainPredicateMatcherFactory matcherFactory = MetaDataQueryContextFactory.getInstance().getTaglibDomainPredicateMatcherFactory();
+ ITaglibDomainEntityPredicateMatcher matcher = matcherFactory.createTagAttributeEntityMatcher(baseTestUri, "loaded", "att2");
+ try {
+ IResultSet<Entity> tagAttrEntities = _query.findEntities(matcher);
+ assertNotNull(tagAttrEntities);
+ assertTrue(tagAttrEntities.getResults().size() == 1);
+ } catch (MetaDataException e) {
+ fail();
+ }
+ }
+
+ @Test
+ public void testFindMultipleTagAttrsWithQuerySpec() {
+ ITaglibDomainPredicateMatcherFactory matcherFactory = MetaDataQueryContextFactory.getInstance().getTaglibDomainPredicateMatcherFactory();
+ ITaglibDomainEntityPredicateMatcher matcher = matcherFactory.createTagAttributeEntityMatcher(baseTestUri, "loaded", ".*");
+ try {
+ IResultSet<Entity> tagAttrEntities = _query.findEntities(matcher);
+ assertNotNull(tagAttrEntities);
+ assertEquals(5, tagAttrEntities.getResults().size()); //4 from 1st loaded, plus 1 from second
+ } catch (MetaDataException e) {
+ fail();
+ }
+
+ matcher = matcherFactory.createTagAttributeEntityMatcher(baseTestUri, "NLS", ".*");
+ try {
+ IResultSet<Entity> tagAttrEntities = _query.findEntities(matcher);
+ assertNotNull(tagAttrEntities);
+ assertEquals(1, tagAttrEntities.getResults().size() );
+ } catch (MetaDataException e) {
+ fail();
+ }
+
+ matcher = matcherFactory.createTagAttributeEntityMatcher(baseTestUri, ".*", "att*");
+ try {
+ IResultSet<Entity> tagAttrEntities = _query.findEntities(matcher);
+ assertNotNull(tagAttrEntities);
+ assertEquals(4, tagAttrEntities.getResults().size());
+ } catch (MetaDataException e) {
+ fail();
+ }
+ }
+
+ @Test
+ public void testFindSingleTagAttrWithMultiQuerySpec() {
+ ITaglibDomainPredicateMatcherFactory matcherFactory = MetaDataQueryContextFactory.getInstance().getTaglibDomainPredicateMatcherFactory();
+ ITaglibDomainEntityPredicateMatcher matcher = matcherFactory.createTagAttributeEntityMatcher(baseTestUri, "loaded", ".*");
+ Entity tagAttrEntity = _query.findEntity(matcher);
+ assertNotNull(tagAttrEntity);
+ }
+
+ @Test
+ public void testFindSingleTraitWithSingleEntityQuerySpec() {
+ ITaglibDomainPredicateMatcherFactory matcherFactory = MetaDataQueryContextFactory.getInstance().getTaglibDomainPredicateMatcherFactory();
+ ITaglibDomainEntityPredicateMatcher entityMatcher = matcherFactory.createTagAttributeEntityMatcher(baseTestUri, "loaded", "att2");
+ IPredicateMatcher<Trait> traitMatcher = matcherFactory.createTraitMatcher("A2");
+ try {
+ IResultSet<Trait> traits = _query.findTraits(entityMatcher, traitMatcher);
+ assertNotNull(traits );
+ assertEquals(1, traits.getResults().size());
+ } catch (MetaDataException e) {
+ fail();
+ }
+ }
+
+ @Test
+ public void testFindMultipleTraitsWithSingleEntityQuerySpec() {
+
+ ITaglibDomainPredicateMatcherFactory matcherFactory = MetaDataQueryContextFactory.getInstance().getTaglibDomainPredicateMatcherFactory();
+ ITaglibDomainEntityPredicateMatcher entityMatcher = matcherFactory.createTagAttributeEntityMatcher(baseTestUri, "loaded", "att2");
+
+ //which traits beginning with "A" are available on "loaded" tag
+ IPredicateMatcher<Trait> traitMatcher = matcherFactory.createTraitMatcher("^[AB]2");
+ try {
+ IResultSet<Trait> traits = _query.findTraits(entityMatcher, traitMatcher);
+ assertNotNull(traits );
+ assertEquals(2, traits.getResults().size());
+ } catch (MetaDataException e) {
+ fail();
+ }
+ }
+
+ @Test
+ public void testFindMultipleTraitsWithMultipleEntityQuerySpec() {
+ ITaglibDomainPredicateMatcherFactory matcherFactory = MetaDataQueryContextFactory.getInstance().getTaglibDomainPredicateMatcherFactory();
+ ITaglibDomainEntityPredicateMatcher entityMatcher = matcherFactory.createTagEntityMatcher(baseTestUri, ".*");
+ //which traits beginning with "A" are available on any tag
+ IPredicateMatcher<Trait> traitMatcher = matcherFactory.createTraitMatcher("^A.*");
+ try {
+ IResultSet<Trait> traits = _query.findTraits(entityMatcher, traitMatcher);
+ assertNotNull(traits);
+ assertEquals(2, traits.getResults().size());
+ } catch (MetaDataException e) {
+ fail();
+ }
+
+ //which traits beginning with "A" or "a" are available on any tag attribute
+ entityMatcher = matcherFactory.createTagAttributeEntityMatcher(baseTestUri, ".*", ".*");
+ traitMatcher = matcherFactory.createTraitMatcher("^[aA].*");
+ try {
+ IResultSet<Trait> traits = _query.findTraits(entityMatcher, traitMatcher);
+ assertNotNull(traits);
+ assertEquals(6, traits.getResults().size());
+ } catch (MetaDataException e) {
+ fail();
+ }
+ }
+
+ @Test
+ public void testFindSingleTraitFromMultipleEntityQuerySpecWithSearchControl() {
+ ITaglibDomainPredicateMatcherFactory matcherFactory = MetaDataQueryContextFactory.getInstance().getTaglibDomainPredicateMatcherFactory();
+ ITaglibDomainEntityPredicateMatcher entityMatcher = matcherFactory.createTagEntityMatcher(baseTestUri, ".*");
+ //which traits beginning with "A" are available on any tag... but stop and return only the first
+ IPredicateMatcher<Trait> traitMatcher = matcherFactory.createTraitMatcher("^A.*");
+ Trait trait = _query.findTrait(entityMatcher, traitMatcher);
+ assertNotNull(trait);
+
+ //which traits beginning with "A" or "a" are available on any tag attribute... but stop and return only the first
+ entityMatcher = matcherFactory.createTagAttributeEntityMatcher(baseTestUri, ".*", ".*");
+ traitMatcher = matcherFactory.createTraitMatcher("^[aA].*");
+ trait = _query.findTrait(entityMatcher, traitMatcher);
+ assertNotNull(trait);
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/TestMDModelManagerFactory.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/TestMDModelManagerFactory.java
new file mode 100644
index 000000000..b39a42f03
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/TestMDModelManagerFactory.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * 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 and/or initial documentation
+ *******************************************************************************/
+
+package org.eclipse.jst.jsf.common.metadata.tests.updated;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jst.jsf.common.metadata.Model;
+import org.eclipse.jst.jsf.common.metadata.internal.AbstractMetaDataModelManager;
+import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataModelContext;
+import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataModelManager;
+import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataModelManagerFactory;
+
+
+public class TestMDModelManagerFactory implements IMetaDataModelManagerFactory {
+
+ public IMetaDataModelManager getInstance(IResource projectOrWorkspaceRoot) {
+ return new TestMDModelManager();
+ }
+
+ private static class TestMDModelManager extends AbstractMetaDataModelManager {
+
+ public Model getModel(IMetaDataModelContext modelContext) {
+ return null;
+ }
+
+ @SuppressWarnings("unused")
+ public Object getAdapter(Class adapter) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/TinyTestTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/TinyTestTests.java
new file mode 100644
index 000000000..1104ff144
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/TinyTestTests.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * 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.common.metadata.tests.updated;
+
+import org.eclipse.emf.ecore.xml.type.AnyType;
+import org.eclipse.jst.jsf.common.metadata.Entity;
+import org.eclipse.jst.jsf.common.metadata.Model;
+import org.eclipse.jst.jsf.common.metadata.Trait;
+import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataDomainContext;
+import org.eclipse.jst.jsf.common.metadata.internal.TraitValueHelper;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryContextFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.taglib.ITaglibDomainMetaDataQuery;
+import org.eclipse.jst.jsf.common.metadata.tests.AbstractBaseMetaDataTestCase;
+
+public class TinyTestTests extends AbstractBaseMetaDataTestCase {
+ Model model;
+ Trait trait;
+ private ITaglibDomainMetaDataQuery _query;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ String uri = "http://org.eclipse.jsf/tinytest";
+
+ IMetaDataDomainContext context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext(project);
+ _query = MetaDataQueryFactory.getInstance().createQuery(context);
+ model = _query.findTagLibraryModel(uri);
+ assertNotNull(model);
+ }
+
+ public void testGetValue() {
+ Entity entity = _query.findTagEntity(model, "A/copy1");
+ assertNotNull(entity);
+ trait = _query.findTrait(entity, "model-trait");
+ assertNotNull(trait);
+ assertNotNull(trait.getValue());
+ assertTrue(trait.getValue() instanceof AnyType);
+ assertEquals("ATrait", TraitValueHelper.getValueAsString(trait));
+
+ entity = _query.getQueryHelper().getEntity(model, "B/copy1");
+ assertNotNull(entity);
+ trait = _query.findTrait(entity, "model-trait");
+ assertNotNull(trait);
+ assertNotNull(trait.getValue());
+ assertTrue(trait.getValue() instanceof AnyType);
+ assertEquals("ATrait", TraitValueHelper.getValueAsString(trait));
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/TraitImplTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/TraitImplTests.java
new file mode 100644
index 000000000..c62e55267
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/TraitImplTests.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * 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.common.metadata.tests.updated;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jst.jsf.common.metadata.Model;
+import org.eclipse.jst.jsf.common.metadata.Trait;
+import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataDomainContext;
+import org.eclipse.jst.jsf.common.metadata.internal.TraitValueHelper;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryContextFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.taglib.ITaglibDomainMetaDataQuery;
+import org.eclipse.jst.jsf.common.metadata.tests.AbstractBaseMetaDataTestCase;
+
+public class TraitImplTests extends AbstractBaseMetaDataTestCase {
+ Model model;
+ Trait trait;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ IMetaDataDomainContext context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext((IProject)null);
+ ITaglibDomainMetaDataQuery query = MetaDataQueryFactory.getInstance().createQuery(context);
+ model = query.findTagLibraryModel(baseTestUri);
+ assertNotNull(model);
+ trait = query.getQueryHelper().getTrait(baseTestUri, "loaded", "A");
+ assertNotNull(trait);
+ }
+
+ public void testGetValue() {
+ assertNotNull(trait.getValue());
+ assertTrue(trait.getValue() instanceof EObject);
+ assertEquals("a", TraitValueHelper.getValueAsString(trait));
+ }
+
+ public void testSetValue() {
+// fail("Not yet implemented");
+ }
+
+ public void testGetSourceModel() {
+ assertNotNull(trait.getSourceModelProvider());
+ assertTrue(trait.getSourceModelProvider().getSourceModel() instanceof Model);
+ }
+
+ public void testSetSourceModel() {
+// Set during model load. no need to test.
+ }
+
+ public void testGetId() {
+ //id
+ assertNotNull(trait.getId());
+ assertEquals("A", trait.getId() );
+ }
+
+ public void testSetId() {
+ String id = trait.getId();
+ trait.setId("new");
+ assertEquals("new",trait.getId());
+ trait.setId(id);
+ }
+
+ public void testAccept() {
+// Excercised by Query tests
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/TraitValueHelperTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/TraitValueHelperTests.java
new file mode 100644
index 000000000..b63061fac
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/common/metadata/tests/updated/TraitValueHelperTests.java
@@ -0,0 +1,271 @@
+/*******************************************************************************
+ * Copyright (c) 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.common.metadata.tests.updated;
+
+import java.util.List;
+import java.util.Locale;
+
+import junit.framework.Assert;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.xml.type.SimpleAnyType;
+import org.eclipse.jst.jsf.common.metadata.Entity;
+import org.eclipse.jst.jsf.common.metadata.Model;
+import org.eclipse.jst.jsf.common.metadata.Trait;
+import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataDomainContext;
+import org.eclipse.jst.jsf.common.metadata.internal.TraitValueHelper2;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryContextFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.taglib.ITaglibDomainMetaDataQuery;
+import org.eclipse.jst.jsf.common.metadata.traittypes.traittypes.ListOfValues;
+import org.eclipse.jst.jsf.test.util.ConfigurableTestCase;
+
+public class TraitValueHelperTests extends ConfigurableTestCase {
+ private final String uri = "http://org.eclipse.jsf/traithelpertest";
+ private Entity entity;
+ private Entity nlsEntity;
+ private ITaglibDomainMetaDataQuery _query;
+ private TraitValueHelper2 _helper;
+
+ public TraitValueHelperTests(){
+ super();
+ }
+
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ IMetaDataDomainContext context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext((IProject)null);
+ _query = MetaDataQueryFactory.getInstance().createQuery(context);
+ entity = _query.getQueryHelper().getEntity(uri, "tag/attr1");
+ Assert.assertNotNull(entity);
+
+ nlsEntity = _query.getQueryHelper().getEntity(uri, "NLS/NLS");
+ Assert.assertNotNull(nlsEntity);
+
+ _helper = new TraitValueHelper2();
+ }
+
+ public void testGetValueType() {
+ //singleString
+ Trait trait = _query.getQueryHelper().getTrait(entity, "singleString");
+ Assert.assertNotNull(trait);
+ Assert.assertEquals("AnyType", _helper.getValueType(trait).getName());
+
+ //anInteger
+ trait = _query.getQueryHelper().getTrait(entity, "anInteger");
+ Assert.assertNotNull(trait);
+ Assert.assertEquals("AnyType", _helper.getValueType(trait).getName());
+
+ //multivalStrings
+ trait = _query.getQueryHelper().getTrait(entity, "multivalStrings");
+ Assert.assertNotNull(trait);
+ Assert.assertEquals("ListOfValues", _helper.getValueType(trait).getName());
+
+ //multivalIntegers
+ trait = _query.getQueryHelper().getTrait(entity, "multivalIntegers");
+ Assert.assertNotNull(trait);
+ Assert.assertEquals("ListOfValues", _helper.getValueType(trait).getName());
+
+ //null tests
+ Assert.assertNull( _helper.getValueType(null));
+ EObject val = trait.getValue();
+ trait.setValue(null);
+ Assert.assertNull( _helper.getValueType(trait));
+ trait.setValue(val);
+
+ trait = _query.getQueryHelper().getTrait(entity, "NullVal");
+ Assert.assertNotNull(trait);
+ Assert.assertEquals("AnyType", _helper.getValueType(trait).getName());
+ }
+
+ public void testGetValue() {
+ //singleString
+ Trait trait = _query.getQueryHelper().getTrait(entity, "singleString");
+ Assert.assertNotNull(trait);
+ Assert.assertEquals("AString", (String)_helper.getValue(trait));
+
+ //anInteger
+ trait = _query.getQueryHelper().getTrait(entity, "anInteger");
+ Assert.assertNotNull(trait);
+ Assert.assertEquals(1, Integer.parseInt((String)_helper.getValue(trait)));
+
+ //aTrueInt
+ trait = _query.getQueryHelper().getTrait(entity, "aTrueInt");
+ Assert.assertNotNull(trait);
+ Assert.assertNotNull(trait.getValue());
+ Assert.assertTrue(trait.getValue() instanceof SimpleAnyType);
+ Assert.assertTrue(((SimpleAnyType)trait.getValue()).getInstanceType().getInstanceClassName().equals("int"));
+ Assert.assertEquals("1", _helper.getValue(trait));
+
+ //null tests
+ Assert.assertNull( _helper.getValue(null));
+ EObject val = trait.getValue();
+ trait.setValue(null);
+ Assert.assertNull( _helper.getValue(trait));
+ //reset
+ trait.setValue(val);
+
+ trait = _query.getQueryHelper().getTrait(entity, "NullVal");
+ Assert.assertNotNull(trait);
+ Assert.assertNull(_helper.getValue(trait));
+ }
+
+ public void testGetValueAsString() {
+ //singleString
+ Trait trait = _query.getQueryHelper().getTrait(entity, "singleString");
+ Assert.assertNotNull(trait);
+ Assert.assertEquals("AString", _helper.getValueAsString(trait));
+
+ //anInteger
+ trait = _query.getQueryHelper().getTrait(entity, "anInteger");
+ Assert.assertNotNull(trait);
+ Assert.assertEquals("1", _helper.getValueAsString(trait));
+
+
+ //null tests
+ Assert.assertNull( _helper.getValue(null));
+ EObject val = trait.getValue();
+ trait.setValue(null);
+ Assert.assertNull( _helper.getValue(trait));
+ trait.setValue(val);
+
+ trait = _query.getQueryHelper().getTrait(entity, "NullVal");
+ Assert.assertNotNull(trait);
+ Assert.assertEquals(null, _helper.getValueAsString(trait));
+ }
+
+ public void testGetValueAsListOfStrings() {
+ //multivalStrings
+ Trait trait = _query.getQueryHelper().getTrait(entity, "multivalStrings");
+ Assert.assertNotNull(trait);
+ Assert.assertTrue(_helper.getValueAsListOfStrings(trait) instanceof List<?>);
+ List<?> vals = _helper.getValueAsListOfStrings(trait);
+ Assert.assertEquals(3, vals.size());
+ Assert.assertTrue(vals.get(0) instanceof String);
+ Assert.assertEquals("A", (String)vals.get(0));
+ Assert.assertEquals("B", (String)vals.get(1));
+ Assert.assertEquals("C", (String)vals.get(2));
+
+ //multivalIntegers
+ trait = _query.getQueryHelper().getTrait(entity, "multivalIntegers");
+ Assert.assertNotNull(trait);
+ Assert.assertTrue(_helper.getValueAsListOfStrings(trait) instanceof List<?>);
+ vals = _helper.getValueAsListOfStrings(trait);
+ Assert.assertEquals(3, vals.size());
+ Assert.assertTrue(vals.get(0) instanceof String);
+ Assert.assertEquals("1", (String)vals.get(0));
+ Assert.assertEquals("2", (String)vals.get(1));
+ Assert.assertEquals("3", (String)vals.get(2));
+ }
+
+ public void testGetNLSValue() {
+ //single NLS String
+ Trait trait = _query.getQueryHelper().getTrait(nlsEntity, "NLS");
+ Assert.assertNotNull(trait);
+ Assert.assertEquals("%NLS1", _helper.getValue(trait));
+ if (Locale.getDefault().getCountry().equalsIgnoreCase("us") &&
+ Locale.getDefault().getLanguage().equalsIgnoreCase("en")) {
+ Assert.assertEquals("a day in the life(en_US)", _helper.getValueAsString(trait));
+ }
+
+ //multiple NLS Strings
+ trait = _query.getQueryHelper().getTrait(nlsEntity, "multivalNLS");
+ Assert.assertNotNull(trait);
+ Assert.assertNotNull(trait.getValue());
+ Assert.assertTrue(trait.getValue() instanceof ListOfValues);
+ List<?> vals = _helper.getValueAsListOfStrings(trait);
+ Assert.assertEquals(2, vals.size());
+ if (Locale.getDefault().getCountry().equalsIgnoreCase("us") &&
+ Locale.getDefault().getLanguage().equalsIgnoreCase("en")) {
+ Assert.assertEquals("a day in the life(en_US)", vals.get(0));
+ Assert.assertEquals("another string(en_US)", vals.get(1));
+ }
+
+ trait = _query.getQueryHelper().getTrait(entity, "NullVal");
+ Assert.assertNotNull(trait);
+ Assert.assertEquals(null, _helper.getValueAsString(trait));
+ }
+
+ public void testGetValueAsBoolean() {
+ //valid true
+ Trait trait = _query.getQueryHelper().getTrait(entity, "BooleanVal");
+ Assert.assertNotNull(trait);
+ Assert.assertNotNull(trait.getValue());
+ Assert.assertEquals(true, _helper.getValueAsBoolean(trait));
+
+ trait = _query.getQueryHelper().getTrait(entity, "NullBooleanVal");
+ Assert.assertNotNull(trait);
+ Assert.assertNotNull(trait.getValue());
+ Assert.assertEquals(false, _helper.getValueAsBoolean(trait));
+ }
+
+ public void testStringValueType() {
+ final Model m = _query.getQueryHelper().getModel(uri);
+ assertNotNull(m);
+
+ final Trait t = _query.getQueryHelper().getTrait( m, "TraitId");
+ assertNotNull(t);
+
+ final EObject obj = (EObject)t.getValue();
+ assertEquals("StringValue", obj.eClass().getName());
+ assertEquals("TraitValue", _helper.getValueAsString(t));
+
+ }
+
+ public void testBooleanValueType() {
+ final Model m = _query.getQueryHelper().getModel(uri);
+ assertNotNull(m);
+
+ //true
+ final Trait t2 = _query.getQueryHelper().getTrait( m, "TraitId2");
+ assertNotNull(t2);
+
+ final EObject obj2 = (EObject)t2.getValue();
+ assertEquals("BooleanValue", obj2.eClass().getName());
+ assertEquals(true, _helper.getValueAsBoolean(t2));
+ assertEquals("true", _helper.getValueAsString(t2));
+
+ //false
+ final Trait t3 = _query.getQueryHelper().getTrait( m, "TraitId3");
+ assertNotNull(t3);
+
+ final EObject obj3 = (EObject)t3.getValue();
+ assertEquals("BooleanValue", obj3.eClass().getName());
+ assertEquals(false, _helper.getValueAsBoolean(t3));
+
+ }
+
+// @SuppressWarnings("restriction")
+// public void testGetValueInstanceClassName() {
+// Trait trait = _query.getQueryHelper().getTrait(entity, "singleString");
+// Assert.assertNotNull(trait);
+// Assert.assertNotNull(trait.getValue());
+// Assert.assertEquals("java.lang.String", _helper.getValueInstanceClassName(trait));
+//
+// trait = _query.getQueryHelper().getTrait(entity, "anInteger");
+// Assert.assertNotNull(trait);
+// Assert.assertNotNull(trait.getValue());
+// Assert.assertEquals("java.lang.String", _helper.getValueInstanceClassName(trait));
+//
+// trait = _query.getQueryHelper().getTrait(entity, "aTrueInt");
+// Assert.assertNotNull(trait);
+// Assert.assertNotNull(trait.getValue());
+// Assert.assertEquals("int", _helper.getValueInstanceClassName(trait));
+//
+// trait = _query.getQueryHelper().getTrait(entity, "multivalStrings");
+// Assert.assertNotNull(trait);
+// Assert.assertNotNull(trait.getValue());
+// Assert.assertEquals("org.eclipse.jst.jsf.common.metadata.traittypes.traittypes.internal.impl.ListOfValuesImpl", _helper.getValueInstanceClassName(trait));
+//
+// }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/AllTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/AllTests.java
new file mode 100644
index 000000000..253bb36bb
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/AllTests.java
@@ -0,0 +1,208 @@
+/*******************************************************************************
+ * 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:
+ * Gerry Kessler/Oracle - initial API and implementation
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.jst.jsf.common.metadata.tests.AllDeprecatedMetadataTests;
+import org.eclipse.jst.jsf.common.metadata.tests.updated.AllUpdatedMetadataTests;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
+import org.eclipse.jst.jsf.metadata.tests.metadataprocessing.AttributeValueRuntimeTypeExtensionsTests;
+import org.eclipse.jst.jsf.metadata.tests.metadataprocessing.AttributeValueRuntimeTypeFactoryTests;
+import org.eclipse.jst.jsf.metadata.tests.metadataprocessing.AttributeValueRuntimeTypesRegistryTests;
+import org.eclipse.jst.jsf.metadata.tests.metadataprocessing.MetaDataProcessorsFactoryTests;
+import org.eclipse.jst.jsf.metadata.tests.pagedesigner.PaletteTests;
+import org.eclipse.jst.jsf.metadata.tests.pagedesigner.PropertyDescriptorTests;
+import org.eclipse.jst.jsf.metadata.tests.pagedesigner.QuickEditSectionsTests;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.ActionTypeTests;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.BooleanTypeTest;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.CSSClassTypeTests;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.CSSStyleTypeTests;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.CharacterTypeTest;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.ColorTypeTest;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.ComponentBindingTypeTests;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.ComponentIDTypeTests;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.ContentTypeTest;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.CurrencyCodeTypeTest;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.DoubleTypeTest;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.EnumeratedDoubleTypeTest;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.EnumeratedIntegerTypeTest;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.EnumeratedLongTypeTest;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.FacesConfigConverterIDTypeTests;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.FacesConfigValidatorIDTypeTests;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.IntegerTypeTest;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.JSFHTMLTestCase;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.JavaClassTypeTest;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.LanguageCodeTypeTest;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.LengthTypeTest;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.LinkTypeTest;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.LocaleTypeTest;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.LongTypeTest;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.MethodBindingTypeTests;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.NumberPatternTypeTest;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.StringTypeTest;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.TimeZoneTypeTest;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.ValueBindingTypeTests;
+import org.eclipse.jst.jsf.metadata.tests.taglibprocessing.ValueTypeTests;
+import org.eclipse.jst.jsf.metadata.tests.util.IJSFRuntimeRequiredV11;
+import org.eclipse.jst.jsf.metadata.tests.util.IJSFRuntimeRequiredV12;
+
+public class AllTests {
+
+ private static boolean _inited;
+ private static boolean _jsfRuntimePresentV11;
+ private static boolean _jsfRuntimePresentV12;
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite(
+ "Test Suite for org.eclipse.jst.jsf.metadata.tests");
+ //$JUnit-BEGIN$
+
+// //model
+// addTestSuite(suite, TraitImplTests.class);
+// addTestSuite(suite, IncludeEntityGroupImplTests.class);
+// addTestSuite(suite, EntityImplTests.class);
+// addTestSuite(suite, ModelImplTests.class);
+// addTestSuite(suite, MergeTests.class);
+// addTestSuite(suite, TinyTestTests.class);
+//
+// addTestSuite(suite, MissingMDExtensionModelTests.class);
+//
+//// //query + main API
+// addTestSuite(suite, EmptyResultSetTest.class);
+// addTestSuite(suite, MetaDataExceptionTest.class);
+// addTestSuite(suite, AbstractMetaDataVisitorTest.class);
+// addTestSuite(suite, AbstractEntityQueryVisitorTest.class);
+// addTestSuite(suite, AbstractTraitQueryVisitorTest.class);
+// addTestSuite(suite, MetaDataQueryHelperTests.class);
+// addTestSuite(suite, TraitValueHelperTests.class);
+// addTestSuite(suite, ModelProviderAdapterTests.class);
+
+ suite.addTest(AllDeprecatedMetadataTests.suite());
+ suite.addTest(AllUpdatedMetadataTests.suite());
+
+// //metadataprocessing
+ addTestSuite(suite, MetaDataProcessorsFactoryTests.class);
+ addTestSuite(suite, AttributeValueRuntimeTypeExtensionsTests.class);
+ addTestSuite(suite, AttributeValueRuntimeTypesRegistryTests.class);
+ addTestSuite(suite, AttributeValueRuntimeTypeFactoryTests.class);
+
+ //PageDesigner Metadata tests
+ addTestSuite(suite, PropertyDescriptorTests.class);
+ addTestSuite(suite, QuickEditSectionsTests.class);
+
+// //taglib processing
+ //Tests NOT requiring JSF Implementation
+ addTestSuite(suite, StringTypeTest.class);
+ addTestSuite(suite, BooleanTypeTest.class);
+ addTestSuite(suite, IntegerTypeTest.class);
+ addTestSuite(suite, EnumeratedIntegerTypeTest.class);
+ addTestSuite(suite, LongTypeTest.class);
+ addTestSuite(suite, EnumeratedLongTypeTest.class);
+ addTestSuite(suite, DoubleTypeTest.class);
+ addTestSuite(suite, EnumeratedDoubleTypeTest.class);
+
+ addTestSuite(suite, ColorTypeTest.class);
+ addTestSuite(suite, LanguageCodeTypeTest.class);
+ addTestSuite(suite, LocaleTypeTest.class);
+ addTestSuite(suite, CurrencyCodeTypeTest.class);
+ addTestSuite(suite, TimeZoneTypeTest.class);
+ addTestSuite(suite, LengthTypeTest.class);
+ addTestSuite(suite, NumberPatternTypeTest.class);
+// addTestSuite(suite, RelativePathTypeTest.class);
+// addTestSuite(suite, WebPathTypeTest.class);
+ addTestSuite(suite, CharacterTypeTest.class);
+// addTestSuite(suite, ScriptTypeTest.class);
+ addTestSuite(suite, LinkTypeTest.class);
+ addTestSuite(suite, ContentTypeTest.class);
+// addTestSuite(suite, URITypeTest.class);
+
+ //Tests requiring JSF Implementation
+ addTestSuite(suite, JavaClassTypeTest.class);
+ addTestSuite(suite, FacesConfigConverterIDTypeTests.class);
+ addTestSuite(suite, FacesConfigValidatorIDTypeTests.class);
+ addTestSuite(suite, MethodBindingTypeTests.class);
+ addTestSuite(suite, ComponentIDTypeTests.class);
+ addTestSuite(suite, ComponentBindingTypeTests.class);
+ addTestSuite(suite, ValueBindingTypeTests.class);
+ addTestSuite(suite, ValueTypeTests.class);
+ addTestSuite(suite, ActionTypeTests.class);
+
+ addTestSuite(suite, CSSClassTypeTests.class);
+ addTestSuite(suite, CSSStyleTypeTests.class);
+
+ addTestSuite(suite, JSFHTMLTestCase.class);
+// addTestSuite(suite, JSFCoreTestCase.class);
+ addTestSuite(suite, PaletteTests.class);
+
+ //$JUnit-END$
+ return suite;
+ }
+
+ private static void addTestSuite(TestSuite suite, Class<? extends TestCase> klass) {
+ if (!_inited) {
+ _jsfRuntimePresentV11 = JSFCoreUtilHelper.isJSFRuntimeJarsDirectoryPropertySet(JSFVersion.V1_1);
+ _jsfRuntimePresentV12 = JSFCoreUtilHelper.isJSFRuntimeJarsDirectoryPropertySet(JSFVersion.V1_2);
+ _inited = true;
+ }
+ if (IJSFRuntimeRequiredV11.class.isAssignableFrom(klass)){
+ if (_jsfRuntimePresentV11)
+ suite.addTestSuite(klass);
+ else
+ System.err.println("Warning: JSF Runtime v1.1 is required and not present - "+klass.getName()+" test was skipped.");
+ } else if (IJSFRuntimeRequiredV12.class.isAssignableFrom(klass)){
+ if (_jsfRuntimePresentV12)
+ suite.addTestSuite(klass);
+ else
+ System.err.println("Warning: JSF Runtime v1.2 is required and not present - "+klass.getName()+" test was skipped.");
+ } else {
+ suite.addTestSuite(klass);
+ }
+ }
+
+ /**
+ * Old tests that no longer need to run since moving to new metadata system
+ */
+ public void Oldsuite() {
+// TestSuite suite = new TestSuite(
+// "Test for org.eclipse.jst.jsf.metadata.tests");
+// //$JUnit-BEGIN$
+//
+// //annotations
+// addTestSuite(suite, AnnotationMapTestCases.class);
+// addTestSuite(suite, AnnotationHelperTestCases.class);
+// addTestSuite(suite, DuplicateAnnotationsTestCases.class);
+// addTestSuite(suite, CaseInsensitiveAnnotationsTestCases.class);
+// addTestSuite(suite, NegativeAnnotationFileTestCases.class);
+//
+// //metadataprocessing
+// addTestSuite(suite, MetaDataProcessorsFactoryTests.class);
+// addTestSuite(suite, AttributeValueRuntimeTypeExtensionsTests.class);
+// addTestSuite(suite, AttributeValueRuntimeTypesRegistryTests.class);
+// addTestSuite(suite, AttributeValueRuntimeTypeFactoryTests.class);
+//
+// //taglib processing
+// addTestSuite(suite, StringTypeTest.class);
+// addTestSuite(suite, BooleanTypeTest.class);
+// addTestSuite(suite, IntegerTypeTest.class);
+// addTestSuite(suite, LongTypeTest.class);
+// addTestSuite(suite, DoubleTypeTest.class);
+// addTestSuite(suite, JavaClassTypeTest.class);
+
+ //$JUnit-END$
+// return suite;
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/MetadataTestsPlugin.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/MetadataTestsPlugin.java
new file mode 100644
index 000000000..5e5c5e5a6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/MetadataTestsPlugin.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * 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:
+ * Gerry Kessler/Oracle - initial API and implementation
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class MetadataTestsPlugin extends Plugin {
+
+ public static final String ID_BUNDLE = "org.eclipse.jst.jsf.metadata.tests";
+
+ //The shared instance.
+ private static MetadataTestsPlugin plugin;
+
+ /**
+ * The constructor.
+ */
+ public MetadataTestsPlugin() {
+ 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 shared instance.
+ */
+ public static MetadataTestsPlugin getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/AllMetaDataProcessingTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/AllMetaDataProcessingTests.java
new file mode 100644
index 000000000..f7431b588
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/AllMetaDataProcessingTests.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * 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:
+ * Gerry Kessler/Oracle - initial API and implementation
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.metadataprocessing;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllMetaDataProcessingTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite(
+ "Test suite for org.eclipse.jst.jsf.metadata.tests.metadataprocessing");
+ //$JUnit-BEGIN$
+ suite.addTestSuite(AttributeValueRuntimeTypesRegistryTests.class);
+ suite.addTestSuite(AttributeValueRuntimeTypeFactoryTests.class);
+ suite.addTestSuite(MetaDataProcessorsFactoryTests.class);
+ suite.addTestSuite(AttributeValueRuntimeTypeExtensionsTests.class);
+ //$JUnit-END$
+ return suite;
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/AttributeValueRuntimeTypeExtensionsTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/AttributeValueRuntimeTypeExtensionsTests.java
new file mode 100644
index 000000000..25f454ac9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/AttributeValueRuntimeTypeExtensionsTests.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * 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:
+ * Gerry Kessler/Oracle - initial API and implementation
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.metadataprocessing;
+
+import java.util.List;
+
+import junit.framework.Assert;
+import junit.framework.Test;
+import junit.framework.TestCase;
+
+import org.eclipse.jst.jsf.metadata.tests.metadataprocessing.features.IBarker;
+import org.eclipse.jst.jsf.metadataprocessors.MetaDataEnabledProcessingFactory;
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues;
+
+public class AttributeValueRuntimeTypeExtensionsTests extends TestCase {
+ private String uri1 = "http://org.eclipse.jsf/metadataprocessing";
+
+ public void testBarkerExt(){
+ List<?> barkProcessors = MetaDataEnabledProcessingFactory.getInstance().
+ getAttributeValueRuntimeTypeFeatureProcessors(IBarker.class, null, uri1,
+ "MyTag", "MyLongAttr"); //invalid
+
+ Assert.assertNotNull(barkProcessors);
+ Assert.assertTrue(barkProcessors.isEmpty());
+
+
+ }
+
+ public void testGetPossibleValsWithExtensions(){
+ List<?> processors = MetaDataEnabledProcessingFactory.getInstance().
+ getAttributeValueRuntimeTypeFeatureProcessors(IPossibleValues.class, null, uri1,
+ "MyTag", "BooleanAttr");
+
+ Assert.assertNotNull(processors);
+ Assert.assertFalse(processors.isEmpty());
+ Assert.assertEquals(processors.size(), 2); //there should be a Boolean and BarkProcessor capable of handling IPossibleValues
+// Iterator it = processors.iterator();
+// while (it.hasNext()){
+// dumpPossibleValues((IPossibleValues)it.next());
+// }
+
+ }
+
+ public void testNonFeatureExt(){
+ List<?> testProcessors = MetaDataEnabledProcessingFactory.getInstance().
+ getAttributeValueRuntimeTypeFeatureProcessors(Test.class//invalid
+ ,null, uri1, "MyTag", "BooleanAttr");
+
+ Assert.assertNotNull(testProcessors);
+ Assert.assertTrue(testProcessors.isEmpty());
+
+
+ }
+// private void dumpPossibleValues(IPossibleValues p){
+// Iterator it = p.getPossibleValues().iterator();
+// while (it.hasNext()){
+// System.out.println((String)it.next());
+// }
+// }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/AttributeValueRuntimeTypeFactoryTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/AttributeValueRuntimeTypeFactoryTests.java
new file mode 100644
index 000000000..9b7f4f8e9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/AttributeValueRuntimeTypeFactoryTests.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 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:
+ * Gerry Kessler/Oracle - initial API and implementation
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.metadataprocessing;
+
+import java.util.List;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.eclipse.jst.jsf.metadata.tests.MetadataTestsPlugin;
+import org.eclipse.jst.jsf.metadataprocessors.ITypeDescriptor;
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues;
+import org.eclipse.jst.jsf.metadataprocessors.internal.AttributeValueRuntimeTypeFactory;
+
+public class AttributeValueRuntimeTypeFactoryTests extends TestCase {
+
+ /*
+ * Test method for 'org.eclipse.jst.jsf.metadataprocessors.internal.AttributeValueRuntimeTypeFactory.getTypes(String)'
+ * Also tests the simple AbstractMetaDataEnabledType class
+ */
+ public void testGetTypes() {
+ AttributeValueRuntimeTypeFactory factory = AttributeValueRuntimeTypeFactory.getInstance();
+ Assert.assertNotNull(factory);
+
+ ITypeDescriptor atype = factory.getType(AttributeValueRuntimeTypesRegistryTests.BOOLEANTYPE_ID);
+ Assert.assertNotNull(atype);
+ Assert.assertNotNull(atype.getTypeExtension().getClassName());
+ Assert.assertTrue(atype.getTypeExtension().getBundleID().equals(MetadataTestsPlugin.ID_BUNDLE));
+ Assert.assertTrue(atype.getTypeExtension().getTypeID().equals(AttributeValueRuntimeTypesRegistryTests.BOOLEANTYPE_ID));
+ List<?> features = atype.getFeatureAdapters(IPossibleValues.class);
+ Assert.assertNotNull(features);
+ Assert.assertFalse(features.isEmpty());
+ Assert.assertEquals(2, features.size()); //we expect MyBooleanType and MetaDataEnabledBarkProcessor
+
+ atype = factory.getType(AttributeValueRuntimeTypesRegistryTests.STRINGARRAYTYPE_ID);
+ Assert.assertNotNull(atype);
+ Assert.assertNotNull(atype.getTypeExtension().getClassName());
+ Assert.assertTrue(atype.getTypeExtension().getBundleID().equals(MetadataTestsPlugin.ID_BUNDLE));
+ Assert.assertTrue(atype.getTypeExtension().getTypeID().equals(AttributeValueRuntimeTypesRegistryTests.STRINGARRAYTYPE_ID));
+
+ }
+
+ public void testNoImplTest(){
+ AttributeValueRuntimeTypeFactory factory = AttributeValueRuntimeTypeFactory.getInstance();
+ Assert.assertNotNull(factory);
+
+ ITypeDescriptor atype = factory.getType(AttributeValueRuntimeTypesRegistryTests.NOIMPLTYPE_ID);
+ Assert.assertNotNull(atype);
+ Assert.assertNotNull(atype.getTypeExtension().getClassName());
+ Assert.assertTrue(atype.getTypeExtension().getBundleID().equals(MetadataTestsPlugin.ID_BUNDLE));
+
+ }
+
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/AttributeValueRuntimeTypesRegistryTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/AttributeValueRuntimeTypesRegistryTests.java
new file mode 100644
index 000000000..6768547e8
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/AttributeValueRuntimeTypesRegistryTests.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 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:
+ * Gerry Kessler/Oracle - initial API and implementation
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.metadataprocessing;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.eclipse.jst.jsf.metadata.tests.MetadataTestsPlugin;
+import org.eclipse.jst.jsf.metadataprocessors.internal.AbstractMetaDataEnabledType;
+import org.eclipse.jst.jsf.metadataprocessors.internal.AttributeValueRuntimeTypeRegistry;
+
+public class AttributeValueRuntimeTypesRegistryTests extends TestCase {
+ public final static String BOOLEANTYPE_ID = MetadataTestsPlugin.ID_BUNDLE + ".MyBooleanType";
+ public final static String STRINGARRAYTYPE_ID = MetadataTestsPlugin.ID_BUNDLE + ".MyStringArrayType";
+ public final static String NOIMPLTYPE_ID = MetadataTestsPlugin.ID_BUNDLE + ".NoImplType";
+
+ /*
+ * Test method for 'org.eclipse.jst.jsf.metadataprocessors.internal.AbstractMetaDataEnabledTypeRegistry.getTypes(String)'
+ */
+ public void testGetTypes() {
+ AttributeValueRuntimeTypeRegistry reg = AttributeValueRuntimeTypeRegistry.getInstance();
+
+ Assert.assertNotNull(reg.getType(BOOLEANTYPE_ID));
+ Object obj = reg.getType(BOOLEANTYPE_ID);
+ Assert.assertTrue( obj instanceof AbstractMetaDataEnabledType);
+ AbstractMetaDataEnabledType type = (AbstractMetaDataEnabledType)obj;
+
+ Assert.assertTrue(type.getBundleID().equals(MetadataTestsPlugin.ID_BUNDLE));
+ Assert.assertTrue(type.getTypeID().equals(BOOLEANTYPE_ID));
+ Assert.assertTrue(type.getClassName().equals("org.eclipse.jst.jsf.metadata.tests.metadataprocessing.types.MyBooleanType"));
+
+ Assert.assertNotNull(reg.getType(STRINGARRAYTYPE_ID));
+ obj = reg.getType(STRINGARRAYTYPE_ID);
+ Assert.assertTrue( obj instanceof AbstractMetaDataEnabledType);
+ type = (AbstractMetaDataEnabledType)obj;
+
+ Assert.assertTrue(type.getBundleID().equals(MetadataTestsPlugin.ID_BUNDLE));
+ Assert.assertTrue(type.getTypeID().equals(STRINGARRAYTYPE_ID));
+ Assert.assertTrue(type.getClassName().equals("org.eclipse.jst.jsf.taglibprocessing.attributevalues.StringType"));
+
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/MetaDataEnabledBarkAdapter.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/MetaDataEnabledBarkAdapter.java
new file mode 100644
index 000000000..6acbf8eb3
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/MetaDataEnabledBarkAdapter.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * 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:
+ * Gerry Kessler/Oracle - initial API and implementation
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.metadataprocessing;
+
+import java.util.List;
+
+import org.eclipse.jst.jsf.metadata.tests.metadataprocessing.features.IBarker;
+import org.eclipse.jst.jsf.metadataprocessors.AbstractMetaDataEnabledFeature;
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues;
+
+/**
+ * Test class implementing existing and new fetaure type for
+ * testing the MetaDataEnabledFeature Extension
+ *
+ * @author Gerry Kessler - Oracle
+ *
+ */
+public class MetaDataEnabledBarkAdapter extends AbstractMetaDataEnabledFeature
+ implements
+ IBarker, IPossibleValues{
+
+ public MetaDataEnabledBarkAdapter() {
+ super();
+ }
+
+ public boolean canBark() {
+ return true;
+ }
+
+ public List<?> getBarks() {
+ return getTraitValueAsListOfStrings("barks");
+// //notice that we want to use the bundle id of the extender
+// return CMAnnotationHelper.getCMAttributePropertyValues(MetadataTestsPlugin.ID_BUNDLE, getCMAnnotationContext().getUri(),
+// getCMAnnotationContext().getElementName(), getCMAnnotationContext().getAttributeName(),
+// "barks");
+ }
+
+ public List<?> getPossibleValues() {
+ return getBarks();
+ }
+
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/MetaDataProcessorsFactoryTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/MetaDataProcessorsFactoryTests.java
new file mode 100644
index 000000000..694f64d70
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/MetaDataProcessorsFactoryTests.java
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 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:
+ * Gerry Kessler/Oracle - initial API and implementation
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.metadataprocessing;
+
+import java.util.Iterator;
+import java.util.List;
+
+import junit.framework.Assert;
+
+import org.eclipse.jst.jsf.common.metadata.tests.AbstractBaseMetaDataTestCase;
+import org.eclipse.jst.jsf.metadata.tests.metadataprocessing.features.IBarker;
+import org.eclipse.jst.jsf.metadataprocessors.MetaDataEnabledProcessingFactory;
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValue;
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues;
+
+public class MetaDataProcessorsFactoryTests extends AbstractBaseMetaDataTestCase {
+ private String uri1 = "http://org.eclipse.jsf/metadataprocessing";
+
+ /*
+ * Test method for
+ * 'org.eclipse.jst.jsf.metadataprocessors.MetaDataEnabledProcessorsFactory.getAttributeValueRuntimeTypeProcessors(Class,
+ * String, String, String)'
+ */
+ public void testGetAttributeValueRuntimeTypeProcessors() {
+
+ List<?> possibleValueProcessors = MetaDataEnabledProcessingFactory.getInstance().
+ getAttributeValueRuntimeTypeFeatureProcessors(IPossibleValues.class, docContext, uri1,
+ "MyTag", "MyBooleanAttr");
+ Assert.assertNotNull(possibleValueProcessors);
+ Assert.assertFalse(possibleValueProcessors.isEmpty());
+ Assert.assertTrue(possibleValueProcessors.size() == 2);
+
+ IPossibleValues processor = (IPossibleValues)possibleValueProcessors.get(0);
+ Assert.assertNotNull(processor.getPossibleValues());
+// dumpPossibleValues(processor);
+
+ possibleValueProcessors = MetaDataEnabledProcessingFactory.getInstance().
+ getAttributeValueRuntimeTypeFeatureProcessors(IPossibleValues.class, docContext, uri1,
+ "MyTag", "MyValidValsAttr");
+
+ Assert.assertNotNull(possibleValueProcessors);
+ Assert.assertFalse(possibleValueProcessors.isEmpty());
+ processor = (IPossibleValues)possibleValueProcessors.get(0);
+ dumpPossibleValues(processor);
+
+ //negative tests
+ //not a valid attribute annotation
+ possibleValueProcessors = MetaDataEnabledProcessingFactory.getInstance().
+ getAttributeValueRuntimeTypeFeatureProcessors(IPossibleValues.class, docContext, uri1,
+ "MyTag", "bogus"); //invalid
+
+ Assert.assertTrue(possibleValueProcessors.isEmpty());
+
+ //missing runtime-type annotation
+ possibleValueProcessors = MetaDataEnabledProcessingFactory.getInstance().
+ getAttributeValueRuntimeTypeFeatureProcessors(IPossibleValues.class, docContext, uri1,
+ "MyTag", "MyNonMetaDataEnabledAttr"); //invalid
+
+ Assert.assertTrue(possibleValueProcessors.isEmpty());
+
+ //missing processor type
+ possibleValueProcessors = MetaDataEnabledProcessingFactory.getInstance().
+ getAttributeValueRuntimeTypeFeatureProcessors(IPossibleValues.class, docContext, uri1,
+ "MyTag", "MyMissingType"); //value in attr-val-runtime-type is invalid
+
+ Assert.assertNotNull(possibleValueProcessors);
+ Assert.assertTrue(possibleValueProcessors.isEmpty());
+
+ //invalid processor - type exists but does not support specified type
+ possibleValueProcessors = MetaDataEnabledProcessingFactory.getInstance().
+ getAttributeValueRuntimeTypeFeatureProcessors(IPossibleValues.class, docContext, uri1,
+ "MyTag", "MyLongAttr"); //invalid
+
+ Assert.assertNotNull(possibleValueProcessors);
+ Assert.assertTrue(possibleValueProcessors.isEmpty());
+
+ //get extended feature - Bark Processors
+ List<?> barkProcessors = MetaDataEnabledProcessingFactory.getInstance().
+ getAttributeValueRuntimeTypeFeatureProcessors(IBarker.class, docContext, uri1,
+ "MyTag", "BooleanAttr"); //invalid
+
+ Assert.assertNotNull(barkProcessors);
+ Assert.assertTrue(!barkProcessors.isEmpty());
+ Assert.assertTrue(barkProcessors.size() == 1);
+
+ IBarker barker = (IBarker)barkProcessors.get(0);
+ Iterator<?> it = barker.getBarks().iterator();
+ while (it.hasNext()){
+ System.out.println((String)it.next());
+ }
+
+ }
+ // IT IS NO LONGER POSSIBLE FOR THE SAME ENTITY TO HAVE MORE THAN ONE TRAIT VALUE FOR THE SAME TRAIT.
+ // NEW METADATA FRAMEWORK WILL MERGE INTO SINGLE MODEL WHERE ONLY THE FIRST TRAIT WILL BE PRESENT
+
+// public void testDualTypeTest(){
+// System.out.println("---------------- DualTypeTest ------------------");
+// //second plugin (metadataprocessingtests2 marks the same attr with another type
+// List possibleValueProcessors = MetaDataEnabledProcessingFactory.getInstance().
+// getAttributeValueRuntimeTypeFeatureProcessors(IPossibleValues.class, null, uri1,
+// "MyTag", "MyDualTypeAttr");
+// Assert.assertNotNull(possibleValueProcessors);
+// Assert.assertEquals(2,possibleValueProcessors.size()); //expect StringType + NoImplPossibleVals
+//
+// List vals = new ArrayList();
+// Iterator it = possibleValueProcessors.iterator();
+// while (it.hasNext()){
+// IPossibleValues p = (IPossibleValues)it.next();
+// vals.addAll(p.getPossibleValues());
+// dumpPossibleValues(p);
+// }
+// Assert.assertTrue(vals.size() == 8);
+// System.out.println("---------------- END DualTypeTest ------------------");
+// }
+
+ private void dumpPossibleValues(IPossibleValues p){
+ Iterator<?> it = p.getPossibleValues().iterator();
+ while (it.hasNext()){
+ Object obj = it.next();
+ if (obj instanceof String)
+ System.out.println((String)obj);
+ else if (obj instanceof IPossibleValue)
+ System.out.println(((IPossibleValue)obj).getDisplayValue());
+ }
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/features/IBarker.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/features/IBarker.java
new file mode 100644
index 000000000..1d84b6e50
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/features/IBarker.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * 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:
+ * Gerry Kessler/Oracle - initial API and implementation
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.metadataprocessing.features;
+
+import java.util.List;
+
+import org.eclipse.jst.jsf.metadataprocessors.IMetaDataEnabledFeature;
+
+public interface IBarker extends IMetaDataEnabledFeature {
+
+ public boolean canBark();
+ public List<?> getBarks();
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/types/MyBooleanType.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/types/MyBooleanType.java
new file mode 100644
index 000000000..70fb00e0b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/types/MyBooleanType.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * 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:
+ * Gerry Kessler/Oracle - initial API and implementation
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.metadataprocessing.types;
+
+import java.util.List;
+
+import org.eclipse.jst.jsf.taglibprocessing.attributevalues.BooleanType;
+
+/**
+ * Subclass of boolean type used by tests to prove feature extensions
+ *
+ */
+public class MyBooleanType extends BooleanType {
+
+ public List<?> getPossibleValues() {
+ System.out.println("MyBooleanType: getPossibleValues()");
+ return super.getPossibleValues();
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/types/MyLongType.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/types/MyLongType.java
new file mode 100644
index 000000000..28d21be49
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/types/MyLongType.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * 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:
+ * Gerry Kessler/Oracle - initial API and implementation
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.metadataprocessing.types;
+
+import org.eclipse.jst.jsf.taglibprocessing.attributevalues.LongType;
+
+/**
+ * Subclass of boolean type used by tests to prove feature extensions
+ *
+ */
+public class MyLongType extends LongType {
+
+ public boolean isValidValue(String value) {
+ System.out.println("MyLongType: isValidValue(value)");
+ return super.isValidValue(value);
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/pagedesigner/PaletteTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/pagedesigner/PaletteTests.java
new file mode 100644
index 000000000..34e9a8706
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/pagedesigner/PaletteTests.java
@@ -0,0 +1,266 @@
+package org.eclipse.jst.jsf.metadata.tests.pagedesigner;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jst.jsf.common.metadata.Model;
+import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataDomainContext;
+import org.eclipse.jst.jsf.common.metadata.query.TaglibDomainMetaDataQueryHelper;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryContextFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.taglib.ITaglibDomainMetaDataQuery;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.internal.tld.ITLDConstants;
+import org.eclipse.jst.jsf.metadata.tests.util.IJSFRuntimeRequiredV11;
+import org.eclipse.jst.jsf.metadata.tests.util.JSPTestCase;
+import org.eclipse.jst.jsp.core.taglib.ITaglibRecord;
+import org.eclipse.jst.jsp.core.taglib.TaglibIndex;
+import org.eclipse.jst.pagedesigner.editors.palette.IPaletteContext;
+import org.eclipse.jst.pagedesigner.editors.palette.TagToolPaletteEntry;
+import org.eclipse.jst.pagedesigner.editors.palette.impl.PaletteItemManager;
+import org.eclipse.jst.pagedesigner.editors.palette.impl.TaglibPaletteDrawer;
+import org.eclipse.wst.html.core.internal.contentmodel.HTMLCMDocumentFactory;
+import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
+import org.eclipse.wst.xml.core.internal.provisional.contentmodel.CMDocType;
+
+/**
+ * Spot tests the palette exercising the PaletteItemManager and PaletteHelper to ensure that the metadata is being loaded properly.
+ *
+ * Assumes Sun v1.1 implementation and that the JSTL v1.1 jstl.jar and standard.jar are present
+ */
+public class PaletteTests extends JSPTestCase implements IJSFRuntimeRequiredV11 {
+
+ private static String HTML_ID = "HTML";
+ private static String HTML_URI = ITLDConstants.URI_HTML.toUpperCase();
+ private static String HTML_LABEL = "HTML 4.0";
+ private static String HTML_DESC = "HTML Tags";
+ private static String HTML_BUTTON_ID = "INPUT.BUTTON";
+ private static String HTML_BUTTON_LABEL = "Button";
+ private static String HTML_BUTTON_DESC = "An INPUT element with TYPE=SUBMIT represents an input option, typically a button, that instructs the user agent to submit the form";
+ private static String HTML_BUTTON_SMALL_ICON = "HTML_INPUT_BUTTON.gif";
+ private static String HTML_A_ID = "a";
+ private static String HTML_A_LABEL = "Link";
+ private static String HTML_A_DESC = "This element allows the user to navigate the content of the document";
+ private static String HTML_A_SMALL_ICON = "HTML_A.gif";
+
+ private static String JSP_ID = "JSP11";//was lower cased... should be http://java.sun.com/jsp/Page
+ private static String JSP_URI = "JSP11";//was lower cased... should be http://java.sun.com/jsp/Page
+ private static String JSP_LABEL = "JSP";
+ private static String JSP_DESC = "JSP Tags";
+ private static String JSP_DIR_INCLUDE_ID = "jsp:directive.include";
+ private static String JSP_DIR_INCLUDE_LABEL = "Directive.Include";
+ private static String JSP_DIR_INCLUDE_DESC = "Includes a resource of text or code when the JSP page is translated";
+ private static String JSP_DIR_INCLUDE_SMALL_ICON = "JSP_DIRECTIVE.INCLUDE.gif";
+
+ private static String JSFHTML_LABEL = "JSF HTML";
+ private static String JSFHTML_DESC = "This tag library contains JavaServer Faces component tags for all UIComponent + HTML RenderKit Renderer combinations defined in the JavaServer Faces Specification.";
+ private static String JSFHTML_DEFAULT_PREFIX = "h";
+ private static String JSFHTML_COMMAND_BTN_ID = "commandButton";
+ private static String JSFHTML_COMMAND_BTN_LABEL = "Command Button";
+ private static String JSFHTML_COMMAND_BTN_DESC = "Renders an HTML \"input\" element.Decode BehaviorObtain the Map from the \"requestParameterMap\" property of the ExternalContext. If the value in theMap for the value of the \"clientId\" property of the component is null, create a String by concatenating t...";
+ private static String JSFHTML_COMMAND_BTN_SMALL_ICON = "JSF_COMMANDBUTTON.gif";
+
+ private static String JSFCORE_LABEL = "JSF Core";
+ private static String JSFCORE_DESC = "The core JavaServer Faces custom actions that are independent of any particular RenderKit.";
+ private static String JSFCORE_DEFAULT_PREFIX = "f";
+ private static String JSFCORE_ACTION_LISTENER_ID = "actionListener";
+ private static String JSFCORE_ACTION_LISTENER_LABEL = "actionListener";
+ private static String JSFCORE_ACTION_LISTENER__DESC = "Register an ActionListener instance on the UIComponent associated with the closest parent UIComponent custom action.";
+ private static String JSFCORE_ACTION_LISTENER_ICON = "JSF_ACTIONLISTENER.gif";
+
+ private static String JSTL_CORE_URI = "http://java.sun.com/jsp/jstl/core";
+ private static String JSTLCORE_LABEL = "JSTL core";
+ private static String JSTLCORE_DESC = "JSTL 1.1 core library";
+ private static String JSTLCORE_DEFAULT_PREFIX = "c";
+ private static String JSTLCORE_IF_ID = "if";
+ private static String JSTLCORE_IF_LABEL = "if";
+ private static String JSTLCORE_IF_DESC = "Simple conditional tag, which evalutes its body if the supplied condition is true and optionally exposes a Boolean scripting variable representing the evaluation of this condition";
+ private static String JSTLCORE_IF_ICON = "PD_Palette_Default.gif";
+
+ public PaletteTests() {
+ super( JSFVersion.V1_1,
+ "/testfiles/web/faces-config_1_1.xml.data");
+
+ }
+
+ @SuppressWarnings("deprecation")
+ public void testLoadJSPModel() {
+ Model JSP11Model = TaglibDomainMetaDataQueryHelper.getModel(
+ TaglibDomainMetaDataQueryHelper.createMetaDataModelContext(
+ _testEnv.getTestProject(), CMDocType.JSP11_DOC_TYPE));
+
+ assertNotNull(JSP11Model);
+
+ Model jsp11Model = TaglibDomainMetaDataQueryHelper.getModel(
+ TaglibDomainMetaDataQueryHelper.createMetaDataModelContext(
+ _testEnv.getTestProject(), "jsp11"));
+
+
+ IMetaDataDomainContext context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext(_testEnv.getTestProject());
+ ITaglibDomainMetaDataQuery query = MetaDataQueryFactory.getInstance().createQuery(context);
+ Model JSP11Model_2 = query.getQueryHelper().getModel(CMDocType.JSP11_DOC_TYPE);
+ assertNotNull(JSP11Model_2);
+ assertSame(jsp11Model, JSP11Model_2);
+
+ Model jsp11Model_2 = query.getQueryHelper().getModel("jsp11");
+ assertNotNull(jsp11Model_2);
+ assertSame(jsp11Model, jsp11Model_2);
+ }
+
+ public void testPalletteDrawers() {
+ final IFile file = _testEnv.getTestProject().getFile("xxx.jsp");//note jsp does not need to exist
+ final IPaletteContext context = PaletteItemManager.createPaletteContext(file);
+ final PaletteItemManager mgr = PaletteItemManager.getInstance(context);
+ assertNotNull(mgr);
+
+ CMDocument doc = HTMLCMDocumentFactory.getCMDocument(CMDocType.HTML_DOC_TYPE);
+ TaglibPaletteDrawer drawer = mgr.getPaletteHelper().getOrCreateTaglibPaletteDrawer(mgr, doc, CMDocType.HTML_DOC_TYPE);
+ verifyHTMLDrawer(drawer);
+
+ doc = HTMLCMDocumentFactory.getCMDocument(CMDocType.JSP11_DOC_TYPE);
+ drawer = mgr.getPaletteHelper().getOrCreateTaglibPaletteDrawer(mgr, doc, CMDocType.JSP11_DOC_TYPE);
+ verifyJSPDrawer(drawer);
+
+ drawer = getTaglibPaletteDrawer(mgr, ITLDConstants.URI_JSF_HTML);
+ if (drawer != null)
+ verifyJSFHTMLDrawer(drawer);
+
+ drawer = getTaglibPaletteDrawer(mgr, ITLDConstants.URI_JSF_CORE);
+ if (drawer != null)
+ verifyJSFCoreDrawer(drawer);
+
+ drawer = getTaglibPaletteDrawer(mgr, JSTL_CORE_URI);
+ if (drawer != null)
+ verifyJSTLCoreDrawer(drawer);
+
+ mgr.release(context);
+ }
+
+ private TaglibPaletteDrawer getTaglibPaletteDrawer(final PaletteItemManager mgr, final String uri) {
+ ITaglibRecord[] tldrecs = TaglibIndex.getAvailableTaglibRecords(_testEnv.getTestProject().getFullPath());
+ for (int i=0;i<tldrecs.length;i++){
+ if (uri.equals(tldrecs[i].getDescriptor().getURI())) {
+ return mgr.getPaletteHelper().configPaletteItemsByTLD(mgr, tldrecs[i]);
+ }
+ }
+ return null;
+ }
+
+ private void verifyJSFHTMLDrawer(final TaglibPaletteDrawer drawer) {
+ assertNotNull(drawer);
+ verifyDrawer(drawer, "JSF HTML", ITLDConstants.URI_JSF_HTML, ITLDConstants.URI_JSF_HTML, JSFHTML_DEFAULT_PREFIX, JSFHTML_LABEL, JSFHTML_DESC );
+ for (final Object o : drawer.getChildren()) {
+ verifyJSFHTMLTagItem((TagToolPaletteEntry)o);
+ }
+
+ }
+
+ private void verifyJSFCoreDrawer(final TaglibPaletteDrawer drawer) {
+ assertNotNull(drawer);
+ verifyDrawer(drawer, "JSF Core", ITLDConstants.URI_JSF_CORE, ITLDConstants.URI_JSF_CORE, JSFCORE_DEFAULT_PREFIX, JSFCORE_LABEL, JSFCORE_DESC );
+ for (final Object o : drawer.getChildren()) {
+ verifyJSFCoreTagItem((TagToolPaletteEntry)o);
+ }
+
+ }
+
+ private void verifyHTMLDrawer(final TaglibPaletteDrawer drawer) {
+ assertNotNull(drawer);
+ verifyDrawer(drawer, "HTML", HTML_ID, HTML_URI, null, HTML_LABEL, HTML_DESC );
+ for (final Object o : drawer.getChildren()) {
+ verifyHTMLTagItem((TagToolPaletteEntry)o);
+ }
+
+ }
+
+ private void verifyJSPDrawer(final TaglibPaletteDrawer drawer) {
+ assertNotNull(drawer);
+ verifyDrawer(drawer, "JSP", JSP_ID, JSP_URI, null, JSP_LABEL, JSP_DESC );
+ for (final Object o : drawer.getChildren()) {
+ verifyJSPTagItem((TagToolPaletteEntry)o);
+ }
+
+ }
+ private void verifyHTMLTagItem(final TagToolPaletteEntry tagTool) {
+ assertNotNull(tagTool);
+ if (tagTool.getId().equals(HTML_BUTTON_ID)) {
+ verifyTagTool(tagTool, HTML_BUTTON_LABEL, HTML_BUTTON_DESC, HTML_BUTTON_SMALL_ICON);
+ }
+ else if (tagTool.getId().equals(HTML_A_ID)) {
+ verifyTagTool(tagTool, HTML_A_LABEL, HTML_A_DESC, HTML_A_SMALL_ICON);
+ }
+
+ }
+
+ private void verifyJSFHTMLTagItem(final TagToolPaletteEntry tagTool) {
+ assertNotNull(tagTool);
+ if (tagTool.getId().equals(JSFHTML_COMMAND_BTN_ID)) {
+ verifyTagTool(tagTool, JSFHTML_COMMAND_BTN_LABEL, JSFHTML_COMMAND_BTN_DESC, JSFHTML_COMMAND_BTN_SMALL_ICON);
+ }
+
+ }
+
+ private void verifyJSFCoreTagItem(final TagToolPaletteEntry tagTool) {
+ assertNotNull(tagTool);
+ if (tagTool.getId().equals(JSFCORE_ACTION_LISTENER_ID)) {
+ verifyTagTool(tagTool, JSFCORE_ACTION_LISTENER_LABEL, JSFCORE_ACTION_LISTENER__DESC, JSFCORE_ACTION_LISTENER_ICON);
+ }
+
+ }
+ private void verifyJSPTagItem(final TagToolPaletteEntry tagTool) {
+ assertNotNull(tagTool);
+ if (tagTool.getId().equals(JSP_DIR_INCLUDE_ID)) {
+ verifyTagTool(tagTool, JSP_DIR_INCLUDE_LABEL, JSP_DIR_INCLUDE_DESC, JSP_DIR_INCLUDE_SMALL_ICON);
+ }
+ }
+
+ private void verifyJSTLCoreDrawer(final TaglibPaletteDrawer drawer) {
+ assertNotNull(drawer);
+ verifyDrawer(drawer, "JSTL Core", JSTL_CORE_URI, JSTL_CORE_URI, JSTLCORE_DEFAULT_PREFIX, JSTLCORE_LABEL, JSTLCORE_DESC);
+ for (final Object o : drawer.getChildren()) {
+ verifyJSTLCoreTagItem((TagToolPaletteEntry)o);
+ }
+
+ }
+ private void verifyJSTLCoreTagItem(final TagToolPaletteEntry tagTool) {
+ assertNotNull(tagTool);
+ if (tagTool.getId().equals(JSTLCORE_IF_ID)) {
+ verifyTagTool(tagTool, JSTLCORE_IF_LABEL, JSTLCORE_IF_DESC, JSTLCORE_IF_ICON);
+ }
+ }
+
+ private void verifyDrawer(final TaglibPaletteDrawer drawer, String drawerID, final String id , final String uri, final String prefix,
+ final String label, final String desc) {
+
+ assertEquals(drawerID+": bad id", id, drawer.getId());
+ assertEquals(drawerID+": bad uri", uri , drawer.getURI());
+ assertEquals(drawerID+": bad label",label, drawer.getLabel());
+ assertEquals(drawerID+": bad desc", desc, drawer.getDescription());
+ assertEquals(drawerID+": bad default prefix", prefix, drawer.getDefaultPrefix());
+ }
+
+ private void verifyTagTool(final TagToolPaletteEntry tagTool,
+ final String label, final String desc, final String iconName) {
+
+ assertEquals(tagTool.getId()+": bad label", label, tagTool.getLabel());
+ assertEquals(tagTool.getId()+": bad desc", desc, tagTool.getDescription());
+ assertNotNull(tagTool.getId()+": missing small icon", tagTool.getSmallIcon());
+
+ //the following is not very safe... relying on image.toString() returning something in the form of the following example:
+ // URLImageDescriptor(bundleentry://379.fwk23328673/icons/palette/HTML/small/HTML_INPUT_BUTTON.gif)
+ final String actualSmallIcon = tagTool.getSmallIcon().toString();
+ final String frag = actualSmallIcon.substring(actualSmallIcon.length() - iconName.length() - 1);
+ assertTrue(tagTool.getId()+": bad image", frag.indexOf(iconName) == 0);
+ }
+
+ public void testNullProjectPalette() {
+ final IFile file = null;
+ final IPaletteContext context = PaletteItemManager.createPaletteContext(file);
+ final PaletteItemManager mgr = PaletteItemManager.getInstance(context);
+ assertNotNull(mgr);
+
+ //should have JSP tag categories - HTML and JSP only
+ assertTrue(mgr.getTagRegistryIdentifier().getContentType().isAssociatedWith("xxx.jsp"));
+ assertTrue(mgr.getAllCategories().size() == 2);
+ assertNotNull(mgr.getTaglibPalletteDrawer(CMDocType.HTML_DOC_TYPE));
+ assertNotNull(mgr.getTaglibPalletteDrawer(CMDocType.JSP11_DOC_TYPE));
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/pagedesigner/PropertyDescriptorTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/pagedesigner/PropertyDescriptorTests.java
new file mode 100644
index 000000000..5f9ae1f95
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/pagedesigner/PropertyDescriptorTests.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * 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
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.pagedesigner;
+
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jst.jsf.common.metadata.Entity;
+import org.eclipse.jst.jsf.common.metadata.Model;
+import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataDomainContext;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryContextFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.taglib.ITaglibDomainMetaDataQuery;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.metadata.tests.util.SingleJSPTestCase;
+import org.eclipse.jst.jsf.metadataprocessors.IMetaDataEnabledFeature;
+import org.eclipse.jst.jsf.metadataprocessors.MetaDataEnabledProcessingFactory;
+import org.eclipse.jst.pagedesigner.editors.properties.IPropertyPageDescriptor;
+import org.eclipse.jst.pagedesigner.properties.ITabbedPropertiesConstants;
+
+//TODO: can use beefing up
+public class PropertyDescriptorTests extends SingleJSPTestCase {
+
+ // unused private static QualifiedName qn = new QualifiedName("test","model");
+ private String uri = "http://org.eclipse.jsf/propertyDescriptorTest";
+ private Model _model;
+ private int _offset = 423;
+
+
+ public PropertyDescriptorTests() {
+ super("/testfiles/jsps/propertyDescTests.jsp",
+ "/propertyDescTests.jsp",
+ JSFVersion.V1_1,
+ "/testfiles/web/faces-config_1_1.xml.data");
+ }
+
+ public void setUp() throws Exception {
+ if (_model == null) {
+ super.setUp();
+ getModel();
+ }
+ }
+
+ private Model getModel() {
+ if (_model == null) {
+ _model = getQuery().findTagLibraryModel(uri);
+// ITaglibDomainMetaDataModelContext modelContext = TaglibDomainMetaDataQueryHelper.createMetaDataModelContext(null, uri);
+// _model = TaglibDomainMetaDataQueryHelper.getModel(modelContext);
+ }
+
+ return _model;
+ }
+
+ private ITaglibDomainMetaDataQuery getQuery() {
+ final IMetaDataDomainContext context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext((IProject)null);
+ return MetaDataQueryFactory.getInstance().createQuery(context);
+ }
+
+ public void testBasics(){
+ assertNotNull(getModel());
+ assertEquals(1, getModel().getChildEntities().size());
+
+ Entity tag = getQuery().findTagEntity(getModel(), "Tag");
+ assertNotNull(tag);
+ assertTrue(tag.getChildEntities().size() == 3);
+
+ testAttr1(tag);
+ testDefaultAttr(tag);
+
+ }
+
+
+ private void testAttr1(Entity tag){
+ Entity attr1 = getQuery().findTagAttributeEntity(tag, "Attr1");
+ assertNotNull(attr1);
+ assertTrue(attr1.getTraits().size() > 2);
+
+ List<IMetaDataEnabledFeature> pds = MetaDataEnabledProcessingFactory.getInstance().getAttributeValueRuntimeTypeFeatureProcessors(IPropertyPageDescriptor.class, getStructuredDocumentContext(_structuredDocument, _offset), attr1);
+ assertNotNull(pds);
+ IPropertyPageDescriptor pd = (IPropertyPageDescriptor)pds.get(0);
+ assertNotNull(pd);
+ assertEquals("CategoryName", pd.getCategory());
+ assertEquals("This is a description.", pd.getDescription());
+ assertTrue(pd.isRequired());
+ assertEquals("MyAttr1:", pd.getLabel());
+
+ }
+
+ private void testDefaultAttr(Entity tag){
+ Entity attr1 = getQuery().findTagAttributeEntity(tag, "DefaultAttr");
+ assertNotNull(attr1);
+
+ List<IMetaDataEnabledFeature> pds = MetaDataEnabledProcessingFactory.getInstance().getAttributeValueRuntimeTypeFeatureProcessors(IPropertyPageDescriptor.class, getStructuredDocumentContext(_structuredDocument, _offset), attr1);
+ assertNotNull(pds);
+ IPropertyPageDescriptor pd = (IPropertyPageDescriptor)pds.get(0);
+ assertNotNull(pd);
+ assertEquals(ITabbedPropertiesConstants.OTHER_CATEGORY, pd.getCategory());
+ assertNull(pd.getDescription());
+ assertFalse(pd.isRequired());
+ assertEquals("DefaultAttr:", pd.getLabel());
+
+ }
+
+
+ public void testLocatePropertyPageDescForBooleanTagAttr() {
+ Entity boolAttr = getQuery().getQueryHelper().getEntity(getModel(), "Tag/boolAttr");
+ assertNotNull(boolAttr);
+
+ List<IMetaDataEnabledFeature> pds = MetaDataEnabledProcessingFactory.getInstance().getAttributeValueRuntimeTypeFeatureProcessors(IPropertyPageDescriptor.class, getStructuredDocumentContext(_structuredDocument, _offset), boolAttr);
+ assertNotNull(pds);
+ IPropertyPageDescriptor pd = (IPropertyPageDescriptor)pds.get(0);
+ assertNotNull(pd);
+
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/pagedesigner/QuickEditSectionsTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/pagedesigner/QuickEditSectionsTests.java
new file mode 100644
index 000000000..25865f6ce
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/pagedesigner/QuickEditSectionsTests.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * 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
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.pagedesigner;
+
+import org.eclipse.jst.jsf.common.metadata.Entity;
+import org.eclipse.jst.jsf.common.metadata.Model;
+import org.eclipse.jst.jsf.common.metadata.Trait;
+import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataDomainContext;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryContextFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.taglib.ITaglibDomainMetaDataQuery;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.metadata.tests.util.JSPTestCase;
+import org.eclipse.jst.pagedesigner.editors.properties.quickedittabsections.QuickEditTabSections;
+import org.eclipse.jst.pagedesigner.editors.properties.quickedittabsections.SECTION_TYPE;
+import org.eclipse.jst.pagedesigner.editors.properties.quickedittabsections.SectionInfo;
+
+//TODO: can use beefing up
+public class QuickEditSectionsTests extends JSPTestCase {
+ private String _uri;
+
+ public QuickEditSectionsTests () {
+ super( JSFVersion.V1_1,
+ "/testfiles/web/faces-config_1_1.xml.data");
+
+ }
+ public void setUp() throws Exception{
+ super.setUp();
+
+ _uri = "http://org.eclipse.jsf/quickEditSectionTest";
+
+ }
+
+ public void testQuickEditTabSections(){
+ final IMetaDataDomainContext context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext(_testEnv.getTestProject());
+ final ITaglibDomainMetaDataQuery query = MetaDataQueryFactory.getInstance().createQuery(context);
+
+ Model model = query.findTagLibraryModel(_uri);
+ assertNotNull(model);
+ Entity entity = query.findTagEntity(model, "A");
+ assertNotNull(entity);
+ Trait trait = query.findTrait(entity , QuickEditTabSections.TRAIT_ID);
+ assertNotNull(trait);
+ assertNotNull(trait.getValue());
+ assertTrue(trait.getValue() instanceof QuickEditTabSections);
+ QuickEditTabSections sections = (QuickEditTabSections)trait.getValue();
+ assertEquals(3, sections.getSections().size());
+
+ SectionInfo section = sections.getSections().get(0);
+ assertEquals("attr1", section.getId());
+ assertEquals(SECTION_TYPE.ATTRIBUTE, section.getType());
+
+ section = sections.getSections().get(1);
+ assertEquals("attr2", section.getId());
+ assertEquals(SECTION_TYPE.ATTRIBUTE, section.getType());
+
+ section = sections.getSections().get(2);
+ assertEquals("section1", section.getId());
+ assertEquals(SECTION_TYPE.SECTION, section.getType());
+
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/ActionTypeTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/ActionTypeTests.java
new file mode 100644
index 000000000..af5c85130
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/ActionTypeTests.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 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.metadata.tests.taglibprocessing;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jst.jsf.common.internal.types.CompositeType;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.metadata.tests.util.SingleJSPTestCase;
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidELValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidationMessage;
+
+public class ActionTypeTests extends SingleJSPTestCase {
+ private final String tagName = "commandButton";
+ private final String attrName = "action";
+
+ public ActionTypeTests(){
+ super( "/testfiles/jsps/actionTypeTest.jsp.data/",
+ "/actionTypeTest.jsp",
+ JSFVersion.V1_1,
+ "/testfiles/web/faces-config_1_1.xml.data");
+ }
+
+ public void testGetPossibleValues() {
+ IPossibleValues pv = (IPossibleValues)getProcessor(IPossibleValues.class, JSF_HTML_URI, tagName, attrName);
+ assertNotNull(pv);
+
+ assertEquals(2, pv.getPossibleValues().size());
+ assertPossibleValues(pv.getPossibleValues(), new String[] {
+ "gotoWelcome",
+ "gotoSomeplaceElse"});
+
+ }
+
+ public void testIsValidValue() {
+ IValidValues vv = (IValidValues)getProcessor(IValidValues.class, JSF_HTML_URI, tagName, attrName);
+ assertNotNull(vv);
+
+ assertTrue(vv.isValidValue("gotoWelcome"));
+ assertTrue(vv.isValidValue("gotoSomeplaceElse"));
+ assertFalse(vv.isValidValue("gotoSomeplace"));
+ assertEquals(1, vv.getValidationMessages().size());
+ IValidationMessage msg = (IValidationMessage)vv.getValidationMessages().get(0);
+ assertEquals(IStatus.WARNING, msg.getSeverity());
+ assertEquals("The action value does not match a navigation case outcome.", msg.getMessage());
+ vv.getValidationMessages().clear();
+ assertFalse(vv.isValidValue(""));
+ msg = (IValidationMessage)vv.getValidationMessages().get(0);
+ assertEquals(IStatus.WARNING, msg.getSeverity());
+ assertEquals("The action attribute must be a non-zero length String or a method binding matching a navigation case outcome.", msg.getMessage());
+
+ }
+
+ public void testGetExpectedRuntimeType() {
+ IValidELValues vv = (IValidELValues)getProcessor(IValidELValues.class, JSF_HTML_URI, tagName, attrName);
+ assertNotNull(vv);
+
+ try {
+ assertNotNull(vv.getExpectedRuntimeType());
+ assertTrue(vv.getExpectedRuntimeType() instanceof CompositeType);
+ } catch (Exception e) {
+ }
+
+ }
+
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/AllTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/AllTests.java
new file mode 100644
index 000000000..61744b4a6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/AllTests.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 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:
+ * Gerry Kessler/Oracle - initial API and implementation
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.taglibprocessing;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
+import org.eclipse.jst.jsf.metadata.tests.util.IJSFRuntimeRequiredV11;
+import org.eclipse.jst.jsf.metadata.tests.util.IJSFRuntimeRequiredV12;
+
+public class AllTests {
+
+ private static boolean _inited;
+ private static boolean _jsfRuntimePresentV11;
+ private static boolean _jsfRuntimePresentV12;
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite(
+ "Test for org.eclipse.jst.jsf.metadata.tests.taglibprocessing");
+ //$JUnit-BEGIN$
+ //Tests NOT requiring JSF Implementation
+ addTestSuite(suite, StringTypeTest.class);
+ addTestSuite(suite, BooleanTypeTest.class);
+ addTestSuite(suite, IntegerTypeTest.class);
+ addTestSuite(suite, EnumeratedIntegerTypeTest.class);
+ addTestSuite(suite, LongTypeTest.class);
+ addTestSuite(suite, EnumeratedLongTypeTest.class);
+ addTestSuite(suite, DoubleTypeTest.class);
+ addTestSuite(suite, EnumeratedDoubleTypeTest.class);
+
+ addTestSuite(suite, ColorTypeTest.class);
+ addTestSuite(suite, LanguageCodeTypeTest.class);
+ addTestSuite(suite, LocaleTypeTest.class);
+ addTestSuite(suite, CurrencyCodeTypeTest.class);
+ addTestSuite(suite, TimeZoneTypeTest.class);
+ addTestSuite(suite, LengthTypeTest.class);
+ addTestSuite(suite, NumberPatternTypeTest.class);
+// addTestSuite(suite, RelativePathTypeTest.class);
+// addTestSuite(suite, WebPathTypeTest.class);
+ addTestSuite(suite, CharacterTypeTest.class);
+// addTestSuite(suite, ScriptTypeTest.class);
+ addTestSuite(suite, LinkTypeTest.class);
+ addTestSuite(suite, ContentTypeTest.class);
+// addTestSuite(suite, URITypeTest.class);
+
+ //Tests requiring JSF Implementation
+ addTestSuite(suite, JavaClassTypeTest.class);
+ addTestSuite(suite, FacesConfigConverterIDTypeTests.class);
+ addTestSuite(suite, FacesConfigValidatorIDTypeTests.class);
+ addTestSuite(suite, MethodBindingTypeTests.class);
+ addTestSuite(suite, ComponentIDTypeTests.class);
+ addTestSuite(suite, ComponentBindingTypeTests.class);
+ addTestSuite(suite, ValueBindingTypeTests.class);
+ addTestSuite(suite, ValueTypeTests.class);
+ addTestSuite(suite, ActionTypeTests.class);
+
+ addTestSuite(suite, CSSClassTypeTests.class);
+ addTestSuite(suite, CSSStyleTypeTests.class);
+
+ addTestSuite(suite,JSFHTMLTestCase.class);
+
+ //$JUnit-END$
+ return suite;
+ }
+ private static void addTestSuite(TestSuite suite, Class<? extends TestCase> klass) {
+ if (!_inited) {
+ _jsfRuntimePresentV11 = JSFCoreUtilHelper.isJSFRuntimeJarsDirectoryPropertySet(JSFVersion.V1_1);
+ _jsfRuntimePresentV12 = JSFCoreUtilHelper.isJSFRuntimeJarsDirectoryPropertySet(JSFVersion.V1_2);
+ _inited = true;
+ }
+ if (IJSFRuntimeRequiredV11.class.isAssignableFrom(klass)){
+ if (_jsfRuntimePresentV11)
+ suite.addTestSuite(klass);
+ else
+ System.err.println("Warning: JSF Runtime v1.1 is required and not present - "+klass.getName()+" test was skipped.");
+ } else if (IJSFRuntimeRequiredV12.class.isAssignableFrom(klass)){
+ if (_jsfRuntimePresentV12)
+ suite.addTestSuite(klass);
+ else
+ System.err.println("Warning: JSF Runtime v1.2 is required and not present - "+klass.getName()+" test was skipped.");
+ } else {
+ suite.addTestSuite(klass);
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/BooleanTypeTest.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/BooleanTypeTest.java
new file mode 100644
index 000000000..3b4fdb08a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/BooleanTypeTest.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * 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:
+ * Gerry Kessler/Oracle - initial API and implementation
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.taglibprocessing;
+
+
+import junit.framework.Assert;
+
+import org.eclipse.jst.jsf.metadataprocessors.features.IDefaultValue;
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+
+
+public class BooleanTypeTest extends TaglibProcessingTestCase {
+ public void testPossibleValues(){
+ Assert.assertNotNull(possibleValueAdapters);
+ Assert.assertFalse(possibleValueAdapters.isEmpty());
+ Assert.assertEquals(2, possibleValueAdapters.size());
+ IPossibleValues pv =(IPossibleValues)possibleValueAdapters.get(0);
+ Assert.assertEquals(pv.getPossibleValues().size(), 2);//true and false
+
+
+ //validate BarkProcessorFeature does not kick in for this tag
+ //as the tests have added a second impl of IPossibleVals check
+// pv =(IPossibleValues)getBarkProcessingBundle(possibleValueAdapters);
+ pv =(IPossibleValues)possibleValueAdapters.get(1);
+ Assert.assertNotNull(pv);
+ //bark annotation is not on the MyTag element MyAttr attr
+ Assert.assertTrue(pv.getPossibleValues().isEmpty());
+
+ }
+
+ public void testValidValues(){
+ Assert.assertNotNull(validValuesAdapters);
+ Assert.assertFalse(validValuesAdapters.isEmpty());
+ IValidValues vv =(IValidValues)validValuesAdapters.get(0);
+ vv.getValidationMessages().clear();
+ Assert.assertTrue(vv.isValidValue("true"));
+ Assert.assertTrue(vv.getValidationMessages().size()==0);
+ vv.getValidationMessages().clear();
+ Assert.assertTrue(vv.isValidValue("false"));
+ vv.getValidationMessages().clear();
+ Assert.assertTrue(vv.isValidValue("False"));
+ Assert.assertEquals(vv.getValidationMessages().size(), 0);
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("bogus"));
+ Assert.assertEquals(vv.getValidationMessages().size(), 1);
+ }
+
+ public void testDefaultValues(){
+ Assert.assertNotNull(defaultValueAdapters);
+ Assert.assertFalse(defaultValueAdapters.isEmpty());
+ Assert.assertTrue(((IDefaultValue)defaultValueAdapters.get(0)).getDefaultValue().equals("true"));
+ }
+
+ public void testCreateValues(){
+ Assert.assertNotNull(createValuesAdapters);
+ Assert.assertTrue(createValuesAdapters.isEmpty());
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/CSSClassTypeTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/CSSClassTypeTests.java
new file mode 100644
index 000000000..08619ce1e
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/CSSClassTypeTests.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.taglibprocessing;
+
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.metadata.tests.MetadataTestsPlugin;
+import org.eclipse.jst.jsf.metadata.tests.util.SingleJSPTestCase;
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+
+public class CSSClassTypeTests extends SingleJSPTestCase {
+ private final String tagName = "inputText";
+ private final String attrName = "styleClass";
+
+ public CSSClassTypeTests(){
+ super( "/testfiles/jsps/cssTypesTest.jsp.data/",
+ "/cssTypesTest.jsp",
+ JSFVersion.V1_1,
+ "/testfiles/web/faces-config_1_1.xml.data");
+ }
+
+ public void setUp() throws Exception {
+ super.setUp();
+ _testEnv.loadResourceInWebRoot(MetadataTestsPlugin.getDefault().getBundle(),
+ "/testfiles/jsps/mystyle.css.data",
+ "mystyle.css");
+
+ _testEnv.loadResourceInWebRoot(MetadataTestsPlugin.getDefault().getBundle(),
+ "/testfiles/jsps/foo.css.data",
+ "foo.css");
+ }
+
+ public void testGetPossibleValues() {
+ IPossibleValues pv = (IPossibleValues)getProcessor(IPossibleValues.class, JSF_HTML_URI, tagName, attrName);
+ assertNotNull(pv);
+ assertEquals(12, pv.getPossibleValues().size());
+ }
+
+ public void testIsValidValue() {
+ //valid values not currently supported
+ IValidValues vv = (IValidValues)getProcessor(IValidValues.class, JSF_HTML_URI, tagName, attrName);
+ assertNull(vv);
+
+ }
+
+
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/CSSStyleTypeTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/CSSStyleTypeTests.java
new file mode 100644
index 000000000..3458269af
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/CSSStyleTypeTests.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 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.metadata.tests.taglibprocessing;
+
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.metadata.tests.util.SingleJSPTestCase;
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+
+public class CSSStyleTypeTests extends SingleJSPTestCase {
+ private final String tagName = "commandButton";
+ private final String attrName = "class";
+
+ public CSSStyleTypeTests(){
+ super( "/testfiles/jsps/cssTypesTest.jsp.data/",
+ "/cssTypesTest.jsp",
+ JSFVersion.V1_1,
+ "/testfiles/web/faces-config_1_1.xml.data");
+ }
+
+ public void testGetPossibleValues() {
+ IPossibleValues pv = (IPossibleValues)getProcessor(IPossibleValues.class, JSF_HTML_URI, tagName, attrName);
+ assertNotNull(pv);
+
+// TODO: fill me in
+ }
+
+ public void testIsValidValue() {
+ IValidValues vv = (IValidValues)getProcessor(IValidValues.class, JSF_HTML_URI, tagName, attrName);
+ assertNull(vv);
+
+
+ }
+
+
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/CharacterTypeTest.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/CharacterTypeTest.java
new file mode 100644
index 000000000..d67c58e8e
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/CharacterTypeTest.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * 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
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.taglibprocessing;
+
+import junit.framework.Assert;
+
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+
+public class CharacterTypeTest extends TaglibProcessingTestCase {
+ public void testPossibleValues() {
+ Assert.assertNotNull(possibleValueAdapters);
+ Assert.assertTrue(possibleValueAdapters.isEmpty());
+
+ }
+
+ public void testValidValuesValues() {
+ Assert.assertNotNull(validValuesAdapters);
+ Assert.assertFalse(validValuesAdapters.isEmpty());
+
+ IValidValues pvs = (IValidValues) validValuesAdapters.get(0);
+ Assert.assertTrue(pvs.isValidValue("a"));
+
+
+ //negative
+ Assert.assertFalse(pvs.isValidValue("ab"));
+ pvs.getValidationMessages().clear();
+ Assert.assertFalse(pvs.isValidValue("_a"));
+ pvs.getValidationMessages().clear();
+ Assert.assertFalse(pvs.isValidValue(""));
+ pvs.getValidationMessages().clear();
+ Assert.assertFalse(pvs.isValidValue(" a "));
+ pvs.getValidationMessages().clear();
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/ColorTypeTest.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/ColorTypeTest.java
new file mode 100644
index 000000000..84177f8ed
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/ColorTypeTest.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * 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.metadata.tests.taglibprocessing;
+
+import junit.framework.Assert;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jst.jsf.metadataprocessors.features.ELIsNotValidException;
+import org.eclipse.jst.jsf.metadataprocessors.features.IDefaultValue;
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValue;
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidELValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+
+public class ColorTypeTest extends TaglibProcessingTestCase {
+ public void testPossibleValues(){
+ Assert.assertNotNull(possibleValueAdapters);
+ Assert.assertFalse(possibleValueAdapters.isEmpty());
+
+ IPossibleValues pvs = (IPossibleValues)possibleValueAdapters.get(0);
+ Assert.assertTrue(pvs.getPossibleValues().size() == 16 );
+ Assert.assertTrue(pvs.getPossibleValues().get(1) instanceof IPossibleValue);
+ IPossibleValue pv = (IPossibleValue)pvs.getPossibleValues().get(1);
+ Assert.assertTrue(pv.getValue().equalsIgnoreCase("silver"));
+ Assert.assertNotNull(pv.getIcon());
+ Assert.assertTrue(pv.getIcon() instanceof ImageDescriptor);
+ Assert.assertEquals(192, pv.getIcon().getImageData().getRGBs()[0].red);
+ Assert.assertEquals(192, pv.getIcon().getImageData().getRGBs()[0].green);
+ Assert.assertEquals(192, pv.getIcon().getImageData().getRGBs()[0].blue);
+
+ }
+
+ public void testValidValues(){
+ Assert.assertNotNull(validValuesAdapters);
+ Assert.assertFalse(validValuesAdapters.isEmpty());
+
+ IValidValues vv =(IValidValues)validValuesAdapters.get(0);
+ Assert.assertTrue(vv.isValidValue("Black"));
+ Assert.assertTrue(vv.isValidValue("BLACK"));
+ Assert.assertTrue(vv.isValidValue("black"));
+ Assert.assertTrue(vv.isValidValue(" BLACK "));
+ Assert.assertTrue(vv.isValidValue("Silver"));
+ Assert.assertTrue(vv.isValidValue("Gray"));
+ Assert.assertTrue(vv.isValidValue("White"));
+ Assert.assertTrue(vv.isValidValue("Red"));
+ Assert.assertTrue(vv.isValidValue("Purple"));
+ Assert.assertTrue(vv.isValidValue("Fuchsia"));
+ Assert.assertTrue(vv.isValidValue("Green"));
+ Assert.assertTrue(vv.isValidValue("Lime"));
+ Assert.assertTrue(vv.isValidValue("Olive"));
+ Assert.assertTrue(vv.isValidValue("Yellow"));
+ Assert.assertTrue(vv.isValidValue("Navy"));
+ Assert.assertTrue(vv.isValidValue("Blue"));
+ Assert.assertTrue(vv.isValidValue("Teal"));
+ Assert.assertTrue(vv.isValidValue("Aqua"));
+
+ Assert.assertFalse(vv.isValidValue("BlackAndBlue"));
+ vv.getValidationMessages().clear();
+
+ Assert.assertTrue(vv.isValidValue("#FFFFFF"));
+ Assert.assertTrue(vv.isValidValue("#0FFFFF"));
+ Assert.assertTrue(vv.isValidValue("#000001"));
+ Assert.assertFalse(vv.isValidValue("1#FFFFF"));
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("FFFFFF"));
+ vv.getValidationMessages().clear();
+ }
+
+ public void testDefaultValues(){
+ Assert.assertNotNull(defaultValueAdapters);
+ Assert.assertFalse(defaultValueAdapters.isEmpty());
+
+ IDefaultValue dv =(IDefaultValue)defaultValueAdapters.get(0);
+ Assert.assertTrue(dv.getDefaultValue() != null);
+ Assert.assertTrue(dv.getDefaultValue().equalsIgnoreCase("Black"));
+ }
+
+ public void testCreateValues(){
+ Assert.assertNotNull(createValuesAdapters);
+ Assert.assertTrue(createValuesAdapters.isEmpty());
+ }
+
+ public void testGetExpectedReturnType(){
+ Assert.assertNotNull(validELValuesAdapters);
+ IValidELValues vvel = (IValidELValues)validELValuesAdapters.get(0);
+ try {
+ Assert.assertEquals("String", vvel.getExpectedRuntimeType().toUserReadableString());
+ } catch (ELIsNotValidException e) {
+ fail("testGetExpectedReturnType");
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/ComponentBindingTypeTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/ComponentBindingTypeTests.java
new file mode 100644
index 000000000..400e34e30
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/ComponentBindingTypeTests.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 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.metadata.tests.taglibprocessing;
+
+import org.eclipse.jst.jsf.common.internal.types.CompositeType;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.metadata.tests.util.SingleJSPTestCase;
+import org.eclipse.jst.jsf.metadataprocessors.features.ELIsNotValidException;
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidELValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+
+public class ComponentBindingTypeTests extends SingleJSPTestCase {
+ private final String tagName = "inputText";
+ private final String attrName = "binding";
+
+ public ComponentBindingTypeTests() {
+ super( "/testfiles/jsps/facesConfigValidatorIDType.jsp.data/",
+ "/facesConfigValidatorIDType.jsp",
+ JSFVersion.V1_1,
+ "/testfiles/web/faces-config_1_1.xml.data");
+ }
+ protected void setUp() throws Exception {
+ super.setUp();
+
+// addJavaFile("MyBean");
+ }
+
+ public void testGetExpectedRuntimeType() {
+ IValidELValues vv = (IValidELValues)getProcessor(IValidELValues.class, JSF_HTML_URI, tagName, attrName);
+ assertNotNull(vv);
+
+ try {
+ assertNotNull(vv.getExpectedRuntimeType());
+ assertTrue(vv.getExpectedRuntimeType() instanceof CompositeType);
+ } catch (ELIsNotValidException e) {
+ }
+
+ }
+
+ public void testPossibleValues() {
+ IPossibleValues vv = (IPossibleValues)getProcessor(IPossibleValues.class, JSF_HTML_URI, tagName, attrName);
+ assertNull(vv); //possible value is not supported!
+
+ }
+
+ public void testIsValidValue() {
+ IValidValues vv = (IValidValues)getProcessor(IValidValues.class, JSF_HTML_URI, tagName, attrName);
+ assertNotNull(vv);
+
+ assertFalse(vv.isValidValue("All non-EL is invalid!"));
+ assertNotNull(vv.getValidationMessages());
+ assertEquals(1, vv.getValidationMessages().size());
+
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/ComponentIDTypeTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/ComponentIDTypeTests.java
new file mode 100644
index 000000000..845e827f1
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/ComponentIDTypeTests.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 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.metadata.tests.taglibprocessing;
+
+import junit.framework.Assert;
+
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.metadata.tests.util.SingleJSPTestCase;
+import org.eclipse.jst.jsf.metadataprocessors.features.ELIsNotValidException;
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidELValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+
+public class ComponentIDTypeTests extends SingleJSPTestCase {
+
+ private final String tagName = "commandButton";
+ private final String attrName = "id";
+
+ public ComponentIDTypeTests() {
+ super( "/testfiles/jsps/facesConfigValidatorIDType.jsp.data/",
+ "/facesConfigValidatorIDType.jsp",
+ JSFVersion.V1_1,
+ "/testfiles/web/faces-config_1_1.xml.data");
+ }
+ protected void setUp() throws Exception {
+ super.setUp();
+
+// addJavaFile("MyBean");
+ }
+
+ public void testGetExpectedRuntimeType() {
+ IValidELValues vv = (IValidELValues)getProcessor(IValidELValues.class, JSF_HTML_URI, tagName, attrName);
+ assertNotNull(vv);
+
+ try {
+ assertNotNull(vv.getExpectedRuntimeType());
+ fail("Expected ELIsNotValidException");
+ } catch (ELIsNotValidException e) {
+ }
+
+ }
+
+ public void testPossibleValues() {
+ IPossibleValues vv = (IPossibleValues)getProcessor(IPossibleValues.class, JSF_HTML_URI, tagName, attrName);
+ assertNull(vv); //possible value is not supported!
+
+ }
+
+ public void testIsValidValue() {
+ IValidValues vv = (IValidValues)getProcessor(IValidValues.class, JSF_HTML_URI, tagName, attrName);
+ assertNotNull(vv);
+//
+// assertTrue(vv.isValidValue("every non zero length string is valid!"));
+// assertNotNull(vv.getValidationMessages());
+// assertEquals(0, vv.getValidationMessages().size());
+// assertFalse(vv.isValidValue(""));
+
+ //positive tests
+ Assert.assertTrue(vv.isValidValue("A"));
+ Assert.assertTrue(vv.isValidValue("Aa"));
+ Assert.assertTrue(vv.isValidValue("z.abc"));
+ Assert.assertTrue(vv.isValidValue("A1"));
+ Assert.assertTrue(vv.isValidValue("A-1"));
+ Assert.assertTrue(vv.isValidValue("A_a"));
+ Assert.assertTrue(vv.isValidValue("A:a"));
+ Assert.assertTrue(vv.isValidValue("A_"));
+ Assert.assertTrue(vv.isValidValue("a."));
+ Assert.assertTrue(vv.isValidValue("Aa."));
+ Assert.assertTrue(vv.isValidValue("_Aa"));
+
+ //negative tests
+ Assert.assertFalse(vv.isValidValue(" "));
+ vv.getValidationMessages().clear();
+
+ //will fail when we have proper regex validation
+// Assert.assertFalse(vv.isValidValue("1Aa"));
+// vv.getValidationMessages().clear();
+// Assert.assertFalse(vv.isValidValue(":Aa"));
+// vv.getValidationMessages().clear();
+// Assert.assertFalse(vv.isValidValue("-Aa"));
+// vv.getValidationMessages().clear();
+// Assert.assertFalse(vv.isValidValue(".Aa"));
+// vv.getValidationMessages().clear();
+
+ // FIXME the below is currently failing and is commented out.
+// Assert.assertFalse(vv.isValidValue("A$!a"));
+// vv.getValidationMessages().clear();
+// Assert.assertFalse(vv.isValidValue("A:!a"));
+// vv.getValidationMessages().clear();
+// Assert.assertFalse(vv.isValidValue("A(a"));
+// vv.getValidationMessages().clear();
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/ContentTypeTest.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/ContentTypeTest.java
new file mode 100644
index 000000000..0ff164b23
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/ContentTypeTest.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * 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
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.taglibprocessing;
+
+import junit.framework.Assert;
+
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+
+public class ContentTypeTest extends TaglibProcessingTestCase {
+ public void testPossibleValues() {
+ Assert.assertNotNull(possibleValueAdapters);
+ Assert.assertFalse(possibleValueAdapters.isEmpty());
+
+ IPossibleValues pvs = (IPossibleValues) possibleValueAdapters.get(0);
+ Assert.assertTrue(pvs.getPossibleValues().size() >= 8);
+ }
+
+ public void testValidValuesValues() {
+ Assert.assertNotNull(validValuesAdapters);
+ Assert.assertFalse(validValuesAdapters.isEmpty());
+
+ IValidValues pvs = (IValidValues) validValuesAdapters.get(0);
+ Assert.assertTrue(pvs.isValidValue("a"));
+ Assert.assertTrue(pvs.isValidValue("foo_bar"));
+
+ //negative
+ Assert.assertFalse(pvs.isValidValue(""));
+ pvs.getValidationMessages().clear();
+ Assert.assertFalse(pvs.isValidValue(" "));
+ pvs.getValidationMessages().clear();
+ Assert.assertFalse(pvs.isValidValue(null));
+ pvs.getValidationMessages().clear();
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/CurrencyCodeTypeTest.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/CurrencyCodeTypeTest.java
new file mode 100644
index 000000000..1e56f5beb
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/CurrencyCodeTypeTest.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * 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.metadata.tests.taglibprocessing;
+
+import junit.framework.Assert;
+
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+import org.eclipse.jst.pagedesigner.editors.properties.IPropertyPageDescriptor;
+
+/**
+ *
+ *
+ */
+public class CurrencyCodeTypeTest extends TaglibProcessingTestCase {
+ public void testPossibleValues(){
+ Assert.assertNotNull(possibleValueAdapters);
+ IPossibleValues pvs = (IPossibleValues)possibleValueAdapters.get(0);
+ Assert.assertEquals(173, pvs.getPossibleValues().size());
+ }
+
+ public void testValidValues(){
+ Assert.assertNotNull(validValuesAdapters);
+ Assert.assertFalse(validValuesAdapters.isEmpty());
+
+ IValidValues vv =(IValidValues)validValuesAdapters.get(0);
+ //positive tests
+ assertTrue(vv.isValidValue("USD"));
+ assertTrue(vv.isValidValue("AOA"));
+ //negative tests
+ vv.getValidationMessages().clear();
+ assertFalse(vv.isValidValue("XXX"));
+ }
+
+ public void testPropertyPageDescriptor(){
+ Assert.assertNotNull(propertyPageDescriptorAdapters);
+ Assert.assertFalse(propertyPageDescriptorAdapters.isEmpty());
+
+ IPropertyPageDescriptor ppd =(IPropertyPageDescriptor)propertyPageDescriptorAdapters.get(0);
+ assertEquals(false, ppd.isRequired());
+
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/DoubleTypeTest.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/DoubleTypeTest.java
new file mode 100644
index 000000000..91c79d4f7
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/DoubleTypeTest.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * 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:
+ * Gerry Kessler/Oracle - initial API and implementation
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.taglibprocessing;
+
+import junit.framework.Assert;
+
+import org.eclipse.jst.jsf.metadataprocessors.features.ELIsNotValidException;
+import org.eclipse.jst.jsf.metadataprocessors.features.IDefaultValue;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidELValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+
+public class DoubleTypeTest extends TaglibProcessingTestCase {
+ public void testPossibleValues(){
+ Assert.assertNotNull(possibleValueAdapters);
+ Assert.assertTrue(possibleValueAdapters.isEmpty());
+ }
+
+ public void testValidValues(){
+ Assert.assertNotNull(validValuesAdapters);
+ Assert.assertFalse(validValuesAdapters.isEmpty());
+
+ IValidValues vv =(IValidValues)validValuesAdapters.get(0);
+
+ Assert.assertFalse(vv.isValidValue("0"));
+ Assert.assertFalse(vv.getValidationMessages().size()==0);
+ vv.getValidationMessages().clear();
+ Assert.assertTrue(vv.isValidValue("188.23"));
+ Assert.assertTrue(vv.isValidValue("245.32"));
+ Assert.assertFalse(vv.isValidValue("0.0"));
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("False"));
+ Assert.assertFalse(vv.getValidationMessages().size()==0);
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("-1001"));
+ Assert.assertTrue(vv.getValidationMessages().size()==1);
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("-1"));
+ Assert.assertTrue(vv.getValidationMessages().size()==1);
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("555555555555555555"));
+ Assert.assertTrue(vv.getValidationMessages().size()==1);
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("555f9"));
+ Assert.assertTrue(vv.getValidationMessages().size()==1);
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("2e1"));
+ Assert.assertTrue(vv.getValidationMessages().size()==1);
+ }
+
+ public void testDefaultValues(){
+ Assert.assertNotNull(defaultValueAdapters);
+ Assert.assertFalse(defaultValueAdapters.isEmpty());
+
+ IDefaultValue dv =(IDefaultValue)defaultValueAdapters.get(0);
+ Assert.assertTrue(dv.getDefaultValue() == null);
+// Assert.assertTrue(dv.getDefaultValue().equals("10"));
+ }
+
+ public void testCreateValues(){
+ Assert.assertNotNull(createValuesAdapters);
+ Assert.assertTrue(createValuesAdapters.isEmpty());
+ }
+
+ public void testGetExpectedReturnType(){
+ Assert.assertNotNull(validELValuesAdapters);
+ IValidELValues vvel = (IValidELValues)validELValuesAdapters.get(0);
+ try {
+ Assert.assertEquals("double", vvel.getExpectedRuntimeType().toUserReadableString());
+ } catch (ELIsNotValidException e) {
+ fail("testGetExpectedReturnType");
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/EnumeratedDoubleTypeTest.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/EnumeratedDoubleTypeTest.java
new file mode 100644
index 000000000..c0c8b6f52
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/EnumeratedDoubleTypeTest.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * 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:
+ * Gerry Kessler/Oracle - initial API and implementation
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.taglibprocessing;
+
+import junit.framework.Assert;
+
+import org.eclipse.jst.jsf.metadataprocessors.features.IDefaultValue;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+
+public class EnumeratedDoubleTypeTest extends TaglibProcessingTestCase {
+
+ public void testValidValues(){
+ Assert.assertNotNull(validValuesAdapters);
+ Assert.assertFalse(validValuesAdapters.isEmpty());
+
+ IValidValues vv =(IValidValues)validValuesAdapters.get(0);
+ Assert.assertTrue(vv.isValidValue("188.23"));
+ Assert.assertTrue(vv.isValidValue("245.32"));
+ Assert.assertTrue(vv.getValidationMessages().size()==0);
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("6"));
+ Assert.assertFalse(vv.getValidationMessages().size()==0);
+ }
+
+ public void testDefaultValues(){
+ Assert.assertNotNull(defaultValueAdapters);
+ Assert.assertFalse(defaultValueAdapters.isEmpty());
+
+ IDefaultValue dv =(IDefaultValue)defaultValueAdapters.get(0);
+ Assert.assertTrue(dv.getDefaultValue().equals("188.23"));
+
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/EnumeratedIntegerTypeTest.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/EnumeratedIntegerTypeTest.java
new file mode 100644
index 000000000..eefba28ca
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/EnumeratedIntegerTypeTest.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * 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:
+ * Gerry Kessler/Oracle - initial API and implementation
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.taglibprocessing;
+
+import junit.framework.Assert;
+
+import org.eclipse.jst.jsf.metadataprocessors.features.IDefaultValue;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+
+public class EnumeratedIntegerTypeTest extends TaglibProcessingTestCase {
+
+ public void testValidValues(){
+ Assert.assertNotNull(validValuesAdapters);
+ Assert.assertFalse(validValuesAdapters.isEmpty());
+
+ IValidValues vv =(IValidValues)validValuesAdapters.get(0);
+ Assert.assertTrue(vv.isValidValue("0"));
+ Assert.assertTrue(vv.isValidValue("3"));
+ Assert.assertTrue(vv.isValidValue("5"));
+ Assert.assertTrue(vv.getValidationMessages().size()==0);
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("6"));
+ Assert.assertFalse(vv.getValidationMessages().size()==0);
+ // TODO: dead?
+ /*IValidationMessage msg = (IValidationMessage)*/vv.getValidationMessages().get(0);
+ }
+
+ public void testDefaultValues(){
+ Assert.assertNotNull(defaultValueAdapters);
+ Assert.assertFalse(defaultValueAdapters.isEmpty());
+
+ IDefaultValue dv =(IDefaultValue)defaultValueAdapters.get(0);
+ Assert.assertTrue(dv.getDefaultValue().equals("10"));
+
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/EnumeratedLongTypeTest.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/EnumeratedLongTypeTest.java
new file mode 100644
index 000000000..8c157f5e4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/EnumeratedLongTypeTest.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * 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:
+ * Gerry Kessler/Oracle - initial API and implementation
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.taglibprocessing;
+
+import junit.framework.Assert;
+
+import org.eclipse.jst.jsf.metadataprocessors.features.IDefaultValue;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidationMessage;
+
+public class EnumeratedLongTypeTest extends TaglibProcessingTestCase {
+
+ public void testValidValues(){
+ Assert.assertNotNull(validValuesAdapters);
+ Assert.assertFalse(validValuesAdapters.isEmpty());
+
+ IValidValues vv =(IValidValues)validValuesAdapters.get(0);
+ Assert.assertTrue(vv.isValidValue("0"));
+ Assert.assertTrue(vv.isValidValue("3"));
+ Assert.assertTrue(vv.isValidValue("5"));
+ Assert.assertTrue(vv.getValidationMessages().size()==0);
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("6"));
+ Assert.assertFalse(vv.getValidationMessages().size()==0);
+ IValidationMessage msg = (IValidationMessage)vv.getValidationMessages().get(0);
+ Assert.assertEquals("bogus validation message", msg.getMessage());
+ Assert.assertEquals(99, msg.getSeverity());
+ Assert.assertEquals("X99", msg.getCode());
+ }
+
+ public void testDefaultValues(){
+ Assert.assertNotNull(defaultValueAdapters);
+ Assert.assertFalse(defaultValueAdapters.isEmpty());
+
+ IDefaultValue dv =(IDefaultValue)defaultValueAdapters.get(0);
+ Assert.assertTrue(dv.getDefaultValue().equals("3"));
+
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/FacesConfigConverterIDTypeTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/FacesConfigConverterIDTypeTests.java
new file mode 100644
index 000000000..ab1c0d179
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/FacesConfigConverterIDTypeTests.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 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.metadata.tests.taglibprocessing;
+
+import org.eclipse.jst.jsf.common.internal.types.CompositeType;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.metadata.tests.util.SingleJSPTestCase;
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidELValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+
+public class FacesConfigConverterIDTypeTests extends SingleJSPTestCase {
+
+ public FacesConfigConverterIDTypeTests() {
+ super( "/testfiles/jsps/facesConfigConverterIDType.jsp.data/",
+ "/facesConfigConverterIDType.jsp",
+ JSFVersion.V1_1,
+ "/testfiles/web/faces-config_1_1.xml.data");
+
+ }
+
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ addJavaFile("MyConverter");
+ }
+
+// public void testSanity() {
+// final IJavaProject javaProject = _jdtTestEnv.getJavaProject();
+// assertNotNull(javaProject);
+// assertNotNull(_structuredDocument);
+// }
+
+ public void testPossibleValues() {
+ IPossibleValues pv = (IPossibleValues)getProcessor(IPossibleValues.class, JSF_HTML_URI, "inputText", "converter");
+ assertNotNull(pv);
+
+ assertEquals(13, pv.getPossibleValues().size());
+
+ assertPossibleValues(pv.getPossibleValues(),
+ new String[]{
+ "com.foo.myconverter",
+ "javax.faces.BigDecimal",
+ "javax.faces.BigInteger",
+ "javax.faces.Byte",
+ "javax.faces.Boolean",
+ "javax.faces.Character",
+ "javax.faces.DateTime",
+ "javax.faces.Double",
+ "javax.faces.Float",
+ "javax.faces.Integer",
+ "javax.faces.Number",
+ "javax.faces.Long",
+ "javax.faces.Short"} );
+
+ }
+ public void testGetExpectedRuntimeValue() {
+ IValidELValues vv = (IValidELValues)getProcessor(IValidELValues.class, JSF_HTML_URI, "inputText", "converter");
+ assertNotNull(vv);
+
+ try {
+ assertNotNull(vv.getExpectedRuntimeType());
+ assertTrue(vv.getExpectedRuntimeType() instanceof CompositeType);
+ } catch (Exception e) {
+ }
+ }
+
+ public void testValidValues() {
+ IValidValues vv = (IValidValues)getProcessor(IValidValues.class, JSF_HTML_URI, "inputText", "converter");
+ assertNotNull(vv);
+
+ assertTrue(vv.isValidValue("com.foo.myconverter"));
+ assertTrue(vv.isValidValue("javax.faces.BigDecimal"));
+ assertTrue(vv.isValidValue("javax.faces.BigInteger"));
+ assertTrue(vv.isValidValue("javax.faces.Byte"));
+ assertTrue(vv.isValidValue("javax.faces.Boolean"));
+ assertTrue(vv.isValidValue("javax.faces.Character"));
+ assertTrue(vv.isValidValue("javax.faces.DateTime"));
+ assertTrue(vv.isValidValue("javax.faces.Double"));
+ assertTrue(vv.isValidValue("javax.faces.Float"));
+ assertTrue(vv.isValidValue("javax.faces.Integer"));
+ assertTrue(vv.isValidValue("javax.faces.Number"));
+ assertTrue(vv.isValidValue("javax.faces.Long"));
+ assertTrue(vv.isValidValue("javax.faces.Short"));
+
+ assertFalse(vv.isValidValue("com.foo.myconvertersubclass1"));
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/FacesConfigValidatorIDTypeTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/FacesConfigValidatorIDTypeTests.java
new file mode 100644
index 000000000..ca4d72f66
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/FacesConfigValidatorIDTypeTests.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * 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.metadata.tests.taglibprocessing;
+
+import org.eclipse.jst.jsf.common.internal.types.CompositeType;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.metadata.tests.util.SingleJSPTestCase;
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidELValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+
+public class FacesConfigValidatorIDTypeTests extends SingleJSPTestCase {
+ private final String tagName = "validator";
+ private final String attrName = "validatorId";
+
+ public FacesConfigValidatorIDTypeTests() {
+ super( "/testfiles/jsps/facesConfigValidatorIDType.jsp.data/",
+ "/facesConfigValidatorIDType.jsp",
+ JSFVersion.V1_1,
+ "/testfiles/web/faces-config_1_1.xml.data");
+
+ }
+
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ addJavaFile("MyValidator");
+ }
+
+// public void testSanity() {
+// final IJavaProject javaProject = _jdtTestEnv.getJavaProject();
+// assertNotNull(javaProject);
+// assertNotNull(_structuredDocument);
+// }
+
+ public void testPossibleValues() {
+ IPossibleValues pv = (IPossibleValues)getProcessor(IPossibleValues.class, JSF_CORE_URI, tagName, attrName);
+ assertNotNull(pv);
+
+ assertEquals(4, pv.getPossibleValues().size());
+
+ assertPossibleValues(pv.getPossibleValues(),
+ new String[]{
+ "com.foo.myvalidator",
+ "javax.faces.DoubleRange",
+ "javax.faces.Length",
+ "javax.faces.LongRange"} );
+
+ }
+
+ public void testGetExpectedRuntimeValue() {
+ IValidELValues vv = (IValidELValues)getProcessor(IValidELValues.class, JSF_CORE_URI, tagName, attrName);
+ assertNotNull(vv);
+
+ try {
+ assertNotNull(vv.getExpectedRuntimeType());
+ assertTrue(vv.getExpectedRuntimeType() instanceof CompositeType);
+ } catch (Exception e) {
+ }
+ }
+
+ public void testValidValues() {
+ IValidValues vv = (IValidValues)getProcessor(IValidValues.class, JSF_CORE_URI, tagName, attrName);
+ assertNotNull(vv);
+
+ assertTrue(vv.isValidValue("com.foo.myvalidator"));
+ assertTrue(vv.isValidValue("javax.faces.DoubleRange"));
+ assertTrue(vv.isValidValue("javax.faces.Length"));
+ assertTrue(vv.isValidValue("javax.faces.LongRange"));
+
+ assertFalse(vv.isValidValue("com.foo.myconverter"));
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/IntegerTypeTest.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/IntegerTypeTest.java
new file mode 100644
index 000000000..0d047451d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/IntegerTypeTest.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * 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:
+ * Gerry Kessler/Oracle - initial API and implementation
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.taglibprocessing;
+
+import junit.framework.Assert;
+
+import org.eclipse.jst.jsf.metadataprocessors.features.ELIsNotValidException;
+import org.eclipse.jst.jsf.metadataprocessors.features.IDefaultValue;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidELValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+
+public class IntegerTypeTest extends TaglibProcessingTestCase {
+ public void testPossibleValues(){
+ Assert.assertNotNull(possibleValueAdapters);
+ Assert.assertTrue(possibleValueAdapters.isEmpty());
+ }
+
+ public void testValidValues(){
+ Assert.assertNotNull(validValuesAdapters);
+ Assert.assertFalse(validValuesAdapters.isEmpty());
+
+ IValidValues vv =(IValidValues)validValuesAdapters.get(0);
+ Assert.assertTrue(vv.isValidValue("0"));
+ Assert.assertTrue(vv.getValidationMessages().size()==0);
+ Assert.assertTrue(vv.isValidValue("255"));
+ Assert.assertFalse(vv.isValidValue("False"));
+ Assert.assertFalse(vv.getValidationMessages().size()==0);
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("-1"));
+ Assert.assertTrue(vv.getValidationMessages().size()==1);
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("555555555555555555"));
+ Assert.assertTrue(vv.getValidationMessages().size()==1);
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("555f9"));
+ Assert.assertTrue(vv.getValidationMessages().size()==1);
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("2e1"));
+ Assert.assertTrue(vv.getValidationMessages().size()==1);
+ }
+
+ public void testDefaultValues(){
+ Assert.assertNotNull(defaultValueAdapters);
+ Assert.assertFalse(defaultValueAdapters.isEmpty());
+
+ IDefaultValue dv =(IDefaultValue)defaultValueAdapters.get(0);
+ Assert.assertTrue(dv.getDefaultValue() != null);
+ Assert.assertTrue(dv.getDefaultValue().equals("10"));
+ }
+
+ public void testCreateValues(){
+ Assert.assertNotNull(createValuesAdapters);
+ Assert.assertTrue(createValuesAdapters.isEmpty());
+ }
+
+ public void testGetExpectedReturnType(){
+ Assert.assertNotNull(validELValuesAdapters);
+ IValidELValues vvel = (IValidELValues)validELValuesAdapters.get(0);
+ try {
+ Assert.assertEquals("int", vvel.getExpectedRuntimeType().toUserReadableString());
+ } catch (ELIsNotValidException e) {
+ fail("testGetExpectedReturnType");
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/JSFCoreTestCase.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/JSFCoreTestCase.java
new file mode 100644
index 000000000..058c8adfd
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/JSFCoreTestCase.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * 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:
+ * Gerry Kessler/Oracle - initial API and implementation
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.taglibprocessing;
+
+public abstract class JSFCoreTestCase extends TaglibProcessingTestCase{
+ public void setUp(){
+ uri = "http://java.sun.com/jsf/core";
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/JSFHTMLTestCase.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/JSFHTMLTestCase.java
new file mode 100644
index 000000000..30f8471ae
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/JSFHTMLTestCase.java
@@ -0,0 +1,183 @@
+/*******************************************************************************
+ * 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:
+ * Gerry Kessler/Oracle - initial API and implementation
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.taglibprocessing;
+
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jst.jsf.common.metadata.Entity;
+import org.eclipse.jst.jsf.common.metadata.Model;
+import org.eclipse.jst.jsf.common.metadata.Trait;
+import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataDomainContext;
+import org.eclipse.jst.jsf.common.metadata.query.IResultSet;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryContextFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.MetaDataQueryFactory;
+import org.eclipse.jst.jsf.common.metadata.query.internal.taglib.ITaglibDomainEntityPredicateMatcher;
+import org.eclipse.jst.jsf.common.metadata.query.internal.taglib.ITaglibDomainMetaDataQuery;
+import org.eclipse.jst.jsf.common.metadata.query.internal.taglib.ITaglibDomainPredicateMatcherFactory;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.metadata.tests.util.IJSFRuntimeRequiredV11;
+import org.eclipse.jst.jsf.metadata.tests.util.JSPTestCase;
+import org.eclipse.jst.jsf.tagdisplay.internal.paletteinfos.PaletteInfo;
+import org.eclipse.jst.jsf.tagdisplay.internal.paletteinfos.PaletteInfos;
+import org.eclipse.jst.jsf.tagdisplay.internal.paletteinfos.TagCreationInfo;
+import org.eclipse.jst.jsf.test.util.mock.MockWorkspaceContext;
+
+public class JSFHTMLTestCase extends JSPTestCase implements IJSFRuntimeRequiredV11{
+ private String _uri;
+ private static final boolean DEBUG = false;
+
+ ITaglibDomainMetaDataQuery _query;
+
+ public JSFHTMLTestCase () {
+ super( JSFVersion.V1_1,
+ "/testfiles/web/faces-config_1_1.xml.data");
+
+ }
+ public void setUp() throws Exception{
+ super.setUp();
+
+// projectTestEnvironment.loadResourceInWebRoot(MetadataTestsPlugin.getDefault().getBundle(),
+// "/testfiles/html_basic.tld",
+// "/WEB-INF/lib/html_basic.tld");
+
+ _uri = "http://java.sun.com/jsf/html";
+ final IMetaDataDomainContext context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext(_testEnv.getTestProject());
+ _query = MetaDataQueryFactory.getInstance().createQuery(context);
+ }
+
+ public void testPaletteInfos(){
+
+ Model model = _query.findTagLibraryModel(_uri);
+ Trait trait = _query.findTrait(model , PaletteInfos.TRAIT_ID);
+
+ assertNotNull(trait);
+ assertTrue(trait.getValue() instanceof PaletteInfos);
+ PaletteInfos pis = (PaletteInfos)trait.getValue();
+ PaletteInfo cmdBtn = pis.findPaletteInfoById("commandButton");
+ assertNotNull(cmdBtn);
+ assertEquals("Command Button", cmdBtn.getDisplayLabel());
+
+ PaletteInfo info = pis.findPaletteInfoById("inputText");
+ assertNotNull(info);
+ //requires jsf html tld to work!
+ assertNotNull(info.getDisplayLabel());
+ assertNotNull(info.getDescription());
+ assertNull(info.getExpert());
+ assertNull(info.getHidden());
+ assertFalse(info.isExpert());
+ assertFalse(info.isHidden());
+ assertNotNull(info.getSmallIcon());
+ assertNotNull(info.getLargeIcon());
+ }
+
+ public void testCreateInfos(){
+ Trait trait = _query.getQueryHelper().getTrait(_uri, "dataTable", TagCreationInfo.TRAIT_ID);
+ assertNotNull(trait);
+ assertTrue(trait.getValue() instanceof TagCreationInfo);
+ TagCreationInfo tci = (TagCreationInfo)trait.getValue();
+
+ Object template = tci.getTemplate();
+ assertNotNull(template);
+ assertTrue(template instanceof String);
+
+ trait = _query.getQueryHelper().getTrait(_uri, "commandLink", TagCreationInfo.TRAIT_ID);
+ assertNotNull(trait);
+ assertTrue(trait.getValue() instanceof TagCreationInfo);
+ tci = (TagCreationInfo)trait.getValue();
+ assertNotNull(tci.getAttributes());
+ assertNotNull(tci.getTemplate());
+ assertEquals(0, tci.getAttributes().size());
+
+ }
+
+ public void testQuery() throws Exception {
+ //tests querying JSF_HTML using new APIs
+ IProject project = new MockWorkspaceContext().createProject("test");
+ IMetaDataDomainContext context = MetaDataQueryContextFactory.getInstance().createTaglibDomainModelContext(project);
+ ITaglibDomainMetaDataQuery query = MetaDataQueryFactory.getInstance().createQuery(context);
+
+ Model tagLib = query.findTagLibraryModel(_uri);
+ assertNotNull(tagLib);
+
+ Entity tag = query.findTagEntity(tagLib, "commandButton");
+ assertNotNull(tag);
+
+ Entity tagAttr = query.findTagAttributeEntity(tag, "value");
+ assertNotNull(tagAttr);
+
+ Trait trait1 = query.findTrait(tagLib, "paletteInfos");
+ assertNotNull(trait1);
+
+ Trait trait2 = query.findTrait(tag, "small-icon");
+ assertNotNull(trait2);
+
+ Trait trait3 = query.findTrait(tagAttr, "attribute-value-runtime-type");
+ assertNotNull(trait3);
+
+ //All tags beginning with c (case-insensitve)
+ ITaglibDomainPredicateMatcherFactory factory = MetaDataQueryContextFactory.getInstance().getTaglibDomainPredicateMatcherFactory();
+ ITaglibDomainEntityPredicateMatcher entityMatcher = factory.createTagEntityMatcher(_uri, "^[cC].*");
+ IResultSet<Entity> tags = query.findEntities(entityMatcher);
+ assertNotNull(tags.getResults());
+ assertEquals(3, tags.getResults().size());
+ dumpEntities(tags.getResults(), "All tags beginning with c (case-insensitive)");
+
+
+ //DISABLING BELOW SINCE IT MAY BE TOUGH TO MAINTAIN
+// //All traits with attribute-value-runtime-types for tag attrs beginning with l, m, n,..., or p (case-sensitive)
+// entityMatcher = factory.createTagAttributeEntityMatcher(_uri,"^[d].*", "^[a-c].*");
+// IPredicateMatcher<Trait> traitMatcher = factory.createTraitMatcher("attribute-value-runtime-type");
+// IResultSet<Trait> traits = query.findTraits(entityMatcher, traitMatcher);
+// assertNotNull(traits.getResults());
+//// assertEquals(3, traits.getResults().size());
+// dumpTraits(traits.getResults(), "All traits with attribute-value-runtime-types for tag attrs on tags beginning beginning with a, b, or c (case-sensitive)");
+
+
+ }
+ private void dumpEntities(List<Entity> tags, String title) throws Exception {
+ if (DEBUG ) {
+ printHeader(title);
+ for (final Entity tag: tags) {
+ System.out.println(tag.getModel().getId()+"/"+tag.getId());
+ }
+ printFooter(tags.size());
+ }
+ }
+
+// private void dumpTraits(List<Trait> traits, String title) throws Exception {
+// if (DEBUG ) {
+// printHeader(title);
+// for (final Trait trait: traits) {
+// System.out.println(trait.getId() + "(for: "+trait.eContainer().toString()+")");
+// }
+// printFooter(traits.size());
+// }
+// }
+
+ private void printHeader(String title) {
+ System.out.println();
+ System.out.println(title);
+ printSeparator();
+ }
+
+ private void printFooter(int size) {
+ printSeparator();
+ System.out.println("Size: "+size);
+ System.out.println();
+
+ }
+
+ private void printSeparator() {
+ System.out.println("--------------------------------------------------------");
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/JavaClassTypeTest.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/JavaClassTypeTest.java
new file mode 100644
index 000000000..900d79d63
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/JavaClassTypeTest.java
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * 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:
+ * Gerry Kessler/Oracle - initial API and implementation
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.taglibprocessing;
+
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.metadata.tests.util.IJSFRuntimeRequiredV11;
+import org.eclipse.jst.jsf.metadata.tests.util.SingleJSPTestCase;
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+
+public class JavaClassTypeTest extends SingleJSPTestCase implements IJSFRuntimeRequiredV11 {
+
+ public JavaClassTypeTest() {
+ super("/testfiles/jsps/javaClassType.jsp.data",
+ "/javaClassType.jsp",
+ JSFVersion.V1_1,
+ "/testfiles/web/faces-config_1_1.xml.data");
+
+ }
+
+ public void setUp() throws Exception {
+ super.setUp();
+
+ //add source files
+ addJavaFile("MyConverter");
+ addJavaFile("MyConverterSubclass1");
+ addJavaFile("MyConverterSubclass2");
+ addJavaFile("MyConverterSubclass3");
+ addJavaFile("MySubclassOfMyConverterSubclass1");
+
+ }
+
+// public void testSanity() {
+// final IJavaProject javaProject = _jdtTestEnv.getJavaProject();
+// assertNotNull(javaProject);
+// assertNotNull(_structuredDocument);
+// }
+
+ public void testPossibleValues() {
+
+ IPossibleValues pv = (IPossibleValues)getProcessor(IPossibleValues.class, TAG_TEST_URI, TAG_TEST_TAG, "JavaClassType1");
+ assertNotNull(pv.getPossibleValues());
+ assertEquals(3, pv.getPossibleValues().size());
+ // all classes implement
+ assertPossibleValues(pv.getPossibleValues(),
+ new String[]{
+ "com.foo.MyConverterSubclass1",
+ "com.foo.MyConverterSubclass2",
+ "com.foo.MySubclassOfMyConverterSubclass1"} );
+ //Below is not currently working ... need to fix results with valid-superclass set
+// pv = (IPossibleValues)getProcessor(IPossibleValues.class, TAG_TEST_URI, TAG_TEST_TAG, "JavaClassType2");
+// assertNotNull(pv.getPossibleValues());
+// assertTrue(pv.getPossibleValues().size() == 5);
+// assertPossibleValues(pv.getPossibleValues(),
+// new String[]{
+// "com.foo.MyConverter",
+// "com.foo.MyConverterSubclass1",
+// "com.foo.MyConverterSubclass2",
+// "com.foo.MyConverterSubclass3",
+// "com.foo.MySubclassOfMyConverterSubclass1"} );
+
+ pv = (IPossibleValues)getProcessor(IPossibleValues.class, TAG_TEST_URI, TAG_TEST_TAG, "JavaClassType3");
+ assertNotNull(pv.getPossibleValues());
+ assertEquals(3, pv.getPossibleValues().size());
+ assertPossibleValues(pv.getPossibleValues(),
+ new String[]{
+ "com.foo.MyConverterSubclass2",
+ "com.foo.MyConverterSubclass3",
+ "com.foo.MySubclassOfMyConverterSubclass1"} );
+
+ //Below is not currently working... need to fix results with multiple valid-interfaces set
+// pv = (IPossibleValues)getProcessor(IPossibleValues.class, TAG_TEST_URI, TAG_TEST_TAG, "JavaClassType4");
+// assertNotNull(pv.getPossibleValues());
+// assertTrue(pv.getPossibleValues().size() == 2);
+// assertPossibleValues(pv.getPossibleValues(),
+// new String[]{
+// "com.foo.MyConverterSubclass2",
+// "com.foo.MySubclassOfMyConverterSubclass1"} );
+ }
+
+
+
+ public void testValidValues() {
+ IValidValues vv = (IValidValues)getProcessor(IValidValues.class, JSF_CORE_URI, "actionListener", "type");
+
+ assertNotNull(vv);
+ assertFalse(vv.isValidValue("foobar"));
+ //below is valid only when using Sun impl
+ //assertTrue(vv.isValidValue("com.sun.faces.application.ActionListenerImpl"));
+
+ //single interface
+ vv = (IValidValues)getProcessor(IValidValues.class, TAG_TEST_URI, TAG_TEST_TAG, "JavaClassType1");
+ assertNotNull(vv);
+ assertFalse(vv.isValidValue("com.foo.MyConverter"));
+ assertTrue(vv.isValidValue("com.foo.MyConverterSubclass1"));
+ assertTrue(vv.isValidValue("com.foo.MyConverterSubclass2"));
+ assertFalse(vv.isValidValue("com.foo.MyConverterSubclass3"));
+ assertTrue(vv.isValidValue("com.foo.MySubclassOfMyConverterSubclass1"));
+
+ //superclass test
+ vv = (IValidValues)getProcessor(IValidValues.class, TAG_TEST_URI, TAG_TEST_TAG, "JavaClassType2");
+ assertNotNull(vv);
+ assertTrue(vv.isValidValue("com.foo.MyConverter"));
+ assertTrue(vv.isValidValue("com.foo.MyConverterSubclass1"));
+ assertTrue(vv.isValidValue("com.foo.MyConverterSubclass2"));
+ assertTrue(vv.isValidValue("com.foo.MyConverterSubclass3"));
+ assertTrue(vv.isValidValue("com.foo.MySubclassOfMyConverterSubclass1"));
+
+ //superclass + single interface test
+ vv = (IValidValues)getProcessor(IValidValues.class, TAG_TEST_URI, TAG_TEST_TAG, "JavaClassType3");
+ assertNotNull(vv);
+ assertFalse(vv.isValidValue("com.foo.MyConverter"));
+ assertFalse(vv.isValidValue("com.foo.MyConverterSubclass1"));
+ assertTrue(vv.isValidValue("com.foo.MyConverterSubclass2"));
+ assertTrue(vv.isValidValue("com.foo.MyConverterSubclass3"));
+ assertTrue(vv.isValidValue("com.foo.MySubclassOfMyConverterSubclass1"));
+
+ //superclass + multiple interface test
+ vv = (IValidValues)getProcessor(IValidValues.class, TAG_TEST_URI, TAG_TEST_TAG, "JavaClassType4");
+ assertNotNull(vv);
+ assertFalse(vv.isValidValue("com.foo.MyConverter"));
+ assertFalse(vv.isValidValue("com.foo.MyConverterSubclass1"));
+ assertTrue(vv.isValidValue("com.foo.MyConverterSubclass2"));
+ assertFalse(vv.isValidValue("com.foo.MyConverterSubclass3"));
+ assertTrue(vv.isValidValue("com.foo.MySubclassOfMyConverterSubclass1"));
+
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/LanguageCodeTypeTest.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/LanguageCodeTypeTest.java
new file mode 100644
index 000000000..15c7be84a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/LanguageCodeTypeTest.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * 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.metadata.tests.taglibprocessing;
+
+import junit.framework.Assert;
+
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+import org.eclipse.jst.pagedesigner.editors.properties.IPropertyPageDescriptor;
+
+public class LanguageCodeTypeTest extends TaglibProcessingTestCase {
+ public void testPossibleValues(){
+ Assert.assertNotNull(possibleValueAdapters);
+ IPossibleValues pvs = (IPossibleValues)possibleValueAdapters.get(0);
+ Assert.assertEquals(58, pvs.getPossibleValues().size());
+ }
+
+ public void testValidValues(){
+ Assert.assertNotNull(validValuesAdapters);
+ Assert.assertFalse(validValuesAdapters.isEmpty());
+
+ IValidValues vv =(IValidValues)validValuesAdapters.get(0);
+ //positive tests
+ assertTrue(vv.isValidValue("en"));
+ //negative tests
+ vv.getValidationMessages().clear();
+ assertFalse(vv.isValidValue("xxx"));
+ }
+
+ public void testPropertyPageDescriptor(){
+ Assert.assertNotNull(propertyPageDescriptorAdapters);
+ Assert.assertFalse(propertyPageDescriptorAdapters.isEmpty());
+
+ IPropertyPageDescriptor ppd =(IPropertyPageDescriptor)propertyPageDescriptorAdapters.get(0);
+ //positive tests
+ assertEquals("ACategory", ppd.getCategory());
+ assertEquals(false, ppd.isRequired());
+
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/LengthTypeTest.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/LengthTypeTest.java
new file mode 100644
index 000000000..ba71ccc40
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/LengthTypeTest.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * 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:
+ * Gerry Kessler/Oracle - initial API and implementation
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.taglibprocessing;
+
+import junit.framework.Assert;
+
+import org.eclipse.jst.jsf.metadataprocessors.features.ELIsNotValidException;
+import org.eclipse.jst.jsf.metadataprocessors.features.IDefaultValue;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidELValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+
+public class LengthTypeTest extends TaglibProcessingTestCase {
+ public void testPossibleValues(){
+ Assert.assertNotNull(possibleValueAdapters);
+ Assert.assertTrue(possibleValueAdapters.isEmpty());
+ }
+
+ public void testValidValues(){
+ Assert.assertNotNull(validValuesAdapters);
+ Assert.assertFalse(validValuesAdapters.isEmpty());
+
+ IValidValues vv =(IValidValues)validValuesAdapters.get(0);
+ Assert.assertTrue(vv.isValidValue("0"));
+ Assert.assertTrue(vv.getValidationMessages().size()==0);
+ Assert.assertTrue(vv.isValidValue("100"));
+ Assert.assertTrue(vv.isValidValue("101"));
+ Assert.assertFalse(vv.isValidValue("False"));
+ Assert.assertFalse(vv.isValidValue("False"));
+ Assert.assertFalse(vv.getValidationMessages().size()==0);
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("-1"));
+ Assert.assertTrue(vv.getValidationMessages().size()==1);
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("555555555555555555"));
+ Assert.assertTrue(vv.getValidationMessages().size()==1);
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("555f9"));
+ Assert.assertTrue(vv.getValidationMessages().size()==1);
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("2e1"));
+ Assert.assertTrue(vv.getValidationMessages().size()==1);
+ vv.getValidationMessages().clear();
+ //test percentages
+ Assert.assertTrue(vv.isValidValue("20%"));
+ Assert.assertFalse(vv.isValidValue("%20"));
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("2%0"));
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("%"));
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("1x"));
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("x"));
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("-10%"));
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("-20"));
+ vv.getValidationMessages().clear();
+ Assert.assertTrue(vv.isValidValue("100%"));
+
+ }
+
+ public void testDefaultValues(){
+ Assert.assertNotNull(defaultValueAdapters);
+ Assert.assertFalse(defaultValueAdapters.isEmpty());
+
+ IDefaultValue dv =(IDefaultValue)defaultValueAdapters.get(0);
+ Assert.assertTrue(dv.getDefaultValue() != null);
+ Assert.assertTrue(dv.getDefaultValue().equals("100%"));
+ }
+
+ public void testCreateValues(){
+ Assert.assertNotNull(createValuesAdapters);
+ Assert.assertTrue(createValuesAdapters.isEmpty());
+ }
+
+ public void testGetExpectedReturnType(){
+ Assert.assertNotNull(validELValuesAdapters);
+ IValidELValues vvel = (IValidELValues)validELValuesAdapters.get(0);
+ try {
+ Assert.assertEquals("int", vvel.getExpectedRuntimeType().toUserReadableString());
+ } catch (ELIsNotValidException e) {
+ fail("testGetExpectedReturnType");
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/LinkTypeTest.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/LinkTypeTest.java
new file mode 100644
index 000000000..e17a3bbf6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/LinkTypeTest.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * 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
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.taglibprocessing;
+
+import junit.framework.Assert;
+
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+
+public class LinkTypeTest extends TaglibProcessingTestCase {
+ public void testPossibleValues() {
+ Assert.assertNotNull(possibleValueAdapters);
+ Assert.assertFalse(possibleValueAdapters.isEmpty());
+
+ IPossibleValues pvs = (IPossibleValues) possibleValueAdapters.get(0);
+ Assert.assertTrue(pvs.getPossibleValues().size() >= 8);
+ }
+
+ public void testValidValuesValues() {
+ Assert.assertNotNull(validValuesAdapters);
+ Assert.assertFalse(validValuesAdapters.isEmpty());
+
+ IValidValues pvs = (IValidValues) validValuesAdapters.get(0);
+ Assert.assertTrue(pvs.isValidValue("a"));
+ Assert.assertTrue(pvs.isValidValue("Chapter"));
+
+ //negative
+ Assert.assertFalse(pvs.isValidValue(""));
+ pvs.getValidationMessages().clear();
+ Assert.assertFalse(pvs.isValidValue(" "));
+ pvs.getValidationMessages().clear();
+ Assert.assertFalse(pvs.isValidValue(null));
+ pvs.getValidationMessages().clear();
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/LocaleTypeTest.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/LocaleTypeTest.java
new file mode 100644
index 000000000..13d29da0c
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/LocaleTypeTest.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * 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:
+ * Oracle - initial API and implementation
+ *
+ ********************************************************************************/
+
+package org.eclipse.jst.jsf.metadata.tests.taglibprocessing;
+
+import junit.framework.Assert;
+
+import org.eclipse.jst.jsf.metadataprocessors.features.ELIsNotValidException;
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidELValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+import org.eclipse.jst.jsf.taglibprocessing.attributevalues.MultiSignatureEnumerationType;
+import org.eclipse.jst.pagedesigner.editors.properties.IPropertyPageDescriptor;
+
+/**
+ * Tests {@link LocaleTypeTest} and {@link MultiSignatureEnumerationType} *
+ */
+public class LocaleTypeTest extends TaglibProcessingTestCase {
+ public void testPossibleValues(){
+ Assert.assertNotNull(possibleValueAdapters);
+ IPossibleValues pvs = (IPossibleValues)possibleValueAdapters.get(0);
+ Assert.assertTrue( pvs.getPossibleValues().size() > 50);//there are a bunch and it depends on the env.
+ }
+
+ public void testValidValues(){
+ Assert.assertNotNull(validValuesAdapters);
+ Assert.assertFalse(validValuesAdapters.isEmpty());
+
+ IValidValues vv =(IValidValues)validValuesAdapters.get(0);
+ //positive tests
+ assertTrue(vv.isValidValue("en"));
+ //negative tests
+ vv.getValidationMessages().clear();
+ assertFalse(vv.isValidValue("xxx"));
+ }
+
+ public void testPropertyPageDescriptor(){
+ Assert.assertNotNull(propertyPageDescriptorAdapters);
+ Assert.assertFalse(propertyPageDescriptorAdapters.isEmpty());
+
+ IPropertyPageDescriptor ppd =(IPropertyPageDescriptor)propertyPageDescriptorAdapters.get(0);
+ //positive test
+ assertEquals("ACategory", ppd.getCategory());
+ assertEquals(false, ppd.isRequired());
+
+ }
+
+ public void testELValidValues() {
+ //value can be String (non-EL) or an EL expression pointing at Locale
+ Assert.assertNotNull(validELValuesAdapters);
+ Assert.assertFalse(validELValuesAdapters.isEmpty());
+
+ IValidELValues vv =(IValidELValues)validELValuesAdapters.get(0);
+ try {
+ String[] validSigs = vv.getExpectedRuntimeType().getSignatures();
+ assertEquals(2, validSigs.length);
+ assertEquals("Ljava.util.Locale;", validSigs[0]);
+ assertEquals("Ljava.lang.String;", validSigs[1]);
+ } catch (ELIsNotValidException e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/LongTypeTest.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/LongTypeTest.java
new file mode 100644
index 000000000..ca13ed429
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/LongTypeTest.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * 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:
+ * Gerry Kessler/Oracle - initial API and implementation
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.taglibprocessing;
+
+import junit.framework.Assert;
+
+import org.eclipse.jst.jsf.metadataprocessors.features.ELIsNotValidException;
+import org.eclipse.jst.jsf.metadataprocessors.features.IDefaultValue;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidELValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+
+public class LongTypeTest extends TaglibProcessingTestCase {
+
+ public void testPossibleValues(){
+ Assert.assertNotNull(possibleValueAdapters);
+ Assert.assertTrue(possibleValueAdapters.isEmpty());
+ }
+
+ public void testValidValues(){
+ Assert.assertNotNull(validValuesAdapters);
+ Assert.assertFalse(validValuesAdapters.isEmpty());
+
+ IValidValues vv =(IValidValues)validValuesAdapters.get(0);
+ Assert.assertTrue(vv.isValidValue("0"));
+ Assert.assertTrue(vv.getValidationMessages().size()==0);
+ vv.getValidationMessages().clear();
+ Assert.assertTrue(vv.isValidValue("1000"));
+ Assert.assertTrue(vv.isValidValue("-1000"));
+ Assert.assertFalse(vv.isValidValue("-10L"));
+ Assert.assertFalse(vv.isValidValue("False"));
+ Assert.assertFalse(vv.getValidationMessages().size()==0);
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("-1001"));
+ Assert.assertTrue(vv.getValidationMessages().size()==1);
+ vv.getValidationMessages().clear();
+ Assert.assertTrue(vv.isValidValue("-1"));
+ Assert.assertTrue(vv.getValidationMessages().size()==0);
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("555555555555555555"));
+ Assert.assertTrue(vv.getValidationMessages().size()==1);
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("555f9"));
+ Assert.assertTrue(vv.getValidationMessages().size()==1);
+ vv.getValidationMessages().clear();
+ Assert.assertFalse(vv.isValidValue("2e1"));
+ Assert.assertTrue(vv.getValidationMessages().size()==1);
+ }
+
+ public void testDefaultValues(){
+ Assert.assertNotNull(defaultValueAdapters);
+ Assert.assertFalse(defaultValueAdapters.isEmpty());
+
+ IDefaultValue dv =(IDefaultValue)defaultValueAdapters.get(0);
+ Assert.assertTrue(dv.getDefaultValue() == null);
+// Assert.assertTrue(dv.getDefaultValue().equals("10"));
+ }
+
+ public void testCreateValues(){
+ Assert.assertNotNull(createValuesAdapters);
+ Assert.assertTrue(createValuesAdapters.isEmpty());
+ }
+
+ public void testGetExpectedReturnType(){
+ Assert.assertNotNull(validELValuesAdapters);
+ IValidELValues vvel = (IValidELValues)validELValuesAdapters.get(0);
+ try {
+ Assert.assertEquals("long", vvel.getExpectedRuntimeType().toUserReadableString());
+ } catch (ELIsNotValidException e) {
+ fail("testGetExpectedReturnType");
+ }
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/MethodBindingTypeTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/MethodBindingTypeTests.java
new file mode 100644
index 000000000..03556f75a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/MethodBindingTypeTests.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 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.metadata.tests.taglibprocessing;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jst.jsf.common.internal.types.CompositeType;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.metadata.tests.util.SingleJSPTestCase;
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidELValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidationMessage;
+
+public class MethodBindingTypeTests extends SingleJSPTestCase {
+ private final String tagName = "inputText";
+ private final String attrName = "validator";
+
+ public MethodBindingTypeTests() {
+ super( "/testfiles/jsps/facesConfigValidatorIDType.jsp.data/",
+ "/facesConfigValidatorIDType.jsp",
+ JSFVersion.V1_1,
+ "/testfiles/web/faces-config_1_1.xml.data");
+ }
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ addJavaFile("MyBean");
+ }
+
+ public void testGetExpectedRuntimeType() {
+ IValidELValues vv = (IValidELValues)getProcessor(IValidELValues.class, JSF_HTML_URI, tagName, attrName);
+ assertNotNull(vv);
+
+ try {
+ assertNotNull(vv.getExpectedRuntimeType());
+ assertTrue(vv.getExpectedRuntimeType() instanceof CompositeType);
+ } catch (Exception e) {
+ }
+
+ }
+
+ public void testPossibleValues() {
+ IPossibleValues vv = (IPossibleValues)getProcessor(IPossibleValues.class, JSF_HTML_URI, tagName, attrName);
+ assertNull(vv); //possible value is not supported!
+
+ }
+ public void testIsValidValue() {
+ IValidValues vv = (IValidValues)getProcessor(IValidValues.class, JSF_HTML_URI, tagName, attrName);
+ assertNotNull(vv);
+
+ assertFalse(vv.isValidValue("everything is invalid!"));
+ assertNotNull(vv.getValidationMessages());
+ assertEquals(1, vv.getValidationMessages().size());
+ //throw in some coverage on IValidationMessage
+ IValidationMessage msg = (IValidationMessage)vv.getValidationMessages().get(0);
+ assertEquals("MethodBinding attribute values must be EL expressions.", msg.getMessage());
+ assertNull(msg.getCode());
+ assertEquals(IStatus.WARNING, msg.getSeverity());
+
+ assertFalse(vv.isValidValue(""));
+
+
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/NumberPatternTypeTest.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/NumberPatternTypeTest.java
new file mode 100644
index 000000000..5e852a9c0
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/NumberPatternTypeTest.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * 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
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.taglibprocessing;
+
+import junit.framework.Assert;
+
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues;
+
+public class NumberPatternTypeTest extends TaglibProcessingTestCase {
+ public void testPossibleValues() {
+ Assert.assertNotNull(possibleValueAdapters);
+ Assert.assertFalse(possibleValueAdapters.isEmpty());
+
+ IPossibleValues pvs = (IPossibleValues) possibleValueAdapters.get(0);
+ Assert.assertTrue(pvs.getPossibleValues().size() >= 8);
+ }
+
+ public void testValidValuesValues() {
+ Assert.assertNotNull(validValuesAdapters);
+ Assert.assertTrue(validValuesAdapters.isEmpty());
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/StringTypeTest.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/StringTypeTest.java
new file mode 100644
index 000000000..4cb5d107e
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/StringTypeTest.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * 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:
+ * Gerry Kessler/Oracle - initial API and implementation
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.taglibprocessing;
+
+import junit.framework.Assert;
+
+import org.eclipse.jst.jsf.metadataprocessors.features.IDefaultValue;
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValue;
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+
+
+public class StringTypeTest extends TaglibProcessingTestCase {
+ public void testPossibleValues(){
+ Assert.assertNotNull(possibleValueAdapters);
+ Assert.assertFalse(possibleValueAdapters.isEmpty());
+
+ IPossibleValues pv =(IPossibleValues)possibleValueAdapters.get(0);
+ Assert.assertTrue(pv.getPossibleValues().size() == 4);
+
+ IPossibleValue val = (IPossibleValue)pv.getPossibleValues().get(0);
+ Assert.assertFalse(val.getDisplayValue().equals(val.getValue()));
+
+ Assert.assertNotNull(val.getIcon());
+ Assert.assertFalse(val.getIcon().getClass().getName().equals("org.eclipse.jface.resource.MissingImageDescriptor"));// equals("/testfiles/icons/attr_val.gif"));
+ Assert.assertTrue(val.getIcon().getClass().getName().equals("org.eclipse.jface.resource.URLImageDescriptor"));// equals("/icons/foo.gif"));
+
+ Assert.assertTrue(val.isDefaultValue());
+
+ val = (IPossibleValue)pv.getPossibleValues().get(1);
+ Assert.assertFalse(val.getDisplayValue().equals(val.getValue()));
+ Assert.assertFalse(val.isDefaultValue());
+ }
+
+ public void testValidValues(){
+ Assert.assertNotNull(validValuesAdapters);
+ Assert.assertFalse(validValuesAdapters.isEmpty());
+
+ IValidValues vv =(IValidValues)possibleValueAdapters.get(0);
+ Assert.assertTrue(vv.isValidValue("A"));
+ Assert.assertTrue(vv.isValidValue("B"));
+ Assert.assertFalse(vv.isValidValue("a"));
+
+ }
+
+ public void testDefaultValues(){
+ Assert.assertNotNull(defaultValueAdapters);
+ Assert.assertFalse(defaultValueAdapters.isEmpty());
+
+ IDefaultValue dv =(IDefaultValue)possibleValueAdapters.get(0);
+ Assert.assertNotNull(dv.getDefaultValue());
+
+ }
+
+ public void testCreateValues(){
+ Assert.assertNotNull(createValuesAdapters);
+ Assert.assertTrue(createValuesAdapters.isEmpty());
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/TaglibProcessingTestCase.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/TaglibProcessingTestCase.java
new file mode 100644
index 000000000..7bde25dbe
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/TaglibProcessingTestCase.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * 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:
+ * Gerry Kessler/Oracle - initial API and implementation
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.taglibprocessing;
+
+import java.util.List;
+
+import org.eclipse.jst.jsf.common.metadata.tests.AbstractBaseMetaDataTestCase;
+import org.eclipse.jst.jsf.metadata.tests.MetadataTestsPlugin;
+import org.eclipse.jst.jsf.metadataprocessors.IMetaDataEnabledFeature;
+import org.eclipse.jst.jsf.metadataprocessors.MetaDataEnabledProcessingFactory;
+import org.eclipse.jst.jsf.metadataprocessors.features.ICreateValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IDefaultValue;
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidELValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+import org.eclipse.jst.pagedesigner.editors.properties.IPropertyPageDescriptor;
+
+public abstract class TaglibProcessingTestCase extends AbstractBaseMetaDataTestCase {
+// protected IStructuredDocumentContext docContext;
+ protected String uri = "http://org.eclipse.jsf/tagprocessing";
+ protected String bundle = "org.eclipse.jst.jsf.core";
+ protected String barkerBundle = MetadataTestsPlugin.ID_BUNDLE;
+ protected String tag = "MyTag";
+ protected String attributeName;
+
+ protected List<?> possibleValueAdapters;
+ protected List<?> validValuesAdapters;
+ protected List<?> defaultValueAdapters;
+ protected List<?> createValuesAdapters;
+ protected List<?> validELValuesAdapters;
+ protected List<?> propertyPageDescriptorAdapters;
+
+ public void setUp() throws Exception{
+ super.setUp();
+
+ possibleValueAdapters = getProcessorAdapters(IPossibleValues.class);
+ validValuesAdapters = getProcessorAdapters(IValidValues.class);
+ defaultValueAdapters = getProcessorAdapters(IDefaultValue.class);
+ createValuesAdapters = getProcessorAdapters(ICreateValues.class);
+ validELValuesAdapters = getProcessorAdapters(IValidELValues.class);
+ propertyPageDescriptorAdapters = getProcessorAdapters(IPropertyPageDescriptor.class);
+ }
+
+ private String getAttributeNameFromTest(){
+ if (attributeName == null){
+ attributeName = this.getClass().getName();
+ attributeName = attributeName.substring(attributeName.lastIndexOf(".") + 1);
+ attributeName = attributeName.substring(0,attributeName.length() - 4);
+ }
+ return attributeName;
+ }
+
+ protected List<? extends IMetaDataEnabledFeature> getProcessorAdapters(Class<?> featureClass) {
+ return MetaDataEnabledProcessingFactory.getInstance().
+ getAttributeValueRuntimeTypeFeatureProcessors(featureClass, docContext,
+ uri, tag , getAttributeNameFromTest());
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/TimeZoneTypeTest.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/TimeZoneTypeTest.java
new file mode 100644
index 000000000..a606be4b6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/TimeZoneTypeTest.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * 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.metadata.tests.taglibprocessing;
+
+import java.util.Locale;
+
+import junit.framework.Assert;
+
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+
+public class TimeZoneTypeTest extends TaglibProcessingTestCase {
+ public void testPossibleValues(){
+ Assert.assertNotNull(possibleValueAdapters);
+ IPossibleValues pvs = (IPossibleValues)possibleValueAdapters.get(0);
+ Assert.assertTrue( pvs.getPossibleValues().size() > 50);//there are a bunch and it depends on the env.
+ }
+
+ public void testValidValues(){
+ Assert.assertNotNull(validValuesAdapters);
+ Assert.assertFalse(validValuesAdapters.isEmpty());
+
+ IValidValues vv =(IValidValues)validValuesAdapters.get(0);
+ //positive tests
+ if (Locale.getDefault().getDisplayLanguage().equals(Locale.ENGLISH.getDisplayLanguage()))
+ assertTrue(vv.isValidValue("America/Edmonton"));
+ //negative tests
+ vv.getValidationMessages().clear();
+ assertFalse(vv.isValidValue("xxx"));
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/ValueBindingTypeTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/ValueBindingTypeTests.java
new file mode 100644
index 000000000..38be8cbf8
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/ValueBindingTypeTests.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 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.metadata.tests.taglibprocessing;
+
+import org.eclipse.jst.jsf.common.internal.types.CompositeType;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.metadata.tests.util.SingleJSPTestCase;
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidELValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+
+public class ValueBindingTypeTests extends SingleJSPTestCase {
+ private final String tagName = "outputText";
+ private final String attrName = "value";
+
+ public ValueBindingTypeTests() {
+ super( "/testfiles/jsps/facesConfigValidatorIDType.jsp.data/",
+ "/facesConfigValidatorIDType.jsp",
+ JSFVersion.V1_1,
+ "/testfiles/web/faces-config_1_1.xml.data");
+ }
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ addJavaFile("MyBean");
+ }
+
+ public void testGetExpectedRuntimeType() {
+ IValidELValues vv = (IValidELValues)getProcessor(IValidELValues.class, JSF_HTML_URI, tagName, attrName);
+ assertNotNull(vv);
+
+ try {
+ assertNotNull(vv.getExpectedRuntimeType());
+ assertTrue(vv.getExpectedRuntimeType() instanceof CompositeType);
+ } catch (Exception e) {
+ }
+
+ }
+
+ public void testPossibleValues() {
+ IPossibleValues vv = (IPossibleValues)getProcessor(IPossibleValues.class, JSF_HTML_URI, tagName, attrName);
+ assertNull(vv); //possible value is not supported!
+
+ }
+ public void testIsValidValue() {
+ IValidValues vv = (IValidValues)getProcessor(IValidValues.class, JSF_HTML_URI, tagName, attrName);
+ assertNull(vv); // non-EL valid vals not checked
+
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/ValueTypeTests.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/ValueTypeTests.java
new file mode 100644
index 000000000..2d1de981d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/taglibprocessing/ValueTypeTests.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 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.metadata.tests.taglibprocessing;
+
+import org.eclipse.jst.jsf.common.internal.types.CompositeType;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.metadata.tests.util.SingleJSPTestCase;
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidELValues;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+
+public class ValueTypeTests extends SingleJSPTestCase {
+ private final String tagName = "inputText";
+ private final String attrName = "value";
+
+ public ValueTypeTests() {
+ super( "/testfiles/jsps/facesConfigValidatorIDType.jsp.data/",
+ "/facesConfigValidatorIDType.jsp",
+ JSFVersion.V1_1,
+ "/testfiles/web/faces-config_1_1.xml.data");
+ }
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ addJavaFile("MyBean");
+ }
+
+ public void testGetExpectedRuntimeType() {
+ IValidELValues vv = (IValidELValues)getProcessor(IValidELValues.class, JSF_HTML_URI, tagName, attrName);
+ assertNotNull(vv);
+
+ try {
+ assertNotNull(vv.getExpectedRuntimeType());
+ assertTrue(vv.getExpectedRuntimeType() instanceof CompositeType);
+ } catch (Exception e) {
+ }
+
+ }
+
+ public void testPossibleValues() {
+ IPossibleValues vv = (IPossibleValues)getProcessor(IPossibleValues.class, JSF_HTML_URI, tagName, attrName);
+ assertNull(vv); //possible value is not supported!
+
+ }
+ public void testIsValidValue() {
+ IValidValues vv = (IValidValues)getProcessor(IValidValues.class, JSF_HTML_URI, tagName, attrName);
+ assertNotNull(vv);
+
+ assertTrue(vv.isValidValue("anything"));
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/util/BaseTestCase.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/util/BaseTestCase.java
new file mode 100644
index 000000000..81c448fde
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/util/BaseTestCase.java
@@ -0,0 +1,194 @@
+/*******************************************************************************
+ * 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.metadata.tests.util;
+
+import java.io.IOException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jst.common.project.facet.core.JavaFacet;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
+import org.eclipse.jst.jsf.metadata.tests.MetadataTestsPlugin;
+import org.eclipse.jst.jsf.test.util.ConfigurableTestCase;
+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.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+
+/**
+ * Base class for all JSP test cases in this plugin
+ *
+ * @author cbateman
+ *
+ */
+public abstract class BaseTestCase extends ConfigurableTestCase
+{
+ public static final String PROXY_SETTING_HOST = "proxySettings_Host";
+ public static final String PROXY_SETTING_PORT = "proxySettings_Port";
+ public static final String JSF_FACET_VERSION = "jsfFacetVersion";
+
+ private final JSFVersion _defaultJSFVersion;
+
+ /**
+ * Default constructor
+ */
+ public BaseTestCase(JSFVersion defaultJSFVersion)
+ {
+ super();
+ _defaultJSFVersion = defaultJSFVersion;
+ }
+
+ /**
+ * @param name
+ */
+ public BaseTestCase(String name, JSFVersion defaultJSFVersion) {
+ super(name);
+ _defaultJSFVersion = defaultJSFVersion;
+ }
+
+ /**
+ * The dynamic web project test environment
+ */
+ protected WebProjectTestEnvironment _testEnv;
+ /**
+ * A handle to the Java project test environment
+ */
+ protected JDTTestEnvironment _jdtTestEnv;
+
+ private MyConfiguration _configuration;
+
+
+ protected void doStandaloneSetup()
+ {
+ super.doStandaloneSetup();
+ _configuration = new MyConfiguration("www-proxy.uk.oracle.com","80",_defaultJSFVersion);
+ }
+
+ protected void doTestSuiteSetup()
+ {
+ super.doTestSuiteSetup();
+ _configuration = new MyConfiguration(_testConfiguration);
+ }
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ JSFTestUtil.setValidationEnabled(false);
+
+ if (_configuration.isProxyEnabled())
+ {
+ JSFTestUtil.setInternetProxyPreferences
+ (true, _configuration.getProxyHostName()
+ , _configuration.getProxyPort());
+ }
+
+ // if JSF 1.1, use web facet 2.4, if higher then use 2.5
+ final String webProjVersion =
+ (_configuration.getJsfVersion() == JSFVersion.V1_0
+ || _configuration.getJsfVersion() == JSFVersion.V1_1)
+ ? "2.4" : "2.5";
+
+ _testEnv = new WebProjectTestEnvironment
+ ("MetaDataTest_"+this.getClass().getName()+"_"+getName()+"_"+_configuration.getJsfVersion()
+ , JavaFacet.VERSION_1_5
+ , ProjectFacetsManager.getProjectFacet( "jst.web" ).getVersion(webProjVersion));
+ _testEnv.createProject(false);
+ assertNotNull(_testEnv);
+ assertNotNull(_testEnv.getTestProject());
+ assertTrue(_testEnv.getTestProject().isAccessible());
+
+ // sub-classes may custom their JSF env; primarily to decide what version
+ // of JSF
+ configureJSFEnvironment();
+
+ _jdtTestEnv = new JDTTestEnvironment(_testEnv);
+ configureJDTTestEnvironment(_jdtTestEnv);
+ }
+
+ /**
+ * Used to configure the JSF environment. After successful
+ * return, sub-classes must ensure that their JSF facet is
+ * installed and that there is at least one faces-config (in WEB-INF)
+ * installed
+ *
+ * @throws Exception
+ */
+ protected abstract JSFFacetedTestEnvironment configureJSFEnvironment() throws Exception;
+
+ /**
+ * Add all Java and property file resources to the Java source path
+ * needed for testing. Sub-classes may override.
+ *
+ * @param jdtTestEnv
+ * @throws Exception
+ */
+ protected void configureJDTTestEnvironment(JDTTestEnvironment jdtTestEnv) throws Exception
+ {
+ }
+
+ protected void tearDown() throws Exception
+ {
+ _testEnv.getTestProject().close(null);
+ //_testEnv.getTestProject().delete(true, null);
+ }
+
+
+ protected void addJavaFile(String file) throws IOException,
+ JavaModelException, CoreException {
+ TestFileResource resource = new TestFileResource();
+ resource.load(MetadataTestsPlugin.getDefault().getBundle(), "/testfiles/java/"+file+".java.data");
+ _jdtTestEnv.addSourceFile("src", "com.foo", file, resource.toString());
+ }
+
+
+ private static class MyConfiguration
+ {
+ private final String _proxyHostName;
+ private final String _proxyPort;
+ private final JSFVersion _jsfVersion;
+
+ MyConfiguration(final String proxyHostName, final String proxyPort, final JSFVersion jsfVersion)
+ {
+ _proxyHostName = proxyHostName;
+ _proxyPort = proxyPort;
+ _jsfVersion = jsfVersion;
+ }
+
+ MyConfiguration(TestConfiguration configuration)
+ {
+ _proxyHostName = configuration.get(BaseTestCase.PROXY_SETTING_HOST);
+ _proxyPort = configuration.get(BaseTestCase.PROXY_SETTING_PORT);
+ _jsfVersion = JSFVersion.valueOfString(configuration.get(BaseTestCase.JSF_FACET_VERSION));
+ }
+
+ public boolean isProxyEnabled()
+ {
+ return _proxyHostName != null && _proxyPort != null;
+ }
+
+ public String getProxyHostName() {
+ return _proxyHostName;
+ }
+
+ public String getProxyPort() {
+ return _proxyPort;
+ }
+
+ public JSFVersion getJsfVersion() {
+ return _jsfVersion;
+ }
+
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/util/IJSFRuntimeRequired.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/util/IJSFRuntimeRequired.java
new file mode 100644
index 000000000..b3690702a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/util/IJSFRuntimeRequired.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 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.metadata.tests.util;
+
+/**
+ * Interface alerts the test suite that a JSF runtime is required.
+ */
+public interface IJSFRuntimeRequired {
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/util/IJSFRuntimeRequiredV11.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/util/IJSFRuntimeRequiredV11.java
new file mode 100644
index 000000000..6156dad82
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/util/IJSFRuntimeRequiredV11.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 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.metadata.tests.util;
+
+/**
+ * Interface alerts the test suite that a v1.1 JSF runtime is required.
+ */
+public interface IJSFRuntimeRequiredV11 extends IJSFRuntimeRequired {
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/util/IJSFRuntimeRequiredV12.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/util/IJSFRuntimeRequiredV12.java
new file mode 100644
index 000000000..f02531a7b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/util/IJSFRuntimeRequiredV12.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 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.metadata.tests.util;
+
+/**
+ * Interface alerts the test suite that a v1.2 JSF runtime is required.
+ */
+public interface IJSFRuntimeRequiredV12 extends IJSFRuntimeRequired {
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/util/JSPTestCase.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/util/JSPTestCase.java
new file mode 100644
index 000000000..9a94761ac
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/util/JSPTestCase.java
@@ -0,0 +1,172 @@
+/*******************************************************************************
+ * 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 - initial implementation
+ *******************************************************************************/
+package org.eclipse.jst.jsf.metadata.tests.util;
+
+import java.io.File;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jst.jsf.context.resolver.structureddocument.IStructuredDocumentContextResolverFactory;
+import org.eclipse.jst.jsf.context.resolver.structureddocument.internal.ITextRegionContextResolver;
+import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext;
+import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContextFactory;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
+import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
+import org.eclipse.jst.jsf.metadata.tests.MetadataTestsPlugin;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+
+public class JSPTestCase extends BaseTestCase
+{
+ public static final String FACES_CONFIG_FILE = "facesConfigFile";
+ public static final String JSF_CORE_URI = "http://java.sun.com/jsf/core";
+ public static final String JSF_HTML_URI = "http://java.sun.com/jsf/html";
+ public static final String TAG_TEST_URI = "http://org.eclipse.jsf/tagprocessing";
+ public static final String TAG_TEST_TAG = "MyTag";
+
+ /**
+ * Test config
+ */
+ private MyConfiguration _myConfig;
+ private final JSFVersion _defaultJSFVersion;
+ private final String _defaultFacesConfigFile;
+
+ private String[] _runtimeJars;
+
+
+ public JSPTestCase(final JSFVersion defaultJSFVersion, final String defaultFacesConfigFile)
+ {
+ super(defaultJSFVersion);
+ _defaultJSFVersion = defaultJSFVersion;
+ _defaultFacesConfigFile = defaultFacesConfigFile;
+ }
+
+ protected void doStandaloneSetup()
+ {
+ super.doStandaloneSetup();
+
+ // NOTE: defaults to 1.1 tests for standalone testing
+ _myConfig = new MyConfiguration
+ (_defaultJSFVersion
+ , _defaultFacesConfigFile);
+ }
+
+ protected void doTestSuiteSetup()
+ {
+ super.doTestSuiteSetup();
+
+ _myConfig = new MyConfiguration(_testConfiguration);
+ }
+
+ @Override
+ protected JSFFacetedTestEnvironment configureJSFEnvironment() throws Exception
+ {
+ final JSFVersion version = _myConfig.getFacetVersion();
+ JSFFacetedTestEnvironment jsfFacedEnv = new JSFFacetedTestEnvironment(_testEnv);
+ jsfFacedEnv.initialize(version.toString());
+
+ try {
+ initializeJSFRuntime();
+ JSFCoreUtilHelper.createRegistryAndAddReferences(jsfFacedEnv, _runtimeJars, version);
+ } catch (NoJSFRuntimeFoundException e) {
+ //
+ }
+
+ _testEnv.loadResourceInWebRoot(MetadataTestsPlugin.getDefault().getBundle(),
+ _myConfig.getFacesConfigFile(),
+ "/WEB-INF/faces-config.xml");
+ return jsfFacedEnv;
+ }
+
+
+ // dead?
+// private String[] getArchiveFiles() {
+//// getJsfImplEnv();
+// return null;
+// }
+
+ protected IFile loadJSP(final String srcFileName, final String destFileName) throws Exception
+ {
+ return (IFile) _testEnv.loadResourceInWebRoot
+ (MetadataTestsPlugin.getDefault().getBundle(),
+ srcFileName, destFileName);
+ }
+
+ /**
+ * @param document
+ * @param docPos
+ * @return the text at docPos in document or null if no such text
+ */
+ protected String getText(IStructuredDocument document, int docPos)
+ {
+ final IStructuredDocumentContext context =
+ getStructuredDocumentContext(document, docPos);
+ final ITextRegionContextResolver resolver =
+ IStructuredDocumentContextResolverFactory.INSTANCE.getTextRegionResolver(context);
+ return stripQuotes(resolver.getRegionText());
+ }
+
+ protected IStructuredDocumentContext getStructuredDocumentContext(IStructuredDocument document, int docPos) {
+ return IStructuredDocumentContextFactory.INSTANCE.getContext(document, docPos);
+ }
+ private String stripQuotes(String text) {
+ if (text != null && text.startsWith("\""))
+ return text.substring(1, text.length() -1);
+ return text;
+ }
+
+ protected static class MyConfiguration
+ {
+ private final JSFVersion _facetVersion;
+ private final String _facesConfigFile;
+
+ MyConfiguration(JSFVersion facetVersion, String facesConfigFile)
+ {
+ super();
+ _facetVersion = facetVersion;
+ _facesConfigFile = facesConfigFile;
+ }
+
+ MyConfiguration(TestConfiguration testConfiguration)
+ {
+ _facetVersion = JSFVersion.valueOfString(testConfiguration.get(BaseTestCase.JSF_FACET_VERSION));
+ _facesConfigFile = testConfiguration.get(FACES_CONFIG_FILE);
+ }
+
+ public JSFVersion getFacetVersion() {
+ return _facetVersion;
+ }
+
+ public String getFacesConfigFile() {
+ return _facesConfigFile;
+ }
+ }
+
+ protected void initializeJSFRuntime() throws NoJSFRuntimeFoundException{
+ String dir = JSFCoreUtilHelper.getJSFRuntimeJarsDirectory(_defaultJSFVersion);
+ if (dir == null || !jarsFound(dir) )
+ throw new NoJSFRuntimeFoundException();
+ }
+
+ private boolean jarsFound(String dir) {
+ java.io.File dirFile = new java.io.File(dir);
+ if (dirFile.exists() && dirFile.isDirectory()) {
+ File [] files = dirFile.listFiles();
+ if (files.length > 0) {
+ _runtimeJars = new String[files.length];
+ for (int i=0;i<files.length;i++){
+ _runtimeJars[i] = files[i].getAbsolutePath();
+ }
+ return true;
+ }
+ }
+ return false;
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/util/NoJSFRuntimeFoundException.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/util/NoJSFRuntimeFoundException.java
new file mode 100644
index 000000000..0f033937f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/util/NoJSFRuntimeFoundException.java
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 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.metadata.tests.util;
+
+@SuppressWarnings("serial")
+public class NoJSFRuntimeFoundException extends Exception {
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/util/SingleJSPTestCase.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/util/SingleJSPTestCase.java
new file mode 100644
index 000000000..680240bb1
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/util/SingleJSPTestCase.java
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * 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.metadata.tests.util;
+
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.metadataprocessors.IMetaDataEnabledFeature;
+import org.eclipse.jst.jsf.metadataprocessors.MetaDataEnabledProcessingFactory;
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValue;
+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;
+
+public abstract class SingleJSPTestCase extends JSPTestCase
+{
+
+ public static final String FACES_CONFIG_FILE_NAME_1_1 = "/testfiles/web/faces-config_1_1.xml.data";
+ public static final String FACES_CONFIG_FILE_NAME_1_2 = "/testfiles/web/faces-config_1_2.xml.data";
+
+ /**
+ * 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;
+ /**
+ * Name of the test data file containing the JSP source for this test
+ */
+ private final String _srcFileName;
+
+ /**
+ * Name of the file and path where the JSP source should be put in the
+ * test project
+ */
+ protected final String _destFileName;
+
+
+ protected SingleJSPTestCase(final String srcFileName, final String destFileName, final JSFVersion defaultJSFVersion, final String defaultFacesConfigFile)
+ {
+ super(defaultJSFVersion, defaultFacesConfigFile);
+ _srcFileName = srcFileName;
+ _destFileName = destFileName;
+ }
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ _testJSP = loadJSP(_srcFileName, _destFileName);
+
+ _structuredModel = StructuredModelManager.getModelManager().getModelForRead(_testJSP);
+ _structuredDocument = _structuredModel.getStructuredDocument();
+ }
+
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+
+ if (_structuredModel != null)
+ {
+ _structuredModel.releaseFromRead();
+ }
+ }
+
+ protected IMetaDataEnabledFeature getProcessor(Class<?> klass, String uri, String tagname, String attrName) {
+ List<?> ret = MetaDataEnabledProcessingFactory.getInstance().
+ getAttributeValueRuntimeTypeFeatureProcessors(klass,
+ getStructuredDocumentContext(_structuredDocument, 1), //just need to establish the project; don't really care about offset. should consider improving API
+ uri,
+ tagname,
+ attrName);
+
+ if (ret.isEmpty())
+ return null;
+
+ return (IMetaDataEnabledFeature)ret.get(0);
+
+ }
+
+ protected void assertPossibleValues(List<?> possibleValues, String[] strings) {
+
+ for (int i=0;i < strings.length;i++) {
+ boolean found = false;
+ for (int j=0;j < possibleValues.size();j++) {
+ IPossibleValue val = (IPossibleValue)possibleValues.get(j);
+ if (strings[i].equals(val.getValue())){
+ found = true;
+ break;
+ }
+ }
+ if (! found)
+ fail(strings[i] + " was not found as a possible value");
+ }
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/test.xml b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/test.xml
new file mode 100644
index 000000000..5a30f19e1
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/test.xml
@@ -0,0 +1,49 @@
+<?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.metadata.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.metadata.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.metadata.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.metadata.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.metadata.tests/testfiles/icons/attr_val.gif b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/icons/attr_val.gif
new file mode 100644
index 000000000..d4cb4254d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/icons/attr_val.gif
Binary files differ
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/java/MyBean.java.data b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/java/MyBean.java.data
new file mode 100644
index 000000000..8ed374cbe
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/java/MyBean.java.data
@@ -0,0 +1,16 @@
+package com.foo;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.Validator;
+import javax.faces.validator.ValidatorException;
+
+public class MyBean implements Validator {
+
+ public void validate(FacesContext arg0, UIComponent arg1, Object arg2)
+ throws ValidatorException {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/java/MyConverter.java.data b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/java/MyConverter.java.data
new file mode 100644
index 000000000..c496e49d9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/java/MyConverter.java.data
@@ -0,0 +1,17 @@
+package com.foo;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+public class MyConverter implements javax.faces.convert.Converter{
+
+ public Object getAsObject(FacesContext arg0, UIComponent arg1, String arg2) {
+ return null;
+ }
+
+ public String getAsString(FacesContext arg0, UIComponent arg1, Object arg2) {
+ return null;
+ }
+
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/java/MyConverterSubclass1.java.data b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/java/MyConverterSubclass1.java.data
new file mode 100644
index 000000000..6a422e0ac
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/java/MyConverterSubclass1.java.data
@@ -0,0 +1,12 @@
+package com.foo;
+
+import javax.xml.namespace.QName;
+import javax.xml.xpath.XPathFunction;
+
+public class MyConverterSubclass1 extends MyConverter implements javax.xml.xpath.XPathFunctionResolver {
+
+ public XPathFunction resolveFunction(QName functionName, int arity) {
+ return null;
+ }
+
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/java/MyConverterSubclass2.java.data b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/java/MyConverterSubclass2.java.data
new file mode 100644
index 000000000..04a2902fc
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/java/MyConverterSubclass2.java.data
@@ -0,0 +1,16 @@
+package com.foo;
+
+import javax.xml.namespace.QName;
+import javax.xml.xpath.XPathFunction;
+
+public class MyConverterSubclass2 extends MyConverter implements javax.xml.xpath.XPathFunctionResolver, javax.xml.xpath.XPathVariableResolver{
+
+ public XPathFunction resolveFunction(QName functionName, int arity) {
+ return null;
+ }
+
+ public Object resolveVariable(QName variableName) {
+ return null;
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/java/MyConverterSubclass3.java.data b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/java/MyConverterSubclass3.java.data
new file mode 100644
index 000000000..ed42a5a10
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/java/MyConverterSubclass3.java.data
@@ -0,0 +1,12 @@
+package com.foo;
+
+import javax.xml.namespace.QName;
+
+public class MyConverterSubclass3 extends MyConverter implements javax.xml.xpath.XPathVariableResolver{
+
+ public Object resolveVariable(QName variableName) {
+ return null;
+ }
+
+}
+
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/java/MySubclassOfMyConverterSubclass1.java.data b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/java/MySubclassOfMyConverterSubclass1.java.data
new file mode 100644
index 000000000..d3c41185e
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/java/MySubclassOfMyConverterSubclass1.java.data
@@ -0,0 +1,11 @@
+package com.foo;
+
+import javax.xml.namespace.QName;
+
+public class MySubclassOfMyConverterSubclass1 extends MyConverterSubclass1 implements javax.xml.xpath.XPathVariableResolver{
+
+ public Object resolveVariable(QName variableName) {
+ return null;
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/java/MyValidator.java.data b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/java/MyValidator.java.data
new file mode 100644
index 000000000..ce4808fa1
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/java/MyValidator.java.data
@@ -0,0 +1,14 @@
+package com.foo;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.ValidatorException;
+
+public class MyValidator implements javax.faces.validator.Validator{
+
+ public void validate(FacesContext arg0, UIComponent arg1, Object arg2)
+ throws ValidatorException {
+
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/JSFPage.jsp b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/JSFPage.jsp
new file mode 100644
index 000000000..0904c6ecf
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/JSFPage.jsp
@@ -0,0 +1,16 @@
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
+ pageEncoding="ISO-8859-1"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Insert title here</title>
+</head>
+<body>
+ <f:view>
+ <f:actionListener type="#{foobar}"/>
+ </f:view>
+</body>
+</html> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/actionTypeTest.jsp.data b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/actionTypeTest.jsp.data
new file mode 100644
index 000000000..49d009173
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/actionTypeTest.jsp.data
@@ -0,0 +1,17 @@
+<%@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:commandButton action="gotoWelcome"></h:commandButton>
+ </h:form></f:view>
+ </body>
+</html> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/cssTypesTest.html b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/cssTypesTest.html
new file mode 100644
index 000000000..76e48b9f3
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/cssTypesTest.html
@@ -0,0 +1,18 @@
+<!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">
+<link rel="stylesheet" href="mystyle.css">
+<link rel="stylesheet" href="foo.css">
+<style type="text/css">
+ body {
+ color: purple;
+ background-color: red; }
+ </style>
+<title>Insert title here</title>
+</head>
+<body class="" style="">
+ <b style="color: green;">Hello</b>
+ <a id="a" class="" style="color: HoneyDew " href="Foo" /></output>
+</body>
+</html> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/cssTypesTest.jsp.data b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/cssTypesTest.jsp.data
new file mode 100644
index 000000000..50f35e2fa
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/cssTypesTest.jsp.data
@@ -0,0 +1,15 @@
+<%@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">
+<link rel="stylesheet" href="mystyle.css">
+<link rel="stylesheet" href="foo.css">
+<title>Insert title here</title>
+</head>
+<body>
+ <h:inputText styleClass=""/>
+</body>
+</html> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/facesConfigConverterIDType.jsp.data b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/facesConfigConverterIDType.jsp.data
new file mode 100644
index 000000000..f83af7f2f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/facesConfigConverterIDType.jsp.data
@@ -0,0 +1,18 @@
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
+ pageEncoding="ISO-8859-1"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<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>
+ <f:converter converterId="com.foo.myconverter"/>
+ </h:inputText>
+ </h:form></f:view>
+</body>
+</html> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/facesConfigValidatorIDType.jsp.data b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/facesConfigValidatorIDType.jsp.data
new file mode 100644
index 000000000..311483396
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/facesConfigValidatorIDType.jsp.data
@@ -0,0 +1,18 @@
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
+ pageEncoding="ISO-8859-1"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<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>
+ <f:validator validatorId="com.foo.myvalidator"/>
+ </h:inputText>
+ </h:form></f:view>
+</body>
+</html> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/foo.css.data b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/foo.css.data
new file mode 100644
index 000000000..b4b1cc241
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/foo.css.data
@@ -0,0 +1,157 @@
+BODY, P, LI, UL, OL {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 97%;
+ color:#000000;
+ list-style-position: outside;
+}
+
+A:link {
+ font-family: Arial, Helvetica, sans-serif;
+ color:#663300;
+
+}
+
+A:active {
+ font-family: Arial, Helvetica, sans-serif;
+ color:#ff6600;
+
+}
+
+A:visited {
+ font-family: Arial, Helvetica, sans-serif;
+ color:#996633;
+
+}
+
+A.navigation:link
+{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size:65%;
+ color:#996633;
+}
+
+A.navigation:active
+{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size:65%;
+ color:#996633;
+}
+
+A.navigation:visited
+{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size:65%;
+ color:#996633;
+}
+
+p.listpara
+{text-indent: 15%}
+
+H1 {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size:170%;
+ color:#336699;
+ border : solid #CCCC99;
+ width : 100%;
+ border-width : 0px 0px 2px 0px;
+}
+
+H2 {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size:130%;
+ color:#336699;
+ border : solid #cccc99;
+ border-width : 0px 0px 2px 0px;
+ width : 100%;
+}
+
+H3 {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size:110%;
+ color:#336699;
+ width : 100%;
+}
+
+H4 {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size:92%;
+ color:#000000;
+ font-weight: bold;
+ width : 100%;
+}
+
+.code_no_color {
+ color : #000000;
+ font-family : "Courier New", "Courier", "monospace";
+}
+
+code {
+ color : #336699;
+ font-family : "Courier New", "Courier", "monospace";
+}
+
+P.indent {
+ text-indent: 9%;
+}
+
+table.borders {
+ border : 1% solid #BDB76B;
+}
+
+TR {
+ text-align : left;
+ vertical-align : top;
+}
+
+TH {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 11pt;
+ color:#000000;
+ font-weight: bold;
+}
+
+TD {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 11pt%;
+ color:#000000;
+}
+
+.smalltext {
+ font-size:80%;
+}
+
+p.note {
+ display: block;
+ font-family: Arial, Helvetica, Geneva, sans-serif;
+ font-size: 95%;
+}
+
+p.warning {
+ display: block;
+ font-family: Arial, Helvetica, Geneva, sans-serif;
+ font-size: 95%;
+}
+
+pre {
+ font-family: "Courier New", Courier, mono;
+ font-size: 92%;
+ text-indent : 15%;
+}
+
+.GUITag {
+ font-family: Arial, Helvetica, Geneva, sans-serif;
+ font-size: 95%;
+ font-weight: bold;
+ font-style: normal;
+}
+
+.PropertyName {
+ font-family: "Courier New", Courier, mono;
+ font-style: normal;
+}
+
+.GlossaryItem {
+ color : #008080;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size : 95%;
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/javaClassType.jsp.data b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/javaClassType.jsp.data
new file mode 100644
index 000000000..5d1228fa3
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/javaClassType.jsp.data
@@ -0,0 +1,17 @@
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
+ pageEncoding="ISO-8859-1"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Insert title here</title>
+</head>
+<body>
+ <f:view>
+ <f:actionListener type="foobar"/>
+ <f:actionListener type="com.sun.faces.application.ActionListenerImpl"/>
+ </f:view>
+</body>
+</html> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/mystyle.css.data b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/mystyle.css.data
new file mode 100644
index 000000000..e02e1cb5b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/mystyle.css.data
@@ -0,0 +1,31 @@
+body {
+ padding-left: 11em;
+ font-family: Georgia, "Times New Roman",
+ Times, serif;
+}
+ul.navbar {
+ list-style-type: none;
+ padding: 0;
+ margin: 0;
+ position: absolute;
+ top: 2em;
+ left: 1em;
+ width: 9em }
+h1 {
+ font-family: Helvetica, Geneva, Arial,
+ SunSans-Regular, sans-serif }
+ul.navbar li {
+ background: white;
+ margin: 0.5em 0;
+ padding: 0.3em;
+ border-right: 1em solid black }
+ul.navbar a {
+ text-decoration: none }
+a:link {
+ color: blue }
+a:visited {
+ color: purple }
+address {
+ margin-top: 1em;
+ padding-top: 1em;
+ border-top: thin dotted }
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/propertyDescTests.jsp b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/propertyDescTests.jsp
new file mode 100644
index 000000000..2da57b688
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/jsps/propertyDescTests.jsp
@@ -0,0 +1,13 @@
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
+ pageEncoding="ISO-8859-1"%>
+ <%@ taglib prefix="x" uri="http://org.eclipse.jsf/propertyDescriptorTest" %>
+<!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>
+ <x:Tag Attr1="y" boolAttr="true" DeafultAttr="x"/>
+</body>
+</html> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/FileA.xml b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/FileA.xml
new file mode 100644
index 000000000..21c6f7ea3
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/FileA.xml
@@ -0,0 +1,66 @@
+<metadatamodel
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:mdt="http://org.eclipse.jst.jsf.common.metadata/metadataTraitTypes.ecore"
+ id="http://org.eclipse.jsf/mergetest1">
+
+ <trait id="A1">
+ <value>A1</value>
+ </trait>
+ <trait id="Dupe">
+ <value>dupe from A</value>
+ </trait>
+
+ <entity id="A">
+ <trait id="A1">
+ <value>A1</value>
+ </trait>
+ <entity id="a">
+ <trait id="A1">
+ <value>A1</value>
+ </trait>
+ </entity>
+ </entity>
+
+ <entity id="Dupe">
+ <trait id="A1">
+ <value>A1FromA</value>
+ </trait>
+ <entity id="a">
+ <trait id="A1">
+ <value>A1FromA</value>
+ </trait>
+ </entity>
+ </entity>
+
+ <entity id="DupeWithInclude">
+ <include-entity-group id="eg1"/>
+ <trait id="A1">
+ <value>A1</value>
+ </trait>
+ <entity id="a">
+ <trait id="A1">
+ <value>A1</value>
+ </trait>
+ </entity>
+ </entity>
+
+ <entity id="DupeWithInclude2">
+ <include-entity-group id="eg1"/>
+ </entity>
+
+ <entityGroup id="eg1">
+ <trait id="A1">
+ <value>A1FromEG1</value>
+ </trait>
+ <entity id="a">
+ <trait id="A1">
+ <value>A1FromEG1</value>
+ </trait>
+ <trait id="aFromEG1">
+ <value>aFromEG1</value>
+ </trait>
+ </entity>
+ </entityGroup>
+
+</metadatamodel>
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/FileB.xml b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/FileB.xml
new file mode 100644
index 000000000..4c2496ed8
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/FileB.xml
@@ -0,0 +1,96 @@
+<metadatamodel
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:mdt="http://org.eclipse.jst.jsf.common.metadata/metadataTraitTypes.ecore"
+ id="http://org.eclipse.jsf/mergetest1">
+
+ <trait id="B1">
+ <value>B1</value>
+ </trait>
+ <trait id="Dupe">
+ <value>dupe from B</value>
+ </trait>
+
+ <entity id="B">
+ <trait id="B1">
+ <value>B1</value>
+ </trait>
+ <entity id="b">
+ <trait id="B1">
+ <value>B1</value>
+ </trait>
+ </entity>
+ </entity>
+
+ <entity id="Dupe">
+ <trait id="A1">
+ <value>A1FromB</value>
+ </trait>
+ <trait id="B1">
+ <value>B1</value>
+ </trait>
+ <entity id="a">
+ <trait id="A1">
+ <value>A1</value>
+ </trait>
+ <trait id="B1">
+ <value>B1</value>
+ </trait>
+ </entity>
+ <entity id="b"></entity>
+ </entity>
+
+ <entity id="DupeWithInclude">
+ <include-entity-group id="eg1"/>
+ <include-entity-group id="eg2"/>
+ <trait id="A1">
+ <value>A1</value>
+ </trait>
+ <entity id="a">
+ <trait id="A1">
+ <value>A1</value>
+ </trait>
+ </entity>
+ </entity>
+
+ <entityGroup id="eg1">
+ <!-- All traits and entities should not be merged... Should come from FileA -->
+ <trait id="B">
+ <value>trait SHOULD NOT appear in merge</value>
+ </trait>
+ <trait id="A1">
+ <value>A1FromEG1-B</value>
+ </trait>
+ <entity id="a">
+ <trait id="A1">
+ <value>A1FromEG1-1</value>
+ </trait>
+ <trait id="aFromEG1">
+ <value>aFromEG1-1</value>
+ </trait>
+ </entity>
+ </entityGroup>
+
+ <entityGroup id="eg2">
+ <!-- All traits and entities should first come from eg1... Should come from FileA -->
+ <trait id="B">
+ <value>trait SHOULD appear in merge from eg2</value>
+ </trait>
+ <trait id="A1">
+ <value>A1FromEG1-B</value>
+ </trait>
+ <entity id="a">
+ <trait id="A1">
+ <value>A1FromEG2-B</value>
+ </trait>
+ <trait id="aFromEG1">
+ <value>aFromEG2-B</value>
+ </trait>
+ </entity>
+ <entity id="b">
+ <trait id="bFromEG2">
+ <value>bFromEG2-B</value>
+ </trait>
+ </entity>
+ </entityGroup>
+</metadatamodel>
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/FileIncludeExternalModel.xml b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/FileIncludeExternalModel.xml
new file mode 100644
index 000000000..fea1e94bb
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/FileIncludeExternalModel.xml
@@ -0,0 +1,9 @@
+<metadatamodel
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:mdt="http://org.eclipse.jst.jsf.common.metadata/metadataTraitTypes.ecore"
+ id="http://org.eclipse.jsf/mergetest2">
+
+ <include-entity-group id="eg1" uri="http://org.eclipse.jsf/mergetest1"/>
+
+</metadatamodel>
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/FileIncludeExternalModel2.xml b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/FileIncludeExternalModel2.xml
new file mode 100644
index 000000000..f5442dbaf
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/FileIncludeExternalModel2.xml
@@ -0,0 +1,9 @@
+<metadatamodel
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:mdt="http://org.eclipse.jst.jsf.common.metadata/metadataTraitTypes.ecore"
+ id="http://org.eclipse.jsf/mergetest3">
+
+ <include-entity-group id="eg1" uri="http://org.eclipse.jsf/mergetest1"/>
+
+</metadatamodel>
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/TestJSP.jsp b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/TestJSP.jsp
new file mode 100644
index 000000000..be13202e4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/TestJSP.jsp
@@ -0,0 +1,16 @@
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
+ pageEncoding="ISO-8859-1"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Insert title here</title>
+</head>
+<body>
+ <f:view>
+ <MyTag attr1="foo"/>
+ </f:view>
+</body>
+</html> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/TinyIncludeTest.xml b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/TinyIncludeTest.xml
new file mode 100644
index 000000000..150bf3d14
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/TinyIncludeTest.xml
@@ -0,0 +1,82 @@
+<metadatamodel
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:mdt="http://org.eclipse.jst.jsf.common.metadata/metadataTraitTypes.ecore"
+ id="TinyIncludeTest">
+
+ <entity id="A">
+ <include-entity-group id="eg"/>
+ <include-entity-group id="eg2"/>
+ <trait id="T1">
+ <value>A1</value>
+ </trait>
+ <entity id="a">
+ <trait id="t1">
+ <value>A1</value>
+ </trait>
+ </entity>
+ </entity>
+
+ <entityGroup id="eg">
+ <include-entity-group id="egbogus"/> <!-- SHOULD BE IGNORED - entityGroups should not contain entityGroups -->
+ <trait id="T1">
+ <value>T1FromEG</value>
+ </trait>
+ <trait id="T2">
+ <value>T2FromEG</value>
+ </trait>
+ <entity id="sub-A">
+ <trait id="a-T1">T1</trait>
+ </entity>
+ <entity id="a">
+ <trait id="t1">
+ <value>t1FromEG-a</value>
+ </trait>
+ <entity id="sub-a">
+ <trait id="a-T1">a-T1FromEG</trait>
+ </entity>
+ <entity id="bFromEG">
+ </entity>
+ </entity>
+ </entityGroup>
+ <entityGroup id="eg2"> <!-- Since "eg" comes before "eg2" in A, none of the eg2 entity and traits should be used as they have all identical ids except for the sub-sub-a entity-->
+ <trait id="T2">
+ <value>T2FromEG2</value>
+ </trait>
+ <entity id="sub-A">
+ <trait id="a-T1">a-T1FromEG2</trait>
+ <entity id="sub-sub-A"/>
+ </entity>
+
+ </entityGroup>
+ <entityGroup id="egbogus">
+ <trait id="eg2Trait">
+ <value>never merged</value>
+ </trait>
+ <entity id="eg2Entity">
+ </entity>
+ </entityGroup>
+ <!-- EXPECTED MERGE RESULT
+ <entity id="A">
+ <trait id="T1">
+ <value>A1</value>
+ </trait>
+ <trait id="T2">
+ <value>T2FromEG</value>
+ </trait>
+ <entity id="a">
+ <trait id="t1">
+ <value>A1</value>
+ </trait>
+ <entity id="sub-a">
+ <trait id="a-T1">T1</trait>
+ </entity>
+ <entity id="bFromEG">
+ </entity>
+ </entity>
+ <entity id="sub-A">
+ <trait id="a-T1">T1</trait>
+ </entity>
+ </entity>
+ -->
+</metadatamodel>
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/jsf_metadataprocessing.xml b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/jsf_metadataprocessing.xml
new file mode 100644
index 000000000..f6da689e9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/jsf_metadataprocessing.xml
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadatamodel
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:mdt="http://org.eclipse.jst.jsf.common.metadata/metadataTraitTypes.ecore"
+ id="http://org.eclipse.jsf/metadataprocessing"
+ type="tagFile">
+
+ <entity type="tag" id="MyTag">
+ <entity type="attribute" id="MyBooleanAttr">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.metadata.tests.MyBooleanType</value>
+ </trait>
+ </entity>
+ <entity type="attribute" id="BooleanAttr">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.BooleanType</value>
+ </trait>
+ <trait id="barks">
+ <value xsi:type="mdt:ListOfValues">
+ <item>woof</item>
+ <item>ruff</item>
+ <item>howlll</item>
+ </value>
+ </trait>
+ </entity>
+ <entity type="attribute" id="NutherBooleanAttr">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.BooleanType</value>
+ </trait>
+ <trait id="barks">
+ <value xsi:type="mdt:ListOfValues">
+ <item>WOOF</item>
+ <item>RUFF</item>
+ <item>HOWLLL</item>
+ </value>
+ </trait>
+ </entity>
+ <entity type="attribute" id="MyValidValsAttr">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.metadata.tests.MyStringArrayType</value>
+ </trait>
+ <trait id="valid-values">
+ <value xsi:type="mdt:ListOfValues">
+ <item>AFirstVal</item>
+ <item>ASecondVal</item>
+ <item>AThirdVal</item>
+ <item>AFourthVal</item>
+ </value>
+ </trait>
+ </entity>
+ <entity type="attribute" id="MyNonMetaDataEnabledAttr">
+ <trait id="valid-values">
+ <value xsi:type="mdt:ListOfValues">
+ <item>AFirstVal</item>
+ <item>ASecondVal</item>
+ <item>AThirdVal</item>
+ <item>AFourthVal</item>
+ </value>
+ </trait>
+ </entity>
+ <entity type="attribute" id="MyNoImplMetaDataEnabledAttr">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.metadata.tests.NoImplType</value>
+ </trait>
+ <trait id="valid-values">
+ <value xsi:type="mdt:ListOfValues">
+ <item>AFirstVal</item>
+ <item>ASecondVal</item>
+ <item>AThirdVal</item>
+ <item>AFourthVal</item>
+ </value>
+ </trait>
+ </entity>
+ <entity type="attribute" id="MyDualTypeAttr">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.metadata.tests.MyStringArrayType</value>
+ </trait>
+ <trait id="valid-values">
+ <value xsi:type="mdt:ListOfValues">
+ <item>AFirstVal</item>
+ <item>ASecondVal</item>
+ <item>AThirdVal</item>
+ <item>AFourthVal</item>
+ </value>
+ </trait>
+ </entity>
+ <entity type="attribute" id="MyLongAttr">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.metadata.tests.MyLongType</value>
+ </trait>
+ </entity>
+ <entity type="attribute" id="MyMissingType">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.metadata.tests.WhereIsIt</value>
+ </trait>
+ </entity>
+ <entity type="attribute" id="ValidatorID">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.IdentifierType</value>
+ </trait>
+ <trait id="identifier-type">
+ <value>javax.faces.validator</value>
+ </trait>
+ </entity>
+ </entity>
+</metadatamodel>
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/jsf_tagprocessing.xml b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/jsf_tagprocessing.xml
new file mode 100644
index 000000000..2d34c6269
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/jsf_tagprocessing.xml
@@ -0,0 +1,251 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<md:metadatamodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:md="http://org.eclipse.jst.jsf.common.metadata/metadata.ecore"
+ xmlns:mdt="http://org.eclipse.jst.jsf.common.metadata/metadataTraitTypes.ecore"
+ id="http://org.eclipse.jsf/tagprocessing"
+ type="tagFile">
+
+ <entity id="MyTag">
+ <entity id="BooleanType">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.BooleanType</value>
+ </trait>
+ <trait id="default-value">
+ <value>true</value>
+ </trait>
+ </entity>
+ <entity id="StringType">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.StringType</value>
+ </trait>
+ <trait id="valid-values">
+ <value xsi:type="mdt:ListOfValues">
+ <item>A</item>
+ <item>B</item>
+ <item>C</item>
+ <item>D</item>
+ </value>
+ </trait>
+ <trait id="displayed-values">
+ <value xsi:type="mdt:ListOfValues">
+ <item>A FirstVal</item>
+ <item>B SecondVal</item>
+ <item>C ThirdVal</item>
+ <item>D FourthVal</item>
+ </value>
+ </trait>
+ <trait id="small-icon">
+ <value>/testfiles/icons/attr_val.gif</value>
+ </trait>
+ <trait id="default-value">
+ <value>A</value>
+ </trait>
+ </entity>
+ <entity id="IntegerType">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.IntegerType</value>
+ </trait>
+ <trait id="valid-minimum"><value>0</value></trait>
+ <trait id="valid-maximum"><value>255</value></trait>
+ <trait id="default-value"><value>10</value></trait>
+ </entity>
+ <entity id="LengthType">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.LengthType</value>
+ </trait>
+ <trait id="valid-minimum"><value>0%</value></trait> <!-- Check that min/max are ignored. Not valid for length type -->
+ <trait id="valid-maximum"><value>100%</value></trait>
+ <trait id="default-value"><value>100%</value></trait>
+ </entity>
+ <entity id="EnumeratedIntegerType">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.IntegerType</value>
+ </trait>
+ <trait id="valid-values">
+ <value xsi:type="mdt:ListOfValues">
+ <item>0</item>
+ <item>3</item>
+ <item>5</item>
+ </value>
+ </trait>
+ <trait id="default-value"><value>10</value></trait>
+ </entity>
+ <entity id="LongType">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.LongType</value>
+ </trait>
+ <trait id="valid-minimum"><value>-1000</value></trait>
+ <trait id="valid-maximum"><value>1000</value></trait>
+ </entity>
+ <entity id="EnumeratedLongType">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.LongType</value>
+ </trait>
+ <trait id="valid-values">
+ <value xsi:type="mdt:ListOfValues">
+ <item>0</item>
+ <item>3</item>
+ <item>5</item>
+ </value>
+ </trait>
+ <trait id="valid-values-message"><value>bogus validation message</value></trait>
+ <trait id="valid-values-severity"><value>99</value></trait>
+ <trait id="valid-values-code"><value>X99</value></trait>
+ <trait id="default-value"><value>3</value></trait>
+ </entity>
+ <entity id="DoubleType">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.DoubleType</value>
+ </trait>
+ <trait id="valid-minimum"><value>188.23</value></trait>
+ <trait id="valid-maximum"><value>245.32</value></trait>
+ </entity>
+ <entity id="EnumeratedDoubleType">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.DoubleType</value>
+ </trait>
+ <trait id="valid-values">
+ <value xsi:type="mdt:ListOfValues">
+ <item>188.23</item>
+ <item>245.32</item>
+ <item>1</item>
+ </value>
+ </trait>
+ <trait id="default-value"><value>188.23</value></trait>
+ </entity>
+ <entity id="JavaClassType1">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.JavaClassType</value>
+ </trait>
+ <trait id="valid-interfaces">
+ <value>javax.xml.xpath.XPathFunctionResolver</value>
+ </trait>
+ </entity>
+ <entity id="JavaClassType2">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.JavaClassType</value>
+ </trait>
+ <trait id="valid-superclass">
+ <value>com.foo.MyConverter</value>
+ </trait>
+ </entity>
+ <entity id="JavaClassType3">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.JavaClassType</value>
+ </trait>
+ <trait id="valid-interfaces">
+ <value>javax.xml.xpath.XPathVariableResolver</value>
+ </trait>
+ <trait id="valid-superclass">
+ <value>com.foo.MyConverter</value>
+ </trait>
+ </entity>
+ <entity id="JavaClassType4">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.JavaClassType</value>
+ </trait>
+ <trait id="valid-interfaces">
+ <value xsi:type="mdt:ListOfValues">
+ <item>javax.xml.xpath.XPathVariableResolver</item>
+ <item>javax.xml.xpath.XPathFunctionResolver</item>
+ </value>
+ </trait>
+ <trait id="valid-superclass">
+ <value>com.foo.MyConverter</value>
+ </trait>
+ </entity>
+ <entity id="MethodBindingType">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.MethodBindingType</value>
+ </trait>
+ </entity>
+ <entity id="ColorType">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.ColorType</value>
+ </trait>
+ <trait id="default-value"><value>Black</value></trait>
+ </entity>
+ <entity id="LanguageCodeType">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.LanguageCodeType</value>
+ </trait>
+ <trait id="category">
+ <value>ACategory</value>
+ </trait>
+ </entity>
+ <entity id="LocaleType">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.LocaleType</value>
+ </trait>
+ <trait id="category">
+ <value>ACategory</value>
+ </trait>
+ </entity>
+ <entity id="CurrencyCodeType">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.CurrencyCodeType</value>
+ </trait>
+ </entity>
+ <entity id="TimeZoneType">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.TimeZoneType</value>
+ </trait>
+ </entity>
+ <entity id="RelativePathType">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.RelativePathType</value>
+ </trait>
+ </entity>
+ <entity id="WebPathType">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.WebPathType</value>
+ </trait>
+ </entity>
+ <entity id="JavaScriptType">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.JavaScriptType</value>
+ </trait>
+ </entity>
+ <entity id="CSSClassType">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.CSSClassType</value>
+ </trait>
+ </entity>
+ <entity id="CSSStyleType">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.CSSStyleType</value>
+ </trait>
+ </entity>
+ <entity id="ComponentIDType">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.ComponentIDType</value>
+ </trait>
+ </entity>
+ <entity id="CharacterType">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.CharacterType</value>
+ </trait>
+ </entity>
+ <entity id="ScriptType">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.ScriptType</value>
+ </trait>
+ </entity>
+ <entity id="LinkType">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.LinkType</value>
+ </trait>
+ </entity>
+ <entity id="ContentType">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.ContentType</value>
+ </trait>
+ </entity>
+ <entity id="NumberPatternType">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.NumberPatternType</value>
+ </trait>
+ </entity>
+ </entity>
+ </md:metadatamodel>
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/jsf_test.properties b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/jsf_test.properties
new file mode 100644
index 000000000..fb51ea458
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/jsf_test.properties
@@ -0,0 +1,15 @@
+###############################################################################
+# 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
+###############################################################################
+NLS1=a day in the life
+NLS2=another string
+
+
+
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/jsf_test.xml b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/jsf_test.xml
new file mode 100644
index 000000000..adc008e83
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/jsf_test.xml
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadatamodel
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:mdt="http://org.eclipse.jst.jsf.common.metadata/metadataTraitTypes.ecore"
+ id="http://org.eclipse.jsf/test"
+ type="tagFile">
+
+ <trait id="model-trait">
+ <value>ATrait</value>
+ </trait>
+
+ <!-- Note that this is fot testing multiple trait queries. Not recommended! -->
+ <trait id="model-trait">
+ <value>DupeTrait</value>
+ </trait>
+
+ <entity type="tag" id="validator">
+ <entity type="attribute" id="validatorId">
+ <trait id="attr-val-content-assistant">
+ <value>com.eclipse.wtp.jsf.ui.internal.ValidatorAttrValueContentAssistant</value>
+ </trait>
+ <trait id="attr-val-runtime-type">
+ <value>com.eclipse.wtp.jsf.core.internal.model.datatype.Validator</value>
+ </trait>
+ </entity>
+ </entity>
+ <entity type="tag" id="nopropsOrAttrs">
+ </entity>
+ <entity type="tag" id="noAttrs">
+ <trait id="A">
+ <value>a</value>
+ </trait>
+ <trait id="B">
+ <value>b</value>
+ </trait>
+ </entity>
+ <entity type="tag" id="loaded">
+ <include-entity-group id="eg2"/>
+ <entity type="attribute" id="att1">
+ <trait id="A1">
+ <value>a1</value>
+ </trait>
+ <trait id="B1">
+ <value>b1</value>
+ </trait>
+ </entity>
+ <entity type="attribute" id="att2">
+ <trait id="A2">
+ <value>a2</value>
+ </trait>
+ <trait id="B2">
+ <value>b2</value>
+ </trait>
+ </entity>
+ <entity type="attribute" id="att3">
+ <trait id="A3">
+ <value>a3</value>
+ </trait>
+ <trait id="B3">
+ <value>b3</value>
+ </trait>
+ <trait id="multival">
+ <value xsi:type="mdt:ListOfValues">
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ </value>
+ </trait>
+ </entity>
+ <trait id="A">
+ <value>a</value>
+ </trait>
+ <trait id="B">
+ <value>b</value>
+ </trait>
+ <trait id="multival">
+ <value xsi:type="mdt:ListOfValues">
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ </value>
+ </trait>
+ </entity>
+ <entity type="tag" id="NLS">
+ <entity type="attribute" id="NLS">
+ <trait id="NLS1">
+ <value>%NLS1</value>
+ </trait>
+ <trait id="NLS2">
+ <value>%NLS2</value>
+ </trait>
+ <trait id="NLS3">
+ <value>%NLS3</value>
+ </trait>
+ <trait id="multival">
+ <value xsi:type="mdt:ListOfValues">
+ <item>%NLS1</item>
+ <item>%NLS2</item>
+ </value>
+ </trait>
+ </entity>
+ <trait id="NLS1">
+ <value>%NLS1</value>
+ </trait>
+ <trait id="NLS2">
+ <value>%NLS2</value>
+ </trait>
+ <trait id="NLS3">
+ <value>%NLS3</value>
+ </trait>
+ <trait id="multival">
+ <value xsi:type="mdt:ListOfValues">
+ <item>%NLS1</item>
+ <item>%NLS2</item>
+ </value>
+ </trait>
+ <trait id="NullVal">
+ <value></value>
+ </trait>
+ </entity>
+ <!-- Note that this is fot testing multiple entity queries. Not recommended. -->
+ <entity type="tag" id="loaded">
+ <entity type="attribute" id="secondLoadedAtt1">
+ <trait id="A1">
+ <value>a1</value>
+ </trait>
+ <trait id="B1">
+ <value>b1</value>
+ </trait>
+ </entity>
+ </entity>
+
+ <entityGroup id="eg1">
+ <entity id="eg1-A"></entity>
+ </entityGroup>
+ <entityGroup id="eg2">
+ <trait id="eg2-A"><value>XXX</value> </trait>
+ <entity id="eg2-A"></entity>
+ </entityGroup>
+</metadatamodel>
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/jsf_test_en_US.properties b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/jsf_test_en_US.properties
new file mode 100644
index 000000000..c30f767b9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/jsf_test_en_US.properties
@@ -0,0 +1,15 @@
+###############################################################################
+# 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
+###############################################################################
+NLS1=a day in the life(en_US)
+NLS2=another string(en_US)
+
+
+
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/jsf_tinytest.xml b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/jsf_tinytest.xml
new file mode 100644
index 000000000..54868e2eb
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/jsf_tinytest.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadatamodel
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:mdt="http://org.eclipse.jst.jsf.common.metadata/metadataTraitTypes.ecore"
+ id="http://org.eclipse.jsf/tinytest"
+ type="tagFile">
+
+ <entity id="A">
+ <include-entity-group id="eg1"/>
+ </entity>
+ <entity id="B">
+ <include-entity-group id="eg1"/>
+ </entity>
+ <entityGroup id="eg1">
+ <entity id="copy1">
+ <trait id="model-trait">
+ <value>ATrait</value>
+ </trait>
+ </entity>
+ </entityGroup>
+</metadatamodel>
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/missingMDModelTest.xml b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/missingMDModelTest.xml
new file mode 100644
index 000000000..9ad9a0e28
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/missingMDModelTest.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadatamodel
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:mdt="http://org.eclipse.jst.jsf.common.metadata/metadataTraitTypes.ecore"
+ xmlns:bogus="http://org.eclipse.jsf/bogus.ecore"
+ id="http://org.eclipse.jsf/missingMDModelTest"
+ type="tagFile">
+
+ <entity id="Tag">
+ <entity id="Attr1">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.StringType</value>
+ </trait>
+ <trait id="bogusTrait">
+ <value xsi:type="bogus:foobars">
+ <item>A</item>
+ <item>B</item>
+ <item>C</item>
+ <item>D</item>
+ </value>
+ </trait>
+ <trait id="reallybogusTrait">
+ <value xsi:type="bogiss:foobars">
+ <item>A</item>
+ <item>B</item>
+ <item>C</item>
+ <item>D</item>
+ </value>
+ </trait>
+ <trait id="valid-values">
+ <value xsi:type="mdt:ListOfValues">
+ <item>A</item>
+ <item>B</item>
+ <item>C</item>
+ <item>D</item>
+ </value>
+ </trait>
+ <trait id="displayed-values">
+ <value xsi:type="mdt:ListOfValues">
+ <item>A FirstVal</item>
+ <item>B SecondVal</item>
+ <item>C ThirdVal</item>
+ <item>D FourthVal</item>
+ </value>
+ </trait>
+ <trait id="display-label">
+ <value>MyAttr1</value>
+ </trait>
+ <trait id="description">
+ <value>This is a description.</value>
+ </trait>
+ <trait id="category">
+ <value>CategoryName</value>
+ </trait>
+ <trait id="small-icon">
+ <value>/testfiles/icons/attr_val.gif</value>
+ </trait>
+ <trait id="default-value">
+ <value>A</value>
+ </trait>
+ <trait id="required">
+ <value>true</value>
+ </trait>
+ </entity>
+ <entity id="DefaultAttr">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.StringType</value>
+ </trait>
+ <trait id="cell-editor">
+ <value>org.eclipse.jface.viewers.TextCellEditor</value>
+ </trait>
+ <trait id="bogusTrait">
+ <value xsi:type="bogus:foobars">
+ <item>A</item>
+ <item>B</item>
+ <item>C</item>
+ <item>D</item>
+ </value>
+ </trait>
+ </entity>
+ <entity id="boolAttr">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.BooleanType</value>
+ </trait>
+ </entity>
+ </entity>
+</metadatamodel>
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/propertyDescriptorTest.xml b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/propertyDescriptorTest.xml
new file mode 100644
index 000000000..cb87f4ab3
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/propertyDescriptorTest.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadatamodel
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:mdt="http://org.eclipse.jst.jsf.common.metadata/metadataTraitTypes.ecore"
+ xmlns:qe="http://org.eclipse.jsf.pagedesigner/QuickEditTabSections.ecore"
+ id="http://org.eclipse.jsf/propertyDescriptorTest"
+ type="tagFile">
+
+ <entity id="Tag">
+ <entity id="Attr1">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.StringType</value>
+ </trait>
+ <trait id="valid-values">
+ <value xsi:type="mdt:ListOfValues">
+ <item>A</item>
+ <item>B</item>
+ <item>C</item>
+ <item>D</item>
+ </value>
+ </trait>
+ <trait id="displayed-values">
+ <value xsi:type="mdt:ListOfValues">
+ <item>A FirstVal</item>
+ <item>B SecondVal</item>
+ <item>C ThirdVal</item>
+ <item>D FourthVal</item>
+ </value>
+ </trait>
+ <trait id="display-label">
+ <value>MyAttr1</value>
+ </trait>
+ <trait id="description">
+ <value>This is a description.</value>
+ </trait>
+ <trait id="category">
+ <value>CategoryName</value>
+ </trait>
+ <trait id="small-icon">
+ <value>/testfiles/icons/attr_val.gif</value>
+ </trait>
+ <trait id="default-value">
+ <value>A</value>
+ </trait>
+ <trait id="required">
+ <value>true</value>
+ </trait>
+ </entity>
+ <entity id="DefaultAttr">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.StringType</value>
+ </trait>
+ <trait id="cell-editor">
+ <value>org.eclipse.jface.viewers.TextCellEditor</value>
+ </trait>
+ </entity>
+ <entity id="boolAttr">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.BooleanType</value>
+ </trait>
+ </entity>
+ </entity>
+</metadatamodel>
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/quickEditSectionTest.xml b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/quickEditSectionTest.xml
new file mode 100644
index 000000000..9567ffda3
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/quickEditSectionTest.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadatamodel
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:mdt="http://org.eclipse.jst.jsf.common.metadata/metadataTraitTypes.ecore"
+ xmlns:qe="http://org.eclipse.jsf.pagedesigner/QuickEditTabSections.ecore"
+ id="http://org.eclipse.jsf/quickEditSectionTest"
+ type="tagFile">
+
+ <entity id="A">
+ <entity id="attr1"/>
+ <entity id="attr2"/>
+ <trait id="quick-edit-tab">
+ <value xsi:type="qe:QuickEditTabSections">
+ <section id="attr1" type="ATTRIBUTE" />
+ <section id="attr2"/> <!-- ATTRIBUTE type is default -->
+ <section id="section1" type="SECTION"/>
+ </value>
+ </trait>
+ </entity>
+</metadatamodel> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/traithelpertest.properties b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/traithelpertest.properties
new file mode 100644
index 000000000..fb51ea458
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/traithelpertest.properties
@@ -0,0 +1,15 @@
+###############################################################################
+# 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
+###############################################################################
+NLS1=a day in the life
+NLS2=another string
+
+
+
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/traithelpertest.xml b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/traithelpertest.xml
new file mode 100644
index 000000000..32ec01bdc
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/traithelpertest.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadatamodel
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:xmltype="http://www.eclipse.org/emf/2003/XMLType"
+ xmlns:mdt="http://org.eclipse.jst.jsf.common.metadata/metadataTraitTypes.ecore"
+ id="http://org.eclipse.jsf/traithelpertest"
+ type="tagFile">
+
+ <trait id="TraitId">
+ <value xsi:type="mdt:StringValue">TraitValue</value>
+ </trait>
+
+ <trait id="TraitId2">
+ <value xsi:type="mdt:BooleanValue">true</value>
+ </trait>
+
+ <trait id="TraitId3">
+ <value xsi:type="mdt:BooleanValue">false</value>
+ </trait>
+
+
+ <entity id="tag">
+
+ <entity type="attribute" id="attr1">
+ <trait id="singleString">
+ <value>AString</value>
+ </trait>
+ <trait id="anInteger">
+ <value>1</value>
+ </trait>
+ <trait id="aTrueInt">
+ <value xsi:type="ecore:EInt">1</value>
+ </trait>
+ <trait id="multivalIntegers">
+ <value xsi:type="mdt:ListOfValues">
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ </value>
+ </trait>
+ <trait id="multivalStrings">
+ <value xsi:type="mdt:ListOfValues">
+ <item>A</item>
+ <item>B</item>
+ <item>C</item>
+ </value>
+ </trait>
+ <trait id="NullVal">
+ <value></value>
+ </trait>
+ <trait id="BooleanVal">
+ <value>true</value>
+ </trait>
+ <trait id="NullBooleanVal">
+ <value></value>
+ </trait>
+ </entity>
+ </entity>
+ <entity id="NLS">
+ <entity id="NLS">
+ <trait id="NLS">
+ <value>%NLS1</value>
+ </trait>
+ <trait id="multivalNLS">
+ <value xsi:type="mdt:ListOfValues">
+ <item>%NLS1</item>
+ <item>%NLS2</item>
+ </value>
+ </trait>
+ </entity>
+ <trait id="NullVal">
+ <value>%NLS3</value>
+ </trait>
+ </entity>
+
+</metadatamodel>
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/traithelpertest_en_US.properties b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/traithelpertest_en_US.properties
new file mode 100644
index 000000000..c30f767b9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/metadata/traithelpertest_en_US.properties
@@ -0,0 +1,15 @@
+###############################################################################
+# 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
+###############################################################################
+NLS1=a day in the life(en_US)
+NLS2=another string(en_US)
+
+
+
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/web/faces-config_1_1.xml.data b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/web/faces-config_1_1.xml.data
new file mode 100644
index 000000000..6be8b5c9a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/testfiles/web/faces-config_1_1.xml.data
@@ -0,0 +1,50 @@
+<?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>
+ <converter>
+ <display-name>
+ MyConverter</display-name>
+ <converter-id>
+ com.foo.myconverter</converter-id>
+ <converter-class>
+ com.foo.MyConverter</converter-class>
+ </converter>
+ <managed-bean>
+ <managed-bean-name>
+ myBean</managed-bean-name>
+ <managed-bean-class>
+ com.foo.MyBean</managed-bean-class>
+ <managed-bean-scope>
+ session</managed-bean-scope>
+ </managed-bean>
+ <navigation-rule>
+ <display-name>
+ actionTypeTest.jsp</display-name>
+ <from-view-id>
+ /actionTypeTest.jsp</from-view-id>
+ <navigation-case>
+ <from-outcome>gotoWelcome</from-outcome>
+ <to-view-id>
+ /welcome.jsp</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>gotoSomeplaceElse</from-outcome>
+ <to-view-id>
+ /heck.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <validator>
+ <description>
+ </description>
+ <display-name>
+ MyValidator</display-name>
+ <validator-id>
+ com.foo.myvalidator</validator-id>
+ <validator-class>
+ com.foo.MyValidator</validator-class>
+ </validator>
+</faces-config>
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/.classpath b/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/.classpath
new file mode 100644
index 000000000..304e86186
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.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.metadataprocessingtests2/.cvsignore b/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/.cvsignore
new file mode 100644
index 000000000..392746722
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/.cvsignore
@@ -0,0 +1,5 @@
+bin
+@dot
+temp.folder
+build.xml
+javaCompiler...args
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/.project b/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/.project
new file mode 100644
index 000000000..27dce317f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jst.jsf.metadataprocessingtests2</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.metadataprocessingtests2/.settings/org.eclipse.core.resources.prefs b/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 000000000..3feb5725f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Sun May 27 16:03:56 EDT 2007
+eclipse.preferences.version=1
+encoding/<project>=ISO-8859-1
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/.settings/org.eclipse.jdt.core.prefs b/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..df300a37b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Tue Apr 10 09:31:09 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.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.metadataprocessingtests2/META-INF/MANIFEST.MF b/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..bb85c6b18
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name.0
+Bundle-SymbolicName: org.eclipse.jst.jsf.metadataprocessingtests2;singleton:=true
+Bundle-Version: 1.5.0.qualifier
+Bundle-Activator: org.eclipse.jst.jsf.metadataprocessingtests2.Activator
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.jst.jsf.core;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.jst.jsf.common;bundle-version="[1.0.0,2.0.0)"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.jst.jsf.metadataprocessingtests2;x-internal:=true
+Bundle-Vendor: %Bundle-Vendor.0
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/about.html b/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/about.html
new file mode 100644
index 000000000..04d4782f4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/about.html
@@ -0,0 +1,22 @@
+<!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.metadataprocessingtests2/build.properties b/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/build.properties
new file mode 100644
index 000000000..a9a96c463
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/build.properties
@@ -0,0 +1,20 @@
+###############################################################################
+# 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
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ metadata/,\
+ about.html,\
+ plugin.properties
+javacSource=1.5
+javacTarget=1.5
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/metadata/jsf_metadataprocessing2.xml b/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/metadata/jsf_metadataprocessing2.xml
new file mode 100644
index 000000000..6b6e098df
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/metadata/jsf_metadataprocessing2.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<md:metadatamodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:md="http://org.eclipse.jst.jsf.common.metadata/metadata.ecore"
+ xmlns:mdt="http://org.eclipse.jst.jsf.common.metadata/metadataTraitTypes.ecore"
+ id=" http://org.eclipse.jsf/metadataprocessing"
+ type="tagFile">
+
+ <entity id="MyTag">
+ <entity id="MyDualTypeAttr">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.metadata.tests.NoImplType</value>
+ </trait>
+ <trait id="valid-values">
+ <value xsi:type="mdt:ListOfValues">
+ <item>BFirstVal</item>
+ <item>BSecondVal</item>
+ <item>BThirdVal</item>
+ <item>BFourthVal</item>
+ </value>
+ </trait>
+ <trait id="small-icon"><value>/icons/attr_val.gif</value></trait>
+ </entity>
+ </entity>
+</md:metadatamodel>
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/plugin.properties b/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/plugin.properties
new file mode 100644
index 000000000..f18aa54f9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/plugin.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# 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=JSF Tools - Metadata Processing Tests 2
+Bundle-Vendor.0=Eclipse Web Tools Platform \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/plugin.xml b/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/plugin.xml
new file mode 100644
index 000000000..a6708b38f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/plugin.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+ <extension
+ point="org.eclipse.jst.jsf.common.standardMetaDataFiles">
+ <standardMetaDataFile
+ location="/metadata/jsf_metadataprocessing2.xml"
+ uri=" http://org.eclipse.jsf/metadataprocessing"/>
+ </extension>
+ <extension
+ point="org.eclipse.jst.jsf.core.AttributeValueRuntimeTypes">
+ <attributeValueRuntimeType id="NoImplType"/>
+ </extension>
+ <extension
+ point="org.eclipse.jst.jsf.core.MetaDataEnabledFeatures">
+ <MetaDataEnabledFeature
+ class="org.eclipse.jst.jsf.metadataprocessingtests2.NoImplPossibleVals"
+ typeid="org.eclipse.jst.jsf.metadata.tests.NoImplType"/>
+ </extension>
+
+</plugin>
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/pom.xml b/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/pom.xml
new file mode 100644
index 000000000..1a050f854
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/pom.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012, 2013 Eclipse Foundation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Distribution License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/org/documents/edl-v10.php
+
+ Contributors:
+ Thanh Ha (Eclipse Foundation) - initial implementation
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.webtools.jsf</groupId>
+ <artifactId>org.eclipse.webtools.jsf.tests</artifactId>
+ <version>3.6.0-SNAPSHOT</version>
+ <relativePath>../../../</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.webtools.jsf</groupId>
+ <artifactId>org.eclipse.jst.jsf.metadataprocessingtests2</artifactId>
+ <version>1.5.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/src/org/eclipse/jst/jsf/metadataprocessingtests2/Activator.java b/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/src/org/eclipse/jst/jsf/metadataprocessingtests2/Activator.java
new file mode 100644
index 000000000..e8c2da713
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/src/org/eclipse/jst/jsf/metadataprocessingtests2/Activator.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * 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:
+ * Gerry Kessler/Oracle - initial API and implementation
+ *
+ ********************************************************************************/
+
+package org.eclipse.jst.jsf.metadataprocessingtests2;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class Activator extends Plugin {
+
+ //The shared instance.
+ private static Activator plugin;
+
+ /**
+ * The constructor.
+ */
+ public Activator() {
+ 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 shared instance.
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/src/org/eclipse/jst/jsf/metadataprocessingtests2/NoImplPossibleVals.java b/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/src/org/eclipse/jst/jsf/metadataprocessingtests2/NoImplPossibleVals.java
new file mode 100644
index 000000000..267996341
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.metadataprocessingtests2/src/org/eclipse/jst/jsf/metadataprocessingtests2/NoImplPossibleVals.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * 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:
+ * Gerry Kessler/Oracle - initial API and implementation
+ *
+ ********************************************************************************/
+
+package org.eclipse.jst.jsf.metadataprocessingtests2;
+
+
+import java.util.List;
+
+import org.eclipse.jst.jsf.metadataprocessors.AbstractMetaDataEnabledFeature;
+import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues;
+
+public class NoImplPossibleVals extends AbstractMetaDataEnabledFeature implements
+ IPossibleValues {
+
+ public NoImplPossibleVals() {
+ super();
+ }
+
+ public List<?> getPossibleValues() {
+ return getPossibleVals();
+ }
+
+ private List<?> getPossibleVals() {
+ return getTraitValueAsListOfStrings(IPossibleValues.POSSIBLE_VALUES_PROP_NAME);
+// return CMAnnotationHelper.getCMAttributePropertyValues(getCMAnnotationContext().getBundleId(), getCMAnnotationContext().getUri(),
+// getCMAnnotationContext().getElementName(), getCMAnnotationContext().getAttributeName(),
+// IPossibleValues.POSSIBLE_VALUES_PROP_NAME);
+
+ }
+
+
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/.classpath b/jsf/tests/org.eclipse.jst.jsf.test.util/.classpath
new file mode 100644
index 000000000..304e86186
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.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.test.util/.cvsignore b/jsf/tests/org.eclipse.jst.jsf.test.util/.cvsignore
new file mode 100644
index 000000000..f522003bf
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/.cvsignore
@@ -0,0 +1,4 @@
+temp.folder
+@dot
+build.xml
+javaCompiler...args
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/.project b/jsf/tests/org.eclipse.jst.jsf.test.util/.project
new file mode 100644
index 000000000..00bf754ec
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jst.jsf.test.util</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.test.util/.settings/org.eclipse.core.resources.prefs b/jsf/tests/org.eclipse.jst.jsf.test.util/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 000000000..3f6030492
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Sun May 27 16:04:15 EDT 2007
+eclipse.preferences.version=1
+encoding/<project>=ISO-8859-1
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/.settings/org.eclipse.jdt.core.prefs b/jsf/tests/org.eclipse.jst.jsf.test.util/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..b27249ce6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,61 @@
+#Fri Aug 24 19:13:38 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.test.util/META-INF/MANIFEST.MF b/jsf/tests/org.eclipse.jst.jsf.test.util/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..c9fa105e0
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/META-INF/MANIFEST.MF
@@ -0,0 +1,42 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name.0
+Bundle-SymbolicName: org.eclipse.jst.jsf.test.util
+Bundle-Version: 1.5.110.qualifier
+Bundle-Activator: org.eclipse.jst.jsf.test.util.Activator
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)";visibility:=reexport,
+ org.eclipse.jst.j2ee;bundle-version="[1.1.0,1.3.0)";visibility:=reexport,
+ org.eclipse.jst.j2ee.core;bundle-version="[1.1.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)";visibility:=reexport,
+ org.junit;bundle-version="4.8.1",
+ org.eclipse.wst.common.core;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.wst.validation;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.wst.internet.cache;bundle-version="[1.0.201,1.2.0)",
+ org.eclipse.core.net;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.wst.common.project.facet.core;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.jst.common.frameworks;bundle-version="[1.1.0,1.2.0)",
+ org.eclipse.wst.web;bundle-version="[1.1.0,1.2.0)",
+ org.eclipse.jem.util;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.wst.sse.core,
+ org.eclipse.wst.xml.core,
+ org.eclipse.ui.ide;bundle-version="3.4.0",
+ org.eclipse.jst.common.project.facet.core,
+ org.eclipse.core.filesystem;visibility:=reexport,
+ org.eclipse.equinox.common;bundle-version="3.6.0";visibility:=reexport,
+ org.eclipse.core.jobs;bundle-version="3.5.0";visibility:=reexport,
+ org.eclipse.core.contenttype;bundle-version="3.4.100";visibility:=reexport,
+ org.eclipse.core.runtime;bundle-version="3.6.0";visibility:=reexport,
+ org.eclipse.jst.jsf.common;bundle-version="1.2.0"
+Export-Package: org.eclipse.jst.jsf.test.util,
+ org.eclipse.jst.jsf.test.util.junit4,
+ org.eclipse.jst.jsf.test.util.mock,
+ org.eclipse.jst.jsf.test.util.mock.java,
+ org.eclipse.jst.jsf.test.util.mock.osgi,
+ org.eclipse.jst.jsf.test.util.mock.smodel
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Vendor: %Bundle-Vendor.0
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/about.html b/jsf/tests/org.eclipse.jst.jsf.test.util/about.html
new file mode 100644
index 000000000..04d4782f4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/about.html
@@ -0,0 +1,22 @@
+<!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.test.util/build.properties b/jsf/tests/org.eclipse.jst.jsf.test.util/build.properties
new file mode 100644
index 000000000..37f1d3b28
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/build.properties
@@ -0,0 +1,18 @@
+###############################################################################
+# 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
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties
+javacSource=1.5
+javacTarget=1.5
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/plugin.properties b/jsf/tests/org.eclipse.jst.jsf.test.util/plugin.properties
new file mode 100644
index 000000000..85810e06b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/plugin.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# 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=JSF Tools - JUnit Tests Utilities
+Bundle-Vendor.0=Eclipse Web Tools Platform
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/pom.xml b/jsf/tests/org.eclipse.jst.jsf.test.util/pom.xml
new file mode 100644
index 000000000..5f2210ba7
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/pom.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012, 2013 Eclipse Foundation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Distribution License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/org/documents/edl-v10.php
+
+ Contributors:
+ Thanh Ha (Eclipse Foundation) - initial implementation
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.webtools.jsf</groupId>
+ <artifactId>org.eclipse.webtools.jsf.tests</artifactId>
+ <version>3.6.0-SNAPSHOT</version>
+ <relativePath>../../../</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.webtools.jsf</groupId>
+ <artifactId>org.eclipse.jst.jsf.test.util</artifactId>
+ <version>1.5.110-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/Activator.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/Activator.java
new file mode 100644
index 000000000..fcc3ca9d8
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/Activator.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * 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.test.util;
+
+//Test1dd
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ /**
+ * the plugin's unique id
+ */
+ public static final String PLUGIN_ID = "org.eclipse.jst.jsf.test.util";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ 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 Activator getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Default plugin log method
+ *
+ * @param message
+ * @param t
+ */
+ public static void log(String message, Throwable t)
+ {
+ IStatus logInfo = new Status(IStatus.ERROR, plugin.getBundle().getSymbolicName(), 0, message, t);
+ plugin.getLog().log(logInfo);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/ConfigurableTestCase.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/ConfigurableTestCase.java
new file mode 100644
index 000000000..5b380ed37
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/ConfigurableTestCase.java
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * 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.test.util;
+
+import java.util.AbstractMap;
+import java.util.HashMap;
+import java.util.Set;
+
+import junit.framework.TestCase;
+
+public class ConfigurableTestCase extends TestCase
+{
+ protected TestConfiguration _testConfiguration;
+
+
+ protected ConfigurableTestCase() {
+ super();
+ }
+
+ public ConfigurableTestCase(String name)
+ {
+ super(name);
+ }
+
+
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ if (_testConfiguration == null)
+ {
+ doStandaloneSetup();
+ }
+ else
+ {
+ doTestSuiteSetup();
+ }
+ }
+
+ /**
+ * sub-classes should override to do test configuration for
+ * when the test is run stand-alone.
+ *
+ * Subs should always call super.doStandalonSetup to ensure all setup is performed
+ */
+ protected void doStandaloneSetup()
+ {
+ // no default behavior
+ }
+
+ /**
+ * sub-classes should override to handle the case where
+ * the testcase is run under a ConfigurableTestSuite that sets
+ * the configuration automatically.
+ *
+ * Subs should always call super.doStandalonSetup to ensure all setup is performed
+ */
+ protected void doTestSuiteSetup()
+ {
+ // no default behavior
+ }
+
+ public void setConfiguration(TestConfiguration configuration)
+ {
+ _testConfiguration = configuration;
+ }
+
+ public static class TestConfiguration extends AbstractMap<String, String>
+ {
+ private HashMap<String, String> backingMap = new HashMap<String, String>();
+
+ public Set<Entry<String,String>> entrySet()
+ {
+ return backingMap.entrySet();
+ }
+
+ public String put(String key, String value) {
+ return backingMap.put(key, value);
+ }
+
+ /**
+ * Produces a new TestConfiguration with a shallow copy of the backing map
+ */
+ @SuppressWarnings("unchecked")
+ public Object clone()
+ {
+ TestConfiguration clone = new TestConfiguration();
+ HashMap<String, String> newBackingMap = (HashMap<String, String>) backingMap.clone();
+ clone.backingMap = newBackingMap;
+ return clone;
+ }
+
+
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/ConfigurableTestSuite.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/ConfigurableTestSuite.java
new file mode 100644
index 000000000..9c32f8427
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/ConfigurableTestSuite.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * 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.test.util;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestResult;
+import junit.framework.TestSuite;
+
+import org.eclipse.jst.jsf.test.util.ConfigurableTestCase.TestConfiguration;
+
+public class ConfigurableTestSuite extends TestSuite
+{
+ protected TestConfiguration _configuration;
+
+
+ /**
+ * Use this constructor when adding to parent ConfigurableTestSuite
+ * @param theClass
+ * @param name
+ */
+ public ConfigurableTestSuite(Class<? extends TestCase> theClass, String name) {
+ super(theClass, name);
+ }
+
+ public ConfigurableTestSuite(Class<?> theClass)
+ {
+ super(theClass);
+ }
+
+ public ConfigurableTestSuite(TestConfiguration configuration, String name)
+ {
+ super(name);
+ _configuration = configuration;
+ }
+
+ public void runTest(Test test, TestResult result)
+ {
+ if (test instanceof ConfigurableTestCase)
+ {
+ ((ConfigurableTestCase)test)
+ .setConfiguration(_configuration);
+ }
+ else if (test instanceof ConfigurableTestSuite)
+ {
+ ((ConfigurableTestSuite)test)._configuration =
+ this._configuration;
+ }
+ super.runTest(test, result);
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/JDTTestEnvironment.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/JDTTestEnvironment.java
new file mode 100644
index 000000000..55628072d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/JDTTestEnvironment.java
@@ -0,0 +1,229 @@
+/*******************************************************************************
+ * 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.test.util;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+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.IProjectDescription;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.osgi.framework.Bundle;
+
+/**
+ * Test environment for doing project tests involving JDT dependencies
+ * @author cbateman
+ *
+ */
+public class JDTTestEnvironment {
+
+ private final ProjectTestEnvironment _projectTestEnvironment;
+
+ /**
+ * @param projectTestEnvironment
+ * @throws CoreException
+ */
+ public JDTTestEnvironment(ProjectTestEnvironment projectTestEnvironment) throws CoreException
+ {
+ _projectTestEnvironment = projectTestEnvironment;
+
+ IProject project = _projectTestEnvironment.getTestProject();
+ if (!project.hasNature(JavaCore.NATURE_ID)) {
+ IProjectDescription description = project.getDescription();
+ String[] prevNatures= description.getNatureIds();
+ String[] newNatures= new String[prevNatures.length + 1];
+ System.arraycopy(prevNatures, 0, newNatures, 0, prevNatures.length);
+ newNatures[prevNatures.length]= JavaCore.NATURE_ID;
+ description.setNatureIds(newNatures);
+ project.setDescription(description, new NullProgressMonitor());
+ }
+
+ IJavaProject javaProject = JavaCore.create(project);
+
+ // make sure that the project root is not on the classpath
+ IClasspathEntry[] entries =
+ javaProject.getRawClasspath();
+ List<IClasspathEntry> preservedEntries = new ArrayList<IClasspathEntry>();
+
+ for (int i=0; i < entries.length; i++)
+ {
+ IClasspathEntry entry = entries[i];
+
+ if (!entry.getPath().equals(project.getFullPath()))
+ {
+ preservedEntries.add(entry);
+ }
+ }
+
+ javaProject.setRawClasspath(preservedEntries.toArray(new IClasspathEntry[0]),
+ new NullProgressMonitor());
+ }
+
+ /**
+ * @return the supporting IProject test environment
+ */
+ public ProjectTestEnvironment getProjectEnvironment()
+ {
+ return _projectTestEnvironment;
+ }
+
+ /**
+ * @param name
+ * @return the IFolder handle, creating it if it doesn't exist
+ * @throws CoreException
+ */
+ public IFolder getSourceFolder(final String name) throws CoreException
+ {
+ IProject project = _projectTestEnvironment.getTestProject();
+ IFolder folder = project.getFolder(name);
+
+ if (!folder.exists())
+ {
+ folder.create(true, true, new NullProgressMonitor());
+ IPath path = project.getFullPath().append("bin");
+ IClasspathEntry entry = JavaCore.newSourceEntry(folder.getFullPath(), new IPath[]{path}, path);
+ addClasspathEntry(entry);
+ }
+
+
+ return folder;
+ }
+
+ /**
+ * Tries to add the newEntry to the java project's classpath
+ * @param newEntry
+ */
+ public void addClasspathEntry(IClasspathEntry newEntry) throws JavaModelException
+ {
+ IClasspathEntry[] entries = getJavaProject().getRawClasspath();
+ IClasspathEntry[] newEntries = new IClasspathEntry[entries.length+1];
+ System.arraycopy(entries, 0, newEntries, 0, entries.length);
+ newEntries[entries.length] = newEntry;
+ getJavaProject().setRawClasspath(newEntries, new NullProgressMonitor());
+ }
+
+ /**
+ * Try to load the jar file at pathToJarFile in bundle as a jar classpath entry
+ *
+ * @param bundle
+ * @param pathToJarFile
+ * @return the class path entry or null if unable to create
+ * @throws JavaModelException if a problem occurs adding the classpath entry
+ */
+ public IClasspathEntry addJarClasspathEntry(Bundle bundle, String pathToJarFile) throws JavaModelException, IOException, URISyntaxException
+ {
+ IPath path = JSFTestUtil.getAbsolutePath(bundle, pathToJarFile);
+ IClasspathEntry entry = JavaCore.newLibraryEntry(path, null, null);
+
+ addClasspathEntry(entry);
+
+ return entry;
+ }
+
+ /**
+ * @param folderName
+ * @return the package fragment root for the folder name; resource may or may not exist
+ * @throws CoreException
+ */
+ public IPackageFragmentRoot getPackageFragmentRoot(final String folderName) throws CoreException
+ {
+ final IJavaProject javaProject = JavaCore.create(_projectTestEnvironment.getTestProject());
+ IFolder folder = getSourceFolder(folderName);
+ IPackageFragmentRoot root = javaProject.getPackageFragmentRoot(folder);
+
+ return root;
+ }
+
+ /**
+ * Creates a new Java class file in the folder/package/file name specified with contents as the
+ * the Java code.
+ *
+ * @param folder
+ * @param packageName
+ * @param className
+ * @param contents
+ * @return the created compiliation unit
+ * @throws CoreException
+ * @throws JavaModelException
+ */
+ public ICompilationUnit addSourceFile(final String folder, final String packageName, final String className, final String contents) throws CoreException, JavaModelException
+ {
+ IPackageFragmentRoot root = getPackageFragmentRoot(folder);
+ IPackageFragment packageFrag = root.getPackageFragment(packageName);
+
+ if (!packageFrag.exists())
+ {
+ packageFrag =
+ root.createPackageFragment(packageName,
+ true, new NullProgressMonitor());
+ }
+
+ ICompilationUnit newCompUnit =
+ packageFrag.createCompilationUnit(className+".java", contents, true, new NullProgressMonitor());
+ return newCompUnit;
+ }
+
+ /**
+ * @param folderName
+ * @param src
+ * @param path
+ * @param fileName
+
+ * @return a new IFile corresponding to src being created and copied
+ * into a new file at folderName/IPath
+ * @throws IOException
+ * @throws CoreException
+ */
+ public IFile addResourceFile(final String folderName, final InputStream src, final String path, final String fileName) throws CoreException
+ {
+ IPackageFragmentRoot root = getPackageFragmentRoot(folderName);
+
+ IPackageFragment packageFrag = root.getPackageFragment(path);
+
+ if (!packageFrag.exists())
+ {
+ packageFrag =
+ root.createPackageFragment(path,
+ true, new NullProgressMonitor());
+ packageFrag.open(null);
+ }
+
+ final IFolder folder = (IFolder) packageFrag.getUnderlyingResource();
+
+ IFile file = folder.getFile(new Path(fileName));
+ file.create(src, true, null);
+ return file;
+ }
+
+ /**
+ * @return the IJavaProject instance for this test environment object
+ */
+ public IJavaProject getJavaProject()
+ {
+ return JavaCore.create(_projectTestEnvironment.getTestProject());
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/JSFTestUtil.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/JSFTestUtil.java
new file mode 100644
index 000000000..e1d958db6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/JSFTestUtil.java
@@ -0,0 +1,470 @@
+/*******************************************************************************
+ * 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.test.util;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.InvocationTargetException;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.Arrays;
+import java.util.zip.ZipFile;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.jobs.IJobChangeEvent;
+import org.eclipse.core.runtime.jobs.IJobChangeListener;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.core.runtime.jobs.JobChangeAdapter;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.validation.ValidationFramework;
+import org.eclipse.wst.validation.internal.ConfigurationManager;
+import org.eclipse.wst.validation.internal.GlobalConfiguration;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+import org.osgi.framework.Bundle;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+/**
+ * Test utility methods
+ *
+ * @author cbateman
+ *
+ */
+public final class JSFTestUtil
+{
+ private static boolean _enableTrace = false;
+
+ /**
+ * Setting to true enables internal tracing in this class. The default
+ * is false. There is no thread safety.
+ *
+ * @param enableTrace
+ */
+ public static void setEnableTrace(final boolean enableTrace)
+ {
+ _enableTrace = enableTrace;
+ }
+
+ /**
+ * Used to turn off build validation to speed up testing
+ *
+ * @param isEnabled
+ * @throws InvocationTargetException
+ * @throws InvocationTargetException
+ */
+ public static void setValidationEnabled(final boolean isEnabled) throws InvocationTargetException
+ {
+ // old way (just in case)
+ final GlobalConfiguration config = new GlobalConfiguration(ConfigurationManager.getManager().getGlobalConfiguration());
+ config.setDisableAllValidation(!isEnabled);
+ config.passivate();
+ config.store();
+
+ // new way
+ ValidationFramework.getDefault().suspendAllValidation(!isEnabled);
+ }
+
+ /**
+ * @param proxied
+ * @param proxyHostName
+ * @param proxyPort
+ */
+ public static void setInternetProxyPreferences(final boolean proxied, final String proxyHostName, final String proxyPort)
+ {
+ // disable
+// IProxyService proxy = ProxyManager.getProxyManager();
+//
+// if (proxied)
+// {
+// ProxyData proxyData = new ProxyData(IProxyData.HTTP_PROXY_TYPE);
+// proxyData.setHost(proxyHostName);
+// proxyData.setPassword(proxyPort);
+// try
+// {
+// proxy.setProxyData(new ProxyData[] {proxyData});
+// proxy.setProxiesEnabled(true);
+// }
+// catch (CoreException ce)
+// {
+// // TODO: is this recoverable? Maybe should throw up.
+// Activator.log("Error setting web proxy. Tests may fail or take a long time to run", ce);
+// }
+//
+// }
+// else
+// {
+// proxy.setProxiesEnabled(false);
+// }
+ }
+
+ /**
+ * Loads the source file in bundle called fileName into the jdtTestEnvironment
+ * under srcFolderName/packageName.beanClassName
+ *
+ * @param bundle
+ * @param fileName
+ * @param beanClassName
+ * @param srcFolderName
+ * @param packageName
+ * @param jdtTestEnvironment
+ * @throws Exception
+ */
+ public static void loadSourceClass(final Bundle bundle,
+ final String fileName,
+ final String beanClassName,
+ final String srcFolderName,
+ final String packageName,
+ final JDTTestEnvironment jdtTestEnvironment) throws Exception
+ {
+ final TestFileResource codeRes = new TestFileResource();
+ codeRes.load(bundle, fileName);
+ final String code = codeRes.toString();
+ jdtTestEnvironment.addSourceFile(srcFolderName, packageName, beanClassName, code);
+ }
+
+ public static ZipFile createZipFile(final Bundle bundle, final String entryName) throws IOException, URISyntaxException
+ {
+ return new ZipFile(new File(getAbsolutePath(bundle, entryName).toOSString()));
+ }
+
+ public static URI getPlatformAbsPath(final String relativePath) throws MalformedURLException, URISyntaxException
+ {
+
+ final File file = new File(Platform.getInstanceLocation().getURL().getFile() + File.separator + relativePath);
+ return file.toURI();
+ }
+
+ public static IPath getAbsolutePath(final Bundle bundle, final String relativePath) throws IOException, URISyntaxException
+ {
+ final URL bundleUrl = bundle.getEntry(relativePath);
+ Assert.assertNotNull(bundleUrl);
+ final URL url = FileLocator.resolve(bundleUrl);
+ return new Path(new File(url.getFile()).getAbsolutePath());
+ }
+
+ public static void savePlatformRelative(final TestFileResource testFile, final String relativePath) throws IOException, URISyntaxException
+ {
+ saveToFileSystem(testFile, getPlatformAbsPath(relativePath));
+ }
+
+ public static void saveToFileSystem(final TestFileResource testFile, final URI absPath) throws IOException
+ {
+ saveToFileSystem(testFile.toBytes(), absPath);
+ }
+
+ public static void saveToFileSystem(final byte[] buffer, final URI absPath) throws IOException
+ {
+ final File file = new File(absPath);
+
+ FileOutputStream outFile = null;
+
+ try
+ {
+ outFile=new FileOutputStream(file);
+ outFile.write(buffer);
+ }
+ finally
+ {
+ if (outFile != null)
+ {
+ outFile.close();
+ }
+ }
+
+ }
+
+ public static void saveToFileSystem(final InputStream inStream, final URI absPath) throws IOException
+ {
+ ByteArrayOutputStream loadFromInputStream = loadFromInputStream(inStream);
+ saveToFileSystem(loadFromInputStream.toByteArray(), absPath);
+ }
+
+ /**
+ * @param testFile
+ * @param absPath
+ * @return true if the contents of testFile and the contents of what absPath point to
+ * are the same based on a byte for byte comparison (Arrays.equal(byte[], byte[]).
+ *
+ * @throws IOException
+ */
+ public static boolean areEqual(final TestFileResource testFile, final URI absPath) throws IOException
+ {
+ final File file = new File(absPath);
+
+ return Arrays.equals(loadFromFile(file).toByteArray(), testFile.toBytes());
+ }
+
+ public static ByteArrayOutputStream loadFromFile(final IFile file) throws IOException
+ {
+ InputStream inStream = null;
+
+ try
+ {
+ inStream = file.getContents();
+ return loadFromInputStream(inStream);
+ }
+ catch(final CoreException ce)
+ {
+ return new ByteArrayOutputStream();
+ }
+ finally
+ {
+ if (inStream != null)
+ {
+ inStream.close();
+ }
+ }
+ }
+
+ public static ByteArrayOutputStream loadFromFile(final File file) throws IOException
+ {
+ FileInputStream inFile = null;
+
+ try
+ {
+ inFile=new FileInputStream(file);
+ return loadFromInputStream(inFile);
+ }
+ finally
+ {
+ if (inFile != null)
+ {
+ inFile.close();
+ }
+ }
+ }
+
+ /**
+ * Caller is responsible for closing the stream
+ * @param stream
+ * @return the byte stream loaded from the file
+ * @throws IOException
+ */
+ public static ByteArrayOutputStream loadFromInputStream(final InputStream stream) throws IOException
+ {
+ final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
+ final byte[] inBuffer = new byte[1024];
+ int bytesRead;
+// int curPos = 0;
+ while ((bytesRead = stream.read(inBuffer)) != -1)
+ {
+ buffer.write(inBuffer,0,bytesRead);
+// curPos+=bytesRead;
+ }
+
+ return buffer;
+ }
+
+ public static IndexedRegion getIndexedRegion(final IStructuredDocument document, final int documentOffset)
+ {
+ // C.B: most of this logic was copied from ContentAssistUtils.getNodeAt
+ // I chose to copy rather than just call that because ContentAssistUtils is
+ // internal
+ final IStructuredModel model = getStructuredModel(document);
+ IndexedRegion region = null;
+ if (model != null)
+ {
+ try
+ {
+ int lastOffset = documentOffset;
+ region = model.getIndexedRegion(documentOffset);
+ trace("Starting at region: "+region.toString());
+ while (region == null && lastOffset >= 0) {
+ lastOffset--;
+ region = model.getIndexedRegion(lastOffset);
+ trace("Iterating on region: "+region.toString());
+ }
+
+ trace("Finished with: "+region.toString()+", Class: "+region.getClass());
+
+ // now we assume we have an element. But our context may be
+ // on an attribute in that node, so we need to check
+ if (region instanceof IDOMElement)
+ {
+ trace("Region is an IDOMElement");
+ final IDOMElement domElement = (IDOMElement) region;
+
+ final NamedNodeMap attributes = domElement.getAttributes();
+
+ for (int i = 0; i < attributes.getLength(); i++)
+ {
+ final Node attrNode = attributes.item(i);
+
+ if (attrNode instanceof IDOMAttr)
+ {
+ final IDOMAttr attr = (IDOMAttr) attrNode;
+ trace("Examining attribute: "+attr.toString());
+
+ if (documentOffset >= attr.getStartOffset()
+ && documentOffset < attr.getEndOffset())
+ {
+ region = attr;
+ trace("Found attribute: "+region.toString());
+ break;
+ }
+ }
+ }
+ }
+ }
+ finally
+ {
+ trace("releasing model");
+ model.releaseFromRead();
+ }
+ }
+
+ trace("returning: "+region);
+ return region;
+ }
+
+ private static void trace(final String message)
+ {
+ if (_enableTrace)
+ {
+ System.out.println("getIndexedRegion: "+message);
+ }
+ }
+
+ /**
+ * @param document
+ * @return a structured model or null if one cannot be opened for document.
+ * Note: the caller is responsible for releasing the instance of structured
+ * model that gets returned.
+ */
+ private static IStructuredModel getStructuredModel(final IStructuredDocument document)
+ {
+ final IModelManager modelManager = StructuredModelManager.getModelManager();
+
+ if (modelManager != null)
+ {
+ return StructuredModelManager.getModelManager().getModelForRead(document);
+ }
+
+ return null;
+ }
+
+ /**
+ * Attempts to delete resource. If the delete operation throws a
+ * CoreException, the call will sleep the thread for backOffInMs
+ * before trying again. Will try a maximum of 'maxTries' times. If at that
+ * point the resource still exists, an error will be logged and the method
+ * will return.
+ *
+ * @param resource
+ * @param maxTries
+ * @param backInMs
+ * @return true if the delete was successful.
+ */
+ public static boolean safeDelete(final IResource resource, final int maxTries, final int backOffInMs)
+ {
+ boolean success = false;
+
+ DELETE_LOOP: for (int attempt = 0; attempt < maxTries; attempt++)
+ {
+ try
+ {
+ resource.delete(true, null);
+ success = true;
+ break DELETE_LOOP;
+ }
+ catch (CoreException e)
+ {
+ try
+ {
+ Thread.sleep(backOffInMs);
+ }
+ catch (InterruptedException e1)
+ {
+ // do nothing, just continue
+ }
+ }
+ }
+ if (!success)
+ {
+ System.err.println("Could not delete resource: "+resource.getLocation().toOSString());
+ }
+ return success;
+ }
+
+ private static IJobChangeListener javaScriptJobChangeListener;
+
+ public static void preventJavaScriptJobs() {
+ if (javaScriptJobChangeListener == null) {
+ javaScriptJobChangeListener = new JobChangeAdapter() {
+ @Override
+ public void scheduled(IJobChangeEvent event) {
+ Job job = event.getJob();
+ if (job != null) {
+ String jobName = job.getName();
+ if (jobName != null && jobName.length() > 0) {
+ if (jobName.toUpperCase().contains("JAVASCRIPT")) { //$NON-NLS-1$
+ job.cancel();
+ }
+ }
+ }
+ }
+ };
+ }
+ Job.getJobManager().addJobChangeListener(javaScriptJobChangeListener);
+ }
+
+ public static void allowJavaScriptJobs() {
+ if (javaScriptJobChangeListener != null) {
+ Job.getJobManager().removeJobChangeListener(javaScriptJobChangeListener);
+ //don't null out javaScriptJobChangeListener as it may be reused without re-construction
+ }
+ }
+
+ public static Class<? extends TestCase> getPreventJavaScriptJobsTestCase() {
+ return PreventJavaScriptJobsTestCase.class;
+ }
+
+ public static Class<? extends TestCase> getAllowJavaScriptJobsTestCase() {
+ return AllowJavaScriptJobsTestCase.class;
+ }
+
+ public static class PreventJavaScriptJobsTestCase extends TestCase {
+ public void testPreventJavaScriptJobs() throws Exception {
+ preventJavaScriptJobs();
+ }
+ }
+
+ public static class AllowJavaScriptJobsTestCase extends TestCase {
+ public void testAllowJavaScriptJobs() throws Exception {
+ allowJavaScriptJobs();
+ }
+ }
+
+ private JSFTestUtil()
+ {
+ // no instantiation
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/LoadableResource.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/LoadableResource.java
new file mode 100644
index 000000000..eacdc9aa4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/LoadableResource.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * 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.test.util;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+import org.osgi.framework.Bundle;
+
+/**
+ * A resource that can be loaded into memory in a test plugin friendly way
+ *
+ * @author cbateman
+ */
+public abstract class LoadableResource
+{
+
+ /**
+ * Attempts to load the code from the path relative to bundle
+ *
+ * @param bundle
+ * @param path
+ * @throws IOException
+ */
+ public void load(Bundle bundle, String path) throws IOException
+ {
+ URL url = bundle.getEntry(path);
+
+ if (url == null)
+ {
+ throw new IOException("Could not locate "+path+" in bundle "+bundle.getSymbolicName());
+ }
+
+ InputStream stream = null;
+
+ try
+ {
+ stream = url.openStream();
+ byte[] buffer = new byte[2048];
+ int bytesRead = 0;
+
+ while ((bytesRead = stream.read(buffer)) != -1)
+ {
+ bufferLoaded(buffer, bytesRead);
+ }
+ }
+ finally
+ {
+ if (stream != null)
+ {
+ stream.close();
+ }
+ }
+ }
+
+ /**
+ * Called by load to indicate that numBytes starting from offset 0
+ * have been loaded. Sub-classes must implement to handle the buffer,
+ * usually it will be appended into a running buffer until loadCompleted
+ * is called to indicate that all data has been loaded.
+ *
+ * @param buffer
+ * @param numBytes
+ */
+ protected abstract void bufferLoaded(byte[] buffer, int numBytes);
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/ObjectHacker.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/ObjectHacker.java
new file mode 100644
index 000000000..7d8892a7b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/ObjectHacker.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.test.util;
+
+import java.lang.reflect.Field;
+
+/**
+ * A utility class used to hack other classes at test time. This should be
+ * viewed as a last resort where state needs to be forced inside classes that we
+ * cannot access in any other way.
+ *
+ * @author cbateman
+ *
+ */
+public class ObjectHacker
+{
+
+ public void forceStaticField(final Class<?> clazz, final String fieldName,
+ final Object value) throws NoSuchFieldException,
+ IllegalAccessException
+ {
+ final Field declaredField = clazz.getDeclaredField(fieldName);
+ declaredField.setAccessible(true);
+ declaredField.set(null, value);
+ }
+
+ public void forceField(final Object instance,
+ final Class<?> declaringClass, final String fieldName,
+ final Object value) throws SecurityException, NoSuchFieldException,
+ IllegalArgumentException, IllegalAccessException
+ {
+ final Field declaredField = declaringClass.getDeclaredField(fieldName);
+ declaredField.setAccessible(true);
+ declaredField.set(instance, value);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/PerfTracker.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/PerfTracker.java
new file mode 100644
index 000000000..9a6eceb84
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/PerfTracker.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * 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.test.util;
+
+import java.io.PrintStream;
+import java.text.MessageFormat;
+
+public class PerfTracker {
+ private long _max = Long.MIN_VALUE; // ensure any value compared to to this
+ // will be bigger
+ private long _maxIdx = 0;
+ private long _min = Long.MAX_VALUE; // ensure any value compared to this
+ // will be smaller
+ private long _minIdx = 0;
+ private long _runningTotal = 0;
+ private final long[] _times;
+ private int _numTimesRecorded = 0;
+
+ private final String _name;
+
+ public PerfTracker(final String name, final int numOfRuns) {
+ _times = new long[numOfRuns];
+ _name = name;
+ }
+
+ public void recordTime(long time) {
+ _max = Math.max(_max, time);
+ _maxIdx = _max == time ? _numTimesRecorded : _maxIdx;
+
+ _min = Math.min(_min, time);
+ _minIdx = _min == time ? _numTimesRecorded : _minIdx;
+
+ _runningTotal += time;
+
+ _times[_numTimesRecorded++] = time;
+ }
+
+ public void printReport(PrintStream outStream) {
+ outStream
+ .println("===================================================");
+ outStream.println("Report for performance test: " + _name);
+ outStream.println("Number of iterations: " + _numTimesRecorded);
+ outStream
+ .println("===================================================");
+ outStream.println(MessageFormat.format("Max: {0}, Max Index: {1}",
+ new Object[] { _max, _maxIdx }));
+ outStream.println(MessageFormat.format("Min: {0}, Min Index: {1}",
+ new Object[] { _min, _minIdx }));
+ outStream.println(MessageFormat.format(
+ "Avg: {0}, StdDev: {1}, StdDev Ignore Max/Min: {2}",
+ new Object[] { average(), calculateStdDev(false),
+ calculateStdDev(true) }));
+ outStream
+ .println("===================================================");
+ outStream.println("");
+ }
+
+ private double average() {
+ return _runningTotal / _numTimesRecorded;
+ }
+
+ private double calculateStdDev(boolean ignoreMaxMin) {
+ double total = 0;
+ final double avg = average();
+ for (int i = 0; i < _numTimesRecorded; i++) {
+ if (!ignoreMaxMin || ((i != _maxIdx) && (i != _minIdx))) {
+ total += Math.pow((_times[i] - avg), 2) / _numTimesRecorded;
+ }
+ }
+ return Math.sqrt(total);
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/ProjectTestEnvironment.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/ProjectTestEnvironment.java
new file mode 100644
index 000000000..dea626a06
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/ProjectTestEnvironment.java
@@ -0,0 +1,272 @@
+/***************************************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle -- adapted WizardUtil class for EMF faces config model testing
+ * IBM Corporation - initial API and implementation
+ **************************************************************************************************/
+package org.eclipse.jst.jsf.test.util;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.ui.dialogs.IOverwriteQuery;
+import org.eclipse.ui.wizards.datatransfer.ImportOperation;
+import org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider;
+
+/**
+ * Utility class for launching JSF-related wizard operations.
+ *
+ * @author spaxton, cbateman
+ */
+public class ProjectTestEnvironment
+{
+ /**
+ * flag indicating if the project test env has been created
+ */
+ protected boolean _projectCreated = false;
+
+ /**
+ * the project name
+ */
+ protected final String _projectName;
+ /**
+ * the project
+ */
+ protected IProject _project;
+
+ protected static final IOverwriteQuery OVERWRITE_ALL_QUERY =
+ new IOverwriteQuery()
+ {
+ public String queryOverwrite(
+ String pathString)
+ {
+ return IOverwriteQuery.ALL;
+ }
+ };
+
+ /**
+ * @param projectName
+ */
+ public ProjectTestEnvironment(final String projectName)
+ {
+ _projectName = projectName;
+ }
+
+ /**
+ * @return true if the project is in a valid created state
+ */
+ public boolean isProjectCreated()
+ {
+ return _projectCreated;
+ }
+
+ /**
+ * @param ignoreProjectExists --
+ * only has impact if _projectName already exists in the
+ * workspace. In this case, if set to true, then createProject
+ * will return without error if the project exists (it will be
+ * deleted and recreated)
+ *
+ * If set to false and the project exists, a runtime exception will be
+ * thrown
+ *
+ * @return true if project is created
+ */
+ public boolean createProject(boolean ignoreProjectExists)
+ {
+ IProject project =
+ ResourcesPlugin.getWorkspace().getRoot().getProject(
+ _projectName);
+
+ if (project.isAccessible() && !ignoreProjectExists)
+ {
+ throw new RuntimeException(
+ "Project was not expected to exist but does: "
+ + project.getName());
+ }
+
+ if (!isProjectCreated())
+ {
+ // first delete the projects of these names, if present
+ deleteProject();
+
+ if (!project.exists())
+ {
+ try
+ {
+ final IProgressMonitor monitor = new NullProgressMonitor();
+ project.create(monitor);
+ project.open(monitor);
+ _project = project;
+ _projectCreated = true;
+ return true;
+ }
+ catch (CoreException ce)
+ {
+ ce.printStackTrace();
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Creates the new projecct from the specified zip file. createProject
+ * is first called to create and open the empty project. The projectZip
+ * is then used to populate the contents of the project.
+ *
+ * @param projectZip
+ * @param ignoreProjectExists
+ * @throws InvocationTargetException
+ * @throws InterruptedException
+ */
+ public final void createFromZip(final ZipFile projectZip,
+ final boolean ignoreProjectExists) throws InvocationTargetException, InterruptedException
+ {
+ // TODO: assert that the faceting in the zip matches what was set in the constructor.
+ createProject(ignoreProjectExists);
+ ZipFileStructureProvider zipFileStructureProvider =
+ new ZipFileStructureProvider(
+ projectZip)
+ {
+
+ @Override
+ public String getFullPath(Object element)
+ {
+ final String fullName = super.getFullPath(element);
+ IPath asPath = new Path(fullName);
+
+ if (asPath.segmentCount() > 0)
+ {
+ boolean pathIsAbsolute = asPath.isAbsolute();
+ String newFirstSegment = (pathIsAbsolute ? "/" : "") + _projectName;
+ asPath = new Path(newFirstSegment+"/"+asPath.removeFirstSegments(1).toString());
+ }
+ return asPath.toString();
+ }
+
+ @Override
+ public String getLabel(Object element)
+ {
+ if (element.equals(getRoot())) {
+ return ((ZipEntry) element).getName();
+ }
+
+ return new Path(getFullPath(element)).lastSegment();
+ }
+ };
+
+ final ImportOperation op =
+ new ImportOperation(_project
+ .getProjectRelativePath(),
+ zipFileStructureProvider.getRoot(),
+ zipFileStructureProvider,
+ OVERWRITE_ALL_QUERY);
+ op.setCreateContainerStructure(true);
+ op.run(null);
+ }
+
+ /**
+ * Creates the new project from the specified zip file. createProject
+ * is first called to create and open the empty project. The projectZip
+ * is then used to populate the contents of the project.
+ *
+ * Differs from createFromZip in that it passes the project path (relative
+ * to workspace) to ImportOperation and so projectZip should contain only
+ * intended contents of the project with no top-level "project" folder in
+ * the zip file. This is to workaround bug 296496.
+ *
+ * @param projectZip
+ * @param ignoreProjectExists
+ * @throws InvocationTargetException
+ * @throws InterruptedException
+ */
+ public final void createFromZip2(
+ final ZipFile projectZip,
+ final boolean ignoreProjectExists)
+ throws InvocationTargetException, InterruptedException {
+ // TODO: assert that the faceting in the zip matches what was set in the constructor.
+ createProject(ignoreProjectExists);
+ ZipFileStructureProvider zipFileStructureProvider =
+ new ZipFileStructureProvider(projectZip);
+ final ImportOperation op =
+ new ImportOperation(
+ _project.getFullPath(),
+ zipFileStructureProvider.getRoot(),
+ zipFileStructureProvider,
+ OVERWRITE_ALL_QUERY);
+ op.setCreateContainerStructure(true);
+ op.run(null);
+ }
+
+ /**
+ * Delete project
+ */
+ public void deleteProject()
+ {
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ IProject oldWebProj = workspace.getRoot().getProject(_projectName);
+
+ try
+ {
+ if (oldWebProj != null && oldWebProj.isAccessible())
+ {
+ workspace.delete(new IResource[]
+ { oldWebProj }, true, null);
+ }
+ }
+ catch (CoreException ce)
+ {
+ ce.printStackTrace();
+ }
+ }
+
+ /**
+ * Clears the _projectCreated flag, allowing createProject to be called to
+ * reset the web project back to it's initial state
+ */
+ public void setProjectDirtied()
+ {
+ _projectCreated = false;
+ }
+
+ /**
+ * Forces recreation of the test project - to be used after unit tests that
+ * dirty the project state.
+ */
+ public void recreateProject()
+ {
+ setProjectDirtied();
+ createProject(true);
+ }
+
+ /**
+ * Should call createProject first.
+ *
+ * @return the IProject
+ */
+ public IProject getTestProject()
+ {
+ if (_projectCreated)
+ {
+ return _project;
+ }
+
+ return null;
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/TestFileResource.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/TestFileResource.java
new file mode 100644
index 000000000..d6c0b1a1b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/TestFileResource.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * 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.test.util;
+
+import java.io.ByteArrayOutputStream;
+import java.io.UnsupportedEncodingException;
+
+
+
+/**
+ * Represents a piece of java code (usually a full compilation unit) that is loaded
+ * from a static test file somewhere.
+ *
+ * @author cbateman
+ *
+ */
+public class TestFileResource extends LoadableResource
+{
+ private ByteArrayOutputStream _buffer = new ByteArrayOutputStream();
+
+ /**
+ * @return the contents
+ */
+ public String toString()
+ {
+ return _buffer.toString();
+ }
+
+ public String toString(final String encoding) throws UnsupportedEncodingException
+ {
+ return _buffer.toString(encoding);
+
+ }
+ /**
+ * @return the contents as a byte array
+ */
+ public byte[] toBytes()
+ {
+ return _buffer.toByteArray();
+ }
+
+ protected void bufferLoaded(byte[] buffer, int numBytes)
+ {
+ _buffer.write(buffer, 0, numBytes);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/TestUtil.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/TestUtil.java
new file mode 100644
index 000000000..31b83d2f6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/TestUtil.java
@@ -0,0 +1,469 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 Sybase, Inc. and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.jsf.test.util;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
+import junit.framework.Assert;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.wst.validation.ValidationFramework;
+import org.osgi.framework.Bundle;
+
+/**
+ * Test utility to create project and its files.
+ *
+ * @author Yang Liu, Xiao-guang Zhang
+ *
+ * @version
+ */
+public class TestUtil
+{
+ /**
+ *
+ * @param prjname
+ * @param path
+ * relative to this plugin's root folder.
+ * @return
+ * @throws Exception
+ */
+ public static IProject createProjectFromZip(Bundle bundle, String prjname,
+ String path) throws Exception
+ {
+ URL url = FileLocator.find(bundle, new Path(path), null);
+ // if this fails, it most likely that path is wrong.
+ Assert.assertNotNull(url);
+ return createProjectFromZip(prjname, url);
+ }
+
+ public static IProject createProjectFromZip(File file, String prjname)
+ throws Exception
+ {
+ URL url = file.toURL();
+ // if this fails, it most likely that path is wrong.
+ Assert.assertNotNull(url);
+ return createProjectFromZip(prjname, url);
+ }
+
+ /**
+ * build a project
+ *
+ * @param project
+ * @param monitor
+ */
+ public static void buildProject(IProject project, IProgressMonitor monitor)
+ {
+ try
+ {
+ project.build(IncrementalProjectBuilder.FULL_BUILD, monitor);
+ } catch (CoreException e)
+ {
+ e.printStackTrace(System.err);
+ }
+ }
+
+ /**
+ * expand the zip stream into the specified folder.
+ *
+ * @param url
+ * @param dir
+ * @throws Exception
+ */
+ private static void expandZip(URL url, IContainer dir) throws Exception
+ {
+ ZipInputStream zis = null;
+ try
+ {
+ // first, count number of items in zip file
+ zis = new ZipInputStream(url.openStream());
+ String prefix = getPrefix(zis);
+ zis = new ZipInputStream(url.openStream());
+ ZipEntry ze = zis.getNextEntry();
+ while (ze != null)
+ {
+ String name = ze.getName();
+ if (!name.startsWith(prefix))
+ {
+ ze = zis.getNextEntry();
+ continue;
+ }
+ name = name.substring(prefix.length());
+ if (ze.isDirectory())
+ {
+ IFolder folder = dir.getFolder(new Path(name));
+ if (!folder.exists())
+ {
+ ensurePath(folder);
+ folder.create(true, true, null);
+ }
+ } else
+ {
+ IFile file = dir.getFile(new Path(name));
+ ensurePath(file);
+ // use ZipStreamWrapper to prevent zis being closed
+ if (file.exists())
+ {
+ file.setContents(new ZipStreamWrapper(zis),
+ IResource.NONE, null);
+ } else
+ {
+ file.create(new ZipStreamWrapper(zis), true, null);
+ }
+ }
+ ze = zis.getNextEntry();
+ }
+ } finally
+ {
+ try
+ {
+ if (zis != null)
+ zis.close();
+ } catch (Exception ex)
+ {
+ // ignore
+ }
+ }
+ }
+
+ private static String getPrefix(ZipInputStream zipStream)
+ throws IOException
+ {
+ ZipEntry ze = zipStream.getNextEntry();
+ while (ze != null)
+ {
+ String name = ze.getName();
+ if (name != null && name.endsWith(".project") && !ze.isDirectory())
+ {
+ int index = name.lastIndexOf(".project");
+ return name.substring(0, index);
+ }
+ ze = zipStream.getNextEntry();
+ }
+ // if we get to here, then nothing to prepend
+ return "";
+ }
+
+ /**
+ * @param file
+ * @throws CoreException
+ */
+ private static void ensurePath(IResource file) throws CoreException
+ {
+ IContainer container = file.getParent();
+ if (!container.exists())
+ {
+ ensurePath(container);
+ ((IFolder) container).create(true, true, null);
+ }
+ }
+
+ /**
+ * this method will copy file from the sourcePath folder of this plugin into
+ * the target path related with the destination project.
+ *
+ * @param project
+ * @param sourcePath
+ * - Source path, must be a relative path to test plugin
+ * @param targetPath
+ * - Target path, must be relative path to eclispe project.
+ *
+ * @return
+ */
+ public static IFile copyFile(Bundle bundle, IProject project,
+ String targetPath, String sourcePath) throws Exception
+ {
+ URL url = FileLocator.find(bundle, new Path(sourcePath), null);
+ InputStream stream = url.openStream();
+ IFile file = null;
+ IPath path = new Path(sourcePath);
+ if (targetPath != null && targetPath.length() > 0)
+ {
+ IFolder folder = project.getFolder(targetPath);
+ file = folder.getFile(path.lastSegment());
+ } else
+ {
+ file = project.getFile(path.lastSegment());
+ }
+ if (!file.exists())
+ {
+ ensurePath(file);
+ file.create(stream, true, null);
+ } else
+ {
+ file.setContents(stream, IFile.FORCE, null);
+ }
+ return file;
+ }
+
+ /**
+ * this method will create page file from the "pages" folder of this plugin
+ * into the webroot folder of the destination project.
+ *
+ * @param filePath
+ * - file path, must be relative path to destination project.
+ *
+ * @return
+ */
+ public static IFile createFile(IProject project, String filePath,
+ String content) throws Exception
+ {
+ IFile file = project.getFile(filePath);
+ ensurePath(file);
+ ByteArrayInputStream stream = new ByteArrayInputStream(
+ content.getBytes());
+ file.create(stream, true, null);
+ return file;
+ }
+
+ /**
+ * this method will get the page file from the "pages" folder of this plugin
+ * as a string.
+ *
+ * @param path
+ * - related with plugin
+ * @return
+ * @throws Exception
+ */
+ public static String getFileAsString(String path) throws Exception
+ {
+ URL url = FileLocator.find(Activator.getDefault().getBundle(),
+ new Path(path), null);
+ InputStream stream = url.openStream();
+ BufferedReader reader = new BufferedReader(
+ new InputStreamReader(stream));
+ StringBuffer buffer = new StringBuffer();
+ char[] temp = new char[256];
+ int count;
+ while ((count = reader.read(temp)) > 0)
+ {
+ buffer.append(temp, 0, count);
+ }
+ reader.close();
+ stream.close();
+ return buffer.toString();
+ }
+
+ /**
+ * create a project from a zip file.
+ *
+ * @param prjname
+ * @param zipStream
+ * @throws Exception
+ */
+ private static IProject createProjectFromZip(final String prjname,
+ final URL url) throws Exception
+ {
+ final IProject[] holder = new IProject[1];
+ IWorkspaceRunnable r = new IWorkspaceRunnable()
+ {
+ public void run(IProgressMonitor monitor) throws CoreException
+ {
+ IProject prj = ResourcesPlugin.getWorkspace().getRoot()
+ .getProject(prjname);
+ if (!prj.exists())
+ {
+ prj.create(null);
+ }
+ prj.open(null);
+ ValidationFramework.getDefault().suspendValidation(prj, true);
+ try
+ {
+ expandZip(url, prj);
+ } catch (Exception ex)
+ {
+ throw new CoreException(new Status(0, Activator.PLUGIN_ID,
+ 0, ex.getMessage(), ex));
+ }
+ holder[0] = prj;
+ }
+ };
+ ResourcesPlugin.getWorkspace().run(r, null);
+ return holder[0];
+ }
+
+ public static String removeAllWhitespace(String s)
+ {
+ StringBuffer buffer = new StringBuffer(s.length());
+ for (int i = 0, length = s.length(); i < length; i++)
+ {
+ if (!Character.isWhitespace(s.charAt(i)))
+ {
+ buffer.append(s.charAt(i));
+ }
+ }
+ return buffer.toString();
+ }
+
+ /**
+ * remove resource, following schedule rule.
+ *
+ * @param prj
+ * @throws CoreException
+ */
+ public static void removeResource(final IResource prj) throws CoreException
+ {
+ if (prj instanceof IFile)
+ {
+ ((IFile) prj).delete(true, false, null);
+ return;
+ }
+ Job job = new Job("DeleteProject")
+ {
+ protected IStatus run(IProgressMonitor monitor)
+ {
+ try
+ {
+ prj.delete(true, monitor);
+ } catch (CoreException e)
+ {
+ return Status.CANCEL_STATUS;
+ }
+ return Status.OK_STATUS;
+ }
+ };
+ job.setPriority(Job.SHORT);
+ job.setRule(ResourcesPlugin.getWorkspace().getRoot());
+ job.schedule();
+ // wait
+ try
+ {
+ job.join();
+ } catch (InterruptedException e)
+ {
+ }
+ }
+
+ private final static boolean PROJECT_IS_OPEN = true;
+
+ public static boolean verifyProjectStatus(final IProject project,
+ final boolean isOpenCondition, final int waitTimeInMs)
+ {
+ return TestUtil.waitForCondition(
+ createProjectStatusCondition(project, isOpenCondition),
+ waitTimeInMs, 20);
+ }
+
+ public static TestCondition createProjectStatusCondition(
+ final IProject project, final boolean isOpenCondition)
+ {
+ return new TestCondition()
+ {
+ @Override
+ public boolean test()
+ {
+ return project.isOpen() == isOpenCondition;
+ }
+ };
+ }
+
+ public static boolean openProject(final IProject project,
+ final int waitTimeInMs) throws CoreException
+ {
+ project.open(null);
+ return verifyProjectStatus(project, PROJECT_IS_OPEN, waitTimeInMs);
+ }
+
+ public static boolean closeProject(final IProject project,
+ final int waitTimeInMs) throws CoreException
+ {
+ project.close(null);
+ return verifyProjectStatus(project, !PROJECT_IS_OPEN, waitTimeInMs);
+ }
+
+ public static boolean waitForCondition(final TestCondition condition,
+ final int maxTime, final int numIntervals)
+ {
+ int curIteration = 0;
+ int waitPerInterval = maxTime / numIntervals;
+ if (waitPerInterval < 1)
+ {
+ Assert.fail("Your wait interval is less than 1");
+ }
+ do
+ {
+ if (condition.test())
+ {
+ return true;
+ }
+ try
+ {
+ Thread.sleep(waitPerInterval);
+ } catch (InterruptedException e)
+ {
+ // ignore.
+ }
+ } while (curIteration++ < numIntervals);
+ // if we get to here, then the condition was not satisified in the
+ // time alloted
+ return false;
+ }
+
+ public static abstract class TestCondition
+ {
+ public abstract boolean test();
+ }
+
+ public static class CompositeTestCondition extends TestCondition
+ {
+ protected final List<? extends TestCondition> _conditions;
+
+ public CompositeTestCondition(
+ final List<? extends TestCondition> conditions)
+ {
+ super();
+ _conditions = Collections
+ .unmodifiableList(new ArrayList<TestCondition>(conditions));
+ }
+
+ public void dispose()
+ {
+ // do nothing by default
+ }
+
+ @Override
+ public boolean test()
+ {
+ boolean isSatisfied = true;
+ for (final TestCondition condition : _conditions)
+ {
+ isSatisfied &= condition.test();
+ }
+ return isSatisfied;
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/WebProjectTestEnvironment.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/WebProjectTestEnvironment.java
new file mode 100644
index 000000000..a22906fd7
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/WebProjectTestEnvironment.java
@@ -0,0 +1,284 @@
+/*******************************************************************************
+ * 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.test.util;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Set;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
+import org.eclipse.jst.common.project.facet.JavaProjectFacetCreationDataModelProvider;
+import org.eclipse.jst.common.project.facet.core.JavaFacet;
+import org.eclipse.jst.j2ee.internal.web.archive.operations.WebFacetProjectCreationDataModelProvider;
+import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties;
+import org.eclipse.wst.common.componentcore.resources.IVirtualContainer;
+import org.eclipse.wst.common.componentcore.resources.IVirtualResource;
+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.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.internal.FacetedProjectNature;
+import org.osgi.framework.Bundle;
+
+/**
+ * Test environment for dynamic web projects
+ * @author cbateman
+ *
+ */
+public class WebProjectTestEnvironment extends ProjectTestEnvironment {
+
+ private final IProjectFacetVersion _javaFacetVersion;
+ private final IProjectFacetVersion _webFacetVersion;
+ /**
+ * @param projectName
+ */
+ public WebProjectTestEnvironment(String projectName) {
+ this(projectName, JavaFacet.VERSION_1_5, ProjectFacetsManager.getProjectFacet( "jst.web" ).getVersion("2.4"));
+ }
+
+ /**
+ * @param projectName
+ * @param javaVersion
+ * @param webVersion
+ */
+ public WebProjectTestEnvironment(String projectName, IProjectFacetVersion javaVersion, IProjectFacetVersion webVersion)
+ {
+ super(projectName);
+ _javaFacetVersion = javaVersion;
+ _webFacetVersion = webVersion;
+ }
+
+
+ /**
+ * Use forCase to try and create a project name unique to the current
+ * class and test name being run.
+ *
+ * @param forCase
+ * @param javaVersion
+ * @param webVersion
+ */
+ public WebProjectTestEnvironment(TestCase forCase,
+ IProjectFacetVersion javaVersion, IProjectFacetVersion webVersion)
+ {
+ this(forCase.getClass().getName() + "_" + forCase.getName(),
+ javaVersion, webVersion);
+ }
+
+ /**
+ * NOTE: behaviour override compared to super. This method doesn't
+ * delete existing
+ *
+ * Create the web project. If this method completes successfully
+ * without throwing RuntimeExceptions, this test environment will
+ * point to an IProject with Java and Web facets set as configured
+ * in the constructor.
+ *
+ * NOTE: create behaviour is significantly altered by the ignoreExisting
+ * flag
+ *
+ * @param ignoreProjectExists -- only has impact if _projectName already
+ * exists in the workspace. In this case, if set to true, then createProject
+ * will return without error if the project exists and is properly faceted, but
+ * throw a RuntimeException if faceting doesn't match what is expected.
+ *
+ * If set to false and the project exists, a runtime exception will be thrown
+ * @return true if project was created
+ */
+ @Override
+ public boolean createProject(boolean ignoreProjectExists)
+ {
+ boolean doCreate = true;
+
+ try
+ {
+ _project = ResourcesPlugin.getWorkspace().getRoot().getProject(_projectName);
+
+ if (_project.isAccessible())
+ {
+ if (ignoreProjectExists)
+ {
+ if (hasFacets(_project))
+ {
+ doCreate = false;
+ }
+ }
+ else
+ {
+ throw new RuntimeException("Project was not expected to exist but does: "+_project.getName());
+ }
+ }
+
+ if (doCreate)
+ {
+ _project = createWebProject(_projectName);
+ }
+ _projectCreated = true;
+
+ return doCreate;
+ } catch (Exception t) {
+ throw new RuntimeException(t);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private boolean hasFacets(IProject project) throws CoreException
+ {
+ boolean javaInstalled = false;
+ boolean webInstalled = false;
+
+ IFacetedProject facetedProject = ProjectFacetsManager.create(project);
+
+ IProjectFacetVersion version =
+ facetedProject.getInstalledVersion(_javaFacetVersion.getProjectFacet());
+
+ if (version != null)
+ {
+ if (version.compareTo(_javaFacetVersion) == 0)
+ {
+ javaInstalled = true;
+ }
+ else
+ {
+ throw new RuntimeException("Wrong Java version already installed. Has: "+version.getVersionString()+" but was expecting: "+_javaFacetVersion.getVersionString());
+ }
+ }
+
+ version = facetedProject.getInstalledVersion(_webFacetVersion.getProjectFacet());
+
+ if (version != null)
+ {
+ if (version.compareTo(_webFacetVersion) == 0)
+ {
+ webInstalled = true;
+ }
+ else
+ {
+ throw new RuntimeException("Wrong web version already installed. Has: "+version.getVersionString()+" but was expecting: "+_javaFacetVersion.getVersionString());
+ }
+ }
+
+ if (javaInstalled && webInstalled)
+ {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * @param projectName
+ * @return the web project
+ * @throws Exception
+ */
+ private IProject createWebProject(String projectName) throws Exception
+ {
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+
+ if(!isProjectCreated())
+ {
+ if (!project.exists())
+ {
+ project.create(null);
+ project.open(null);
+ ProjectUtilities.addNatureToProject(project, FacetedProjectNature.NATURE_ID);
+ }
+
+ Set<Action> actions = new HashSet<Action>();
+ IDataModel dataModel = DataModelFactory.createDataModel(new JavaProjectFacetCreationDataModelProvider());
+ dataModel.setProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME, projectName);
+ actions.add(new IFacetedProject.Action(Action.Type.INSTALL,_javaFacetVersion,null));
+// dataModel.setProperty(IFacetProjectCreationDataModelProperties.FACET_ACTION_MAP, actions);
+// dataModel.getDefaultOperation().execute(new NullProgressMonitor(), null);
+// dataModel.dispose();
+
+ dataModel = DataModelFactory.createDataModel(new WebFacetProjectCreationDataModelProvider());
+ dataModel.setProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME, projectName);
+ actions.add(new IFacetedProject.Action(Action.Type.INSTALL,_webFacetVersion,null));
+
+ IFacetedProject facetedProject = ProjectFacetsManager.create(project);
+ facetedProject.modify(actions, null);
+ }
+
+ return project;
+ }
+
+ /**
+ * @param create
+ * @param force
+ * @return the web root container for the project
+ */
+ public IVirtualContainer getWebRoot(boolean create, boolean force)
+ {
+ IVirtualContainer webRoot =
+ ComponentCore.createComponent(getTestProject()).getRootFolder();
+
+ if (!webRoot.exists() && create)
+ {
+ try
+ {
+ webRoot.create(force ? IVirtualResource.FORCE : 0, new NullProgressMonitor());
+ }
+ catch (CoreException ce)
+ {
+ Activator.log("Error creating web root", ce);
+ ce.printStackTrace();
+ }
+ }
+
+ return webRoot;
+ }
+
+
+ /**
+ * Creates or overwrites destFileName with the contents of srcFileName in bundle
+ *
+ * @param bundle
+ * @param srcFileName
+ * @param destDirName
+ * @param destFileName
+ * @return the IResource for the newly loaded resource
+ * @throws IOException
+ * @throws CoreException
+ */
+ public IResource loadResourceInWebRoot(Bundle bundle, String srcFileName, String destFileName) throws IOException, CoreException
+ {
+ final TestFileResource resource = new TestFileResource();
+ resource.load(bundle, srcFileName);
+
+ IFile file = getWebRoot(true, true).getFile(new Path(destFileName)).getUnderlyingFile();
+
+ if (!file.exists())
+ {
+ file.create(new ByteArrayInputStream(resource.toBytes()), true, null);
+ }
+ else
+ {
+ file.setContents(new ByteArrayInputStream(resource.toBytes()), true, true, null);
+ }
+
+ return file;
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/ZipStreamWrapper.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/ZipStreamWrapper.java
new file mode 100644
index 000000000..48b4929b2
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/ZipStreamWrapper.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 Sybase, Inc. and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sybase, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.jsf.test.util;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.zip.ZipInputStream;
+
+/**
+ * @author Yang Liu
+ * @version
+ */
+public class ZipStreamWrapper extends InputStream
+{
+
+ private ZipInputStream zipStream;
+
+ /**
+ *
+ */
+ public ZipStreamWrapper(ZipInputStream stream)
+ {
+ super();
+ this.zipStream = stream;
+ }
+
+ /* (non-Javadoc)
+ * @see java.io.InputStream#read()
+ */
+ public int read() throws IOException
+ {
+ return zipStream.read();
+ }
+
+ /* (non-Javadoc)
+ * @see java.io.InputStream#read(byte[])
+ */
+ public int read(byte[] b) throws IOException
+ {
+ return zipStream.read(b);
+ }
+
+ /* (non-Javadoc)
+ * @see java.io.InputStream#read(byte[], int, int)
+ */
+ public int read(byte[] b, int off, int len) throws IOException
+ {
+ return zipStream.read(b, off, len);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/BugRegressionTest.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/BugRegressionTest.java
new file mode 100644
index 000000000..ba61e5d1c
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/BugRegressionTest.java
@@ -0,0 +1,14 @@
+package org.eclipse.jst.jsf.test.util.junit4;
+
+public @interface BugRegressionTest
+{
+ // can be used to specify what bug system the bug was reported in.
+ // default == Eclipse
+ String bugSystem() default "Eclipse";
+
+ /**
+ * @return the bug number that that annotated test method covers
+ * regression testing for.
+ */
+ long bugNumber();
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/DualModeEnvironment.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/DualModeEnvironment.java
new file mode 100644
index 000000000..79352642f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/DualModeEnvironment.java
@@ -0,0 +1,12 @@
+package org.eclipse.jst.jsf.test.util.junit4;
+
+/**
+ * This class should never be used directly. It is used to mark JUnit test
+ * classes that can run either with or without a plugin environment.
+ *
+ * Such tests may require a special test runner such as {@link WorkspaceRunner}
+ *
+ */
+public interface DualModeEnvironment extends NoPluginEnvironment
+{
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/FastTest.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/FastTest.java
new file mode 100644
index 000000000..f5186dbfa
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/FastTest.java
@@ -0,0 +1,15 @@
+package org.eclipse.jst.jsf.test.util.junit4;
+
+/**
+ * @author cbateman
+ *
+ * This class should never be used directly. It is used to mark JUnit
+ * test classes that run "fast". This generally means they have
+ * little or no environment startup costs and take less than 1 second
+ * to run each test case object.
+ *
+ */
+public interface FastTest
+{
+ // do nothing
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/NoPluginEnvironment.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/NoPluginEnvironment.java
new file mode 100644
index 000000000..34ca785e9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/NoPluginEnvironment.java
@@ -0,0 +1,13 @@
+package org.eclipse.jst.jsf.test.util.junit4;
+
+/**
+ * @author cbateman
+ *
+ * This class should never be used directly. It is used to mark JUnit test
+ * classes that don't require the Eclipse plugin environment to run.
+ *
+ */
+public interface NoPluginEnvironment extends FastTest
+{
+ // do nothing
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/RealWorkspaceContext.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/RealWorkspaceContext.java
new file mode 100644
index 000000000..dfb337572
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/RealWorkspaceContext.java
@@ -0,0 +1,918 @@
+package org.eclipse.jst.jsf.test.util.junit4;
+
+import static junit.framework.Assert.assertFalse;
+import static junit.framework.Assert.assertNotNull;
+import static junit.framework.Assert.assertTrue;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import org.eclipse.core.internal.events.BuildManager;
+import org.eclipse.core.internal.events.ILifecycleListener;
+import org.eclipse.core.internal.events.NotificationManager;
+import org.eclipse.core.internal.localstore.FileSystemResourceManager;
+import org.eclipse.core.internal.properties.IPropertyManager;
+import org.eclipse.core.internal.refresh.RefreshManager;
+import org.eclipse.core.internal.resources.AliasManager;
+import org.eclipse.core.internal.resources.CharsetManager;
+import org.eclipse.core.internal.resources.ContentDescriptionManager;
+import org.eclipse.core.internal.resources.LocalMetaArea;
+import org.eclipse.core.internal.resources.MarkerManager;
+import org.eclipse.core.internal.resources.NatureManager;
+import org.eclipse.core.internal.resources.Resource;
+import org.eclipse.core.internal.resources.ResourceInfo;
+import org.eclipse.core.internal.resources.SaveManager;
+import org.eclipse.core.internal.resources.WorkManager;
+import org.eclipse.core.internal.resources.Workspace;
+import org.eclipse.core.internal.resources.WorkspaceDescription;
+import org.eclipse.core.internal.watson.ElementTree;
+import org.eclipse.core.resources.IBuildConfiguration;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFilterMatcherDescriptor;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IPathVariableManager;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IProjectNatureDescriptor;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceRuleFactory;
+import org.eclipse.core.resources.ISaveParticipant;
+import org.eclipse.core.resources.ISavedState;
+import org.eclipse.core.resources.ISynchronizer;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.ISafeRunnable;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.jst.jsf.test.util.Activator;
+import org.eclipse.jst.jsf.test.util.JSFTestUtil;
+import org.eclipse.jst.jsf.test.util.ProjectTestEnvironment;
+import org.eclipse.jst.jsf.test.util.TestUtil;
+import org.eclipse.jst.jsf.test.util.mock.AbstractWorkspaceContextWithEvents;
+import org.eclipse.swt.widgets.Display;
+import org.osgi.framework.Bundle;
+
+@SuppressWarnings("deprecation")
+public class RealWorkspaceContext extends AbstractWorkspaceContextWithEvents
+{
+ private DecoratedWorkspace _workspace;
+ private final CopyOnWriteArrayList<IResourceChangeListener> _listeners;
+ private final Workspace _actualWorkspace;
+
+ public RealWorkspaceContext()
+ {
+ _listeners = new CopyOnWriteArrayList<IResourceChangeListener>();
+ _actualWorkspace = (Workspace) ResourcesPlugin.getWorkspace();
+ _workspace = new DecoratedWorkspace(this, _actualWorkspace, _listeners);
+ }
+
+ @Override
+ protected void doInit() throws Exception
+ {
+ setWorkspace(_workspace);
+ setWorkspace(_actualWorkspace.getRoot(), _workspace);
+ }
+
+ private static void setWorkspace(final IResource root,
+ final IWorkspace workspace) throws Exception
+ {
+ final Class<Resource> rootClass = Resource.class;
+ final Field declaredField = rootClass.getDeclaredField("workspace");
+ declaredField.setAccessible(true);
+ declaredField.set(root, workspace);
+ }
+
+ private void setWorkspace(final IWorkspace workspace) throws Exception
+ {
+ final Class<ResourcesPlugin> resPlugin = ResourcesPlugin.class;
+ final Field declaredField = resPlugin.getDeclaredField("workspace");
+ declaredField.setAccessible(true);
+ declaredField.set(null, workspace);
+ }
+
+ @Override
+ public void doDispose() throws Exception
+ {
+ setWorkspace(_actualWorkspace.getRoot(), _actualWorkspace);
+ setWorkspace(_workspace._ws);
+ _workspace = null;
+ }
+
+ public IWorkspace getWorkspace()
+ {
+ assertInitialized();
+ return _workspace;
+ }
+
+ public IResource getResource(final IPath path)
+ {
+ assertInitialized();
+ final IWorkspaceRoot root = _workspace.getRoot();
+ final IResource res = root.findMember(path, false);
+ if (res != null && res.exists())
+ {
+ return res;
+ }
+ return null;
+ }
+
+ public IFile getFile(final IPath path)
+ {
+ return (IFile) getResource(path);
+ }
+
+ public IProject getProject(final IPath path)
+ {
+ return (IProject) getResource(path);
+ }
+
+ public IProject createProject(final String baseId)
+ {
+ assertInitialized();
+ int suffix = 0;
+ String projectName = null;
+ do
+ {
+ projectName = baseId + "_" + suffix++;
+ } while ((_workspace.getRoot().getProject(projectName).exists()));
+ assertNotNull(projectName);
+ return createProject2(projectName);
+ }
+
+ private IProject createProject2(final String projectName)
+ {
+ assertInitialized();
+ final ProjectTestEnvironment testEnv = new ProjectTestEnvironment(
+ projectName);
+ assertTrue(testEnv.createProject(false));
+ return testEnv.getTestProject();
+ }
+
+ public IProject createProject(final IPath path)
+ {
+ return createProject2(path.toString());
+ }
+
+ public IProject loadProject(final IPath path,
+ final ZipFileLoader zipFileLoader) throws Exception
+ {
+ assertInitialized();
+ assertFalse(_workspace.getRoot().getProject(path.toString()).exists());
+ return TestUtil.createProjectFromZip(zipFileLoader.getFile(),
+ path.toString());
+ }
+
+ public IProject loadProject(final IPath path,
+ final Bundle bundle, String pathToZip) throws Exception {
+ assertInitialized();
+ assertFalse(_workspace.getRoot().getProject(path.toString()).exists());
+ return TestUtil.createProjectFromZip(bundle, path.toString(),
+ pathToZip);
+ }
+
+ public IFile attachFile(final IProject project,
+ final IPath projectRelativePath, final File file) throws Exception
+ {
+ assertInitialized();
+ final ByteArrayOutputStream stream = JSFTestUtil.loadFromFile(file);
+ return TestUtil.createFile(project, projectRelativePath.toString(),
+ stream.toString());
+ }
+
+ public void fireWorkspaceEvent(final IResourceChangeEvent event)
+ {
+ assertInitialized();
+ for (final IResourceChangeListener listener : _listeners)
+ {
+ SafeRunner.run(new ISafeRunnable()
+ {
+ public void run() throws Exception
+ {
+ listener.resourceChanged(event);
+ }
+
+ public void handleException(final Throwable exception)
+ {
+ Activator.log("While processing mock resource event",
+ exception);
+ }
+ });
+ }
+ }
+
+ public List<IResourceChangeListener> getListeners()
+ {
+ assertInitialized();
+ return Collections.unmodifiableList(_listeners);
+ }
+
+ public List<IResourceChangeListener> getListeners(final List<Class<? extends IResourceChangeListener>> includeListeners)
+ {
+ List<IResourceChangeListener> listeners = new ArrayList<IResourceChangeListener>();
+ for (final IResourceChangeListener listener : getListeners())
+ {
+ SEARCH_CLASSES: for (final Class<? extends IResourceChangeListener> clazz : includeListeners)
+ {
+ if (clazz.isAssignableFrom(listener.getClass()))
+ {
+ listeners.add(listener);
+ break SEARCH_CLASSES;
+ }
+ }
+ }
+ return listeners;
+ }
+
+ @Override
+ protected void assertInitialized()
+ {
+ super.assertInitialized();
+ }
+
+ public void ensureAllMembers(final IProject project) throws Exception
+ {
+ // do nothing; the real workspace always is "loaded".
+ }
+
+ private static class DecoratedWorkspace extends Workspace
+ {
+ private final Workspace _ws;
+ private final List<IResourceChangeListener> _listeners;
+ private final RealWorkspaceContext _wsContext;
+
+ /**
+ * @param ws
+ * @param listeners
+ */
+ public DecoratedWorkspace(final RealWorkspaceContext wsContext,
+ final Workspace ws,
+ final List<IResourceChangeListener> listeners)
+ {
+ _wsContext = wsContext;
+ _ws = ws;
+ _listeners = listeners;
+ }
+
+ @Override
+ protected void flushBuildOrder()
+ {
+ invokeOnWorkspace("flushBuildOrder", new Class<?>[0], new Object[0]);
+ }
+
+ private void invokeOnWorkspace(final String name,
+ final Class<?>[] classes, final Object[] values)
+ {
+ try
+ {
+ final Class<Workspace> workspaceClass = Workspace.class;
+ final Method declaredMethod = workspaceClass.getDeclaredMethod(
+ name, classes);
+ declaredMethod.setAccessible(true);
+ declaredMethod.invoke(_ws, values);
+ } catch (final SecurityException e)
+ {
+ throw new RuntimeException(e);
+ } catch (final NoSuchMethodException e)
+ {
+ throw new RuntimeException(e);
+ } catch (final IllegalArgumentException e)
+ {
+ throw new RuntimeException(e);
+ } catch (final IllegalAccessException e)
+ {
+ throw new RuntimeException(e);
+ } catch (final InvocationTargetException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ @Override
+ public void addLifecycleListener(final ILifecycleListener listener)
+ {
+ _ws.addLifecycleListener(listener);
+ }
+
+ @Override
+ public void addResourceChangeListener(
+ final IResourceChangeListener listener)
+ {
+ addResourceChangeListener(listener, IResourceChangeEvent.PRE_CLOSE
+ | IResourceChangeEvent.PRE_DELETE
+ | IResourceChangeEvent.POST_CHANGE);
+ }
+
+ @Override
+ public void addResourceChangeListener(
+ final IResourceChangeListener listener, final int eventMask)
+ {
+ _wsContext.assertInitialized();
+ if (Thread.currentThread() == Display.getDefault().getThread())
+ {
+ _listeners.add(listener);
+ }
+ _ws.addResourceChangeListener(listener, eventMask);
+ }
+
+ @Override
+ public ISavedState addSaveParticipant(final Plugin plugin,
+ final ISaveParticipant participant) throws CoreException
+ {
+ return _ws.addSaveParticipant(plugin, participant);
+ }
+
+ @Override
+ public ISavedState addSaveParticipant(final String pluginId,
+ final ISaveParticipant participant) throws CoreException
+ {
+ return _ws.addSaveParticipant(pluginId, participant);
+ }
+
+ @Override
+ public void beginOperation(final boolean createNewTree)
+ throws CoreException
+ {
+ _ws.beginOperation(createNewTree);
+ }
+
+ @Override
+ public void broadcastBuildEvent(final Object source, final int type,
+ final int buildTrigger)
+ {
+ _ws.broadcastBuildEvent(source, type, buildTrigger);
+ }
+
+ @Override
+ public void broadcastPostChange()
+ {
+ _ws.broadcastPostChange();
+ }
+
+ @Override
+ public void build(final int trigger, final IProgressMonitor monitor)
+ throws CoreException
+ {
+ _ws.build(trigger, monitor);
+ }
+
+ @Override
+ public void checkpoint(final boolean build)
+ {
+ _ws.checkpoint(build);
+ }
+
+ @Override
+ public void close(final IProgressMonitor monitor) throws CoreException
+ {
+ _ws.close(monitor);
+ }
+
+ @Override
+ public IProject[][] computePrerequisiteOrder(final IProject[] targets)
+ {
+ return _ws.computePrerequisiteOrder(targets);
+ }
+
+ @Override
+ public ProjectOrder computeProjectOrder(final IProject[] projects)
+ {
+ return _ws.computeProjectOrder(projects);
+ }
+
+ @Override
+ public IStatus copy(final IResource[] resources,
+ final IPath destination, final boolean force,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ return _ws.copy(resources, destination, force, monitor);
+ }
+
+ @Override
+ public IStatus copy(final IResource[] resources,
+ final IPath destination, final int updateFlags,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ return _ws.copy(resources, destination, updateFlags, monitor);
+ }
+
+ @Override
+ public int countResources(final IPath root, final int depth,
+ final boolean phantom)
+ {
+ return _ws.countResources(root, depth, phantom);
+ }
+
+ @Override
+ public ResourceInfo createResource(final IResource resource,
+ final boolean phantom) throws CoreException
+ {
+ return _ws.createResource(resource, phantom);
+ }
+
+ @Override
+ public ResourceInfo createResource(final IResource resource,
+ final int updateFlags) throws CoreException
+ {
+ return _ws.createResource(resource, updateFlags);
+ }
+
+ @Override
+ public ResourceInfo createResource(final IResource resource,
+ final ResourceInfo info, final boolean phantom,
+ final boolean overwrite, final boolean keepSyncInfo)
+ throws CoreException
+ {
+ return _ws.createResource(resource, info, phantom, overwrite,
+ keepSyncInfo);
+ }
+
+ @Override
+ public IStatus delete(final IResource[] resources, final boolean force,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ return _ws.delete(resources, force, monitor);
+ }
+
+ @Override
+ public IStatus delete(final IResource[] resources,
+ final int updateFlags, final IProgressMonitor monitor)
+ throws CoreException
+ {
+ return _ws.delete(resources, updateFlags, monitor);
+ }
+
+ @Override
+ public void deleteMarkers(final IMarker[] markers) throws CoreException
+ {
+ _ws.deleteMarkers(markers);
+ }
+
+ @Override
+ public void endOperation(final ISchedulingRule rule,
+ final boolean build)
+ throws CoreException
+ {
+ _ws.endOperation(rule, build);
+ }
+
+// @Override
+// public boolean equals(final Object obj)
+// {
+// return _ws.equals(obj);
+// }
+
+ @Override
+ public <T> T getAdapter(final Class<T> adapter)
+ {
+ return _ws.getAdapter(adapter);
+ }
+
+ @Override
+ public void forgetSavedTree(final String pluginId)
+ {
+ _ws.forgetSavedTree(pluginId);
+ }
+
+ @Override
+ public AliasManager getAliasManager()
+ {
+ return _ws.getAliasManager();
+ }
+
+ @Override
+ public BuildManager getBuildManager()
+ {
+ return _ws.getBuildManager();
+ }
+
+ @Override
+ public IBuildConfiguration[] getBuildOrder()
+ {
+ return _ws.getBuildOrder();
+ }
+
+ @Override
+ public CharsetManager getCharsetManager()
+ {
+ return _ws.getCharsetManager();
+ }
+
+ @Override
+ public ContentDescriptionManager getContentDescriptionManager()
+ {
+ return _ws.getContentDescriptionManager();
+ }
+
+ @Override
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ public Map getDanglingReferences()
+ {
+ return _ws.getDanglingReferences();
+ }
+
+ @Override
+ public IWorkspaceDescription getDescription()
+ {
+ return _ws.getDescription();
+ }
+
+ @Override
+ public ElementTree getElementTree()
+ {
+ return _ws.getElementTree();
+ }
+
+ @Override
+ public FileSystemResourceManager getFileSystemManager()
+ {
+ return _ws.getFileSystemManager();
+ }
+
+ @Override
+ public MarkerManager getMarkerManager()
+ {
+ return _ws.getMarkerManager();
+ }
+
+ @Override
+ public LocalMetaArea getMetaArea()
+ {
+ return _ws.getMetaArea();
+ }
+
+ @Override
+ public IFilterMatcherDescriptor getFilterMatcherDescriptor(
+ final String filterMAtcherId)
+ {
+ return _ws.getFilterMatcherDescriptor(filterMAtcherId);
+ }
+
+ @Override
+ public IFilterMatcherDescriptor[] getFilterMatcherDescriptors()
+ {
+ return _ws.getFilterMatcherDescriptors();
+ }
+
+ @Override
+ public IProjectNatureDescriptor getNatureDescriptor(
+ final String natureId)
+ {
+ return _ws.getNatureDescriptor(natureId);
+ }
+
+ @Override
+ public IProjectNatureDescriptor[] getNatureDescriptors()
+ {
+ return _ws.getNatureDescriptors();
+ }
+
+ @Override
+ public NatureManager getNatureManager()
+ {
+ return _ws.getNatureManager();
+ }
+
+ @Override
+ public NotificationManager getNotificationManager()
+ {
+ return _ws.getNotificationManager();
+ }
+
+ @Override
+ public IPathVariableManager getPathVariableManager()
+ {
+ return _ws.getPathVariableManager();
+ }
+
+ @Override
+ public IPropertyManager getPropertyManager()
+ {
+ return _ws.getPropertyManager();
+ }
+
+ @Override
+ public RefreshManager getRefreshManager()
+ {
+ return _ws.getRefreshManager();
+ }
+
+ @Override
+ public ResourceInfo getResourceInfo(final IPath path,
+ final boolean phantom, final boolean mutable)
+ {
+ return _ws.getResourceInfo(path, phantom, mutable);
+ }
+
+ @Override
+ public IWorkspaceRoot getRoot()
+ {
+ return _ws.getRoot();
+ }
+
+ @Override
+ public IResourceRuleFactory getRuleFactory()
+ {
+ return _ws.getRuleFactory();
+ }
+
+ @Override
+ public SaveManager getSaveManager()
+ {
+ return _ws.getSaveManager();
+ }
+
+ @Override
+ public ISynchronizer getSynchronizer()
+ {
+ return _ws.getSynchronizer();
+ }
+
+ @Override
+ public WorkManager getWorkManager() throws CoreException
+ {
+ return _ws.getWorkManager();
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return _ws.hashCode();
+ }
+
+ @Override
+ public WorkspaceDescription internalGetDescription()
+ {
+ return _ws.internalGetDescription();
+ }
+
+ @Override
+ public boolean isAutoBuilding()
+ {
+ return _ws.isAutoBuilding();
+ }
+
+ @Override
+ public boolean isOpen()
+ {
+ return _ws.isOpen();
+ }
+
+ @Override
+ public boolean isTreeLocked()
+ {
+ return _ws.isTreeLocked();
+ }
+
+ @Override
+ public IProjectDescription loadProjectDescription(
+ final InputStream stream) throws CoreException
+ {
+ return _ws.loadProjectDescription(stream);
+ }
+
+ @Override
+ public IProjectDescription loadProjectDescription(final IPath path)
+ throws CoreException
+ {
+ return _ws.loadProjectDescription(path);
+ }
+
+ @Override
+ public IStatus move(final IResource[] resources,
+ final IPath destination, final boolean force,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ return _ws.move(resources, destination, force, monitor);
+ }
+
+ @Override
+ public IStatus move(final IResource[] resources,
+ final IPath destination, final int updateFlags,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ return _ws.move(resources, destination, updateFlags, monitor);
+ }
+
+ @Override
+ public IProjectDescription newProjectDescription(
+ final String projectName)
+ {
+ return _ws.newProjectDescription(projectName);
+ }
+
+ @Override
+ public Resource newResource(final IPath path, final int type)
+ {
+ Resource res = _ws.newResource(path, type);
+ try
+ {
+ setWorkspace(res, this);
+ } catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ return res;
+ }
+
+ @Override
+ public ElementTree newWorkingTree()
+ {
+ return _ws.newWorkingTree();
+ }
+
+ @Override
+ public IStatus open(final IProgressMonitor monitor)
+ throws CoreException
+ {
+ return _ws.open(monitor);
+ }
+
+ @Override
+ public void prepareOperation(final ISchedulingRule rule,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ _ws.prepareOperation(rule, monitor);
+ }
+
+ @Override
+ public void removeResourceChangeListener(
+ final IResourceChangeListener listener)
+ {
+ _wsContext.assertInitialized();
+ if (Thread.currentThread() == Display.getDefault().getThread())
+ {
+ _listeners.remove(listener);
+ }
+ _ws.removeResourceChangeListener(listener);
+ }
+
+ @Override
+ public void removeSaveParticipant(final Plugin plugin)
+ {
+ _ws.removeSaveParticipant(plugin);
+ }
+
+ @Override
+ public void removeSaveParticipant(final String pluginId)
+ {
+ _ws.removeSaveParticipant(pluginId);
+ }
+
+ @Override
+ public void run(final IWorkspaceRunnable action,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ _ws.run(action, monitor);
+ }
+
+ @Override
+ public void run(final IWorkspaceRunnable action,
+ final ISchedulingRule rule, final int options,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ _ws.run(action, rule, options, monitor);
+ }
+
+ @Override
+ public IStatus save(final boolean full, final IProgressMonitor monitor)
+ throws CoreException
+ {
+ return _ws.save(full, monitor);
+ }
+
+ @Override
+ public IStatus save(final boolean full,
+ final boolean keepConsistencyWhenCanceled,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ return _ws.save(full, keepConsistencyWhenCanceled, monitor);
+ }
+
+ @Override
+ public void setCrashed(final boolean value)
+ {
+ _ws.setCrashed(value);
+ }
+
+ @Override
+ public void setDescription(final IWorkspaceDescription value)
+ {
+ _ws.setDescription(value);
+ }
+
+ @Override
+ public void setTreeLocked(final boolean locked)
+ {
+ _ws.setTreeLocked(locked);
+ }
+
+ @Override
+ public String[] sortNatureSet(final String[] natureIds)
+ {
+ return _ws.sortNatureSet(natureIds);
+ }
+
+ @Override
+ public String toDebugString()
+ {
+ return _ws.toDebugString();
+ }
+
+ @Override
+ public String toString()
+ {
+ return _ws.toString();
+ }
+
+ @Override
+ public URI transferVariableDefinition(final IResource source,
+ final IResource dest, final URI sourceURI) throws CoreException
+ {
+ return _ws.transferVariableDefinition(source, dest, sourceURI);
+ }
+
+ @Override
+ public void updateModificationStamp(final ResourceInfo info)
+ {
+ info.incrementModificationStamp();
+ }
+
+ @Override
+ public IStatus validateEdit(final IFile[] files, final Object context)
+ {
+ return _ws.validateEdit(files, context);
+ }
+
+ @Override
+ public IStatus validateLinkLocation(final IResource resource,
+ final IPath unresolvedLocation)
+ {
+ return _ws.validateLinkLocation(resource, unresolvedLocation);
+ }
+
+ @Override
+ public IStatus validateLinkLocationURI(final IResource resource,
+ final URI unresolvedLocation)
+ {
+ return _ws.validateLinkLocationURI(resource, unresolvedLocation);
+ }
+
+ @Override
+ public IStatus validateName(final String segment, final int type)
+ {
+ return _ws.validateName(segment, type);
+ }
+
+ @Override
+ public IStatus validateNatureSet(final String[] natureIds)
+ {
+ return _ws.validateNatureSet(natureIds);
+ }
+
+ @Override
+ public IStatus validatePath(final String path, final int type)
+ {
+ return _ws.validatePath(path, type);
+ }
+
+ @Override
+ public IStatus validateProjectLocation(final IProject context,
+ final IPath location)
+ {
+ return _ws.validateProjectLocation(context, location);
+ }
+
+ @Override
+ public IStatus validateProjectLocationURI(final IProject project,
+ final URI location)
+ {
+ return _ws.validateProjectLocationURI(project, location);
+ }
+
+ @Override
+ public IStatus validateFiltered(final IResource resource)
+ {
+ return _ws.validateFiltered(resource);
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/RequiresPluginEnvironment.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/RequiresPluginEnvironment.java
new file mode 100644
index 000000000..6a23981d4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/RequiresPluginEnvironment.java
@@ -0,0 +1,14 @@
+package org.eclipse.jst.jsf.test.util.junit4;
+
+/**
+ * Marks a JUnit4 test category that must be run using the PDE Plugin Test JUnit
+ * Runner and the plugin env that it bootstraps. These tests cannot accept
+ * Workspace mocks.
+ *
+ * @author cbateman
+ *
+ */
+public interface RequiresPluginEnvironment extends SlowTest
+{
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/SlowTest.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/SlowTest.java
new file mode 100644
index 000000000..c442ed2b1
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/SlowTest.java
@@ -0,0 +1,12 @@
+package org.eclipse.jst.jsf.test.util.junit4;
+
+/**
+ * Marks a JUnit 4 test category that runs "slowly".
+ * @author cbateman
+ *
+ *
+ */
+public interface SlowTest
+{
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/TestDataBaseLocation.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/TestDataBaseLocation.java
new file mode 100644
index 000000000..fa5169095
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/TestDataBaseLocation.java
@@ -0,0 +1,22 @@
+package org.eclipse.jst.jsf.test.util.junit4;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Marks a field in a JUnit test into which the base location for the test's data
+ * is to be injected. The field must be of type java.io.File. Resources
+ * loaded by the test should be referenced relative to this base location.
+ *
+ * Generally, the base location will be dictated by the runtime.
+ *
+ * @author cbateman
+ *
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.FIELD})
+public @interface TestDataBaseLocation
+{
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/WorkspaceContext.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/WorkspaceContext.java
new file mode 100644
index 000000000..ed3ea1a36
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/WorkspaceContext.java
@@ -0,0 +1,20 @@
+package org.eclipse.jst.jsf.test.util.junit4;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Indicates a non-static field declared on a test class (may be any visibility)
+ * of type IWorkspaceContext that will have an appropriate instance injected into
+ * it.
+ *
+ * @author cbateman
+ *
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.FIELD})
+public @interface WorkspaceContext
+{
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/WorkspaceRunner.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/WorkspaceRunner.java
new file mode 100644
index 000000000..5af1ae19d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/junit4/WorkspaceRunner.java
@@ -0,0 +1,123 @@
+package org.eclipse.jst.jsf.test.util.junit4;
+
+import java.io.File;
+import java.lang.reflect.Field;
+
+import junit.framework.Assert;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jst.jsf.test.util.JSFTestUtil;
+import org.eclipse.jst.jsf.test.util.mock.IWorkspaceContext;
+import org.eclipse.jst.jsf.test.util.mock.MockWorkspaceContext;
+import org.eclipse.osgi.internal.loader.ModuleClassLoader;
+import org.junit.Rule;
+import org.junit.rules.MethodRule;
+import org.junit.runners.BlockJUnit4ClassRunner;
+import org.junit.runners.model.FrameworkMethod;
+import org.junit.runners.model.InitializationError;
+import org.junit.runners.model.Statement;
+import org.osgi.framework.Bundle;
+
+/**
+ * This class is not operable
+ *
+ * Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=343669
+ * disables this. Need to find way of fixing this tracked by
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=343672
+ *
+ */
+@SuppressWarnings("deprecation")
+public class WorkspaceRunner extends BlockJUnit4ClassRunner
+{
+ @Rule
+ public MethodRule rule = new WorkspaceContextInjector();
+
+ public interface IWorkspaceContextFactory
+ {
+ IWorkspaceContext createContext();
+ }
+
+ public WorkspaceRunner(final Class<?> klass) throws InitializationError
+ {
+ super(klass);
+ }
+//
+// Removed: https://bugs.eclipse.org/bugs/show_bug.cgi?id=343669
+// @Override
+// protected List<MethodRule> rules(final Object test)
+// {
+// final List<MethodRule> rules = super.rules(test);
+// rules.add(new WorkspaceContextInjector());
+// return rules;
+// }
+
+ public static class WorkspaceContextInjector implements MethodRule
+ {
+ protected IWorkspaceContext before(final FrameworkMethod method,
+ final Object target) throws Throwable
+ {
+ final Class<?> declaringClass = method.getMethod()
+ .getDeclaringClass();
+ final ClassLoader classLoader = declaringClass.getClassLoader();
+ final Field[] declaredFields = declaringClass.getDeclaredFields();
+ final IWorkspaceContext context = Platform.isRunning() ? new RealWorkspaceContext()
+ : new MockWorkspaceContext();
+ context.init();
+ File baseLoc = null;
+ if (Platform.isRunning() && classLoader instanceof ModuleClassLoader)
+ {
+ final Bundle bundle = ((ModuleClassLoader) classLoader).getBundle();
+ final IPath absolutePath = JSFTestUtil.getAbsolutePath(bundle, "/");
+ baseLoc = absolutePath.toFile();
+ } else
+ {
+ baseLoc = new File(".").getAbsoluteFile();
+ }
+ Assert.assertTrue(baseLoc.isDirectory());
+ for (final Field field : declaredFields)
+ {
+ final WorkspaceContext annotation = field
+ .getAnnotation(WorkspaceContext.class);
+ if (annotation != null)
+ {
+ field.setAccessible(true);
+ field.set(target, context);
+ }
+ final TestDataBaseLocation locAnnotation = field
+ .getAnnotation(TestDataBaseLocation.class);
+ if (locAnnotation != null)
+ {
+ field.setAccessible(true);
+ field.set(target, baseLoc);
+ }
+ }
+ return context;
+ }
+
+ protected void after(final IWorkspaceContext context) throws Exception
+ {
+ context.dispose();
+ }
+
+ public Statement apply(final Statement base,
+ final FrameworkMethod method, final Object target)
+ {
+ return new Statement()
+ {
+ @Override
+ public void evaluate() throws Throwable
+ {
+ final IWorkspaceContext context = before(method, target);
+ try
+ {
+ base.evaluate();
+ } finally
+ {
+ after(context);
+ }
+ }
+ };
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/AbstractWorkspaceContextWithEvents.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/AbstractWorkspaceContextWithEvents.java
new file mode 100644
index 000000000..55962f80b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/AbstractWorkspaceContextWithEvents.java
@@ -0,0 +1,42 @@
+package org.eclipse.jst.jsf.test.util.mock;
+
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import junit.framework.Assert;
+
+public abstract class AbstractWorkspaceContextWithEvents implements
+ IWorkspaceContextWithEvents
+{
+ private AtomicBoolean _isInitialized = new AtomicBoolean(false);
+ private AtomicBoolean _isDisposed = new AtomicBoolean(false);
+
+ public final void init() throws Exception
+ {
+ if (_isInitialized.compareAndSet(false, true))
+ {
+ doInit();
+ return;
+ }
+ throw new IllegalStateException();
+ }
+
+ protected abstract void doInit() throws Exception;
+
+ public final void dispose() throws Exception
+ {
+ if (_isDisposed.compareAndSet(false, true))
+ {
+ doDispose();
+ return;
+ }
+ throw new IllegalStateException();
+ }
+
+ protected abstract void doDispose() throws Exception;
+
+ protected void assertInitialized()
+ {
+ Assert.assertTrue("context must be initialized", _isInitialized.get());
+ Assert.assertFalse("context cannot be used after it is disposed", _isDisposed.get());
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/FileSpec.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/FileSpec.java
new file mode 100644
index 000000000..c8f79c66f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/FileSpec.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.test.util.mock;
+
+import org.eclipse.core.runtime.content.IContentType;
+
+/**
+ * Provides a uniform representation for file specifications, such as file
+ * names, file extensions and regular expressions.
+ */
+public class FileSpec
+{
+ final static int BASIC_TYPE = IContentType.FILE_EXTENSION_SPEC
+ | IContentType.FILE_NAME_SPEC;
+ private String text;
+ private int type;
+
+ public FileSpec(String text, int type)
+ {
+ this.text = text;
+ this.type = type;
+ }
+
+ public String getText()
+ {
+ return text;
+ }
+
+ public int getType()
+ {
+ return type;
+ }
+
+ public static int getBasicType(int type)
+ {
+ return BASIC_TYPE & type;
+ }
+
+ public boolean equals(Object other)
+ {
+ if (!(other instanceof FileSpec))
+ return false;
+ FileSpec otherFileSpec = (FileSpec) other;
+ return equals(text, otherFileSpec.getType(), false);
+ }
+
+ public boolean equals(final String text, final int otherType,
+ final boolean strict)
+ {
+ return ((!strict && getBasicType(type) == getBasicType(otherType)) || type == otherType)
+ && this.text.equalsIgnoreCase(text);
+ }
+
+ public int hashCode()
+ {
+ return text.hashCode();
+ }
+
+ public static String getMappingKeyFor(String fileSpecText)
+ {
+ return fileSpecText.toLowerCase();
+ }
+
+ public String toString()
+ {
+ return getText();
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/FileSystemZipLoader.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/FileSystemZipLoader.java
new file mode 100644
index 000000000..5788c11ee
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/FileSystemZipLoader.java
@@ -0,0 +1,52 @@
+package org.eclipse.jst.jsf.test.util.mock;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.zip.ZipException;
+import java.util.zip.ZipFile;
+
+import org.eclipse.jst.jsf.test.util.mock.IWorkspaceContext.ZipFileLoader;
+
+/**
+ * Allows a zip to be loaded directly from the file system.
+ *
+ * @author cbateman
+ *
+ */
+public class FileSystemZipLoader extends ZipFileLoader
+{
+ private final File _file;
+ private String _pathIntoZip;
+
+ public FileSystemZipLoader(final File file)
+ {
+ this(file, "");
+ }
+
+
+ public FileSystemZipLoader(File file, String pathIntoZip)
+ {
+ _file = file;
+ _pathIntoZip = pathIntoZip;
+ }
+
+
+ @Override
+ public ZipFile getZipFile() throws ZipException, IOException
+ {
+ return new ZipFile(_file);
+ }
+
+ @Override
+ public String getPathInZip()
+ {
+ return _pathIntoZip;
+ }
+
+
+ @Override
+ public File getFile()
+ {
+ return _file;
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/IMockResourceFactory.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/IMockResourceFactory.java
new file mode 100644
index 000000000..e0eab39b1
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/IMockResourceFactory.java
@@ -0,0 +1,41 @@
+package org.eclipse.jst.jsf.test.util.mock;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IPath;
+
+public interface IMockResourceFactory
+{
+ /**
+ * @param path the path, relative to container where the file should
+ * be created.
+ * @return the mock file for the path. If the file already exists
+ * for this path, then this will be returned. If a resource already exists
+ * for this path but it is not a file then a ClassCastException is thrown.
+ */
+ MockResource createFile(final MockContainer container, final IPath path) throws Exception;
+
+ /**
+ * @param container
+ * @return all of the resources this factory currently knows about for the
+ * container. In other words, all of the paths within container for
+ * which create* methods have been successfully called.
+ */
+ List<MockResource> getCurrentMembers(final MockContainer container);
+
+ /**
+ * Cause any "existent" resources that have not yet be created from test
+ * source (i.e. from a project zip) to be loaded so that they will be
+ * returned by getCurrentMembers().
+ *
+ * @throws Exception
+ */
+ void forceLoad(final MockProject project) throws Exception;
+ /**
+ * Signal that the factory should release any resources it is holding.
+ * @throws Exception
+ */
+ void dispose() throws Exception;
+
+ public abstract MockFolder createFolder(final MockContainer container, final IPath path);
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/IWorkspaceContext.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/IWorkspaceContext.java
new file mode 100644
index 000000000..ffdc94470
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/IWorkspaceContext.java
@@ -0,0 +1,97 @@
+package org.eclipse.jst.jsf.test.util.mock;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.zip.ZipException;
+import java.util.zip.ZipFile;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.runtime.IPath;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author cbateman
+ *
+ */
+public interface IWorkspaceContext
+{
+ public abstract void init() throws Exception;
+ public abstract void dispose() throws Exception;
+
+ public abstract IWorkspace getWorkspace();
+
+ /**
+ * @param path
+ * @return a resource for path only if it exists null otherwise. This is a
+ * departure from normal ws handle ops that always answer non-null
+ * and you have to check if something exists.
+ */
+ public abstract IResource getResource(final IPath path);
+
+ /**
+ * Fully equivalent to (IFile) getResource(path).
+ *
+ * @param path
+ * @return the IFile or null if none for path.
+ * @throws ClassCastException
+ * if path exists but doesn't not point to a file.
+ */
+ public abstract IFile getFile(final IPath path);
+
+ /**
+ * Equivalent to (IProject) getResource(path).
+ *
+ * @param path
+ * @return the project for the path or null if it isn't currently in the
+ * context.
+ */
+ public abstract IProject getProject(final IPath path);
+
+ /**
+ * @return a mock project with a generated name that is guaranteed not to
+ * conflict with any that already exist in this context.
+ */
+ public abstract IProject createProject(final String baseId);
+
+ public abstract IProject createProject(final IPath path);
+
+ public IFile attachFile(IProject project, IPath projectRelativePath,
+ File file) throws Exception;
+
+ /**
+ * @param path
+ * @param zipFileLoader
+ * @return an IProject loaded from zipFileLoader into the path provided.
+ * @throws Exception
+ */
+ public abstract IProject loadProject(final IPath path,
+ final ZipFileLoader zipFileLoader) throws Exception;
+
+ /**
+ * @param projectPath the path of the new project
+ * @param bundle the plugin containing the zip
+ * @param pathToZip relative to the plugin's root folder
+ * @return an IProject loaded from a zip in the plugin and
+ * into the path provided.
+ * @throws Exception
+ */
+ public abstract IProject loadProject(final IPath projectPath,
+ final Bundle bundle, final String pathIntoZip) throws Exception;
+
+ /**
+ * Method that implementers may choose to noop.
+ *
+ * @param project
+ * @throws Exception
+ */
+ public abstract void ensureAllMembers(final IProject project) throws Exception;
+ public abstract static class ZipFileLoader
+ {
+ public abstract ZipFile getZipFile() throws ZipException, IOException;
+ public abstract File getFile();
+ public abstract String getPathInZip();
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/IWorkspaceContextWithEvents.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/IWorkspaceContextWithEvents.java
new file mode 100644
index 000000000..00e5a6686
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/IWorkspaceContextWithEvents.java
@@ -0,0 +1,20 @@
+package org.eclipse.jst.jsf.test.util.mock;
+
+import java.util.List;
+
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+
+/**
+ * An IWorkspaceContext object that has the ability to simulate workspace change
+ * events at test time.
+ *
+ * @author cbateman
+ *
+ */
+public interface IWorkspaceContextWithEvents extends IWorkspaceContext
+{
+ public abstract void fireWorkspaceEvent(final IResourceChangeEvent event);
+ public abstract List<IResourceChangeListener> getListeners();
+ public abstract List<IResourceChangeListener> getListeners(List<Class<? extends IResourceChangeListener>> includeTypes);
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockBundle.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockBundle.java
new file mode 100644
index 000000000..7c90987e3
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockBundle.java
@@ -0,0 +1,193 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.test.util.mock;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.security.cert.X509Certificate;
+import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.Version;
+
+public class MockBundle implements Bundle
+{
+ private final String _bundleRootPath;
+
+ public MockBundle(final String bundleRootPath)
+ {
+ _bundleRootPath = bundleRootPath;
+ }
+
+ public int getState()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void start(int options) throws BundleException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void start() throws BundleException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void stop(int options) throws BundleException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void stop() throws BundleException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void update(InputStream input) throws BundleException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void update() throws BundleException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void uninstall() throws BundleException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public Dictionary<String,String> getHeaders()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public long getBundleId()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public String getLocation()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @SuppressWarnings({ })
+ public ServiceReference[] getRegisteredServices()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @SuppressWarnings({ })
+ public ServiceReference[] getServicesInUse()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean hasPermission(Object permission)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public URL getResource(String name)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public Dictionary<String, String> getHeaders(String locale)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public String getSymbolicName()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public Class<?> loadClass(String name) throws ClassNotFoundException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public Enumeration<URL> getResources(String name) throws IOException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public Enumeration<String> getEntryPaths(String path)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public URL getEntry(String path)
+ {
+ IPath entryPath = new Path(_bundleRootPath).append(path);
+ try
+ {
+ return entryPath.toFile().toURI().toURL();
+ } catch (MalformedURLException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public long getLastModified()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public Enumeration<URL> findEntries(String path, String filePattern,
+ boolean recurse)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public BundleContext getBundleContext()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public Map<X509Certificate,List<X509Certificate>> getSignerCertificates(int signersType)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public Version getVersion()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public int compareTo(Bundle o) {
+ throw new UnsupportedOperationException();
+ }
+
+ public <A> A adapt(Class<A> type) {
+ throw new UnsupportedOperationException();
+ }
+
+ public File getDataFile(String filename) {
+ throw new UnsupportedOperationException();
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockContainer.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockContainer.java
new file mode 100644
index 000000000..5880c2b2e
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockContainer.java
@@ -0,0 +1,167 @@
+package org.eclipse.jst.jsf.test.util.mock;
+
+import junit.framework.AssertionFailedError;
+
+import org.eclipse.core.resources.FileInfoMatcherDescription;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceFilterDescription;
+import org.eclipse.core.resources.IResourceVisitor;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+public class MockContainer extends MockResource implements IContainer
+{
+ private final IMockResourceFactory _resFactory;
+
+ public MockContainer(int type, IPath path, IMockResourceFactory resFactory)
+ {
+ super(type, path);
+ _resFactory = resFactory;
+ }
+
+ public void loadAllMembers() throws Exception
+ {
+ getResFactory().forceLoad((MockProject) this.getProject());
+ }
+
+ @Override
+ public void dispose() throws Exception
+ {
+ try
+ {
+ getResFactory().dispose();
+ } finally
+ {
+ super.dispose();
+ }
+ }
+
+
+ public boolean exists(IPath path)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IResource findMember(String name)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IResource findMember(String name, boolean includePhantoms)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IResource findMember(IPath path)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IResource findMember(IPath path, boolean includePhantoms)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public String getDefaultCharset() throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public String getDefaultCharset(boolean checkImplicit) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IFile getFile(IPath path)
+ {
+ try
+ {
+ return (IFile) getResFactory().createFile(this, path);
+ } catch (Exception e)
+ {
+ throw new AssertionFailedError(e.getLocalizedMessage());
+ }
+ }
+
+ public IFile getFile(String path)
+ {
+ return getFile(new Path(path));
+ }
+
+ public IFolder getFolder(IPath path)
+ {
+ try
+ {
+ return getResFactory().createFolder(this, path);
+ } catch (Exception e)
+ {
+ throw new AssertionFailedError(e.getLocalizedMessage());
+ }
+ }
+
+
+ @Override
+ protected void visitMembers(IResourceVisitor visitor, int depth,
+ int memberFlags) throws CoreException
+ {
+ for (final IResource res : members(memberFlags))
+ {
+ res.accept(visitor, depth, memberFlags);
+ }
+ }
+
+ public IResource[] members() throws CoreException
+ {
+ return members(IResource.NONE);
+ }
+
+ public IResource[] members(boolean includePhantoms) throws CoreException
+ {
+ return members(includePhantoms ? INCLUDE_PHANTOMS : IResource.NONE);
+ }
+
+ public IResource[] members(int memberFlags) throws CoreException
+ {
+ // TODO: ignore member flags for now
+ return getResFactory().getCurrentMembers(this).toArray(new IResource[0]);
+ }
+
+ public IFile[] findDeletedMembersWithHistory(int depth,
+ IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setDefaultCharset(String charset) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setDefaultCharset(String charset, IProgressMonitor monitor)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IResourceFilterDescription createFilter(int type,
+ FileInfoMatcherDescription matcherDescription, int updateFlags,
+ IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IResourceFilterDescription[] getFilters() throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IMockResourceFactory getResFactory()
+ {
+ return _resFactory;
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockContentDescription.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockContentDescription.java
new file mode 100644
index 000000000..802d9d965
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockContentDescription.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.test.util.mock;
+
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.core.runtime.content.IContentDescription;
+import org.eclipse.core.runtime.content.IContentType;
+
+public class MockContentDescription implements IContentDescription
+{
+ private IContentType _contentType;
+
+ public MockContentDescription()
+ {
+ this (new MockContentType("RandomId_"+System.currentTimeMillis()));
+ }
+ public MockContentDescription(IContentType mockContentType)
+ {
+ _contentType = mockContentType;
+ }
+ public void setProperty(QualifiedName key, Object value)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isRequested(QualifiedName key)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public Object getProperty(QualifiedName key)
+ {
+ return null;
+ }
+
+ public void setContentType(final IContentType contentType)
+ {
+ _contentType = contentType;
+ }
+
+ public IContentType getContentType()
+ {
+ return _contentType;
+ }
+
+ public String getCharset()
+ {
+ return "UTF-8";
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockContentType.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockContentType.java
new file mode 100644
index 000000000..5eaec6d54
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockContentType.java
@@ -0,0 +1,286 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.test.util.mock;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+import java.util.Iterator;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.core.runtime.content.IContentDescription;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.core.runtime.content.IContentTypeSettings;
+import org.eclipse.core.runtime.preferences.IScopeContext;
+import org.eclipse.core.runtime.preferences.InstanceScope;
+
+public class MockContentType implements IContentType
+{
+ final static int SPEC_PRE_DEFINED = IGNORE_PRE_DEFINED;
+ final static int SPEC_USER_DEFINED = IGNORE_USER_DEFINED;
+ final static byte ASSOCIATED_BY_EXTENSION = 2;
+ final static byte ASSOCIATED_BY_NAME = 1;
+ final static byte NOT_ASSOCIATED = 0;
+
+ private CopyOnWriteArrayList<FileSpec> fileSpecs = new CopyOnWriteArrayList<FileSpec>();
+
+ private final IScopeContext _context = new InstanceScope();
+
+ private final String _id;
+ private boolean _builtInAssociations;
+
+ public MockContentType(String id)
+ {
+ _id = id;
+ }
+
+ public void addFileSpec(String fileSpec, int type) throws CoreException
+ {
+ Assert.isLegal(type == FILE_EXTENSION_SPEC || type == FILE_NAME_SPEC,
+ "Unknown type: " + type); //$NON-NLS-1$
+// String[] userSet;
+ synchronized (this)
+ {
+ if (!internalAddFileSpec(fileSpec, type | SPEC_USER_DEFINED))
+ return;
+// userSet = getFileSpecs(type | IGNORE_PRE_DEFINED);
+ }
+ // persist using preferences
+// Preferences contentTypeNode = manager.getPreferences().node(id);
+// String newValue = Util.toListString(userSet);
+ // we are adding stuff, newValue must be non-null
+// Assert.isNotNull(newValue);
+// setPreference(contentTypeNode, getPreferenceKey(type), newValue);
+// TRY
+// {
+// CONTENTTYPENODE.FLUSH();
+// }
+// CATCH (BACKINGSTOREEXCEPTION BSE)
+// {
+// STRING MESSAGE = NLS.BIND(
+// CONTENTMESSAGES.CONTENT_ERRORSAVINGSETTINGS, ID);
+// ISTATUS STATUS = NEW STATUS(ISTATUS.ERROR,
+// CONTENTMESSAGES.OWNER_NAME, 0, MESSAGE, BSE);
+// THROW NEW COREEXCEPTION(STATUS);
+// }
+ // notify listeners
+// manager.fireContentTypeChangeEvent(this);
+ }
+
+ /**
+ * Adds a user-defined or pre-defined file spec.
+ */
+ boolean internalAddFileSpec(String fileSpec, int typeMask)
+ {
+ if (hasFileSpec(fileSpec, typeMask, false))
+ return false;
+ FileSpec newFileSpec = createFileSpec(fileSpec, typeMask);
+ if ((typeMask & SPEC_USER_DEFINED) == 0)
+ {
+ // plug-in defined - all that is left to be done is to add it to the
+ // list
+ if (fileSpecs.isEmpty())
+ fileSpecs = new CopyOnWriteArrayList<FileSpec>();
+ fileSpecs.add(newFileSpec);
+ return true;
+ }
+ return true;
+ }
+
+ public void removeFileSpec(final String fileSpec, final int type)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setDefaultCharset(final String userCharset)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IContentType getBaseType()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IContentDescription getDefaultDescription()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IContentDescription getDescriptionFor(final InputStream contents,
+ final QualifiedName[] options) throws IOException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IContentDescription getDescriptionFor(final Reader contents,
+ final QualifiedName[] options) throws IOException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public String getDefaultCharset()
+ {
+ return "UTF-8";
+ }
+
+ public String[] getFileSpecs(final int type)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public String getId()
+ {
+ return _id;
+ }
+
+ public String getName()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isAssociatedWith(final String fileName)
+ {
+ return internalIsAssociatedWith(fileName, _context) != NOT_ASSOCIATED;
+ }
+
+ private byte internalIsAssociatedWith(final String fileName, IScopeContext context)
+ {
+ if (hasFileSpec(context, fileName, FILE_NAME_SPEC))
+ return ASSOCIATED_BY_NAME;
+ String fileExtension = getFileExtension(fileName);
+ if (hasFileSpec(context, fileExtension, FILE_EXTENSION_SPEC))
+ return ASSOCIATED_BY_EXTENSION;
+ // if does not have built-in file specs, delegate to parent (if any)
+ if (!hasBuiltInAssociations() /*&& baseType != null*/)
+ {
+// return baseType.internalIsAssociatedWith(fileName, context);
+ }
+ return NOT_ASSOCIATED;
+ }
+ private boolean hasBuiltInAssociations()
+ {
+ return _builtInAssociations;
+ }
+ /*
+ * Returns the extension for a file name (omitting the leading '.').
+ */
+ static String getFileExtension(String fileName) {
+ int dotPosition = fileName.lastIndexOf('.');
+ return (dotPosition == -1 || dotPosition == fileName.length() - 1) ? "" : fileName.substring(dotPosition + 1); //$NON-NLS-1$
+ }
+
+ private boolean hasFileSpec(IScopeContext context, String text, int typeMask)
+ {
+ if (context.equals(_context)
+ || (typeMask & IGNORE_USER_DEFINED) != 0)
+ return hasFileSpec(text, typeMask, false);
+// String[] fileSpecs = ContentTypeSettings.getFileSpecs(context, _id,
+// typeMask);
+// for (int i = 0; i < fileSpecs.length; i++)
+// if (text.equalsIgnoreCase(fileSpecs[i]))
+// return true;
+ // no user defined association... try built-in
+ return hasFileSpec(text, typeMask | IGNORE_PRE_DEFINED, false);
+ }
+
+ /**
+ * Returns whether this content type has the given file spec.
+ *
+ * @param text
+ * the file spec string
+ * @param typeMask
+ * FILE_NAME_SPEC or FILE_EXTENSION_SPEC
+ * @param strict
+ * @return true if this file spec has already been added, false otherwise
+ */
+ private boolean hasFileSpec(String text, int typeMask, boolean strict)
+ {
+ if (fileSpecs.isEmpty())
+ return false;
+ for (Iterator<FileSpec> i = fileSpecs.iterator(); i.hasNext();)
+ {
+ FileSpec spec = (FileSpec) i.next();
+ if (spec.equals(text, typeMask, strict))
+ return true;
+ }
+ return false;
+ }
+
+ public boolean isAssociatedWith(final String fileName,
+ final IScopeContext context)
+ {
+ // ignore scope context
+ return isAssociatedWith(fileName);
+ }
+
+ public boolean isKindOf(final IContentType another)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IContentTypeSettings getSettings(final IScopeContext context)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public static IContentType createContentType(/*ContentTypeCatalog catalog,*/
+ String uniqueId, /*String name, byte priority,*/
+ String[] fileExtensions, String[] fileNames/*, String baseTypeId,
+ String aliasTargetId, Map defaultProperties,
+ IConfigurationElement contentTypeElement*/)
+ {
+ MockContentType contentType = new MockContentType(uniqueId);
+ // ContentType contentType = new ContentType(catalog.getManager());
+ // contentType.catalog = catalog;
+ // contentType.defaultDescription = new DefaultDescription(contentType);
+ // contentType.name = name;
+ // contentType.priority = priority;
+ if ((fileExtensions != null && fileExtensions.length > 0)
+ || (fileNames != null && fileNames.length > 0))
+ {
+ contentType._builtInAssociations = true;
+ contentType.fileSpecs = new CopyOnWriteArrayList<FileSpec>();
+ for (int i = 0; i < fileNames.length; i++)
+ {
+ contentType.internalAddFileSpec(fileNames[i], FILE_NAME_SPEC
+ | SPEC_PRE_DEFINED);
+ }
+ for (int i = 0; i < fileExtensions.length; i++)
+ {
+ contentType.internalAddFileSpec(fileExtensions[i],
+ FILE_EXTENSION_SPEC | SPEC_PRE_DEFINED);
+ }
+ }
+ // contentType.defaultProperties = defaultProperties;
+ // contentType.contentTypeElement = contentTypeElement;
+ // contentType.baseTypeId = baseTypeId;
+ // contentType.aliasTargetId = aliasTargetId;
+ return contentType;
+ }
+ static FileSpec createFileSpec(String fileSpec, int type) {
+ return new FileSpec(fileSpec, type);
+ }
+
+ public boolean isUserDefined()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockContentTypeManager.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockContentTypeManager.java
new file mode 100644
index 000000000..0767e9ea9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockContentTypeManager.java
@@ -0,0 +1,151 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.test.util.mock;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.core.runtime.content.IContentDescription;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.core.runtime.content.IContentTypeManager;
+import org.eclipse.core.runtime.content.IContentTypeMatcher;
+import org.eclipse.core.runtime.preferences.IScopeContext;
+import org.eclipse.core.runtime.preferences.InstanceScope;
+
+public class MockContentTypeManager implements IContentTypeManager
+{
+ private final Map<String, IContentType> _idToContentType;
+ private IScopeContext _context = new InstanceScope();
+
+ public static Map<String, IContentType> createDefaultContentTypeMappings()
+ {
+ Map<String, IContentType> map = new HashMap<String, IContentType>();
+ map.put("org.eclipse.wst.html.core.htmlsource", MockContentType
+ .createContentType("org.eclipse.wst.html.core.htmlsource",
+ new String[]
+ { "xhtml" , "html", "htm"}, new String[0]));
+ map.put("org.eclipse.jst.jsp.core.jspsource", MockContentType
+ .createContentType("org.eclipse.jst.jsp.core.jspsource",
+ new String[]
+ { "jsp", "jspx", "jsv", "jtpl" }, new String[0]));
+
+ return map;
+ }
+
+ /**
+ * Construct with a default set of extension to type mappings
+ */
+ public MockContentTypeManager()
+ {
+ this(Collections.unmodifiableMap(createDefaultContentTypeMappings()));
+ }
+
+ public MockContentTypeManager(
+ final Map<String, IContentType> idToContentType)
+ {
+ _idToContentType = idToContentType;
+ }
+
+ public IContentType findContentTypeFor(final InputStream contents,
+ final String fileName) throws IOException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IContentType findContentTypeFor(final String fileName)
+ {
+
+ throw new UnsupportedOperationException();
+ }
+
+ public IContentType[] findContentTypesFor(final InputStream contents,
+ final String fileName) throws IOException
+ {
+
+ throw new UnsupportedOperationException();
+ }
+
+ public IContentType[] findContentTypesFor(final String fileName)
+ {
+
+ throw new UnsupportedOperationException();
+ }
+
+ public IContentDescription getDescriptionFor(final InputStream contents,
+ final String fileName, final QualifiedName[] options)
+ throws IOException
+ {
+
+ throw new UnsupportedOperationException();
+ }
+
+ public IContentDescription getDescriptionFor(final Reader contents,
+ final String fileName, final QualifiedName[] options)
+ throws IOException
+ {
+
+ throw new UnsupportedOperationException();
+ }
+
+ public void addContentTypeChangeListener(
+ final IContentTypeChangeListener listener)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IContentType[] getAllContentTypes()
+ {
+
+ throw new UnsupportedOperationException();
+ }
+
+ public IScopeContext getContext()
+ {
+ return _context;
+ }
+
+ public IContentType getContentType(final String contentTypeIdentifier)
+ {
+ return _idToContentType.get(contentTypeIdentifier);
+ }
+
+ public IContentTypeMatcher getMatcher(final ISelectionPolicy customPolicy,
+ final IScopeContext context)
+ {
+
+ throw new UnsupportedOperationException();
+ }
+
+ public void removeContentTypeChangeListener(
+ final IContentTypeChangeListener listener)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IContentType addContentType(String contentTypeIdentifier, String name, IContentType baseType)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void removeContentType(String contentTypeIdentifier) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockDataModel.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockDataModel.java
new file mode 100644
index 000000000..013b853d8
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockDataModel.java
@@ -0,0 +1,274 @@
+package org.eclipse.jst.jsf.test.util.mock;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.wst.common.frameworks.datamodel.DataModelPropertyDescriptor;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModelListener;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
+
+public class MockDataModel implements IDataModel
+{
+ private final String _id;
+ private final Map<String, MockPropertyHolder> _properties;
+
+ public MockDataModel(final String id, final Map<String, MockPropertyHolder> properties)
+ {
+ _id = id;
+ _properties = properties;
+ }
+ public String getID()
+ {
+ return _id;
+ }
+
+ public IDataModelOperation getDefaultOperation()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public List<?> getExtendedContext()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public Object getProperty(String propertyName)
+ {
+ MockPropertyHolder property = _properties.get(propertyName);
+ if (property != null)
+ {
+ return property.getValue();
+ }
+ return null;
+ }
+
+ public Object getDefaultProperty(String propertyName)
+ {
+ MockPropertyHolder property = _properties.get(propertyName);
+ if (property != null)
+ {
+ return property.getDefaultValue();
+ }
+ return null;
+ }
+
+ public int getIntProperty(String propertyName)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean getBooleanProperty(String propertyName)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public String getStringProperty(String propertyName)
+ {
+ return (String) getProperty(propertyName);
+ }
+
+ public void setProperty(String propertyName, Object propertyValue)
+ {
+ MockPropertyHolder property = _properties.get(propertyName);
+ if (property == null)
+ {
+ property = new MockPropertyHolder();
+ _properties.put(propertyName, property);
+ }
+ property.setValue(propertyValue);
+ }
+
+ public void setIntProperty(String propertyName, int propertyValue)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setBooleanProperty(String propertyName, boolean propertyValue)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setStringProperty(String propertyName, String propertyValue)
+ {
+ setProperty(propertyName, propertyValue);
+ }
+
+ public boolean addNestedModel(String nestedModelName, IDataModel dataModel)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IDataModel removeNestedModel(String nestedModelName)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isNestedModel(String nestedModelName)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IDataModel getNestedModel(String nestedModelName)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public Collection<?> getNestedModels()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public Collection<?> getNestedModelNames()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public Collection<?> getNestingModels()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public Collection<?> getBaseProperties()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public Collection<?> getNestedProperties()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public Collection<?> getAllProperties()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isBaseProperty(String propertyName)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isProperty(String propertyName)
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean isNestedProperty(String propertyName)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isPropertySet(String propertyName)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isPropertyEnabled(String propertyName)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isPropertyValid(String propertyName)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IStatus validateProperty(String propertyName)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isValid()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IStatus validate()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IStatus validate(boolean stopAtFirstFailure)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public DataModelPropertyDescriptor getPropertyDescriptor(String propertyName)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public DataModelPropertyDescriptor[] getValidPropertyDescriptors(
+ String propertyName)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void addListener(IDataModelListener dataModelListener)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void removeListener(IDataModelListener dataModelListener)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void notifyPropertyChange(String propertyName, int eventType)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void dispose()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @author cbateman
+ *
+ */
+ public static class MockPropertyHolder
+ {
+ private Object _value;
+ private final Object _defaultValue;
+ public MockPropertyHolder(Object value, Object defaultValue)
+ {
+ super();
+ _value = value;
+ _defaultValue = defaultValue;
+ }
+ public MockPropertyHolder(Object defaultValue)
+ {
+ this(null, defaultValue);
+ }
+ public MockPropertyHolder()
+ {
+ this(null, null);
+ }
+
+ /**
+ * @return the property value to be used by the data model.
+ */
+ public Object getValue()
+ {
+ return _value;
+ }
+
+ /**
+ * @return the default value to be used by the data model
+ */
+ public Object getDefaultValue()
+ {
+ return _defaultValue;
+ }
+ public void setValue(Object value)
+ {
+ _value = value;
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockExtensionRegistryProvider.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockExtensionRegistryProvider.java
new file mode 100644
index 000000000..dbdeedb74
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockExtensionRegistryProvider.java
@@ -0,0 +1,18 @@
+package org.eclipse.jst.jsf.test.util.mock;
+
+import java.io.File;
+
+import org.eclipse.core.internal.registry.ExtensionRegistry;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.spi.IRegistryProvider;
+import org.eclipse.core.runtime.spi.RegistryStrategy;
+
+public class MockExtensionRegistryProvider implements IRegistryProvider
+{
+
+ public IExtensionRegistry getRegistry()
+ {
+ return new ExtensionRegistry(new RegistryStrategy(new File[0], new boolean[0]), new Object(), new Object());
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockFile.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockFile.java
new file mode 100644
index 000000000..baeac0a6d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockFile.java
@@ -0,0 +1,256 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.test.util.mock;
+
+import static junit.framework.Assert.assertTrue;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+import java.net.URI;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFileState;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.content.IContentDescription;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.jst.jsf.test.util.Activator;
+import org.eclipse.jst.jsf.test.util.JSFTestUtil;
+
+public class MockFile extends MockResource implements IFile
+{
+
+ private byte[] _contents;
+ private File _concreteFile;
+ private MockContentTypeManager _contentTypeManager;
+
+ public MockFile(final IPath path)
+ {
+ super(IResource.FILE, path);
+ }
+
+ public void appendContents(final InputStream source, final boolean force,
+ final boolean keepHistory, final IProgressMonitor monitor)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void appendContents(final InputStream source, final int updateFlags,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void create(final InputStream source, final boolean force,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ setContents(source, 0, monitor);
+ }
+
+ public void create(final InputStream source, final int updateFlags,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void createLink(final IPath localLocation, final int updateFlags,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void createLink(final URI location, final int updateFlags,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void delete(final boolean force, final boolean keepHistory,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public String getCharset() throws CoreException
+ {
+ return "UTF-8";
+ }
+
+ public String getCharset(final boolean checkImplicit) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public String getCharsetFor(final Reader reader) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IContentDescription getContentDescription() throws CoreException
+ {
+ IContentType[] contentType = _contentTypeManager.findContentTypesFor(getName());
+ if (contentType != null && contentType.length > 0)
+ {
+ return new MockContentDescription(contentType[0]);
+ }
+ return new MockContentDescription();
+ }
+
+ public void setContentTypeManager(final MockContentTypeManager contentTypeManager)
+ {
+ _contentTypeManager = contentTypeManager;
+ }
+
+ public InputStream getContents() throws CoreException
+ {
+ return getContents(false);
+
+ }
+
+ public InputStream getContents(final boolean force) throws CoreException
+ {
+ return new ByteArrayInputStream(_contents);
+ }
+
+ public int getEncoding() throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IFileState[] getHistory(final IProgressMonitor monitor)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void move(final IPath destination, final boolean force,
+ final boolean keepHistory, final IProgressMonitor monitor)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void setCharset(final String newCharset) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void setCharset(final String newCharset,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void setContents(final InputStream source, final boolean force,
+ final boolean keepHistory, final IProgressMonitor monitor)
+ throws CoreException
+ {
+ // TODO: this doesn't work for EMF uri handlers
+// if (_contents != null && !force)
+// {
+// new CoreException(new Status(IStatus.ERROR,
+// Activator.PLUGIN_ID,
+// "Attempt to reset contents without force"));
+// }
+ ByteArrayOutputStream captureBytes;
+ try
+ {
+ captureBytes = JSFTestUtil.loadFromInputStream(source);
+ // keep concrete file in sync if we have one.
+ if (_concreteFile != null && _concreteFile.exists())
+ {
+ JSFTestUtil.saveToFileSystem(captureBytes.toByteArray(),
+ _concreteFile.toURI());
+ }
+ }
+ catch (IOException e)
+ {
+ throw new CoreException(new Status(IStatus.ERROR,
+ Activator.PLUGIN_ID,
+ "Failed loading mock contents from stream"));
+ }
+ _contents = captureBytes.toByteArray();
+
+ }
+
+ public void setContents(final IFileState source, final boolean force,
+ final boolean keepHistory, final IProgressMonitor monitor)
+ throws CoreException
+ {
+ setContents(source.getContents(), force, keepHistory, monitor);
+ }
+
+ public void setContents(final InputStream source, final int updateFlags,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ setContents(source, (updateFlags | IResource.FORCE) != 0,
+ (updateFlags | IResource.KEEP_HISTORY) != 0, monitor);
+ }
+
+ public void setContents(final IFileState source, final int updateFlags,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ setContents(source, (updateFlags | IResource.FORCE) != 0,
+ (updateFlags | IResource.KEEP_HISTORY) != 0, monitor);
+ }
+
+ @Override
+ public IPath getLocation()
+ {
+ File concreteFile = ensureConcreteFile();
+ return Path.fromOSString(concreteFile.getAbsolutePath());
+ }
+
+ private File ensureConcreteFile()
+ {
+ if (_concreteFile == null)
+ {
+ String tempFileName = getFullPath().toString().replace('/', '_');
+ try
+ {
+ _concreteFile = File.createTempFile(tempFileName, "."
+ + getFullPath().getFileExtension());
+ _concreteFile.deleteOnExit();
+ assertTrue(_concreteFile.exists());
+ if (_contents != null)
+ {
+ JSFTestUtil.saveToFileSystem(_contents,
+ _concreteFile.toURI());
+ }
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+ return _concreteFile;
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockFolder.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockFolder.java
new file mode 100644
index 000000000..80ec94d4e
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockFolder.java
@@ -0,0 +1,67 @@
+package org.eclipse.jst.jsf.test.util.mock;
+
+import java.net.URI;
+
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+public class MockFolder extends MockContainer implements IFolder
+{
+
+ public MockFolder(IPath path, IMockResourceFactory resFactory)
+ {
+ super(IResource.FOLDER, path, resFactory);
+ }
+
+ public void create(boolean force, boolean local, IProgressMonitor monitor)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void create(int updateFlags, boolean local, IProgressMonitor monitor)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void createLink(IPath localLocation, int updateFlags,
+ IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void createLink(URI location, int updateFlags,
+ IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void delete(boolean force, boolean keepHistory,
+ IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IFolder getFolder(String name)
+ {
+ return super.getFolder(new Path(name));
+ }
+
+ public void move(IPath destination, boolean force, boolean keepHistory,
+ IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockJarProvider.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockJarProvider.java
new file mode 100644
index 000000000..dad33fc18
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockJarProvider.java
@@ -0,0 +1,69 @@
+package org.eclipse.jst.jsf.test.util.mock;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.jar.JarFile;
+
+import junit.framework.AssertionFailedError;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jst.jsf.test.util.JSFTestUtil;
+
+public final class MockJarProvider
+{
+ public static JarFile getJar(final String fileName)
+ throws AssertionFailedError
+ {
+ final File javaFile = new File(fileName);
+ assertTrue(javaFile.exists());
+ JarFile jarFile;
+ try
+ {
+ jarFile = new JarFile(javaFile);
+ } catch (final IOException e)
+ {
+ final AssertionFailedError error = new AssertionFailedError();
+ error.setStackTrace(e.getStackTrace());
+ throw error;
+ }
+ return jarFile;
+ }
+
+ public static JarFile getJar(final IFile jarFile)
+ {
+ FileOutputStream outStream = null;
+ try
+ {
+ final InputStream inStream = jarFile.getContents();
+ final File tempFile = File.createTempFile(jarFile.getName() + "_"
+ + System.currentTimeMillis(), null);
+ tempFile.deleteOnExit();
+ outStream = new FileOutputStream(tempFile);
+ JSFTestUtil.saveToFileSystem(inStream, tempFile.toURI());
+ return new JarFile(tempFile);
+ } catch (final CoreException e)
+ {
+ throw new AssertionFailedError(e.getLocalizedMessage());
+ } catch (final IOException e)
+ {
+ throw new AssertionFailedError(e.getLocalizedMessage());
+ } finally
+ {
+ if (outStream != null)
+ {
+ try
+ {
+ outStream.close();
+ } catch (final IOException e)
+ {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockMarker.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockMarker.java
new file mode 100644
index 000000000..c591011d3
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockMarker.java
@@ -0,0 +1,142 @@
+package org.eclipse.jst.jsf.test.util.mock;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+
+public class MockMarker implements IMarker
+{
+ private final Map<String, Object> _attributes = new HashMap<String, Object>();
+ private final IResource _resource;
+
+ public MockMarker(final IResource resource)
+ {
+ _resource = resource;
+ }
+
+ public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void delete() throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public boolean exists()
+ {
+ return true;
+ }
+
+ public Object getAttribute(String attributeName) throws CoreException
+ {
+ return _attributes.get(attributeName);
+ }
+
+ public int getAttribute(String attributeName, int defaultValue)
+ {
+ Object object = _attributes.get(attributeName);
+ if (object instanceof Integer)
+ {
+ return ((Integer)object).intValue();
+ }
+ return defaultValue;
+ }
+
+ public String getAttribute(String attributeName, String defaultValue)
+ {
+ Object object = _attributes.get(attributeName);
+ if (object instanceof String)
+ {
+ return ((String)object);
+ }
+ return defaultValue;
+ }
+
+ public boolean getAttribute(String attributeName, boolean defaultValue)
+ {
+ Object object = _attributes.get(attributeName);
+ if (object instanceof Boolean)
+ {
+ return ((Boolean)object).booleanValue();
+ }
+ return defaultValue;
+ }
+
+ public Map<String, Object> getAttributes() throws CoreException
+ {
+ return Collections.unmodifiableMap(_attributes);
+ }
+
+ public Object[] getAttributes(String[] attributeNames) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public long getCreationTime() throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public long getId()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IResource getResource()
+ {
+ return _resource;
+ }
+
+ public String getType() throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public boolean isSubtypeOf(String superType) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setAttribute(String attributeName, int value)
+ throws CoreException
+ {
+ setAttribute(attributeName, Integer.valueOf(value));
+ }
+
+ public void setAttribute(String attributeName, Object value)
+ throws CoreException
+ {
+ _attributes.put(attributeName, value);
+ }
+
+ public void setAttribute(String attributeName, boolean value)
+ throws CoreException
+ {
+ setAttribute(attributeName, Boolean.valueOf(value));
+ }
+
+ public void setAttributes(String[] attributeNames, Object[] values)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ @SuppressWarnings("unchecked")
+ public void setAttributes(@SuppressWarnings("rawtypes") Map attributes)
+ throws CoreException
+ {
+ _attributes.putAll(attributes);
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockModelProvider.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockModelProvider.java
new file mode 100644
index 000000000..6656e89ec
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockModelProvider.java
@@ -0,0 +1,46 @@
+package org.eclipse.jst.jsf.test.util.mock;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jst.j2ee.model.IModelProvider;
+import org.eclipse.jst.j2ee.model.IModelProviderListener;
+
+public class MockModelProvider implements IModelProvider
+{
+ private final Object _modelObject;
+
+ public MockModelProvider(final Object modelObject)
+ {
+ _modelObject = modelObject;
+ }
+ public Object getModelObject()
+ {
+ return _modelObject;
+ }
+
+ public Object getModelObject(IPath modelPath)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void modify(Runnable runnable, IPath modelPath)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IStatus validateEdit(IPath modelPath, Object context)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void addListener(IModelProviderListener listener)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void removeListener(IModelProviderListener listener)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockProject.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockProject.java
new file mode 100644
index 000000000..6f285f22a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockProject.java
@@ -0,0 +1,219 @@
+package org.eclipse.jst.jsf.test.util.mock;
+
+import java.net.URI;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.resources.IBuildConfiguration;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IProjectNature;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IPluginDescriptor;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.content.IContentTypeMatcher;
+
+@SuppressWarnings("deprecation")
+public class MockProject extends MockContainer implements IProject
+{
+
+ private Set<String> _natures = new HashSet<String>();
+
+ public MockProject(final IPath path, final IMockResourceFactory resFactory)
+ {
+ super(IResource.PROJECT,path, resFactory);
+ setProject(this);
+ }
+
+ @SuppressWarnings("rawtypes")
+ public void build(int kind, String builderName, Map args,
+ IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void build(int kind, IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void build(IBuildConfiguration config, int kind,
+ IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void close(IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void create(IProjectDescription description, IProgressMonitor monitor)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void create(IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void create(IProjectDescription description, int updateFlags,
+ IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void delete(boolean deleteContent, boolean force,
+ IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IContentTypeMatcher getContentTypeMatcher() throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IProjectDescription getDescription() throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IFolder getFolder(String name)
+ {
+ return getFolder(new Path(name));
+ }
+
+ public IProjectNature getNature(String natureId) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IPath getPluginWorkingLocation(IPluginDescriptor plugin)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IPath getWorkingLocation(String id)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IProject[] getReferencedProjects() throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IProject[] getReferencingProjects()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void addNature(String natureId)
+ {
+ _natures.add(natureId);
+ }
+ public boolean hasNature(String natureId) throws CoreException
+ {
+ return _natures.contains(natureId);
+ }
+
+ public boolean isNatureEnabled(String natureId) throws CoreException
+ {
+ // for now, assume if we have the nature then it is enabled.
+ return hasNature(natureId);
+ }
+
+ public boolean isOpen()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void loadSnapshot(int options, URI snapshotLocation,
+ IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void move(IProjectDescription description, boolean force,
+ IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void open(int updateFlags, IProgressMonitor monitor)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void open(IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void saveSnapshot(int options, URI snapshotLocation,
+ IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setDescription(IProjectDescription description,
+ IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setDescription(IProjectDescription description,
+ int updateFlags, IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public IContainer getParent()
+ {
+ return getWorkspace().getRoot();
+ }
+
+ public IBuildConfiguration getActiveBuildConfig() throws CoreException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public IBuildConfiguration getBuildConfig(String configName)
+ throws CoreException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public IBuildConfiguration[] getBuildConfigs() throws CoreException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public IBuildConfiguration[] getReferencedBuildConfigs(String configName,
+ boolean includeMissing) throws CoreException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean hasBuildConfig(String configName) throws CoreException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void clearCachedDynamicReferences() {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockResource.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockResource.java
new file mode 100644
index 000000000..518f813c9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockResource.java
@@ -0,0 +1,603 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.test.util.mock;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import junit.framework.Assert;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IPathVariableManager;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceProxy;
+import org.eclipse.core.resources.IResourceProxyVisitor;
+import org.eclipse.core.resources.IResourceVisitor;
+import org.eclipse.core.resources.ResourceAttributes;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+
+public class MockResource implements IResource
+{
+ private final int _type;
+ private final IPath _path;
+ private boolean _exists = true; // always exist by default
+ private MockWorkspace _workspace;
+ private IProject _project;
+ private long _modificationStamp = -1;
+ private Map<QualifiedName, Object> _sessionProps;
+ public final static List<Integer> VALID_TYPES;
+ private boolean _isSynchronized = true;
+
+ static
+ {
+ final List<Integer> list = new ArrayList<Integer>();
+ list.add(IResource.FILE);
+ list.add(IResource.FOLDER);
+ list.add(IResource.PROJECT);
+ list.add(IResource.ROOT);
+ VALID_TYPES = Collections.unmodifiableList(list);
+ }
+
+ public MockResource(final int type, final IPath path)
+ {
+ _path = path;
+ _type = type;
+ Assert.assertTrue(VALID_TYPES.contains(type));
+ }
+
+ public int getType()
+ {
+ return _type;
+ }
+
+ @Override
+ public boolean equals(Object target)
+ {
+ if (this == target)
+ return true;
+ if (!(target instanceof MockResource))
+ return false;
+ MockResource resource = (MockResource) target;
+ return getType() == resource.getType() && _path.equals(resource._path) && _workspace.equals(resource._workspace);
+ }
+
+
+ @Override
+ public int hashCode()
+ {
+ int code = _path.hashCode();
+ code ^= getType();
+ return code;
+ }
+
+ @SuppressWarnings("rawtypes")
+ public Object getAdapter(final Class adapter)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean contains(final ISchedulingRule rule)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public boolean isConflicting(final ISchedulingRule rule)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void accept(final IResourceProxyVisitor visitor,
+ final int memberFlags) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void accept(IResourceProxyVisitor visitor,
+ final int depth, final int memberFlags) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void accept(final IResourceVisitor visitor) throws CoreException
+ {
+ accept(visitor, IResource.DEPTH_INFINITE, IResource.NONE);
+ }
+
+ public void accept(final IResourceVisitor visitor, final int depth,
+ final boolean includePhantoms) throws CoreException
+ {
+ accept(visitor, depth, includePhantoms ? IContainer.INCLUDE_PHANTOMS
+ : IResource.NONE);
+ }
+
+ public void accept(final IResourceVisitor visitor, final int depth,
+ final int memberFlags) throws CoreException
+ {
+ boolean visit = visitor.visit(this);
+
+ if (visit)
+ {
+ visitMembers(visitor, depth, memberFlags);
+ }
+ }
+
+ protected void visitMembers(IResourceVisitor visitor, int depth,
+ int memberFlags) throws CoreException
+ {
+ // do nothing by default. Container must to override to visit members.
+ }
+
+ public void clearHistory(final IProgressMonitor monitor)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void copy(final IPath destination, final boolean force,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void copy(final IPath destination, final int updateFlags,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void copy(final IProjectDescription description,
+ final boolean force, final IProgressMonitor monitor)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void copy(final IProjectDescription description,
+ final int updateFlags, final IProgressMonitor monitor)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IMarker createMarker(final String type) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IResourceProxy createProxy()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void delete(final boolean force, final IProgressMonitor monitor)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void delete(final int updateFlags, final IProgressMonitor monitor)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void deleteMarkers(final String type, final boolean includeSubtypes,
+ final int depth) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public boolean exists()
+ {
+ return _exists;
+ }
+
+ public void setExists(final boolean exists)
+ {
+ _exists = exists;
+ }
+
+ public IMarker findMarker(final long id) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IMarker[] findMarkers(final String type,
+ final boolean includeSubtypes, final int depth)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public int findMaxProblemSeverity(final String type,
+ final boolean includeSubtypes, final int depth)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public String getFileExtension()
+ {
+ String name = getName();
+ int index = name.lastIndexOf('.');
+ if (index == -1)
+ return null;
+ if (index == (name.length() - 1))
+ return ""; //$NON-NLS-1$
+ return name.substring(index + 1);
+ }
+
+ public IPath getFullPath()
+ {
+ return _path;
+ }
+
+ public long getLocalTimeStamp()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IPath getLocation()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public URI getLocationURI()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IMarker getMarker(final long id)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public long getModificationStamp()
+ {
+ return _modificationStamp;
+ }
+
+ public String getName()
+ {
+ return _path.lastSegment();
+ }
+
+ public IContainer getParent()
+ {
+ final IPath myParent = getProjectRelativePath().removeLastSegments(1);
+
+ // if the parent is the empty path, then our parent is the root.
+ if (myParent.segmentCount() == 0)
+ {
+ return getProject();
+ }
+ return _project.getFolder(getProjectRelativePath().removeLastSegments(1));
+ }
+
+ public Map<QualifiedName, String> getPersistentProperties() throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public String getPersistentProperty(final QualifiedName key)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IProject getProject()
+ {
+ return _project;
+ }
+
+ public void setProject(final IProject project)
+ {
+ _project = project;
+ }
+
+ public IPath getProjectRelativePath()
+ {
+ if (getType() == IResource.ROOT || getType() == IResource.PROJECT)
+ {
+ return new Path("");
+ }
+ IPath projectPath = getProject().getFullPath();
+ Assert.assertTrue(projectPath.isPrefixOf(getFullPath()));
+ return getFullPath().removeFirstSegments(projectPath.segmentCount());
+ }
+
+ public IPath getRawLocation()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public URI getRawLocationURI()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public ResourceAttributes getResourceAttributes()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public Map<QualifiedName, Object> getSessionProperties() throws CoreException
+ {
+ return getSessionPropsMap();
+ }
+
+ public Object getSessionProperty(final QualifiedName key)
+ throws CoreException
+ {
+ return getSessionProperties().get(key);
+ }
+
+ public MockWorkspace getWorkspace()
+ {
+ return _workspace;
+ }
+
+ public void setWorkspace(final MockWorkspace workspace)
+ {
+ _workspace = workspace;
+ }
+
+ public boolean isAccessible()
+ {
+ return exists();
+ }
+
+ public boolean isDerived()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isDerived(final int options)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isHidden()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isHidden(final int options)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isLinked()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isVirtual()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean hasFilters()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isLinked(final int options)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isLocal(final int depth)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isPhantom()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isReadOnly()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isSynchronized(final int depth)
+ {
+ return _isSynchronized;
+ }
+
+ public void setSynchronized(boolean isSynchronized)
+ {
+ _isSynchronized = isSynchronized;
+ }
+
+ public boolean isTeamPrivateMember()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isTeamPrivateMember(final int options)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void move(final IPath destination, final boolean force,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void move(final IPath destination, final int updateFlags,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void move(final IProjectDescription description,
+ final boolean force, final boolean keepHistory,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void move(final IProjectDescription description,
+ final int updateFlags, final IProgressMonitor monitor)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void refreshLocal(final int depth, final IProgressMonitor monitor)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void revertModificationStamp(final long value) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void setDerived(final boolean isDerived) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void setDerived(final boolean isDerived,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void setHidden(final boolean isHidden) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void setLocal(final boolean flag, final int depth,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public long setLocalTimeStamp(final long value) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setPersistentProperty(final QualifiedName key,
+ final String value) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void setReadOnly(final boolean readOnly)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void setResourceAttributes(final ResourceAttributes attributes)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void setSessionProperty(final QualifiedName key, final Object value)
+ throws CoreException
+ {
+ getSessionPropsMap().put(key, value);
+ }
+
+ private Map<QualifiedName, Object> getSessionPropsMap() {
+ if (_sessionProps == null) {
+ _sessionProps = new HashMap<QualifiedName, Object>();
+ }
+ return _sessionProps;
+ }
+
+ public void setTeamPrivateMember(final boolean isTeamPrivate)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void touch(final IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public boolean isFiltered()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IPathVariableManager getPathVariableManager()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void dispose() throws Exception
+ {
+ _project = null;
+ _workspace = null;
+ }
+
+ public String toString()
+ {
+ return _path.toString();
+ }
+
+ public void incrementModStamp()
+ {
+ _modificationStamp++;
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockResourceChangeEvent.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockResourceChangeEvent.java
new file mode 100644
index 000000000..4df805a14
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockResourceChangeEvent.java
@@ -0,0 +1,63 @@
+package org.eclipse.jst.jsf.test.util.mock;
+
+import java.util.EventObject;
+
+import org.eclipse.core.resources.IMarkerDelta;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceDelta;
+
+public class MockResourceChangeEvent extends EventObject implements IResourceChangeEvent
+{
+ /**
+ *
+ */
+ private static final long serialVersionUID = 6425297945375951902L;
+ private final MockResourceDelta _delta;
+ private final IResource _resource;
+ private final int _type;
+
+ /**
+ * @param resource
+ * @param type
+ * @param delta
+ */
+ public MockResourceChangeEvent(final IResource resource, final int type, final MockResourceDelta delta)
+ {
+ super(resource != null ? resource.getWorkspace() : new Object());
+ _delta = delta;
+ _resource = resource;
+ _type = type;
+ }
+ public MockResourceChangeEvent(final int type, final MockResourceDelta delta)
+ {
+ this(null, type, delta);
+ }
+
+ public IMarkerDelta[] findMarkerDeltas(final String type, final boolean includeSubtypes)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public int getBuildKind()
+ {
+ // we currently don't support build events
+ return 0;
+ }
+
+ public IResourceDelta getDelta()
+ {
+ return _delta;
+ }
+
+ public IResource getResource()
+ {
+ return _resource;
+ }
+
+ public int getType()
+ {
+ return _type;
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockResourceChangeEventFactory.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockResourceChangeEventFactory.java
new file mode 100644
index 000000000..1786cca60
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockResourceChangeEventFactory.java
@@ -0,0 +1,105 @@
+package org.eclipse.jst.jsf.test.util.mock;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResourceChangeEvent;
+
+public class MockResourceChangeEventFactory
+{
+ private final MockResourceDeltaFactory _deltaFactory;
+
+ public MockResourceChangeEventFactory(
+ final MockResourceDeltaFactory deltaFactory)
+ {
+ _deltaFactory = deltaFactory;
+ }
+
+ public MockResourceChangeEventFactory(final IWorkspaceContext wsContext)
+ {
+ this(new MockResourceDeltaFactory(wsContext));
+ }
+
+ public IResourceChangeEvent createSimpleFileChange(final IFile file,
+ final boolean incrementModStamp)
+ {
+ final MockResourceDelta delta = _deltaFactory
+ .createSimpleFileChange(file);
+ if (incrementModStamp && file instanceof MockFile)
+ {
+ ((MockResource) file).incrementModStamp();
+ }
+ return newPostChangeEvent(delta);
+ }
+
+ public IResourceChangeEvent createSimpleFileRemove(final IFile file)
+ {
+ final MockResourceDelta delta = _deltaFactory
+ .createSimpleFileRemoved(file);
+ return newPostChangeEvent(delta);
+ }
+
+ public IResourceChangeEvent createSimpleFileAdded(final IFile file)
+ {
+ final MockResourceDelta delta = _deltaFactory
+ .createSimpleFileAdded(file);
+ return newPostChangeEvent(delta);
+ }
+
+ public IResourceChangeEvent createSimpleProjectClosed(
+ final IProject project)
+ {
+ return new MockResourceChangeEvent(project,
+ IResourceChangeEvent.PRE_CLOSE, null);
+ }
+
+ public IResourceChangeEvent createSimpleProjectDeleted(
+ final IProject project)
+ {
+ return new MockResourceChangeEvent(project,
+ IResourceChangeEvent.PRE_DELETE, null);
+ }
+
+ public IResourceChangeEvent createSimpleFolderAdded(final IFolder folder)
+ {
+ final MockResourceDelta delta = _deltaFactory
+ .createSimpleFolderAdded(folder);
+ return newPostChangeEvent(delta);
+ }
+
+ public IResourceChangeEvent createSimpleFolderDeleted(final IFolder folder)
+ {
+ final MockResourceDelta delta = _deltaFactory
+ .createSimpleFolderRemoved(folder);
+ return newPostChangeEvent(delta);
+ }
+
+ public IResourceChangeEvent createRecursiveFolderDeleted(final IFolder folder)
+ {
+ final MockResourceDelta delta = _deltaFactory
+ .createRecursiveFolderRemoved(folder);
+ return newPostChangeEvent(delta);
+ }
+
+ public IResourceChangeEvent createSimpleFolderRename(final IFolder folder,
+ final IFolder newFolderName)
+ {
+ final MockResourceDelta delta = _deltaFactory.createFolderRename(folder,
+ newFolderName);
+
+ return newPostChangeEvent(delta);
+ }
+
+ public IResourceChangeEvent createSimpleFileRename(final IFile file,
+ final IFile newFile)
+ {
+ final MockResourceDelta delta = _deltaFactory.createFileRename(file, newFile);
+ return newPostChangeEvent(delta);
+ }
+
+ private MockResourceChangeEvent newPostChangeEvent(final MockResourceDelta delta)
+ {
+ return new MockResourceChangeEvent(IResourceChangeEvent.POST_CHANGE,
+ delta);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockResourceDelta.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockResourceDelta.java
new file mode 100644
index 000000000..c8e35cc57
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockResourceDelta.java
@@ -0,0 +1,372 @@
+package org.eclipse.jst.jsf.test.util.mock;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.internal.runtime.AdapterManager;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IMarkerDelta;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+
+public class MockResourceDelta implements IResourceDelta
+{
+ public enum StateType
+ {
+ BEFORE_EVENT, AFTER_EVENT
+ }
+
+ private final IResource _afterEventResource;
+ private final IResource _beforeEventResource;
+ private final List<MockResourceDelta> _childDeltas;
+ private final int _status;
+
+ protected static int KIND_MASK = 0xFF;
+
+ public MockResourceDelta(final IResource afterEventResource,
+ final IResource beforeEventResource, final int status,
+ final List<MockResourceDelta> childDeltas)
+ {
+ super();
+ if (afterEventResource == null && beforeEventResource == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ _afterEventResource = afterEventResource;
+ _beforeEventResource = beforeEventResource;
+ _status = status;
+ _childDeltas = childDeltas;
+ }
+
+ /**
+ * @param delta
+ * @return a new resource delta that combines delta with my values. If there
+ * are conflicts, delta's value is used.
+ */
+ public MockResourceDelta merge(final MockResourceDelta delta)
+ {
+ final List<MockResourceDelta> mergedChildren = new ArrayList<MockResourceDelta>(
+ _childDeltas);
+
+ for (final MockResourceDelta mergeMe : delta._childDeltas)
+ {
+ for (final Iterator<MockResourceDelta> it = mergedChildren
+ .iterator(); it.hasNext();)
+ {
+ if (it.next().getActiveResource().equals(
+ mergeMe.getActiveResource()))
+ {
+ it.remove();
+ }
+ }
+ mergedChildren.add(mergeMe);
+ }
+
+ return new MockResourceDelta(delta._afterEventResource,
+ delta._beforeEventResource, delta._status, mergedChildren);
+ }
+
+ /*
+ * @see IResourceDelta#accept(IResourceDeltaVisitor)
+ */
+ public void accept(IResourceDeltaVisitor visitor) throws CoreException
+ {
+ accept(visitor, 0);
+ }
+
+ /*
+ * @see IResourceDelta#accept(IResourceDeltaVisitor, boolean)
+ */
+ public void accept(IResourceDeltaVisitor visitor, boolean includePhantoms)
+ throws CoreException
+ {
+ accept(visitor, includePhantoms ? IContainer.INCLUDE_PHANTOMS : 0);
+ }
+
+ /*
+ * @see IResourceDelta#accept(IResourceDeltaVisitor, int)
+ */
+ public void accept(IResourceDeltaVisitor visitor, int memberFlags)
+ throws CoreException
+ {
+ final boolean includePhantoms = (memberFlags & IContainer.INCLUDE_PHANTOMS) != 0;
+ final boolean includeTeamPrivate = (memberFlags & IContainer.INCLUDE_TEAM_PRIVATE_MEMBERS) != 0;
+ final boolean includeHidden = (memberFlags & IContainer.INCLUDE_HIDDEN) != 0;
+// int mask = includePhantoms ? ALL_WITH_PHANTOMS : REMOVED | ADDED
+// | CHANGED;
+ // if ((getKind() & mask) == 0)
+ // return;
+ if (!visitor.visit(this))
+ return;
+ for (final MockResourceDelta childDelta : _childDeltas)
+ {
+ // quietly exclude team-private, hidden and phantom members unless
+ // explicitly included
+ if (!includeTeamPrivate && childDelta.isTeamPrivate())
+ continue;
+ if (!includePhantoms && childDelta.isPhantom())
+ continue;
+ if (!includeHidden && childDelta.isHidden())
+ continue;
+ childDelta.accept(visitor, memberFlags);
+ }
+ }
+
+ /**
+ * @see IResourceDelta#findMember(IPath)
+ */
+ public IResourceDelta findMember(IPath path)
+ {
+ int segmentCount = path.segmentCount();
+ if (segmentCount == 0)
+ return this;
+
+ // iterate over the path and find matching child delta
+ MockResourceDelta current = this;
+ segments: for (int i = 0; i < segmentCount; i++)
+ {
+ List<MockResourceDelta> currentChildren = current._childDeltas;
+ for (int j = 0, jmax = currentChildren.size(); j < jmax; j++)
+ {
+ if (currentChildren.get(j).getFullPath().lastSegment().equals(
+ path.segment(i)))
+ {
+ current = (MockResourceDelta) currentChildren.get(j);
+ continue segments;
+ }
+ }
+ // matching child not found, return
+ return null;
+ }
+ return current;
+ }
+
+ /**
+ * @see IResourceDelta#getAffectedChildren()
+ */
+ public IResourceDelta[] getAffectedChildren()
+ {
+ return getAffectedChildren(ADDED | REMOVED | CHANGED, IResource.NONE);
+ }
+
+ /**
+ * @see IResourceDelta#getAffectedChildren(int)
+ */
+ public IResourceDelta[] getAffectedChildren(int kindMask)
+ {
+ return getAffectedChildren(kindMask, IResource.NONE);
+ }
+
+ /*
+ * @see IResourceDelta#getAffectedChildren(int, int)
+ */
+ public IResourceDelta[] getAffectedChildren(int kindMask, int memberFlags)
+ {
+ final int numChildren = _childDeltas.size();
+ // if there are no children, they all match
+ if (numChildren == 0)
+ {
+ return _childDeltas.toArray(new IResourceDelta[0]);
+ }
+ boolean includePhantoms = (memberFlags & IContainer.INCLUDE_PHANTOMS) != 0;
+ boolean includeTeamPrivate = (memberFlags & IContainer.INCLUDE_TEAM_PRIVATE_MEMBERS) != 0;
+ boolean includeHidden = (memberFlags & IContainer.INCLUDE_HIDDEN) != 0;
+ // reduce INCLUDE_PHANTOMS member flag to kind mask
+ if (includePhantoms)
+ kindMask |= ADDED_PHANTOM | REMOVED_PHANTOM;
+
+ // first count the number of matches so we can allocate the exact array
+ // size
+ int matching = 0;
+ for (int i = 0; i < numChildren; i++)
+ {
+ if ((_childDeltas.get(i).getKind() & kindMask) == 0)
+ continue;// child has wrong kind
+ if (!includePhantoms && _childDeltas.get(i).isPhantom())
+ continue;
+ if (!includeTeamPrivate && _childDeltas.get(i).isTeamPrivate())
+ continue; // child has is a team-private member which are not
+ // included
+ if (!includeHidden && _childDeltas.get(i).isHidden())
+ continue;
+ matching++;
+ }
+ // use arraycopy if all match
+ if (matching == numChildren)
+ {
+ final List<IResourceDelta> copy = new ArrayList<IResourceDelta>(
+ _childDeltas);
+ return copy.toArray(new IResourceDelta[0]);
+ }
+ // create the appropriate sized array and fill it
+ IResourceDelta[] result = new IResourceDelta[matching];
+ int nextPosition = 0;
+ for (int i = 0; i < numChildren; i++)
+ {
+ if ((_childDeltas.get(i).getKind() & kindMask) == 0)
+ continue; // child has wrong kind
+ if (!includePhantoms && _childDeltas.get(i).isPhantom())
+ continue;
+ if (!includeTeamPrivate && _childDeltas.get(i).isTeamPrivate())
+ continue; // child has is a team-private member which are not
+ // included
+ if (!includeHidden && _childDeltas.get(i).isHidden())
+ continue;
+ result[nextPosition++] = _childDeltas.get(i);
+ }
+ return result;
+ }
+
+ /**
+ * @see IResourceDelta#getFlags()
+ */
+ public int getFlags()
+ {
+ return _status & ~KIND_MASK;
+ }
+
+ private boolean isSet(final int flag)
+ {
+ return (getFlags() & flag) != 0;
+ }
+
+ /**
+ * @see IResourceDelta#getFullPath()
+ */
+ public IPath getFullPath()
+ {
+ return getActiveResource().getFullPath();
+ }
+
+ /**
+ * @see IResourceDelta#getKind()
+ */
+ public int getKind()
+ {
+ return _status & KIND_MASK;
+ }
+
+ public IMarkerDelta[] getMarkerDeltas()
+ {
+ throw new UnsupportedOperationException(
+ "getMarkerDeltas not supported by the mock");
+ }
+
+ public IPath getMovedFromPath()
+ {
+ if (isSet(MOVED_FROM))
+ {
+ return _beforeEventResource.getFullPath();
+ }
+ return null;
+ }
+
+ public IPath getMovedToPath()
+ {
+ if (isSet(MOVED_TO))
+ {
+ return _afterEventResource.getFullPath();
+ }
+ return null;
+ }
+
+ public IPath getProjectRelativePath()
+ {
+ return _beforeEventResource.getProjectRelativePath();
+ }
+
+ public IResource getResource()
+ {
+ return getActiveResource();
+ }
+
+ @SuppressWarnings("rawtypes")
+ public Object getAdapter(Class adapter)
+ {
+ return AdapterManager.getDefault().getAdapter(this, adapter);
+ }
+
+ public IResource getActiveResource()
+ {
+ switch (getStateType())
+ {
+ case AFTER_EVENT:
+ return _afterEventResource;
+ case BEFORE_EVENT:
+ return _beforeEventResource;
+ default:
+ throw new IllegalStateException("Should not get here");
+ }
+ }
+
+ public final List<MockResourceDelta> getChildDeltas()
+ {
+ return _childDeltas;
+ }
+
+ private StateType getStateType()
+ {
+ if (getKind() == ADDED || getKind() == ADDED_PHANTOM
+ || isSet(MOVED_FROM))
+ {
+ return StateType.AFTER_EVENT;
+ }
+ return StateType.BEFORE_EVENT;
+ }
+
+ /**
+ * Returns true if this delta represents a hidden member, and false
+ * otherwise.
+ */
+ protected boolean isHidden()
+ {
+ // // use old info for removals, and new info for added or changed
+ // if ((_status & (REMOVED | REMOVED_PHANTOM)) != 0)
+ // return ResourceInfo.isSet(oldInfo.getFlags(),
+ // ICoreConstants.M_HIDDEN);
+ // return ResourceInfo.isSet(newInfo.getFlags(),
+ // ICoreConstants.M_HIDDEN);
+ return false;
+ }
+
+ /**
+ * Returns true if this delta represents a phantom member, and false
+ * otherwise.
+ */
+ protected boolean isPhantom()
+ {
+ // // use old info for removals, and new info for added or changed
+ // if ((_status & (REMOVED | REMOVED_PHANTOM)) != 0)
+ // return ResourceInfo.isSet(oldInfo.getFlags(),
+ // ICoreConstants.M_PHANTOM);
+ // return ResourceInfo.isSet(newInfo.getFlags(),
+ // ICoreConstants.M_PHANTOM);
+ return false;
+ }
+
+ /**
+ * Returns true if this delta represents a team private member, and false
+ * otherwise.
+ */
+ protected boolean isTeamPrivate()
+ {
+ // // use old info for removals, and new info for added or changed
+ // if ((_status & (REMOVED | REMOVED_PHANTOM)) != 0)
+ // return ResourceInfo.isSet(oldInfo.getFlags(),
+ // ICoreConstants.M_TEAM_PRIVATE_MEMBER);
+ // return ResourceInfo.isSet(newInfo.getFlags(),
+ // ICoreConstants.M_TEAM_PRIVATE_MEMBER);
+ return false;
+ }
+
+ @Override
+ public String toString()
+ {
+ return String.format("%s [delta]", getActiveResource().getFullPath());
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockResourceDeltaFactory.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockResourceDeltaFactory.java
new file mode 100644
index 000000000..a61ef8646
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockResourceDeltaFactory.java
@@ -0,0 +1,333 @@
+package org.eclipse.jst.jsf.test.util.mock;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import junit.framework.Assert;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.runtime.CoreException;
+
+public class MockResourceDeltaFactory
+{
+ // private final MockWorkspaceContext _wsContext;
+ public MockResourceDeltaFactory(final IWorkspaceContext wsContext)
+ {
+ // _wsContext = wsContext;
+ }
+
+ private void checkResourceValid(final IResource res)
+ {
+ if (res == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ }
+
+ public MockResourceDelta createSimpleFileChange(final IFile file)
+ {
+ checkResourceValid(file);
+ return newChangeDelta(file, IResourceDelta.CHANGED
+ | IResourceDelta.CONTENT);
+ }
+
+ public MockResourceDelta createSimpleFileAdded(final IFile file)
+ {
+ return createSimpleFileAdded(file, IResourceDelta.ADDED);
+ }
+
+ public MockResourceDelta createSimpleFileAdded(final IFile file,
+ final int kind)
+ {
+ checkResourceValid(file);
+ return newAddDelta(file, kind);
+ }
+
+ public MockResourceDelta createSimpleFolderAdded(final IFolder folder)
+ {
+ return createSimpleFolderAdded(folder, IResourceDelta.ADDED);
+ }
+
+ public MockResourceDelta createSimpleFolderAdded(final IFolder folder,
+ final int kind)
+ {
+ checkResourceValid(folder);
+ final MockResourceDelta root = newAddDelta(folder, kind);
+ // MockResourceDelta folderAdd = (MockResourceDelta) root
+ // .findMember(folder.getFullPath());
+ //
+ // if (folderAdd == null)
+ // {
+ // throw new IllegalStateException();
+ // }
+ //
+ // // TODO: add recursive folders
+ // try
+ // {
+ // for (final IResource child : folder.members())
+ // {
+ // if (child.getType() == IResource.FILE)
+ // {
+ // MockResourceDelta newAddDelta = new MockResourceDelta(child, null,
+ // kind, Collections.EMPTY_LIST);
+ // folderAdd.getChildDeltas().add(newAddDelta);
+ // }
+ // }
+ // } catch (CoreException e)
+ // {
+ // throw new RuntimeException(e);
+ // }
+ return root;
+ }
+
+ public MockResourceDelta createSimpleFileRemoved(final IFile file)
+ {
+ return createSimpleFileRemoved(file, IResourceDelta.REMOVED);
+ }
+
+ public MockResourceDelta createSimpleFileRemoved(final IFile file,
+ final int kind)
+ {
+ checkResourceValid(file);
+ return newRemoveDelta(file, kind);
+ }
+
+ public MockResourceDelta createSimpleFolderRemoved(final IFolder folder)
+ {
+ return createSimpleFolderRemoved(folder, IResourceDelta.REMOVED);
+ }
+
+ public MockResourceDelta createSimpleFolderRemoved(final IFolder folder,
+ final int kind)
+ {
+ checkResourceValid(folder);
+ return newRemoveDelta(folder, kind);
+ }
+
+ public MockResourceDelta createRecursiveFolderRemoved(final IFolder folder)
+ {
+ checkResourceValid(folder);
+ return newRemoveDeltaRecursive(folder, IResourceDelta.REMOVED);
+ }
+
+ @SuppressWarnings("unchecked")
+ protected MockResourceDelta newChangeDelta(final IResource resource,
+ final int kind)
+ {
+ final MockResourceDelta delta = new MockResourceDelta(resource,
+ resource, kind, Collections.EMPTY_LIST);
+ return createWorkspaceRootedDeltaTo(resource, delta);
+ }
+
+ @SuppressWarnings("unchecked")
+ protected MockResourceDelta newAddDelta(final IResource resource,
+ final int kind)
+ {
+ final MockResourceDelta delta = new MockResourceDelta(resource, null,
+ kind, Collections.EMPTY_LIST);
+ return createWorkspaceRootedDeltaTo(resource, delta);
+ }
+
+ @SuppressWarnings("unchecked")
+ protected MockResourceDelta newRemoveDelta(final IResource resource,
+ final int kind)
+ {
+ final MockResourceDelta delta = new MockResourceDelta(null, resource,
+ kind, Collections.EMPTY_LIST);
+ return createWorkspaceRootedDeltaTo(resource, delta);
+ }
+
+ private MockResourceDelta newRemoveDeltaRecursive(final IFolder folder,
+ final int kind)
+ {
+ final MockResourceDelta delta = recursiveContainerRemoved(folder, kind);
+ return createWorkspaceRootedDeltaTo(folder, delta);
+ }
+
+ private MockResourceDelta recursiveContainerRemoved(
+ final IResource rootRes, final int kind)
+ {
+ List<MockResourceDelta> childDeltas = new ArrayList<MockResourceDelta>();
+ try
+ {
+ if (rootRes instanceof IContainer)
+ {
+ for (final IResource res : ((IContainer) rootRes).members())
+ {
+ childDeltas.add(recursiveContainerRemoved(res, kind));
+ }
+ }
+ return new MockResourceDelta(null, rootRes, kind, childDeltas);
+ } catch (CoreException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * @return a delta that doesn't represent a change itself but has
+ * descendants that do.
+ */
+ public MockResourceDelta createPathToChangeDelta(final IResource res,
+ final List<MockResourceDelta> descendants)
+ {
+ return new MockResourceDelta(res, res, 0, descendants);
+ }
+
+ protected MockResourceDelta createWorkspaceRootedDeltaTo(
+ final IResource res, final MockResourceDelta leafRes)
+ {
+ MockResourceDelta curDelta = leafRes;
+ IContainer parent = res.getParent();
+ while (parent != null)
+ {
+ curDelta = createPathToChangeDelta(parent,
+ Collections.singletonList(curDelta));
+ parent = parent.getParent();
+ }
+ return curDelta;
+ }
+
+ public MockResourceDelta createFileMove(final IFile file,
+ final IFile newFile)
+ {
+ final MockResourceDelta fileAddEvent = createSimpleFileAdded(newFile,
+ IResourceDelta.ADDED | IResourceDelta.MOVED_FROM);
+ final MockResourceDelta fileRemoveEvent = createSimpleFileRemoved(file,
+ IResourceDelta.REMOVED | IResourceDelta.MOVED_TO);
+ return merge(file.getWorkspace().getRoot(), fileAddEvent,
+ fileRemoveEvent);
+ }
+
+ public MockResourceDelta createFileRename(final IFile file,
+ final IFile newFile)
+ {
+ Assert.assertEquals(file.getParent(), newFile.getParent());
+ return createFileMove(file, newFile);
+ }
+
+ public MockResourceDelta createFolderRename(final IFolder folder,
+ final IFolder newFolder)
+ {
+ Assert.assertEquals(folder.getParent(), newFolder.getParent());
+ return createFolderMove(folder, newFolder);
+ }
+
+ public MockResourceDelta createFolderMove(final IFolder folder,
+ final IFolder newFolder)
+ {
+ final MockResourceDelta fileAddEvent = createSimpleFolderAdded(
+ newFolder, IResourceDelta.ADDED | IResourceDelta.MOVED_FROM);
+ final MockResourceDelta fileRemoveEvent = createSimpleFolderRemoved(
+ folder, IResourceDelta.REMOVED | IResourceDelta.MOVED_TO);
+ return merge(folder.getWorkspace().getRoot(), fileAddEvent,
+ fileRemoveEvent);
+ }
+
+ private MockResourceDelta merge(final IWorkspaceRoot root,
+ final MockResourceDelta... deltas)
+ {
+ final MergeVisitor visitor = new MergeVisitor(root);
+ for (final MockResourceDelta delta : deltas)
+ {
+ try
+ {
+ delta.accept(visitor);
+ } catch (final CoreException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+ return visitor.getNewDelta();
+ }
+
+ private final static class MergeVisitor implements IResourceDeltaVisitor
+ {
+ private final Map<IResource, MockResourceDelta> _merged = new HashMap<IResource, MockResourceDelta>();
+ private final IWorkspaceRoot _root;
+
+ private MergeVisitor(final IWorkspaceRoot root)
+ {
+ _root = root;
+ }
+
+ public boolean visit(final IResourceDelta addDelta)
+ throws CoreException
+ {
+ final IResource res = addDelta.getResource();
+ if (res == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ MockResourceDelta curDelta = _merged.get(res);
+ if (curDelta != null)
+ {
+ curDelta = curDelta.merge((MockResourceDelta) addDelta);
+ } else
+ {
+ curDelta = (MockResourceDelta) addDelta;
+ }
+ _merged.put(res, curDelta);
+ return true;
+ }
+
+ public final MockResourceDelta getNewDelta()
+ {
+ final MockResourceDelta newDelta = new MockResourceDelta(_root,
+ _root, 0, new ArrayList<MockResourceDelta>());
+ addAllChildren(newDelta);
+ return newDelta;
+ }
+
+ private void addAllChildren(final MockResourceDelta newDelta)
+ {
+ final IResource activeRes = newDelta.getResource();
+ if (activeRes == null)
+ {
+ throw new NullPointerException();
+ }
+ for (final Map.Entry<IResource, MockResourceDelta> entry : _merged
+ .entrySet())
+ {
+ final IResource key = entry.getKey();
+ if (key == null)
+ {
+ throw new NullPointerException();
+ }
+ if (activeRes.equals(key.getParent()))
+ {
+ final MockResourceDelta value = entry.getValue();
+ addAllChildren(value);
+ MockResourceDelta mergeChild = null;
+ for (final MockResourceDelta checkChild : newDelta
+ .getChildDeltas())
+ {
+ if (value.getActiveResource().equals(
+ checkChild.getActiveResource()))
+ {
+ mergeChild = checkChild;
+ break;
+ }
+ }
+ if (mergeChild != null)
+ {
+ newDelta.getChildDeltas().remove(mergeChild);
+ newDelta.getChildDeltas().add(mergeChild.merge(value));
+ } else
+ {
+ newDelta.getChildDeltas().add(value);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockVirtualComponentQuery.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockVirtualComponentQuery.java
new file mode 100644
index 000000000..f37343987
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockVirtualComponentQuery.java
@@ -0,0 +1,27 @@
+package org.eclipse.jst.jsf.test.util.mock;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jst.jsf.common.internal.componentcore.AbstractVirtualComponentQuery;
+import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
+
+public class MockVirtualComponentQuery extends
+ AbstractVirtualComponentQuery
+{
+
+ private final IContainer _webContentFolder;
+
+ /**
+ * @param webContentFolder
+ */
+ public MockVirtualComponentQuery(final IContainer webContentFolder)
+ {
+ _webContentFolder = webContentFolder;
+ }
+
+ @Override
+ public IVirtualFolder getWebContentFolder(IProject project)
+ {
+ return new MockVirtualFolder(_webContentFolder);
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockVirtualFile.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockVirtualFile.java
new file mode 100644
index 000000000..4c7693124
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockVirtualFile.java
@@ -0,0 +1,161 @@
+package org.eclipse.jst.jsf.test.util.mock;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.componentcore.resources.IVirtualContainer;
+import org.eclipse.wst.common.componentcore.resources.IVirtualFile;
+
+public class MockVirtualFile implements IVirtualFile
+{
+ private IFile _realFile;
+
+ public MockVirtualFile(IFile realFile)
+ {
+ _realFile = realFile;
+ }
+
+ public void createLink(IPath aProjectRelativeLocation, int updateFlags,
+ IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void removeLink(IPath aProjectRelativeLocation, int updateFlags,
+ IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void delete(int updateFlags, IProgressMonitor monitor)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public boolean exists()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public String getFileExtension()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IPath getWorkspaceRelativePath()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IPath getProjectRelativePath()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IPath getRuntimePath()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public String getName()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IVirtualComponent getComponent()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IVirtualContainer getParent()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IProject getProject()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public int getType()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IResource getUnderlyingResource()
+ {
+ return getUnderlyingFile();
+ }
+
+ public IResource[] getUnderlyingResources()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public boolean isAccessible()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public String getResourceType()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void setResourceType(String aResourceType)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public boolean contains(ISchedulingRule rule)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public boolean isConflicting(ISchedulingRule rule)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ @SuppressWarnings("rawtypes")
+ public Object getAdapter(Class adapter)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IFile getUnderlyingFile()
+ {
+ return _realFile;
+ }
+
+ public IFile[] getUnderlyingFiles()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockVirtualFolder.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockVirtualFolder.java
new file mode 100644
index 000000000..89e4bed5f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockVirtualFolder.java
@@ -0,0 +1,253 @@
+package org.eclipse.jst.jsf.test.util.mock;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.componentcore.resources.IVirtualContainer;
+import org.eclipse.wst.common.componentcore.resources.IVirtualFile;
+import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
+import org.eclipse.wst.common.componentcore.resources.IVirtualResource;
+
+public class MockVirtualFolder implements IVirtualFolder
+{
+ private final IContainer _realFolder;
+
+ public MockVirtualFolder(final IContainer realFolder)
+ {
+ _realFolder = realFolder;
+ }
+
+ public void create(final int updateFlags, final IProgressMonitor aMonitor)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public boolean exists(final IPath path)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IVirtualResource findMember(final String name)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IVirtualResource findMember(final String name, final int searchFlags)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IVirtualResource findMember(final IPath path)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IVirtualResource findMember(final IPath path, final int searchFlags)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IVirtualFile getFile(final IPath path)
+ {
+ IFile file2 = _realFolder.getFile(path);
+ if (file2 != null)
+ {
+ return new MockVirtualFile(file2);
+ }
+ return null;
+ }
+
+ public IVirtualFolder getFolder(final IPath path)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IVirtualFile getFile(final String name)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IVirtualFolder getFolder(final String name)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IVirtualResource[] members() throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IVirtualResource[] members(final int memberFlags)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IVirtualResource[] getResources(final String aResourceType)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void createLink(final IPath aProjectRelativeLocation,
+ final int updateFlags, final IProgressMonitor monitor)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void removeLink(final IPath aProjectRelativeLocation,
+ final int updateFlags, final IProgressMonitor monitor)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void delete(final int updateFlags, final IProgressMonitor monitor)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public boolean exists()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public String getFileExtension()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IPath getWorkspaceRelativePath()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IPath getProjectRelativePath()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IPath getRuntimePath()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public String getName()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IVirtualComponent getComponent()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IVirtualContainer getParent()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IProject getProject()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public int getType()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IResource getUnderlyingResource()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IResource[] getUnderlyingResources()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public boolean isAccessible()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public String getResourceType()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void setResourceType(final String aResourceType)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public boolean contains(final ISchedulingRule rule)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public boolean isConflicting(final ISchedulingRule rule)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ @SuppressWarnings("rawtypes")
+ public Object getAdapter(final Class adapter)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IContainer getUnderlyingFolder()
+ {
+ return _realFolder;
+ }
+
+ public IContainer[] getUnderlyingFolders()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockWorkspace.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockWorkspace.java
new file mode 100644
index 000000000..5e65c7d3f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockWorkspace.java
@@ -0,0 +1,394 @@
+package org.eclipse.jst.jsf.test.util.mock;
+
+import java.io.InputStream;
+import java.net.URI;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import org.eclipse.core.resources.IBuildConfiguration;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFilterMatcherDescriptor;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IPathVariableManager;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IProjectNatureDescriptor;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceRuleFactory;
+import org.eclipse.core.resources.ISaveParticipant;
+import org.eclipse.core.resources.ISavedState;
+import org.eclipse.core.resources.ISynchronizer;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.ICoreRunnable;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+
+public class MockWorkspace implements IWorkspace
+{
+ private final CopyOnWriteArrayList<IResourceChangeListener> _changeListeners = new CopyOnWriteArrayList<IResourceChangeListener>();
+ private final MockWorkspaceRoot _root;
+
+ public MockWorkspace(final MockWorkspaceRoot root)
+ {
+ _root = root;
+ }
+ public void dispose()
+ {
+ _changeListeners.clear();
+ }
+
+ @SuppressWarnings("rawtypes")
+ public Object getAdapter(final Class adapter)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void addResourceChangeListener(final IResourceChangeListener listener)
+ {
+ _changeListeners.addIfAbsent(listener);
+ }
+
+ public void addResourceChangeListener(final IResourceChangeListener listener,
+ final int eventMask)
+ {
+ // TODO: ignore masks for now
+ _changeListeners.addIfAbsent(listener);
+ }
+
+ protected void fireResourceChangeEvent(final IResourceChangeEvent event)
+ {
+ for (final IResourceChangeListener listener : _changeListeners)
+ {
+ listener.resourceChanged(event);
+ }
+ }
+
+ public List<IResourceChangeListener> getListeners()
+ {
+ return Collections.unmodifiableList(_changeListeners);
+ }
+
+ public ISavedState addSaveParticipant(final Plugin plugin,
+ final ISaveParticipant participant) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public ISavedState addSaveParticipant(final String pluginId,
+ final ISaveParticipant participant) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void build(final int kind, final IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void build(IBuildConfiguration[] buildConfigs, int kind,
+ boolean buildReferences, IProgressMonitor monitor)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IBuildConfiguration newBuildConfig(String projectName,
+ String configName)
+ {
+ return null;
+ }
+
+ public void checkpoint(final boolean build)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IProject[][] computePrerequisiteOrder(final IProject[] projects)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public ProjectOrder computeProjectOrder(final IProject[] projects)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IStatus copy(final IResource[] resources, final IPath destination,
+ final boolean force, final IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IStatus copy(final IResource[] resources, final IPath destination,
+ final int updateFlags, final IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IStatus delete(final IResource[] resources, final boolean force,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IStatus delete(final IResource[] resources, final int updateFlags,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void deleteMarkers(final IMarker[] markers) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void forgetSavedTree(final String pluginId)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IFilterMatcherDescriptor[] getFilterMatcherDescriptors()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IFilterMatcherDescriptor getFilterMatcherDescriptor(
+ final String filterMatcherId)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IProjectNatureDescriptor[] getNatureDescriptors()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IProjectNatureDescriptor getNatureDescriptor(final String natureId)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ public Map getDanglingReferences()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IWorkspaceDescription getDescription()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IWorkspaceRoot getRoot()
+ {
+ return _root;
+ }
+
+ public IResourceRuleFactory getRuleFactory()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public ISynchronizer getSynchronizer()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public boolean isAutoBuilding()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isTreeLocked()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IProjectDescription loadProjectDescription(
+ final IPath projectDescriptionFile) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IProjectDescription loadProjectDescription(
+ final InputStream projectDescriptionFile) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IStatus move(final IResource[] resources, final IPath destination,
+ final boolean force, final IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IStatus move(final IResource[] resources, final IPath destination,
+ final int updateFlags, final IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IProjectDescription newProjectDescription(final String projectName)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void removeResourceChangeListener(final IResourceChangeListener listener)
+ {
+ _changeListeners.remove(listener);
+ }
+
+ public void removeSaveParticipant(final Plugin plugin)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void removeSaveParticipant(final String pluginId)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void run(final IWorkspaceRunnable action, final ISchedulingRule rule, final int flags,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void run(final IWorkspaceRunnable action, final IProgressMonitor monitor)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void run(ICoreRunnable action, ISchedulingRule rule, int flags, IProgressMonitor monitor)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void run(ICoreRunnable action, IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IStatus save(final boolean full, final IProgressMonitor monitor)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void setDescription(final IWorkspaceDescription description)
+ throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public String[] sortNatureSet(final String[] natureIds)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IStatus validateEdit(final IFile[] files, final Object context)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IStatus validateFiltered(final IResource resource)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IStatus validateLinkLocation(final IResource resource, final IPath location)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IStatus validateLinkLocationURI(final IResource resource, final URI location)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IStatus validateName(final String segment, final int typeMask)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IStatus validateNatureSet(final String[] natureIds)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IStatus validatePath(final String path, final int typeMask)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IStatus validateProjectLocation(final IProject project, final IPath location)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IStatus validateProjectLocationURI(final IProject project, final URI location)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IPathVariableManager getPathVariableManager()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockWorkspaceContext.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockWorkspaceContext.java
new file mode 100644
index 000000000..6427309e5
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockWorkspaceContext.java
@@ -0,0 +1,619 @@
+package org.eclipse.jst.jsf.test.util.mock;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertTrue;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+import java.util.zip.ZipInputStream;
+
+import junit.framework.Assert;
+
+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.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jst.jsf.test.util.ZipStreamWrapper;
+import org.osgi.framework.Bundle;
+
+/**
+ * A test context that can be used to construct a number of MockResources that
+ * are associated with a mocked workspace/project hierarchy
+ *
+ * @author cbateman
+ *
+ */
+public class MockWorkspaceContext implements IWorkspaceContextWithEvents
+{
+ private final MockWorkspace _ws;
+ private final Map<IPath, MockResource> _ownedResources;
+
+ public MockWorkspaceContext(final MockWorkspace ws)
+ {
+ _ws = ws;
+ _ownedResources = new HashMap<IPath, MockResource>();
+ ((MockWorkspaceRoot) ws.getRoot()).setContext(this);
+ }
+
+ public MockWorkspaceContext()
+ {
+ this(new MockWorkspace(new MockWorkspaceRoot()));
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jst.jsf.test.util.mock.IWorkspaceContext#fireWorkspaceEvent
+ * (org.eclipse.core.resources.IResourceChangeEvent)
+ */
+ public void fireWorkspaceEvent(final IResourceChangeEvent event)
+ {
+ _ws.fireResourceChangeEvent(event);
+ }
+
+ public void init() throws Exception
+ {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.jsf.test.util.mock.IWorkspaceContext#dispose()
+ */
+ public void dispose() throws Exception
+ {
+ for (final Map.Entry<IPath, MockResource> entry : _ownedResources
+ .entrySet())
+ {
+ entry.getValue().dispose();
+ }
+ _ownedResources.clear();
+ _ws.dispose();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jst.jsf.test.util.mock.IWorkspaceContext#getWorkspace()
+ */
+ public MockWorkspace getWorkspace()
+ {
+ return _ws;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jst.jsf.test.util.mock.IWorkspaceContext#getResource(org.
+ * eclipse.core.runtime.IPath)
+ */
+ public IResource getResource(final IPath path)
+ {
+ return _ownedResources.get(path);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jst.jsf.test.util.mock.IWorkspaceContext#getFile(org.eclipse
+ * .core.runtime.IPath)
+ */
+ public IFile getFile(final IPath path)
+ {
+ return (MockFile) getResource(path);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jst.jsf.test.util.mock.IWorkspaceContext#getProject(org.eclipse
+ * .core.runtime.IPath)
+ */
+ public IProject getProject(final IPath path)
+ {
+ return (MockProject) _ownedResources.get(path);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jst.jsf.test.util.mock.IWorkspaceContext#createProject(org
+ * .eclipse.core.runtime.IPath, boolean)
+ */
+ private IProject createProject(final IPath path, final boolean replace)
+ {
+ final MockProject project = new MockProject(path,
+ new MyMockResourceFactoryFromZipFile());
+ attachProject(project, replace);
+ return project;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jst.jsf.test.util.mock.IWorkspaceContext#createProject(java
+ * .lang.String)
+ */
+ public IProject createProject(final String baseId)
+ {
+ int i = 0;
+ while (_ownedResources.get(generateName(baseId, i)) != null)
+ {
+ // keep looping until we get baseId_i that doesn't exist
+ i++;
+ }
+ return createProject(generateName(baseId, i), false);
+ }
+
+ private Path generateName(final String baseId, final int i)
+ {
+ return new Path(baseId + "_TestProject_" + i);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jst.jsf.test.util.mock.IWorkspaceContext#createProject(org
+ * .eclipse.core.runtime.IPath)
+ */
+ public IProject createProject(final IPath path)
+ {
+ return createProject(path, false);
+ }
+
+ private void attachProject(final IProject project, final boolean replace)
+ {
+ checkExists(project.getFullPath(), replace);
+ ((MockProject) project).setWorkspace(_ws);
+ _ownedResources.put(project.getFullPath(), (MockProject) project);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jst.jsf.test.util.mock.IWorkspaceContext#loadProject(org.
+ * eclipse.core.runtime.IPath, org.eclipse.jst.jsf.test.util.mock.
+ * IWorkspaceContext.ZipFileLoader)
+ */
+ public IProject loadProject(final IPath path,
+ final ZipFileLoader zipFileLoader) throws Exception
+ {
+ checkExists(path, false);
+ final MockProject project = new MockProject(path,
+ new MyMockResourceFactoryFromZipFile(
+ zipFileLoader.getZipFile(),
+ zipFileLoader.getPathInZip()));
+ attachProject(project, false);
+ return project;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jst.jsf.test.util.mock.IWorkspaceContext#loadProject(
+ * org.eclipse.core.runtime.IPath, org.osgi.framework.Bundle,
+ * java.lang.String)
+ */
+ public IProject loadProject(IPath path, Bundle bundle, String pathIntoZip) throws Exception {
+ checkExists(path, false);
+ final MockProject project = new MockProject(path,
+ new MyMockResourceFactoryFromBundle(bundle, pathIntoZip));
+ attachProject(project, false);
+ return project;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jst.jsf.test.util.mock.IWorkspaceContext#attachFile(org.eclipse
+ * .jst.jsf.test.util.mock.MockProject, org.eclipse.core.runtime.IPath,
+ * java.io.File)
+ */
+ public MockFile attachFile(final IProject project, final IPath projectRelativePath,
+ final File file)
+ {
+ assertEquals(checkExists(project.getFullPath(), true), project);
+ // throw an exception if projectRelativePath already exists
+ checkExists(project.getFullPath().append(projectRelativePath), false);
+ assertTrue(file.exists());
+ final MockFile iFile = (MockFile) project.getFile(projectRelativePath);
+ InputStream inStream = null;
+ try
+ {
+ inStream = new FileInputStream(file);
+ iFile.setContents(inStream, 0, null);
+ return iFile;
+ } catch (final IOException e)
+ {
+ throw new RuntimeException(e);
+ } catch (final CoreException e)
+ {
+ throw new RuntimeException(e);
+ } finally
+ {
+ if (inStream != null)
+ {
+ try
+ {
+ inStream.close();
+ } catch (final IOException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+ }
+ }
+
+ private MockResource checkExists(final IPath path, final boolean replace)
+ {
+ final MockResource resource = _ownedResources.get(path);
+ if (resource != null && !replace)
+ {
+ throw new IllegalArgumentException(path.toString()
+ + " already exists");
+ }
+ return resource;
+ }
+
+ private abstract class AbstractMockResourceFactory implements IMockResourceFactory
+ {
+
+ public MockFolder createFolder(final MockContainer container,
+ final IPath path)
+ {
+ final IPath newFileFullPath = container.getFullPath().append(path);
+ MockResource resource = checkExists(newFileFullPath, true);
+ if (resource == null)
+ {
+ resource = newFolder(container, newFileFullPath);
+ ensurePathToNewResource(container, path);
+ }
+ return (MockFolder) resource;
+ }
+
+ protected void ensurePathToNewResource(final MockContainer container,
+ final IPath path)
+ {
+ // add any intervening MockContainers for the folders
+ // under container where the file lives
+ IPath leadingPath = path.removeLastSegments(1);
+ IPath curPath = container.getFullPath();
+ while (leadingPath.segmentCount() > 0)
+ {
+ final String nextSegment = leadingPath.segments()[0];
+ curPath = curPath.append(nextSegment);
+ leadingPath = leadingPath.removeFirstSegments(1);
+ final MockResource newContainer = checkExists(curPath, true);
+ if (newContainer == null)
+ {
+ newFolder(container, curPath);
+ }
+ }
+ }
+
+ protected MockResource newFolder(final MockContainer container, final IPath curPath)
+ {
+ MockResource newContainer;
+ newContainer = new MockFolder(curPath, this);
+ newContainer.setWorkspace(_ws);
+ newContainer.setProject(container.getProject());
+ _ownedResources.put(curPath, newContainer);
+ return newContainer;
+ }
+
+ public List<MockResource> getCurrentMembers(
+ final MockContainer container)
+ {
+ final List<MockResource> members = new ArrayList<MockResource>();
+ final IPath containerPath = container.getFullPath();
+ for (final IPath path : _ownedResources.keySet())
+ {
+ // path is a member of container if container's path is
+ // a prefix of path and path has only one extra segment
+ if (containerPath.isPrefixOf(path)
+ && path.segmentCount() == containerPath.segmentCount() + 1)
+ {
+ members.add(_ownedResources.get(path));
+ }
+ }
+ return members;
+ }
+
+ public MockFile createFile(final MockContainer container,
+ final IPath path) throws Exception
+ {
+ return createFile(container, path, null);
+ }
+
+ protected MockFile createFile(final MockContainer container,
+ final IPath path, final InputStream contents) throws Exception
+ {
+ final IPath newFileFullPath = container.getFullPath().append(path);
+ MockResource resource = checkExists(newFileFullPath, true);
+ if (resource == null)
+ {
+ resource = new MockFile(newFileFullPath);
+ resource.setWorkspace(getWorkspace());
+ resource.setProject(container.getProject());
+ if (contents != null)
+ {
+ ((MockFile) resource).setContents(contents, false, true, new NullProgressMonitor());
+ } else
+ {
+ setContents((MockFile) resource, path);
+ }
+ ensurePathToNewResource(container, path);
+ _ownedResources.put(newFileFullPath, resource);
+ }
+
+ return (MockFile) resource;
+ }
+
+ protected abstract void setContents(final MockFile file, final IPath path) throws Exception;
+ }
+
+ private class MyMockResourceFactoryFromZipFile extends AbstractMockResourceFactory
+ {
+ private final ZipFile _zip;
+ private final String _pathIntoZip;
+
+ public MyMockResourceFactoryFromZipFile()
+ {
+ _zip = null;
+ _pathIntoZip = "";
+ }
+
+ public MyMockResourceFactoryFromZipFile(final ZipFile zip, final String pathIntoZip)
+ {
+ _zip = zip;
+ _pathIntoZip = pathIntoZip;
+ }
+
+ public void dispose() throws Exception
+ {
+ if (_zip != null)
+ {
+ _zip.close();
+ }
+ }
+
+ @Override
+ protected void setContents(MockFile file, IPath path) throws Exception {
+ if (_zip != null)
+ {
+ final ZipEntry entry = _zip.getEntry(_pathIntoZip
+ + path.toString());
+ if (entry != null)
+ {
+ final InputStream inputStream = _zip
+ .getInputStream(entry);
+ if (inputStream != null)
+ {
+ file.setContents(inputStream, false,
+ true, new NullProgressMonitor());
+ }
+ }
+ }
+ }
+
+ public void forceLoad(final MockProject project) throws Exception
+ {
+ final Enumeration<? extends ZipEntry> entries = _zip.entries();
+ while (entries.hasMoreElements())
+ {
+ final ZipEntry entry = entries.nextElement();
+ String name = entry.getName();
+ final int removeIdx = name.indexOf(_pathIntoZip);
+ if (removeIdx > -1)
+ {
+ name = name.substring(_pathIntoZip.length());
+ if (entry.isDirectory())
+ {
+ if (name.endsWith("/"))
+ {
+ name = name.substring(0, name.length() - 1);
+ }
+
+ if (name.length() > 0)
+ {
+ createFolder(project, new Path(name));
+ }
+ } else
+ {
+ createFile(project, new Path(name));
+ }
+ }
+ }
+ }
+ }
+
+ private class MyMockResourceFactoryFromBundle extends AbstractMockResourceFactory
+ {
+ private final URL _zipURL;
+ private final String _pathIntoZip;
+
+ public MyMockResourceFactoryFromBundle(Bundle bundle, String pathIntoZip)
+ {
+ _zipURL = FileLocator.find(bundle, new Path(pathIntoZip), null);
+ Assert.assertNotNull(_zipURL);
+ _pathIntoZip = getPrefix();
+ }
+
+ public void dispose() throws Exception
+ {
+ }
+
+ private String getPrefix()
+ {
+ ZipInputStream zis = null;
+ try
+ {
+ zis = new ZipInputStream(_zipURL.openStream());
+ ZipEntry entry = zis.getNextEntry();
+ while (entry != null)
+ {
+ String name = entry.getName();
+ if (name != null && name.endsWith(".project")
+ && !entry.isDirectory())
+ {
+ int index = name.lastIndexOf(".project");
+ return name.substring(0, index);
+ }
+ entry = zis.getNextEntry();
+ }
+ } catch (IOException e)
+ {
+ Assert.fail("Problem with zip file: " + _zipURL.toString());
+ } finally
+ {
+ try
+ {
+ if (zis != null)
+ zis.close();
+ } catch (Exception ex)
+ {
+ // ignore
+ }
+ }
+
+ // if we get to here, then nothing to prepend
+ return "";
+ }
+
+ @Override
+ protected void setContents(final MockFile file, final IPath path) throws Exception
+ {
+ ZipInputStream zis = null;
+ try
+ {
+ zis = new ZipInputStream(_zipURL.openStream());
+ ZipEntry entry = zis.getNextEntry();
+ while (entry != null)
+ {
+ String name = entry.getName();
+ final int index = name.indexOf(_pathIntoZip
+ + path.toString());
+ if (index > -1)
+ {
+ name = name.substring(_pathIntoZip.length());
+ if (!entry.isDirectory())
+ {
+ file.setContents(new ZipStreamWrapper(zis),
+ false, true, new NullProgressMonitor());
+ return;
+ }
+ }
+ entry = zis.getNextEntry();
+ }
+ } finally
+ {
+ try
+ {
+ if (zis != null)
+ zis.close();
+ } catch (Exception ex)
+ {
+ // ignore
+ }
+ }
+ }
+
+ public void forceLoad(final MockProject project) throws Exception
+ {
+ ZipInputStream zis = null;
+ try
+ {
+ zis = new ZipInputStream(_zipURL.openStream());
+ ZipEntry entry = zis.getNextEntry();
+ while (entry != null)
+ {
+ String name = entry.getName();
+ final int removeIdx = name.indexOf(_pathIntoZip);
+ if (removeIdx > -1)
+ {
+ name = name.substring(_pathIntoZip.length());
+ if (entry.isDirectory())
+ {
+ if (name.endsWith("/"))
+ {
+ name = name.substring(0, name.length() - 1);
+ }
+
+ if (name.length() > 0)
+ {
+ createFolder(project, new Path(name));
+ }
+ } else
+ {
+ createFile(project, new Path(name), new ZipStreamWrapper(zis));
+ }
+ }
+ entry = zis.getNextEntry();
+ }
+ } finally
+ {
+ try
+ {
+ if (zis != null)
+ zis.close();
+ } catch (Exception ex)
+ {
+ // ignore
+ }
+ }
+ }
+ }
+
+ public List<IResourceChangeListener> getListeners()
+ {
+ return getWorkspace().getListeners();
+ }
+
+ public List<IResourceChangeListener> getListeners(final List<Class<? extends IResourceChangeListener>> includeListeners)
+ {
+ final List<IResourceChangeListener> listeners = new ArrayList<IResourceChangeListener>();
+ for (final IResourceChangeListener listener : getListeners())
+ {
+ SEARCH_CLASSES: for (final Class<? extends IResourceChangeListener> clazz : includeListeners)
+ {
+ if (clazz.isAssignableFrom(listener.getClass()))
+ {
+ listeners.add(listener);
+ break SEARCH_CLASSES;
+ }
+ }
+ }
+ return listeners;
+ }
+
+ public void ensureAllMembers(final IProject project) throws Exception
+ {
+ ((MockProject) project).loadAllMembers();
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockWorkspaceMediator.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockWorkspaceMediator.java
new file mode 100644
index 000000000..e12164db5
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockWorkspaceMediator.java
@@ -0,0 +1,22 @@
+package org.eclipse.jst.jsf.test.util.mock;
+
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jst.jsf.common.internal.resource.WorkspaceMediator;
+
+public class MockWorkspaceMediator extends WorkspaceMediator
+{
+
+ @Override
+ public void runInWorkspaceJob(IWorkspaceRunnable runnable, String name)
+ {
+ try
+ {
+ runnable.run(new NullProgressMonitor());
+ } catch (CoreException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockWorkspaceRoot.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockWorkspaceRoot.java
new file mode 100644
index 000000000..136515b6a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/MockWorkspaceRoot.java
@@ -0,0 +1,128 @@
+package org.eclipse.jst.jsf.test.util.mock;
+
+import java.net.URI;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+public class MockWorkspaceRoot extends MockContainer implements IWorkspaceRoot
+{
+ private MockWorkspaceContext _wsContext;
+
+ public MockWorkspaceRoot()
+ {
+ super(IResource.ROOT, new Path(""), null);
+ }
+
+ public void setContext(MockWorkspaceContext context)
+ {
+ _wsContext = context;
+ }
+
+ public void delete(final boolean deleteContent, final boolean force,
+ final IProgressMonitor monitor) throws CoreException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IContainer[] findContainersForLocation(final IPath location)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IContainer[] findContainersForLocationURI(final URI location)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IContainer[] findContainersForLocationURI(final URI location,
+ final int memberFlags)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IFile[] findFilesForLocation(final IPath location)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IFile[] findFilesForLocationURI(final URI location)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IFile[] findFilesForLocationURI(final URI location, final int memberFlags)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IContainer getContainerForLocation(final IPath location)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IFile getFileForLocation(final IPath location)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IProject getProject(final String name)
+ {
+ return _wsContext.getProject(new Path(name));
+ }
+
+ public IProject[] getProjects()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IProject[] getProjects(final int memberFlags)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ @Override
+ public IProject getProject()
+ {
+ return null;
+ }
+
+ @Override
+ public IContainer getParent()
+ {
+ return null;
+ }
+
+ @Override
+ public IFile getFile(IPath path)
+ {
+ if (path == null || path.segmentCount() == 0)
+ {
+ throw new IllegalArgumentException();
+ }
+ IProject project = getProject(path.segment(0));
+ if (project != null)
+ {
+ return project.getFile(path.removeFirstSegments(1));
+ }
+ return null;
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/TestMockWorkspaceContext.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/TestMockWorkspaceContext.java
new file mode 100644
index 000000000..d13e95ffc
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/TestMockWorkspaceContext.java
@@ -0,0 +1,165 @@
+package org.eclipse.jst.jsf.test.util.mock;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.InputStream;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jst.jsf.test.util.JSFTestUtil;
+import org.eclipse.jst.jsf.test.util.junit4.TestDataBaseLocation;
+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.IWorkspaceContext.ZipFileLoader;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(WorkspaceRunner.class)
+public class TestMockWorkspaceContext
+{
+ @WorkspaceContext
+ private IWorkspaceContext _wsContext;
+ @TestDataBaseLocation
+ private File _baseLoc;
+ private ZipFileLoader _testZipFileLoader;
+
+ @Before
+ public void setUp() throws Exception
+ {
+ System.out.println(_baseLoc);
+ IPath path = new Path(_baseLoc.getAbsolutePath());
+ path = path.append("/data/TestProject.zip");
+ final File file = path.toFile();
+ assertTrue(file.exists());
+ _testZipFileLoader = new FileSystemZipLoader(file, "TestProject/");
+ }
+
+// @Test
+// public void testFireWorkspaceEvent()
+// {
+// // TODO:
+// _wsContext.fireWorkspaceEvent(null);
+// }
+
+ @Test
+ public void testDispose() throws Exception
+ {
+ _wsContext.dispose();
+ }
+
+ @Test
+ public void testGetWorkspace()
+ {
+ final IWorkspace workspace = _wsContext.getWorkspace();
+ assertNotNull(workspace);
+ assertSame(workspace, _wsContext.getWorkspace());
+ }
+
+ @Test
+ public void testGetProject() throws Exception
+ {
+ final IPath path = new Path("TestProject");
+ IProject project = _wsContext.getProject(path);
+ assertNull(project);
+ // now load the resource
+ project = _wsContext.loadProject(path, _testZipFileLoader);
+ assertNotNull(project);
+ }
+
+ @Test
+ public void testGetResource() throws Exception
+ {
+ final IPath projPath = new Path("TestProject");
+ // if we haven't done anything special, then this res shouldn't exist.
+ final IPath path = new Path("/WebContent/test.xhtml");
+ final IPath fullPath = projPath.append(path);
+ IResource resource = _wsContext.getResource(path);
+ assertNull(resource);
+ // now load the resource; still won't have the resource until it is
+ // requested.
+ final IProject project = _wsContext.loadProject(projPath,
+ _testZipFileLoader);
+ assertNotNull(project);
+
+ // TODO: only true for non-plugin
+ // resource = _wsContext.getResource(fullPath);
+// assertNull(resource);
+ // now request the resource through the project interface. This should
+ // cause it to be known by the context.
+ final IFile file = project.getFile(path);
+ assertNotNull(file);
+ assertEquals(file, _wsContext.getResource(fullPath));
+ }
+
+ @Test
+ public void testGetFile() throws Exception
+ {
+ final IPath projPath = new Path("TestProject");
+ // if we haven't done anything special, then this res shouldn't exist.
+ final IPath path = new Path("/WebContent/test.xhtml");
+ final IPath fullPath = projPath.append(path);
+ IFile file = _wsContext.getFile(path);
+ assertNull(file);
+ // now load the resource; still won't have the resource until it is
+ // requested.
+ final IProject project = _wsContext.loadProject(projPath,
+ _testZipFileLoader);
+ assertNotNull(project);
+ // TODO:
+// file = _wsContext.getFile(fullPath);
+// assertNull(file);
+ // now request the resource through the project interface. This should
+ // cause it to be known by the context.
+ final IFile fileFromProject = project.getFile(path);
+ assertNotNull(fileFromProject);
+ assertEquals(fileFromProject, _wsContext.getFile(fullPath));
+ }
+
+ @Test
+ public void testCreateProjectString()
+ {
+ final IProject project = _wsContext.createProject("Foo");
+ assertNotNull(project);
+ final IProject project2 = _wsContext.createProject("Foo");
+ assertNotNull(project2);
+ // two projects created with the same baseId should have unique
+ // paths as taken care off by the context.
+ assertFalse(project.equals(project2));
+ }
+
+ @Test
+ public void testCreateProjectIPath()
+ {
+ final IProject project = _wsContext.createProject(new Path("Foo"));
+ assertNotNull(project);
+ assertEquals("Foo", project.getName());
+ }
+
+ @Test
+ public void testLoadProjectIPathZipFile() throws Exception
+ {
+ final IProject project = _wsContext.loadProject(
+ new Path("TestProject1"), _testZipFileLoader);
+ assertNotNull(project);
+ assertTrue(project.exists());
+ final IFile file = project.getFile(new Path("WebContent/test.xhtml"));
+ assertNotNull(file);
+ assertTrue(file.exists());
+ final InputStream contents = file.getContents();
+ final ByteArrayOutputStream data = JSFTestUtil
+ .loadFromInputStream(contents);
+ assertEquals(367, data.toByteArray().length);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockClasspathEntry.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockClasspathEntry.java
new file mode 100644
index 000000000..8c916a540
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockClasspathEntry.java
@@ -0,0 +1,328 @@
+package org.eclipse.jst.jsf.test.util.mock.java;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jdt.core.IAccessRule;
+import org.eclipse.jdt.core.IClasspathAttribute;
+import org.eclipse.jdt.core.IClasspathEntry;
+
+public class MockClasspathEntry implements IClasspathEntry
+{
+ private final int _entryKind;
+ private final IPath _path;
+
+ public MockClasspathEntry(final int entryKind, final IPath path)
+ {
+ _entryKind = entryKind;
+ _path = path;
+ switch (entryKind)
+ {
+ case IClasspathEntry.CPE_CONTAINER:
+ case IClasspathEntry.CPE_LIBRARY:
+ case IClasspathEntry.CPE_PROJECT:
+ case IClasspathEntry.CPE_SOURCE:
+ case IClasspathEntry.CPE_VARIABLE:
+ // do nothing
+ break;
+ default:
+ throw new IllegalArgumentException("entryKind must be valid: "
+ + _entryKind);
+ }
+ }
+
+ public boolean combineAccessRules()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IAccessRule[] getAccessRules()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public int getContentKind()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public int getEntryKind()
+ {
+ return _entryKind;
+ }
+
+ public IPath[] getExclusionPatterns()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IClasspathAttribute[] getExtraAttributes()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IPath[] getInclusionPatterns()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IPath getOutputLocation()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IPath getPath()
+ {
+ return _path;
+ }
+
+ public IPath getSourceAttachmentPath()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IPath getSourceAttachmentRootPath()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IClasspathEntry getReferencingEntry()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isExported()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IClasspathEntry getResolvedEntry()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public String toString()
+ {
+ final StringBuffer buffer = new StringBuffer();
+ buffer.append(getPath());
+ buffer.append('[');
+ switch (getEntryKind())
+ {
+ case IClasspathEntry.CPE_LIBRARY:
+ buffer.append("CPE_LIBRARY"); //$NON-NLS-1$
+ break;
+ case IClasspathEntry.CPE_PROJECT:
+ buffer.append("CPE_PROJECT"); //$NON-NLS-1$
+ break;
+ case IClasspathEntry.CPE_SOURCE:
+ buffer.append("CPE_SOURCE"); //$NON-NLS-1$
+ break;
+ case IClasspathEntry.CPE_VARIABLE:
+ buffer.append("CPE_VARIABLE"); //$NON-NLS-1$
+ break;
+ case IClasspathEntry.CPE_CONTAINER:
+ buffer.append("CPE_CONTAINER"); //$NON-NLS-1$
+ break;
+ }
+ buffer.append("]"); //$NON-NLS-1$
+ // switch (getContentKind())
+ // {
+ // case IPackageFragmentRoot.K_BINARY:
+ // buffer.append("K_BINARY"); //$NON-NLS-1$
+ // break;
+ // case IPackageFragmentRoot.K_SOURCE:
+ // buffer.append("K_SOURCE"); //$NON-NLS-1$
+ // break;
+ // case ClasspathEntry.K_OUTPUT:
+ // buffer.append("K_OUTPUT"); //$NON-NLS-1$
+ // break;
+ // }
+ // buffer.append(']');
+ // if (getSourceAttachmentPath() != null)
+ // {
+ // buffer.append("[sourcePath:"); //$NON-NLS-1$
+ // buffer.append(getSourceAttachmentPath());
+ // buffer.append(']');
+ // }
+ // if (getSourceAttachmentRootPath() != null)
+ // {
+ // buffer.append("[rootPath:"); //$NON-NLS-1$
+ // buffer.append(getSourceAttachmentRootPath());
+ // buffer.append(']');
+ // }
+ // buffer.append("[isExported:"); //$NON-NLS-1$
+ // buffer.append(this.isExported);
+ // buffer.append(']');
+ // IPath[] patterns = this.inclusionPatterns;
+ // int length;
+ // if ((length = patterns == null ? 0 : patterns.length) > 0)
+ // {
+ // buffer.append("[including:"); //$NON-NLS-1$
+ // for (int i = 0; i < length; i++)
+ // {
+ // buffer.append(patterns[i]);
+ // if (i != length - 1)
+ // {
+ // buffer.append('|');
+ // }
+ // }
+ // buffer.append(']');
+ // }
+ // patterns = this.exclusionPatterns;
+ // if ((length = patterns == null ? 0 : patterns.length) > 0)
+ // {
+ // buffer.append("[excluding:"); //$NON-NLS-1$
+ // for (int i = 0; i < length; i++)
+ // {
+ // buffer.append(patterns[i]);
+ // if (i != length - 1)
+ // {
+ // buffer.append('|');
+ // }
+ // }
+ // buffer.append(']');
+ // }
+ // if (this.accessRuleSet != null)
+ // {
+ // buffer.append('[');
+ // buffer.append(this.accessRuleSet.toString(false/* on one line */));
+ // buffer.append(']');
+ // }
+ // if (this.entryKind == CPE_PROJECT)
+ // {
+ // buffer.append("[combine access rules:"); //$NON-NLS-1$
+ // buffer.append(this.combineAccessRules);
+ // buffer.append(']');
+ // }
+ // if (getOutputLocation() != null)
+ // {
+ // buffer.append("[output:"); //$NON-NLS-1$
+ // buffer.append(getOutputLocation());
+ // buffer.append(']');
+ // }
+ // if ((length = this.extraAttributes == null ? 0
+ // : this.extraAttributes.length) > 0)
+ // {
+ // buffer.append("[attributes:"); //$NON-NLS-1$
+ // for (int i = 0; i < length; i++)
+ // {
+ // buffer.append(this.extraAttributes[i]);
+ // if (i != length - 1)
+ // {
+ // buffer.append(',');
+ // }
+ // }
+ // buffer.append(']');
+ // }
+ return buffer.toString();
+ }
+
+ /**
+ * Returns true if the given object is a classpath entry with equivalent
+ * attributes.
+ */
+ @Override
+ public boolean equals(final Object object)
+ {
+ if (this == object)
+ {
+ return true;
+ }
+ if (object instanceof MockClasspathEntry)
+ {
+ final MockClasspathEntry otherEntry = (MockClasspathEntry) object;
+ // if (this.contentKind != otherEntry.getContentKind())
+ // {
+ // return false;
+ // }
+ if (this._entryKind != otherEntry.getEntryKind())
+ {
+ return false;
+ }
+ // if (this.isExported != otherEntry.isExported())
+ // {
+ // return false;
+ // }
+ if (!this._path.equals(otherEntry.getPath()))
+ {
+ return false;
+ }
+ // IPath otherPath = otherEntry.getSourceAttachmentPath();
+ // if (this.sourceAttachmentPath == null) {
+ // if (otherPath != null)
+ // {
+ // return false;
+ // }
+ // } else {
+ // if (!this.sourceAttachmentPath.equals(otherPath))
+ // {
+ // return false;
+ // }
+ // }
+ //
+ // otherPath = otherEntry.getSourceAttachmentRootPath();
+ // if (this.sourceAttachmentRootPath == null) {
+ // if (otherPath != null)
+ // {
+ // return false;
+ // }
+ // } else {
+ // if (!this.sourceAttachmentRootPath.equals(otherPath))
+ // {
+ // return false;
+ // }
+ // }
+ //
+ // if (!equalPatterns(this.inclusionPatterns,
+ // otherEntry.getInclusionPatterns()))
+ // {
+ // return false;
+ // }
+ // if (!equalPatterns(this.exclusionPatterns,
+ // otherEntry.getExclusionPatterns()))
+ // {
+ // return false;
+ // }
+ // final AccessRuleSet otherRuleSet = otherEntry.getAccessRuleSet();
+ // if (getAccessRuleSet() != null) {
+ // if (!getAccessRuleSet().equals(otherRuleSet))
+ // {
+ // return false;
+ // }
+ // } else if (otherRuleSet != null)
+ // {
+ // return false;
+ // }
+ // if (this.combineAccessRules != otherEntry.combineAccessRules())
+ // {
+ // return false;
+ // }
+ // otherPath = otherEntry.getOutputLocation();
+ // if (this.specificOutputLocation == null) {
+ // if (otherPath != null)
+ // {
+ // return false;
+ // }
+ // } else {
+ // if (!this.specificOutputLocation.equals(otherPath))
+ // {
+ // return false;
+ // }
+ // }
+ // if (!equalAttributes(this.extraAttributes,
+ // otherEntry.getExtraAttributes()))
+ // {
+ // return false;
+ // }
+ return true;
+ } else
+ {
+ return false;
+ }
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return _path.hashCode();
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockJDTWorkspaceContext.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockJDTWorkspaceContext.java
new file mode 100644
index 000000000..5159b8ce1
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockJDTWorkspaceContext.java
@@ -0,0 +1,142 @@
+package org.eclipse.jst.jsf.test.util.mock.java;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceVisitor;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.core.ElementChangedEvent;
+import org.eclipse.jdt.core.IElementChangedListener;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jst.jsf.test.util.mock.IWorkspaceContext;
+import org.eclipse.jst.jsf.test.util.mock.MockFile;
+import org.eclipse.jst.jsf.test.util.mock.MockProject;
+
+public class MockJDTWorkspaceContext
+{
+ private final IWorkspaceContext _wsContext;
+ private final Map<IProject, List<IPackageFragmentRoot>> _cpEntriesByProject;
+ private final CopyOnWriteArrayList<IElementChangedListener> _listeners = new CopyOnWriteArrayList<IElementChangedListener>();
+
+ public MockJDTWorkspaceContext(final IWorkspaceContext wsContext)
+ {
+ _wsContext = wsContext;
+ _cpEntriesByProject = new HashMap<IProject, List<IPackageFragmentRoot>>();
+ }
+
+ @SuppressWarnings("unchecked")
+ public MockJavaProject createJavaProject(final IProject project)
+ {
+ List<IPackageFragmentRoot> cpEntries = _cpEntriesByProject.get(project);
+ return new MockJavaProject(project,
+ cpEntries != null ? Collections.unmodifiableList(cpEntries)
+ : Collections.EMPTY_LIST);
+ }
+
+ /**
+ * Initializes this context with mock cp entry information for the provider
+ * project based on the contents of the project (i.e. jar files).
+ *
+ * @param project
+ * @throws CoreException
+ */
+ public void loadCPEntriesFromProject(final IProject project)
+ throws CoreException
+ {
+ project.accept(new IResourceVisitor()
+ {
+ public boolean visit(final IResource resource) throws CoreException
+ {
+ if (resource.getType() == IResource.FILE
+ && "jar".equals(resource.getFullPath()
+ .getFileExtension()))
+ {
+ createAndAddPackageFragmentRoot((MockProject) project,
+ ((MockFile) resource).getLocation());
+ }
+ return true;
+ }
+ });
+ }
+
+ /**
+ * @param project
+ * @param projectRelativePath
+ * @param file
+ * @return a new mock classpath entry. This entry will automatically be
+ * added to project as a file and to any MockJavaProject created
+ * through this context for project.
+ * @throws Exception
+ */
+ public IPackageFragmentRoot createCPELibraryInProject(
+ final IProject project, final IPath projectRelativePath,
+ final File file)
+ {
+ try
+ {
+ _wsContext.attachFile(project, projectRelativePath, file);
+ return createAndAddPackageFragmentRoot(project,
+ new Path(file.getAbsolutePath()));
+ } catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ private IPackageFragmentRoot createAndAddPackageFragmentRoot(
+ final IProject project, final IPath absPathToRoot)
+ {
+ final IJavaProject javaProject = createJavaProject(project);
+ final IPackageFragmentRoot fragRoot = new MockPackageFragmentRoot(
+ javaProject, absPathToRoot);
+ addCPEntry(project, fragRoot);
+ return fragRoot;
+ }
+
+ private void addCPEntry(final IProject project,
+ final IPackageFragmentRoot packageRoot)
+ {
+ List<IPackageFragmentRoot> entriesForProject = _cpEntriesByProject
+ .get(project);
+ if (entriesForProject == null)
+ {
+ entriesForProject = new ArrayList<IPackageFragmentRoot>();
+ _cpEntriesByProject.put(project, entriesForProject);
+ }
+ entriesForProject.add(packageRoot);
+ }
+
+ public void addElementChangedListener(IElementChangedListener listener)
+ {
+ _listeners.addIfAbsent(listener);
+ }
+
+ public void removeElementChangedListener(IElementChangedListener listener)
+ {
+ _listeners.remove(listener);
+ }
+
+ public void fireElementChangedEvent(final ElementChangedEvent event)
+ {
+ for (final IElementChangedListener listener : _listeners)
+ {
+ listener.elementChanged(event);
+ }
+ }
+
+ public Collection<IElementChangedListener> getListeners()
+ {
+ return Collections.unmodifiableList(_listeners);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockJavaChangeEventFactory.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockJavaChangeEventFactory.java
new file mode 100644
index 000000000..3aa2e30e9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockJavaChangeEventFactory.java
@@ -0,0 +1,46 @@
+package org.eclipse.jst.jsf.test.util.mock.java;
+
+import static junit.framework.Assert.assertNotNull;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jdt.core.ElementChangedEvent;
+import org.eclipse.jdt.core.IJavaElementDelta;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+
+public class MockJavaChangeEventFactory
+{
+ private final MockJDTWorkspaceContext _jdtContext;
+
+ public MockJavaChangeEventFactory(final MockJDTWorkspaceContext jdtContext)
+ {
+ _jdtContext = jdtContext;
+ }
+
+ public ElementChangedEvent createSimpleJarAdded(final IProject project,
+ final IPackageFragmentRoot packageRoots)
+ {
+ final IJavaElementDelta delta = createSimpleJarAddedDelta(project,
+ packageRoots, IJavaElementDelta.F_ADDED_TO_CLASSPATH);
+ return new ElementChangedEvent(delta, ElementChangedEvent.POST_CHANGE);
+ }
+
+ public ElementChangedEvent createSimpleJarRemoved(
+ final IProject project, final IPackageFragmentRoot packageRoots)
+ {
+ final IJavaElementDelta delta = createSimpleJarAddedDelta(project,
+ packageRoots, IJavaElementDelta.F_REMOVED_FROM_CLASSPATH);
+ return new ElementChangedEvent(delta, ElementChangedEvent.POST_CHANGE);
+ }
+
+ public IJavaElementDelta createSimpleJarAddedDelta(final IProject project,
+ final IPackageFragmentRoot packageRoots, final int flags)
+ {
+ final IJavaProject owningProject = _jdtContext
+ .createJavaProject(project);
+ assertNotNull(owningProject);
+ final MockJavaElementDelta delta = new MockJavaElementDelta(packageRoots);
+ delta.changed(flags);
+ return delta;
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockJavaCoreMediator.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockJavaCoreMediator.java
new file mode 100644
index 000000000..5caf3a27f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockJavaCoreMediator.java
@@ -0,0 +1,37 @@
+package org.eclipse.jst.jsf.test.util.mock.java;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jdt.core.IElementChangedListener;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jst.jsf.common.internal.resource.ClasspathEntryLifecycleListener;
+import org.eclipse.jst.jsf.common.internal.resource.JavaCoreMediator;
+import org.eclipse.jst.jsf.test.util.mock.MockProject;
+
+public class MockJavaCoreMediator extends JavaCoreMediator
+{
+ private final MockJDTWorkspaceContext _jdtContext;
+
+ public MockJavaCoreMediator(final MockJDTWorkspaceContext jdtContext)
+ {
+ _jdtContext = jdtContext;
+ }
+
+ @Override
+ public IJavaProject create(final IProject project)
+ {
+ return _jdtContext.createJavaProject((MockProject) project);
+ }
+
+ @Override
+ public void addElementChangedListener(IElementChangedListener listener)
+ {
+ _jdtContext.addElementChangedListener(listener);
+ }
+
+ @Override
+ public void removeElementChangeListener(
+ ClasspathEntryLifecycleListener listener)
+ {
+ _jdtContext.removeElementChangedListener(listener);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockJavaElement.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockJavaElement.java
new file mode 100644
index 000000000..60a4d46b5
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockJavaElement.java
@@ -0,0 +1,161 @@
+package org.eclipse.jst.jsf.test.util.mock.java;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaModel;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IOpenable;
+import org.eclipse.jdt.core.JavaModelException;
+
+public class MockJavaElement implements IJavaElement
+{
+ private boolean _exists;
+ private final IJavaProject _owningProject;
+ private String _name;
+ private final IPath _path;
+
+ public MockJavaElement(final IJavaProject owningProject,
+ final IPath path)
+ {
+ _owningProject = owningProject;
+ _name = path.toString();
+ _path = path;
+ }
+
+ @SuppressWarnings("rawtypes")
+ public Object getAdapter(final Class adapter)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean exists()
+ {
+ return _exists;
+ }
+
+ public final void setExists(final boolean exists)
+ {
+ _exists = exists;
+ }
+
+ public IJavaElement getAncestor(final int ancestorType)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public String getAttachedJavadoc(final IProgressMonitor monitor)
+ throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IResource getCorrespondingResource() throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public String getElementName()
+ {
+ return _name;
+ }
+
+ public int getElementType()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public String getHandleIdentifier()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IJavaModel getJavaModel()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IJavaProject getJavaProject()
+ {
+ return _owningProject;
+ }
+
+ public IOpenable getOpenable()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IJavaElement getParent()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IPath getPath()
+ {
+ return _path;
+ }
+
+ public IJavaElement getPrimaryElement()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IResource getResource()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public ISchedulingRule getSchedulingRule()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IResource getUnderlyingResource() throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isReadOnly()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isStructureKnown() throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean equals(final Object o)
+ {
+ if (this == o)
+ {
+ return true;
+ }
+ // Java model parent is null
+ // if (this.parent == null) return super.equals(o);
+ // assume instanceof check is done in subclass
+ final MockJavaElement other = (MockJavaElement) o;
+ return getElementName().equals(other.getElementName())/*
+ * &&
+ * this.parent.equals
+ * (other.parent)
+ */;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return _name.hashCode();
+ }
+
+ @Override
+ public String toString()
+ {
+ return String.format(
+ "MockJavaElement: name=%s, owningProject=%s, exists=%s", _name,
+ _owningProject, _exists);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockJavaElementDelta.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockJavaElementDelta.java
new file mode 100644
index 000000000..73598931d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockJavaElementDelta.java
@@ -0,0 +1,12 @@
+package org.eclipse.jst.jsf.test.util.mock.java;
+
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.internal.core.JavaElementDelta;
+
+public class MockJavaElementDelta extends JavaElementDelta
+{
+ public MockJavaElementDelta(IJavaElement element)
+ {
+ super(element);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockJavaProject.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockJavaProject.java
new file mode 100644
index 000000000..abb076ff5
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockJavaProject.java
@@ -0,0 +1,471 @@
+package org.eclipse.jst.jsf.test.util.mock.java;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jdt.core.IBuffer;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IModuleDescription;
+import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.IRegion;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.ITypeHierarchy;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.WorkingCopyOwner;
+import org.eclipse.jdt.core.eval.IEvaluationContext;
+
+public class MockJavaProject extends MockJavaElement implements IJavaProject
+{
+ private final IProject _project;
+ private final List<IPackageFragmentRoot> _packageFragRoots;
+
+
+ public MockJavaProject(final IProject project, final List<IPackageFragmentRoot> packageFragRoots)
+ {
+ super(null, project.getFullPath());
+ _project = project;
+ _packageFragRoots = new ArrayList<IPackageFragmentRoot>(packageFragRoots);
+ }
+
+ public IJavaElement[] getChildren() throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean hasChildren() throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void close() throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public String findRecommendedLineSeparator() throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IBuffer getBuffer() throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public boolean hasUnsavedChanges() throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public boolean isConsistent() throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public boolean isOpen()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void makeConsistent(final IProgressMonitor progress)
+ throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void open(final IProgressMonitor progress) throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void save(final IProgressMonitor progress, final boolean force)
+ throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IClasspathEntry decodeClasspathEntry(final String encodedEntry)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public String encodeClasspathEntry(final IClasspathEntry classpathEntry)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IJavaElement findElement(final IPath path) throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IJavaElement findElement(final IPath path, final WorkingCopyOwner owner)
+ throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IJavaElement findElement(final String bindingKey, final WorkingCopyOwner owner)
+ throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IPackageFragment findPackageFragment(final IPath path)
+ throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IPackageFragmentRoot findPackageFragmentRoot(final IPath path)
+ throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IPackageFragmentRoot[] findPackageFragmentRoots(final IClasspathEntry entry)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IType findType(final String fullyQualifiedName) throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IType findType(final String fullyQualifiedName,
+ final IProgressMonitor progressMonitor) throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IType findType(final String fullyQualifiedName, final WorkingCopyOwner owner)
+ throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IType findType(final String fullyQualifiedName, final WorkingCopyOwner owner,
+ final IProgressMonitor progressMonitor) throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IType findType(final String packageName, final String typeQualifiedName)
+ throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IType findType(final String packageName, final String typeQualifiedName,
+ final IProgressMonitor progressMonitor) throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IType findType(final String packageName, final String typeQualifiedName,
+ final WorkingCopyOwner owner) throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IType findType(final String packageName, final String typeQualifiedName,
+ final WorkingCopyOwner owner, final IProgressMonitor progressMonitor)
+ throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IPackageFragmentRoot[] getAllPackageFragmentRoots()
+ throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public Object[] getNonJavaResources() throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public String getOption(final String optionName, final boolean inheritJavaCoreOptions)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ @SuppressWarnings("rawtypes")
+ public Map getOptions(final boolean inheritJavaCoreOptions)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IPath getOutputLocation() throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IPackageFragmentRoot getPackageFragmentRoot(
+ final String externalLibraryPath)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IPackageFragmentRoot getPackageFragmentRoot(final IResource resource)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IPackageFragmentRoot[] getPackageFragmentRoots()
+ throws JavaModelException
+ {
+ return _packageFragRoots.toArray(new IPackageFragmentRoot[0]);
+
+ }
+
+ public IPackageFragmentRoot[] getPackageFragmentRoots(final IClasspathEntry entry)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IPackageFragment[] getPackageFragments() throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IProject getProject()
+ {
+ return _project;
+ }
+
+ public IClasspathEntry[] getRawClasspath() throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public String[] getRequiredProjectNames() throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IClasspathEntry[] getResolvedClasspath(final boolean ignoreUnresolvedEntry)
+ throws JavaModelException
+ {
+ return _packageFragRoots.toArray(new IClasspathEntry[0]);
+ }
+
+ public boolean hasBuildState()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public boolean hasClasspathCycle(final IClasspathEntry[] entries)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public boolean isOnClasspath(final IJavaElement element)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public boolean isOnClasspath(final IResource resource)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IEvaluationContext newEvaluationContext()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public ITypeHierarchy newTypeHierarchy(final IRegion region,
+ final IProgressMonitor monitor) throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public ITypeHierarchy newTypeHierarchy(final IRegion region,
+ final WorkingCopyOwner owner, final IProgressMonitor monitor)
+ throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public ITypeHierarchy newTypeHierarchy(final IType type, final IRegion region,
+ final IProgressMonitor monitor) throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public ITypeHierarchy newTypeHierarchy(final IType type, final IRegion region,
+ final WorkingCopyOwner owner, final IProgressMonitor monitor)
+ throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IPath readOutputLocation()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IClasspathEntry[] readRawClasspath()
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void setOption(final String optionName, final String optionValue)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ @SuppressWarnings("rawtypes")
+ public void setOptions(final Map newOptions)
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void setOutputLocation(final IPath path, final IProgressMonitor monitor)
+ throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void setRawClasspath(final IClasspathEntry[] entries,
+ final IPath outputLocation, final boolean canModifyResources,
+ final IProgressMonitor monitor) throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void setRawClasspath(final IClasspathEntry[] entries,
+ final boolean canModifyResources, final IProgressMonitor monitor)
+ throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void setRawClasspath(final IClasspathEntry[] entries,
+ final IClasspathEntry[] referencedEntries, final IPath outputLocation,
+ final IProgressMonitor monitor) throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IClasspathEntry[] getReferencedClasspathEntries()
+ throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void setRawClasspath(final IClasspathEntry[] entries,
+ final IProgressMonitor monitor) throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public void setRawClasspath(final IClasspathEntry[] entries,
+ final IPath outputLocation, final IProgressMonitor monitor)
+ throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ public IModuleDescription findModule(String moduleName, WorkingCopyOwner owner) throws JavaModelException {
+ throw new UnsupportedOperationException();
+ }
+
+ public IModuleDescription getModuleDescription() throws JavaModelException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean equals(Object o)
+ {
+ if (this == o)
+ return true;
+
+ if (!(o instanceof MockJavaProject))
+ return false;
+
+ MockJavaProject other = (MockJavaProject) o;
+ return this._project.equals(other.getProject());
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return this._project.hashCode();
+ }
+
+ @Override
+ public String toString()
+ {
+ return super.toString().concat("[JavaProject]");
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockPackageFragmentRoot.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockPackageFragmentRoot.java
new file mode 100644
index 000000000..55b3b9f16
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/java/MockPackageFragmentRoot.java
@@ -0,0 +1,213 @@
+package org.eclipse.jst.jsf.test.util.mock.java;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jdt.core.IBuffer;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IModuleDescription;
+import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.JavaModelException;
+
+public class MockPackageFragmentRoot extends MockJavaElement implements
+ IPackageFragmentRoot
+{
+ public MockPackageFragmentRoot(final IJavaProject owningProject,
+ final IPath path)
+ {
+ super(owningProject, path);
+ }
+
+ @Override
+ public final int getElementType()
+ {
+ return IJavaElement.PACKAGE_FRAGMENT_ROOT;
+ }
+
+ public IJavaElement[] getChildren() throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean hasChildren() throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void close() throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public String findRecommendedLineSeparator() throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IBuffer getBuffer() throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean hasUnsavedChanges() throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isConsistent() throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isOpen()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void makeConsistent(final IProgressMonitor progress)
+ throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void open(final IProgressMonitor progress) throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void save(final IProgressMonitor progress, final boolean force)
+ throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void attachSource(final IPath sourcePath, final IPath rootPath,
+ final IProgressMonitor monitor) throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void copy(final IPath destination, final int updateResourceFlags,
+ final int updateModelFlags, final IClasspathEntry sibling,
+ final IProgressMonitor monitor) throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IPackageFragment createPackageFragment(final String name,
+ final boolean force, final IProgressMonitor monitor)
+ throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void delete(final int updateResourceFlags,
+ final int updateModelFlags, final IProgressMonitor monitor)
+ throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public int getKind() throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public Object[] getNonJavaResources() throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IPackageFragment getPackageFragment(final String packageName)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IClasspathEntry getRawClasspathEntry() throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IClasspathEntry getResolvedClasspathEntry()
+ throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IPath getSourceAttachmentPath() throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IPath getSourceAttachmentRootPath() throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isArchive()
+ {
+ return "jar".equals(getPath().getFileExtension());
+ }
+
+ public boolean isExternal()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void move(final IPath destination, final int updateResourceFlags,
+ final int updateModelFlags, final IClasspathEntry sibling,
+ final IProgressMonitor monitor) throws JavaModelException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IModuleDescription getModuleDescription() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean equals(final Object o)
+ {
+ if (this == o)
+ {
+ return true;
+ }
+ if (!(o instanceof MockPackageFragmentRoot))
+ {
+ return false;
+ }
+ MockPackageFragmentRoot other = (MockPackageFragmentRoot) o;
+ return getPath().equals(other.getPath());
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return getPath().hashCode();
+ }
+
+ @Override
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer();
+ IPath path = getPath();
+ if (isExternal()) {
+ buffer.append(path.toOSString());
+ } else if (getJavaProject().getElementName().equals(path.segment(0))) {
+ if (path.segmentCount() == 1) {
+ buffer.append("<project root>"); //$NON-NLS-1$
+ } else {
+ buffer.append(path.removeFirstSegments(1).makeRelative());
+ }
+ } else {
+ buffer.append(path);
+ }
+// if (info == null) {
+// buffer.append(" (not open)"); //$NON-NLS-1$
+// }
+ return buffer.toString();
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/osgi/BundleHacker.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/osgi/BundleHacker.java
new file mode 100644
index 000000000..d7918fe53
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/osgi/BundleHacker.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.test.util.mock.osgi;
+
+import java.lang.reflect.Field;
+import java.util.Collections;
+import java.util.EnumSet;
+
+import org.eclipse.osgi.container.Module.Settings;
+import org.eclipse.osgi.internal.framework.BundleContextImpl;
+import org.eclipse.osgi.internal.framework.EquinoxBundle;
+import org.eclipse.osgi.internal.framework.EquinoxContainer;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+
+/**
+ * Utility methods for hacking OSGI bundle dependencies.
+ *
+ * @author cbateman
+ *
+ */
+public class BundleHacker
+{
+ /**
+ * @param clazz
+ * @param instance -- the instance to set the mock bundle context or null if the
+ * field is static on clazz.
+ * @return
+ * @throws NoSuchFieldException
+ * @throws BundleException
+ * @throws IllegalAccessException
+ */
+ public BundleContext mockBundleContext(Class<?> clazz, Object instance) throws NoSuchFieldException,
+ BundleException, IllegalAccessException
+ {
+ final Field declaredField = clazz.getDeclaredField("context");
+ declaredField.setAccessible(true);
+
+ @SuppressWarnings("unchecked")
+ EquinoxContainer container = new EquinoxContainer(Collections.EMPTY_MAP);
+ EquinoxBundle bundle = createEquinoxBundle(container);
+
+ BundleContextImpl bundleContextImpl = new BundleContextImpl(bundle,container);
+// {
+// };
+ declaredField.set(instance, bundleContextImpl);
+ return bundleContextImpl;
+ }
+
+ private EquinoxBundle createEquinoxBundle(EquinoxContainer equinoxContainer) {
+ return new EquinoxBundle(-1L, null, null, EnumSet.of(Settings.USE_ACTIVATION_POLICY), 3, equinoxContainer);
+ }
+
+// private BundleHost createMockBundleHost() throws BundleException
+// {
+// final FrameworkAdaptor adaptor = new MockFrameworkAdaptor();
+// final Framework framework = new Framework(adaptor);
+// final BundleHost host = new BundleHost(null, framework);
+// return host;
+// }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/smodel/TestableStructuredModelFactory.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/smodel/TestableStructuredModelFactory.java
new file mode 100644
index 000000000..f20ab8f33
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/mock/smodel/TestableStructuredModelFactory.java
@@ -0,0 +1,332 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.test.util.mock.smodel;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.nio.charset.Charset;
+import java.nio.charset.CharsetDecoder;
+import java.nio.charset.IllegalCharsetNameException;
+
+import org.eclipse.core.internal.runtime.PlatformActivator;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.IDocumentExtension3;
+import org.eclipse.jface.text.IDocumentPartitioner;
+import org.eclipse.jst.jsf.test.util.mock.osgi.BundleHacker;
+import org.eclipse.wst.sse.core.internal.document.IDocumentLoader;
+import org.eclipse.wst.sse.core.internal.encoding.CodedIO;
+import org.eclipse.wst.sse.core.internal.encoding.CodedReaderCreator;
+import org.eclipse.wst.sse.core.internal.encoding.EncodingMemento;
+import org.eclipse.wst.sse.core.internal.encoding.util.Logger;
+import org.eclipse.wst.sse.core.internal.encoding.util.NullInputStream;
+import org.eclipse.wst.sse.core.internal.provisional.IModelLoader;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.provisional.document.IEncodedDocument;
+import org.eclipse.wst.sse.core.internal.provisional.exceptions.ResourceInUse;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredPartitioning;
+import org.eclipse.wst.sse.core.internal.util.ProjectResolver;
+import org.eclipse.wst.sse.core.internal.util.URIResolver;
+import org.eclipse.wst.xml.core.internal.encoding.XMLDocumentLoader;
+import org.eclipse.wst.xml.core.internal.modelhandler.ModelHandlerForXML;
+import org.eclipse.wst.xml.core.internal.modelhandler.XMLModelLoader;
+import org.osgi.framework.BundleException;
+
+@SuppressWarnings("deprecation")
+public class TestableStructuredModelFactory
+{
+ public static void hackStatics() throws SecurityException,
+ NoSuchFieldException, BundleException, IllegalArgumentException,
+ IllegalAccessException
+ {
+ new BundleHacker().mockBundleContext(PlatformActivator.class, null);
+ }
+
+ public IStructuredModel createUnManagedModelFor(final IFile file)
+ throws CoreException, ResourceInUse, IOException
+ {
+ IStructuredModel model = createUnManagedEmptyModelFor(file);
+ final IDocumentLoader loader = model.getModelHandler()
+ .getDocumentLoader();
+ final IEncodedDocument document = loader
+ .createNewStructuredDocument(file);
+
+ model.getStructuredDocument().setText(this, document.get());
+ return model;
+ }
+
+ /**
+ * @param iFile
+ * @param result
+ * @return
+ * @throws CoreException
+ * @throws ResourceInUse
+ */
+ protected IStructuredModel createUnManagedEmptyModelFor(final IFile iFile)
+ throws CoreException, ResourceInUse
+ {
+ final ModelHandlerForXML handler = new ModelHandlerForXML()
+ {
+
+ public IDocumentLoader getDocumentLoader()
+ {
+ return new TestableXMLModelLoader();
+ }
+ };
+ final String id = iFile.getFullPath().toString();
+ final URIResolver resolver = calculateURIResolver(iFile);
+
+ return _commonCreateModel(id, handler, resolver);
+ }
+
+ /**
+ *
+ */
+ private URIResolver calculateURIResolver(final IFile file)
+ {
+ // Note: see comment in plugin.xml for potentially
+ // breaking change in behavior.
+
+ final IProject project = file.getProject();
+ final URIResolver resolver = new ProjectResolver(project);
+ Object location = file.getLocation();
+ if (location == null)
+ {
+ location = file.getLocationURI();
+ }
+ if (location != null)
+ {
+ resolver.setFileBaseLocation(location.toString());
+ }
+ return resolver;
+ }
+
+ private IStructuredModel _commonCreateModel(final String id,
+ final ModelHandlerForXML handler, final URIResolver resolver)
+ throws ResourceInUse
+ {
+ final IModelLoader loader = new XMLModelLoader()
+ {
+ public IDocumentLoader getDocumentLoader()
+ {
+ return new TestableXMLModelLoader();
+ }
+ };
+
+ // handler.getModelLoader();
+ final IStructuredModel result = loader.createModel();
+ // in the past, id was null for "unmanaged" case, so we won't
+ // try and set it
+ if (id != null)
+ {
+ // result.setId(id);
+ }
+ result.setModelHandler(handler);
+ result.setResolver(resolver);
+ // some obvious redunancy here that maybe could be improved
+ // in future, but is necessary for now
+ result.setBaseLocation(id);
+ if (resolver != null)
+ {
+ resolver.setFileBaseLocation(id);
+ }
+ // addFactories(result, handler);
+ return result;
+ }
+
+ public static final String NO_SPEC_DEFAULT = "NoSpecDefault"; //$NON-NLS-1$
+
+ /**
+ * Note: once this instance is created, trace info still needs to be
+ * appended by caller, depending on the context its created.
+ */
+ public static EncodingMemento createEncodingMemento(
+ final String detectedCharsetName, final String reason,
+ final String specDefaultEncoding)
+ {
+ EncodingMemento result = new EncodingMemento();
+ result = new EncodingMemento();
+ final String javaCharset = "UTF-8";
+ result.setJavaCharsetName(javaCharset);
+ result.setDetectedCharsetName(detectedCharsetName);
+ // TODO: if detectedCharset and spec default is
+ // null, need to use "work
+ // bench based" defaults.
+ if (specDefaultEncoding == null)
+ {
+ result.setAppropriateDefault(NO_SPEC_DEFAULT);
+ }
+ else
+ {
+ result.setAppropriateDefault(specDefaultEncoding);
+ }
+ // check if valid
+ try
+ {
+ Charset.isSupported(javaCharset);
+ }
+ catch (final IllegalCharsetNameException e)
+ {
+ result.setInvalidEncoding(javaCharset);
+ }
+
+ return result;
+ }
+
+ private static final class TestableXMLModelLoader extends XMLDocumentLoader
+ {
+
+ public IEncodedDocument createNewStructuredDocument()
+ {
+ final IEncodedDocument structuredDocument = newEncodedDocument();
+ // Make sure every structuredDocument has an Encoding Memento,
+ // which is the default one for "empty" structuredDocuments
+ final String charset = "UTF-8";
+ final String specDefaultCharset = getDocumentEncodingDetector()
+ .getSpecDefaultEncoding();
+ structuredDocument.setEncodingMemento(createEncodingMemento(
+ charset, EncodingMemento.DEFAULTS_ASSUMED_FOR_EMPTY_INPUT,
+ specDefaultCharset));
+
+ // String lineDelimiter = null;
+ // if (lineDelimiter != null)
+ // structuredDocument.setPreferredLineDelimiter(lineDelimiter);
+
+ final IDocumentPartitioner defaultPartitioner = getDefaultDocumentPartitioner();
+ if (structuredDocument instanceof IDocumentExtension3)
+ {
+ ((IDocumentExtension3) structuredDocument)
+ .setDocumentPartitioner(
+ IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING,
+ defaultPartitioner);
+ }
+ else
+ {
+ structuredDocument.setDocumentPartitioner(defaultPartitioner);
+ }
+ defaultPartitioner.connect(structuredDocument);
+
+ return structuredDocument;
+ }
+
+ /**
+ * This abstract version should handle most cases, but won't if
+ * contentType is sensitive to encoding, and/or embedded types
+ */
+
+ public IEncodedDocument createNewStructuredDocument(final IFile iFile)
+ throws IOException, CoreException
+ {
+ final IEncodedDocument structuredDocument = createNewStructuredDocument();
+
+ // String lineDelimiter = getPreferredNewLineDelimiter(iFile);
+ // if (lineDelimiter != null)
+ // structuredDocument.setPreferredLineDelimiter(lineDelimiter);
+
+ try
+ {
+ // final CodedReaderCreator creator = getCodedReaderCreator();
+ // creator.set(iFile);
+ // fEncodingMemento = new
+ // EncodingMemento();//creator.getEncodingMemento();
+ // structuredDocument.setEncodingMemento(fEncodingMemento);
+ // fFullPreparedReader =
+ // getCodedReaderCreator().getCodedReader();
+ InputStream streamToReturn = getResettableStream(iFile);
+ streamToReturn.reset();
+ Charset charset = Charset.forName("UTF-8");
+ CharsetDecoder charsetDecoder = charset.newDecoder();
+
+ fFullPreparedReader = new BufferedReader(new InputStreamReader(
+ streamToReturn, charsetDecoder), CodedIO.MAX_BUF_SIZE);
+ fFullPreparedReader.mark(CodedIO.MAX_BUF_SIZE);
+
+ setDocumentContentsFromReader(structuredDocument,
+ fFullPreparedReader);
+ }
+ finally
+ {
+ if (fFullPreparedReader != null)
+ {
+ fFullPreparedReader.close();
+ }
+ }
+ return structuredDocument;
+ }
+
+ private InputStream getResettableStream(IFile fIFile)
+ throws CoreException, IOException
+ {
+
+ InputStream resettableStream = null;
+
+ if (fIFile != null)
+ {
+ InputStream inputStream = null;
+ try
+ {
+ // note we always get contents, even if out of synch
+ inputStream = fIFile.getContents(true);
+ }
+ catch (CoreException e)
+ {
+ // SHOULD actually check for existence of
+ // fIStorage, but
+ // for now will just assume core exception
+ // means it
+ // doesn't exist on file system, yet.
+ // and we'll log, just in case its a noteable error
+ Logger.logException(e);
+ inputStream = new NullInputStream();
+ }
+ resettableStream = new BufferedInputStream(inputStream,
+ CodedIO.MAX_BUF_SIZE);
+ }
+ // else
+ // {
+ // if (fInputStream != null)
+ // {
+ // if (fInputStream.markSupported())
+ // {
+ // resettableStream = fInputStream;
+ // // try {
+ // resettableStream.reset();
+ // // }
+ // // catch (IOException e) {
+ // // // assumed just hasn't been marked yet, so ignore
+ // // }
+ // }
+ // else
+ // {
+ // resettableStream = new BufferedInputStream(
+ // fInputStream, CodedIO.MAX_BUF_SIZE);
+ // }
+ // }
+ // }
+
+ if (resettableStream == null)
+ {
+ resettableStream = new NullInputStream();
+ }
+
+ // mark this once, stream at "zero" position
+ resettableStream.mark(CodedReaderCreator.MAX_MARK_SIZE);
+ return resettableStream;
+ }
+
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/sanity/TestJDTTestEnvironment.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/sanity/TestJDTTestEnvironment.java
new file mode 100644
index 000000000..431903d2d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/sanity/TestJDTTestEnvironment.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * 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.test.util.sanity;
+
+import junit.framework.TestCase;
+
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jst.jsf.test.util.Activator;
+import org.eclipse.jst.jsf.test.util.JDTTestEnvironment;
+import org.eclipse.jst.jsf.test.util.ProjectTestEnvironment;
+import org.eclipse.jst.jsf.test.util.TestFileResource;
+
+/**
+ * @author cbateman
+ *
+ */
+public class TestJDTTestEnvironment extends TestCase
+{
+ private ProjectTestEnvironment _projectTestEnvironment;
+ private JDTTestEnvironment _jdtTestEnv;
+ private String _testClass1;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ _projectTestEnvironment = new ProjectTestEnvironment("JDTTestProject");
+ _projectTestEnvironment.createProject(false);
+ _jdtTestEnv = new JDTTestEnvironment(_projectTestEnvironment);
+ TestFileResource codeRes = new TestFileResource();
+ codeRes.load(Activator.getDefault().getBundle(), "/testdata/TestClass1.java.data");
+ _testClass1 = codeRes.toString();
+ }
+
+ /**
+ * Test basic java class file creation
+ */
+ public void testCreateJavaClassFile()
+ {
+ ICompilationUnit compUnit = null;
+ try
+ {
+ compUnit =
+ _jdtTestEnv.
+ addSourceFile("src", "com.test", "TestClass1", _testClass1.toString());
+
+ }
+ catch (Exception e)
+ {
+ fail(e.getLocalizedMessage());
+ }
+
+ assertNotNull(compUnit);
+ assertTrue(compUnit.exists());
+ assertTrue(compUnit.getResource().isAccessible());
+
+ try
+ {
+ IType type = _jdtTestEnv.getJavaProject().findType("com.test.TestClass1");
+ assertNotNull(type);
+ assertTrue(type.getMethods().length == 1);
+ assertTrue(type.getMethods()[0].getElementName().equals("amethod"));
+ }
+ catch (JavaModelException jme)
+ {
+ fail(jme.getLocalizedMessage());
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/sanity/TestJSFTestUtil.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/sanity/TestJSFTestUtil.java
new file mode 100644
index 000000000..6aede4214
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/sanity/TestJSFTestUtil.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * 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.test.util.sanity;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.Arrays;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jst.jsf.test.util.Activator;
+import org.eclipse.jst.jsf.test.util.JSFTestUtil;
+import org.eclipse.jst.jsf.test.util.TestFileResource;
+
+public class TestJSFTestUtil extends TestCase
+{
+ public void testSavePlatformRelative()
+ {
+ FileInputStream checkFile = null;
+ try
+ {
+ final String relativeSavePath = ".metadata/.plugins/dummyFile";
+
+ TestFileResource res = new TestFileResource();
+ res.load(Activator.getDefault().getBundle(), "/testdata/dummyFile");
+
+ JSFTestUtil.savePlatformRelative(res, relativeSavePath);
+
+ checkFile = new FileInputStream(new File(new URL(Platform.getInstanceLocation().getURL(), relativeSavePath).toURI()));
+
+ // NOTE: DON'T use areEqual in JSFTestUtil, since that module is under test
+ ByteArrayOutputStream buffer = new ByteArrayOutputStream();
+ byte[] inBuffer = new byte[1024];
+ int bytesRead;
+ int curPos = 0;
+ while ((bytesRead = checkFile.read(inBuffer)) != -1)
+ {
+ buffer.write(inBuffer,curPos, bytesRead);
+ curPos+=bytesRead;
+ }
+
+ // ensure the file that was written is the same as the source
+ assertTrue(Arrays.equals(buffer.toByteArray(), res.toBytes()));
+ }
+ catch(IOException ioe)
+ {
+ throw new RuntimeException(ioe);
+ } catch (URISyntaxException e) {
+ throw new RuntimeException(e);
+ }
+ finally
+ {
+ if (checkFile != null)
+ {
+ try
+ {
+ checkFile.close();
+ }
+ catch (IOException ioe)
+ {
+ throw new RuntimeException(ioe);
+ }
+ }
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/sanity/TestProjectTestEnvironment.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/sanity/TestProjectTestEnvironment.java
new file mode 100644
index 000000000..1e9edf7a3
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/sanity/TestProjectTestEnvironment.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * 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.test.util.sanity;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jst.jsf.test.util.ProjectTestEnvironment;
+
+/**
+ * Test the base Project Test Environment
+ *
+ * @author cbateman
+ *
+ */
+public class TestProjectTestEnvironment extends TestCase
+{
+ /**
+ * Test creating a basic test project environment
+ */
+ public void testCreateProject()
+ {
+ ProjectTestEnvironment testEnv = new ProjectTestEnvironment("TestProject1");
+ testEnv.createProject(false);
+ assertTrue(testEnv.isProjectCreated());
+
+ IProject project = testEnv.getTestProject();
+
+ assertNotNull(project);
+ assertTrue(project.isAccessible());
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/sanity/TestWebProjectTestEnvironment.java b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/sanity/TestWebProjectTestEnvironment.java
new file mode 100644
index 000000000..7068e3012
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/src/org/eclipse/jst/jsf/test/util/sanity/TestWebProjectTestEnvironment.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * 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.test.util.sanity;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jst.jsf.test.util.Activator;
+import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
+
+/**
+ * Sanity test for web project test environment
+ *
+ * @author cbateman
+ *
+ */
+public class TestWebProjectTestEnvironment extends TestCase
+{
+ /**
+ * Test project creation
+ */
+ public void testCreateProject()
+ {
+// InternetPlugin iPlugin = InternetPlugin.getInstance();
+// IPreferenceStore store = iPlugin.getPreferenceStore();
+
+ WebProjectTestEnvironment testEnv = new WebProjectTestEnvironment("TestProject1");
+ testEnv.createProject(false);
+ assertTrue(testEnv.isProjectCreated());
+
+ IProject project = testEnv.getTestProject();
+
+ assertNotNull(project);
+ assertTrue(project.isAccessible());
+ }
+
+ /**
+ * Test creating a web project and adding a faces-config.xml file to it
+ */
+ public void testAddFileToWebRoot()
+ {
+ WebProjectTestEnvironment testEnv = new WebProjectTestEnvironment("TestProject2");
+ testEnv.createProject(false);
+ assertTrue(testEnv.isProjectCreated());
+
+ try
+ {
+ testEnv.loadResourceInWebRoot(Activator.getDefault().getBundle(),
+ "/testdata/faces-config.xml.data",
+ "/WEB-INF/faces-config.xml");
+ }
+ catch (Exception e)
+ {
+ fail(e.getLocalizedMessage());
+ }
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/testdata/TestClass1.java.data b/jsf/tests/org.eclipse.jst.jsf.test.util/testdata/TestClass1.java.data
new file mode 100644
index 000000000..8c4518b20
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/testdata/TestClass1.java.data
@@ -0,0 +1,9 @@
+package com.test;
+
+public class TestClass1
+{
+ public java.lang.String amethod()
+ {
+ return "A string";
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/testdata/dummyFile b/jsf/tests/org.eclipse.jst.jsf.test.util/testdata/dummyFile
new file mode 100644
index 000000000..827a49fb6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/testdata/dummyFile
@@ -0,0 +1 @@
+Blah blah blah blah blah. \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.test.util/testdata/faces-config.xml.data b/jsf/tests/org.eclipse.jst.jsf.test.util/testdata/faces-config.xml.data
new file mode 100644
index 000000000..163c1ad0b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.test.util/testdata/faces-config.xml.data
@@ -0,0 +1 @@
+<blah></blah> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.ui.tests/.classpath b/jsf/tests/org.eclipse.jst.jsf.ui.tests/.classpath
new file mode 100644
index 000000000..304e86186
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.ui.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.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.ui.tests/.cvsignore b/jsf/tests/org.eclipse.jst.jsf.ui.tests/.cvsignore
new file mode 100644
index 000000000..8e45eb69d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.ui.tests/.cvsignore
@@ -0,0 +1,4 @@
+bin
+temp.folder
+javaCompiler.jsfuitests.jar.args
+build.xml
diff --git a/jsf/tests/org.eclipse.jst.jsf.ui.tests/.project b/jsf/tests/org.eclipse.jst.jsf.ui.tests/.project
new file mode 100644
index 000000000..a8080177b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.ui.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jst.jsf.ui.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/jsf/tests/org.eclipse.jst.jsf.ui.tests/.settings/org.eclipse.core.resources.prefs b/jsf/tests/org.eclipse.jst.jsf.ui.tests/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 000000000..5949dcbcd
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.ui.tests/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Sun May 27 16:04:41 EDT 2007
+eclipse.preferences.version=1
+encoding/<project>=ISO-8859-1
diff --git a/jsf/tests/org.eclipse.jst.jsf.ui.tests/.settings/org.eclipse.jdt.core.prefs b/jsf/tests/org.eclipse.jst.jsf.ui.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..56f3b680f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.ui.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,61 @@
+#Wed Sep 19 11:04:13 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.ui.tests/META-INF/MANIFEST.MF b/jsf/tests/org.eclipse.jst.jsf.ui.tests/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..68eccc963
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.ui.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,29 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name.0
+Bundle-SymbolicName: org.eclipse.jst.jsf.ui.tests
+Bundle-Version: 1.5.0.qualifier
+Bundle-Activator: org.eclipse.jst.jsf.ui.tests.JSFUITestsPlugin
+Bundle-Vendor: %Bundle-Vendor.0
+Bundle-Localization: plugin
+Bundle-ClassPath: jsfuitests.jar
+Require-Bundle: org.eclipse.jst.jsf.core;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.wst.common.project.facet.ui;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.jst.jsf.core.tests;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.jst.jsf.ui;bundle-version="[1.0.0,2.0.0)",
+ org.junit;bundle-version="3.8.1",
+ org.eclipse.emf.common;bundle-version="[2.2.0,3.0.0)",
+ org.eclipse.emf.ecore;bundle-version="[2.2.0,3.0.0)",
+ org.eclipse.ui.forms,
+ org.eclipse.jface.text,
+ org.eclipse.jst.jsf.common;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.jst.jsf.test.util;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.jst.jsf.contentassist.tests;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.jdt.core,
+ org.eclipse.core.resources,
+ org.eclipse.jdt.ui,
+ org.eclipse.ui.ide
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.jst.jsf.ui.tests;x-internal:=true,
+ org.eclipse.jst.jsf.ui.tests.util;x-internal:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/jsf/tests/org.eclipse.jst.jsf.ui.tests/about.html b/jsf/tests/org.eclipse.jst.jsf.ui.tests/about.html
new file mode 100644
index 000000000..04d4782f4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.ui.tests/about.html
@@ -0,0 +1,22 @@
+<!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.ui.tests/build.properties b/jsf/tests/org.eclipse.jst.jsf.ui.tests/build.properties
new file mode 100644
index 000000000..129b644b6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.ui.tests/build.properties
@@ -0,0 +1,20 @@
+###############################################################################
+# 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
+###############################################################################
+bin.includes = META-INF/,\
+ jsfuitests.jar,\
+ test.xml,\
+ about.html,\
+ plugin.properties
+source.jsfuitests.jar = src/
+jars.compile.order = jsfuitests.jar
+output.jsfuitests.jar = bin/
+javacSource=1.5
+javacTarget=1.5
diff --git a/jsf/tests/org.eclipse.jst.jsf.ui.tests/launch/JSFUIAllTests.launch b/jsf/tests/org.eclipse.jst.jsf.ui.tests/launch/JSFUIAllTests.launch
new file mode 100644
index 000000000..23434a77b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.ui.tests/launch/JSFUIAllTests.launch
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.jst.jsf.ui.tests/src/org/eclipse/jst/jsf/ui/tests/JSFUIAllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.jst.jsf.ui.tests.JSFUIAllTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jst.jsf.ui.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx512m -XX:MaxPermSize=512M"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
diff --git a/jsf/tests/org.eclipse.jst.jsf.ui.tests/plugin.properties b/jsf/tests/org.eclipse.jst.jsf.ui.tests/plugin.properties
new file mode 100644
index 000000000..69caa3531
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.ui.tests/plugin.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# 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=JSF Tools - UI Tests
+Bundle-Vendor.0=Eclipse Web Tools Platform
diff --git a/jsf/tests/org.eclipse.jst.jsf.ui.tests/pom.xml b/jsf/tests/org.eclipse.jst.jsf.ui.tests/pom.xml
new file mode 100644
index 000000000..50a1841c6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.ui.tests/pom.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012, 2013 Eclipse Foundation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Distribution License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/org/documents/edl-v10.php
+
+ Contributors:
+ Thanh Ha (Eclipse Foundation) - initial implementation
+ Ian Trimble (Oracle) - initial tests configuration
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.webtools.jsf</groupId>
+ <artifactId>org.eclipse.webtools.jsf.tests</artifactId>
+ <version>3.6.0-SNAPSHOT</version>
+ <relativePath>../../../</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.webtools.jsf</groupId>
+ <artifactId>org.eclipse.jst.jsf.ui.tests</artifactId>
+ <version>1.5.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ <useUIHarness>true</useUIHarness>
+ <testSuite>${project.artifactId}</testSuite>
+ <testClass>org.eclipse.jst.jsf.ui.tests.JSFUIAllTests</testClass>
+ <dependencies>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.jst.j2ee.ejb</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ </dependencies>
+ <argLine>-DjsfRuntimeJarsDirectoryV1.1=${project.basedir}/../jsfRuntimeJarsDirectory/V1.1 -DjsfRuntimeJarsDirectoryV1.2=${project.basedir}/../jsfRuntimeJarsDirectory/V1.2 -DjsfRuntimeJarsDirectoryV2.0=${project.basedir}/../jsfRuntimeJarsDirectory/V2.0</argLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/jsf/tests/org.eclipse.jst.jsf.ui.tests/src/org/eclipse/jst/jsf/ui/tests/JSFUIAllTests.java b/jsf/tests/org.eclipse.jst.jsf.ui.tests/src/org/eclipse/jst/jsf/ui/tests/JSFUIAllTests.java
new file mode 100644
index 000000000..a4655046a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.ui.tests/src/org/eclipse/jst/jsf/ui/tests/JSFUIAllTests.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * 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
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.ui.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.jst.jsf.ui.tests.jspeditor.TestELHyperlinkDetector;
+import org.eclipse.jst.jsf.ui.tests.jspeditor.TestJSFELHover;
+
+public class JSFUIAllTests {
+
+ public static Test suite() {
+ final TestSuite suite = new TestSuite("Test for org.eclipse.jst.jsf.ui.tests");
+ //$JUnit-BEGIN$
+// suite.addTestSuite(JSFLibrariesPreferencePageTestCases.class);
+// suite.addTestSuite(JSFLibraryWizardTestCases.class);
+ suite.addTestSuite(TestELHyperlinkDetector.class);
+ suite.addTestSuite(TestJSFELHover.class);
+ //$JUnit-END$
+ return suite;
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.ui.tests/src/org/eclipse/jst/jsf/ui/tests/JSFUITestsPlugin.java b/jsf/tests/org.eclipse.jst.jsf.ui.tests/src/org/eclipse/jst/jsf/ui/tests/JSFUITestsPlugin.java
new file mode 100644
index 000000000..df80023dc
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.ui.tests/src/org/eclipse/jst/jsf/ui/tests/JSFUITestsPlugin.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * 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
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.ui.tests;
+
+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 JSFUITestsPlugin extends AbstractUIPlugin {
+
+ //The shared instance.
+ private static JSFUITestsPlugin plugin;
+
+ /**
+ * The constructor.
+ */
+ public JSFUITestsPlugin() {
+ 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.
+ */
+ public static JSFUITestsPlugin 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.ui.tests", path);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.ui.tests/src/org/eclipse/jst/jsf/ui/tests/jspeditor/TestELHyperlinkDetector.java b/jsf/tests/org.eclipse.jst.jsf.ui.tests/src/org/eclipse/jst/jsf/ui/tests/jspeditor/TestELHyperlinkDetector.java
new file mode 100644
index 000000000..4a73a6349
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.ui.tests/src/org/eclipse/jst/jsf/ui/tests/jspeditor/TestELHyperlinkDetector.java
@@ -0,0 +1,160 @@
+/*******************************************************************************
+ * 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.ui.tests.jspeditor;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.jst.jsf.contentassist.tests.ContentAssistTestsPlugin;
+import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext;
+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.core.tests.util.JSFCoreUtilHelper.ContextWrapper;
+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.eclipse.jst.jsf.ui.internal.jspeditor.JSPELHyperlinkDetector;
+import org.eclipse.jst.jsf.ui.internal.jspeditor.ITestHyperlink;
+import org.eclipse.jst.jsf.ui.internal.jspeditor.JSPSourceUtil;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+
+public class TestELHyperlinkDetector extends TestCase {
+
+ 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, 579, "value", "#{myBean}");
+ JSFCoreUtilHelper.assertELSanity(_jspFile, 614, "value",
+ "#{myBean.property}");
+ JSFCoreUtilHelper.assertELSanity(_jspFile, 706, "action",
+ "#{myBean.actionMethod}");
+
+ JSFCoreUtilHelper.assertELVariableSanity(_jspFile, "myBean");
+ }
+
+ public void testDetectHyperlinks()
+ throws Exception {
+ // hyperlink from MyBean
+ testJavaHyperlink(579, 0,"MyBean.java", IJavaElement.TYPE, "MyBean");
+ // hyperlink from MyBean
+ testJavaHyperlink(614, 0, "MyBean.java", IJavaElement.TYPE, "MyBean");
+ // hyperlink from MyBean
+ testJavaHyperlink(706, 0, "MyBean.java", IJavaElement.TYPE, "MyBean");
+
+ // hyperlink from property
+ testJavaHyperlink(614, 8, "MyBean.java", IJavaElement.METHOD, "getProperty");
+
+ // hyperlink from method
+ testJavaHyperlink(706, 8, "MyBean.java", IJavaElement.METHOD, "actionMethod");
+ }
+
+ private void testJavaHyperlink(final int regionStartOffset, final int relativeOffset
+ , final String classFileName, final int javaElementType, final String javaElementName) throws Exception
+ {
+ final IWorkbenchPage curPage =
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ final TestableELHyperlinkDetector hyperlinkDetector = new TestableELHyperlinkDetector();
+ final ContextWrapper context = JSFCoreUtilHelper.getDocumentContext(_jspFile,
+ regionStartOffset);
+ Region elRegion = JSPSourceUtil.findELRegion(context.getContext());
+ elRegion = new Region(elRegion.getOffset()+relativeOffset, elRegion.getLength()-relativeOffset);
+ final IHyperlink[] links = hyperlinkDetector.detectHyperlinks(context
+ .getContext(), elRegion);
+ assertEquals(1, links.length);
+ final IHyperlink link = links[0];
+
+ assertTrue(link instanceof ITestHyperlink);
+ assertNotNull(link.getHyperlinkRegion());
+
+ // as a reminder if add optional values
+ assertNull(link.getTypeLabel());
+ assertNotNull(link.getHyperlinkText());
+
+ {
+ final ITestHyperlink testHyperlink = (ITestHyperlink) link;
+ final IJavaElement javaElement = testHyperlink.determineJavaElement();
+ assertNotNull(javaElement);
+ assertEquals(javaElementType, javaElement.getElementType());
+ assertEquals(javaElementName, javaElement.getElementName());
+ }
+
+ link.open();
+
+ final IEditorPart editorPart = curPage.getActiveEditor();
+ assertNotNull(editorPart);
+ final IEditorInput editorInput = editorPart.getEditorInput();
+ assertTrue(editorInput instanceof FileEditorInput);
+ final IFile file = ((FileEditorInput)editorInput).getFile();
+ assertEquals(classFileName, file.getName());
+ curPage.closeEditor(editorPart, false);
+ }
+
+ private static class TestableELHyperlinkDetector extends
+ JSPELHyperlinkDetector {
+ @Override
+ public IHyperlink[] detectHyperlinks(
+ final IStructuredDocumentContext context, final IRegion region) {
+ return super.detectHyperlinks(context, region);
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.ui.tests/src/org/eclipse/jst/jsf/ui/tests/jspeditor/TestJSFELHover.java b/jsf/tests/org.eclipse.jst.jsf.ui.tests/src/org/eclipse/jst/jsf/ui/tests/jspeditor/TestJSFELHover.java
new file mode 100644
index 000000000..f4b10901f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.ui.tests/src/org/eclipse/jst/jsf/ui/tests/jspeditor/TestJSFELHover.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * 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.ui.tests.jspeditor;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jst.jsf.contentassist.tests.ContentAssistTestsPlugin;
+import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext;
+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.core.tests.util.JSFCoreUtilHelper.ContextWrapper;
+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.eclipse.jst.jsf.ui.internal.jspeditor.JSFELHover;
+
+public class TestJSFELHover extends TestCase {
+
+ 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, 579, "value", "#{myBean}");
+ JSFCoreUtilHelper.assertELSanity(_jspFile, 614, "value",
+ "#{myBean.property}");
+ JSFCoreUtilHelper.assertELSanity(_jspFile, 706, "action",
+ "#{myBean.actionMethod}");
+
+ JSFCoreUtilHelper.assertELVariableSanity(_jspFile, "myBean");
+ }
+
+ public void testGetHoverInfo() throws Exception {
+ // hyperlink from MyBean
+ testJavaHoverHelp(579, "MyBean.java", "<p><b>Name: </b>myBean</p><p><b>Type: </b>beans.MyBean</p><p><b>Scope: </b>none</p>");
+ // hyperlink from MyBean
+ testJavaHoverHelp(614, "MyBean.java", "<p><b>Name: </b>myBean</p><p><b>Type: </b>beans.MyBean</p><p><b>Scope: </b>none</p>");
+ // hyperlink from MyBean
+ testJavaHoverHelp(706, "MyBean.java", "<p><b>Name: </b>myBean</p><p><b>Type: </b>beans.MyBean</p><p><b>Scope: </b>none</p>");
+
+ // hyperlink from property
+ testJavaHoverHelp(622, "MyBean.java", "<p><b>Type: </b>java.lang.String[]</p><p><b>Access: </b>read-only</p>");
+
+ // hyperlink from method
+ testJavaHoverHelp(714, "MyBean.java", "<p><b>Signature:</b> String actionMethod()</p>");
+ }
+
+ private void testJavaHoverHelp(final int regionStartOffset,
+ final String classFileName, final String expectedInfo)
+ throws Exception {
+ final TestableJSFELHover hoverHelp = new TestableJSFELHover();
+ final ContextWrapper context = JSFCoreUtilHelper.getDocumentContext(
+ _jspFile, regionStartOffset);
+ final IRegion region = hoverHelp.getHoverRegion(context.getContext(),
+ regionStartOffset);
+ assertNotNull(region);
+ assertEquals(expectedInfo, hoverHelp.getHoverInfo());
+ }
+
+ private static class TestableJSFELHover extends JSFELHover {
+
+ @Override
+ public String getHoverInfo() {
+ return super.getHoverInfo();
+ }
+
+ @Override
+ public IRegion getHoverRegion(final IStructuredDocumentContext context,
+ final int documentPosition) {
+ return super.getHoverRegion(context, documentPosition);
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.ui.tests/src/org/eclipse/jst/jsf/ui/tests/util/JSFUITestHelper.java b/jsf/tests/org.eclipse.jst.jsf.ui.tests/src/org/eclipse/jst/jsf/ui/tests/util/JSFUITestHelper.java
new file mode 100644
index 000000000..b5c030dff
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.ui.tests/src/org/eclipse/jst/jsf/ui/tests/util/JSFUITestHelper.java
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * 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
+ *
+ ********************************************************************************/
+package org.eclipse.jst.jsf.ui.tests.util;
+
+import java.util.Iterator;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.preference.IPreferenceNode;
+import org.eclipse.jface.preference.PreferenceDialog;
+import org.eclipse.jface.preference.PreferenceManager;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.WorkbenchPlugin;
+import org.eclipse.ui.internal.dialogs.PropertyDialog;
+import org.eclipse.ui.internal.dialogs.PropertyPageContributorManager;
+import org.eclipse.ui.internal.dialogs.PropertyPageManager;
+import org.eclipse.ui.model.IWorkbenchAdapter;
+
+/**
+ * Borrowed from UITestHelper in org.eclipse.wst.internet.monitor.ui.tests
+ *
+ * @author YCHEN3
+ */
+public class JSFUITestHelper {
+ private static class PreferenceDialogWrapper extends PreferenceDialog {
+ public PreferenceDialogWrapper(Shell parentShell, PreferenceManager manager) {
+ super(parentShell, manager);
+ }
+ protected boolean showPage(IPreferenceNode node) {
+ return super.showPage(node);
+ }
+ }
+
+ private static class PropertyDialogWrapper extends PropertyDialog {
+ public PropertyDialogWrapper(Shell parentShell, PreferenceManager manager, ISelection selection) {
+ super(parentShell, manager, selection);
+ }
+ protected boolean showPage(IPreferenceNode node) {
+ return super.showPage(node);
+ }
+ }
+
+ public static PreferenceDialog getPreferenceDialog(String id) {
+ PreferenceDialogWrapper dialog = null;
+ PreferenceManager manager = WorkbenchPlugin.getDefault().getPreferenceManager();
+ if (manager != null) {
+ dialog = new PreferenceDialogWrapper(getShell(), manager);
+ dialog.create();
+
+ for (Iterator<?> iterator = manager.getElements(PreferenceManager.PRE_ORDER).iterator();
+ iterator.hasNext();)
+ {
+ IPreferenceNode node = (IPreferenceNode)iterator.next();
+ if ( node.getId().equals(id) ) {
+ dialog.showPage(node);
+ break;
+ }
+ }
+ }
+ return dialog;
+ }
+
+ public static PropertyDialog getPropertyDialog(String id, IAdaptable element) {
+ PropertyDialogWrapper dialog = null;
+
+ PropertyPageManager manager = new PropertyPageManager();
+ String title = "";
+ String name = "";
+
+ // load pages for the selection
+ // fill the manager with contributions from the matching contributors
+ PropertyPageContributorManager.getManager().contribute(manager, element);
+
+ IWorkbenchAdapter adapter = (IWorkbenchAdapter)element.getAdapter(IWorkbenchAdapter.class);
+ if (adapter != null) {
+ name = adapter.getLabel(element);
+ }
+
+ // testing if there are pages in the manager
+ Iterator<?> pages = manager.getElements(PreferenceManager.PRE_ORDER).iterator();
+ if (!pages.hasNext())
+ return null;
+
+ title = "Title: " + name;
+ dialog = new PropertyDialogWrapper(getShell(), manager, new StructuredSelection(element));
+ dialog.create();
+ dialog.getShell().setText(title);
+ for (Iterator<?> iterator = manager.getElements(PreferenceManager.PRE_ORDER).iterator();
+ iterator.hasNext();) {
+ IPreferenceNode node = (IPreferenceNode)iterator.next();
+ if ( node.getId().equals(id) ) {
+ dialog.showPage(node);
+ break;
+ }
+ }
+ return dialog;
+ }
+
+ protected static Shell getShell() {
+ return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+ }
+
+} // end of UITestHelper
diff --git a/jsf/tests/org.eclipse.jst.jsf.ui.tests/test.xml b/jsf/tests/org.eclipse.jst.jsf.ui.tests/test.xml
new file mode 100644
index 000000000..d08fc6e5d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.ui.tests/test.xml
@@ -0,0 +1,49 @@
+<?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.ui.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.ui.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.ui.tests.JSFUIAllTests" />
+ <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.ui.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.validation.el.tests/.classpath b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/.classpath
new file mode 100644
index 000000000..304e86186
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.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.validation.el.tests/.project b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/.project
new file mode 100644
index 000000000..850fbc173
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jst.jsf.validation.el.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.validation.el.tests/.settings/org.eclipse.core.resources.prefs b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 000000000..f5eee9e18
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Sun May 27 16:04:49 EDT 2007
+eclipse.preferences.version=1
+encoding/<project>=ISO-8859-1
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/.settings/org.eclipse.jdt.core.prefs b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..4855c8440
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,61 @@
+#Thu Aug 23 17:30:18 PDT 2007
+eclipse.preferences.version=1
+instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
+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=ignore
+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=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=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.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.validation.el.tests/META-INF/MANIFEST.MF b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..d533fd89a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,36 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name.0
+Bundle-SymbolicName: org.eclipse.jst.jsf.validation.el.tests;singleton:=true
+Bundle-Version: 1.5.0.qualifier
+Bundle-Activator: org.eclipse.jst.jsf.validation.el.tests.ELValidationTestPlugin
+Bundle-Localization: plugin
+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.core.tests;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.jst.jsf.test.util;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.0.0,2.0.0)",
+ org.eclipse.jst.jsf.facesconfig;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.wst.sse.core;bundle-version="[1.1.0,1.2.0)",
+ org.eclipse.jst.jsf.common;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.wst.xml.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.validation;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.jface.text;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.jdt.core;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.jst.common.frameworks;bundle-version="[1.1.0,1.2.0)",
+ org.eclipse.wst.common.project.facet.core;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.emf.common;bundle-version="[2.2.0,3.0.0)",
+ org.eclipse.wst.common.frameworks;bundle-version="[1.1.102,2.0.0)",
+ org.eclipse.emf.ecore;bundle-version="2.4.1",
+ org.eclipse.jst.common.project.facet.core
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.jst.jsf.validation.el.tests;x-internal:=true,
+ org.eclipse.jst.jsf.validation.el.tests.base;x-internal:=true,
+ org.eclipse.jst.jsf.validation.el.tests.jsp;x-internal:=true,
+ org.eclipse.jst.jsf.validation.el.tests.perf;x-internal:=true,
+ org.eclipse.jst.jsf.validation.el.tests.util;x-internal:=true
+Bundle-Vendor: %Bundle-Vendor.0
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/about.html b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/about.html
new file mode 100644
index 000000000..72f94ad86
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/about.html
@@ -0,0 +1,22 @@
+<!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 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.validation.el.tests/build.properties b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/build.properties
new file mode 100644
index 000000000..a89bb8611
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/build.properties
@@ -0,0 +1,20 @@
+###############################################################################
+# 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
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ testdata/,\
+ test.xml,\
+ plugin.properties,\
+ about.html
+javacSource=1.5
+javacTarget=1.5
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/launch/AllValidationELTests_1_1.launch b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/launch/AllValidationELTests_1_1.launch
new file mode 100644
index 000000000..fa10c1ab2
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/launch/AllValidationELTests_1_1.launch
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/AllTests_1_1.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.jst.jsf.validation.el.tests.AllTests_1_1"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jst.jsf.validation.el.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx512m -XX:MaxPermSize=512M"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="false"/>
+</launchConfiguration>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/launch/AllValidationELTests_1_2.launch b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/launch/AllValidationELTests_1_2.launch
new file mode 100644
index 000000000..f5cd2012d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/launch/AllValidationELTests_1_2.launch
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/AllTests_1_2.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.jst.jsf.validation.el.tests.AllTests_1_2"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jst.jsf.validation.el.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx512m -XX:MaxPermSize=512M"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="false"/>
+</launchConfiguration>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/plugin.properties b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/plugin.properties
new file mode 100644
index 000000000..0f23125a7
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/plugin.properties
@@ -0,0 +1,11 @@
+###############################################################################
+# 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
+#
+###############################################################################
+
+Bundle-Name.0=JSF Tools - Validation EL Tests
+Bundle-Vendor.0=Eclipse Web Tools Platform
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/pom.xml b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/pom.xml
new file mode 100644
index 000000000..2fcab260d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/pom.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012, 2013 Eclipse Foundation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Distribution License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/org/documents/edl-v10.php
+
+ Contributors:
+ Thanh Ha (Eclipse Foundation) - initial implementation
+ Ian Trimble (Oracle) - initial tests configuration
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.webtools.jsf</groupId>
+ <artifactId>org.eclipse.webtools.jsf.tests</artifactId>
+ <version>3.6.0-SNAPSHOT</version>
+ <relativePath>../../../</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.webtools.jsf</groupId>
+ <artifactId>org.eclipse.jst.jsf.validation.el.tests</artifactId>
+ <version>1.5.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ <useUIHarness>true</useUIHarness>
+ <includes>
+ <include>org/eclipse/jst/jsf/validation/el/tests/AllTests_1_1.java</include>
+ <include>org/eclipse/jst/jsf/validation/el/tests/AllTests_1_2.java</include>
+ </includes>
+ <dependencies>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.jst.j2ee.ejb</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.jst.jee.web</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ </dependencies>
+ <argLine>-DjsfRuntimeJarsDirectoryV1.1=${project.basedir}/../jsfRuntimeJarsDirectory/V1.1 -DjsfRuntimeJarsDirectoryV1.2=${project.basedir}/../jsfRuntimeJarsDirectory/V1.2 -DjsfRuntimeJarsDirectoryV2.0=${project.basedir}/../jsfRuntimeJarsDirectory/V2.0</argLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/AllTests.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/AllTests.java
new file mode 100644
index 000000000..ae8080368
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/AllTests.java
@@ -0,0 +1,40 @@
+package org.eclipse.jst.jsf.validation.el.tests;
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.jst.jsf.test.util.ConfigurableTestCase.TestConfiguration;
+import org.eclipse.jst.jsf.validation.el.tests.base.BaseTestCase;
+
+
+/**
+ * The full test suite for core.tests
+ *
+ * @author cbateman
+ *
+ */
+public class AllTests
+{
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("EL Validation Testing");
+
+ TestConfiguration configuration = new TestConfiguration();
+ configuration.put(BaseTestCase.PROXY_SETTING_HOST, "www-proxy.uk.oracle.com");
+ configuration.put(BaseTestCase.PROXY_SETTING_PORT, "80");
+
+ suite.addTest(AllTests_1_1.getFacesSuite((TestConfiguration) configuration.clone()));
+ suite.addTest(AllTests_1_2.getFacesSuite((TestConfiguration) configuration.clone()));
+ return suite;
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/AllTests_1_1.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/AllTests_1_1.java
new file mode 100644
index 000000000..6ab73d74a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/AllTests_1_1.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * 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.validation.el.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.test.util.ConfigurableTestSuite;
+import org.eclipse.jst.jsf.test.util.ConfigurableTestCase.TestConfiguration;
+import org.eclipse.jst.jsf.validation.el.tests.base.BaseTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.base.JSPTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+
+public class AllTests_1_1
+{
+ public static Test suite()
+ {
+ final TestSuite suite = new TestSuite("EL Validation Testing (1.1 only)");
+
+ final TestConfiguration configuration = new TestConfiguration();
+ configuration.put(BaseTestCase.PROXY_SETTING_HOST, "www-proxy.uk.oracle.com");
+ configuration.put(BaseTestCase.PROXY_SETTING_PORT, "80");
+
+ suite.addTest(getFacesSuite((TestConfiguration) configuration.clone()));
+ return suite;
+ }
+
+ /**
+ * @return the test suite
+ */
+ public static Test getFacesSuite(final TestConfiguration commonConfig)
+ {
+ // add JSF 1.1 specific configs to common config
+ commonConfig.put(BaseTestCase.JSF_FACET_VERSION, IJSFCoreConstants.FACET_VERSION_1_1);
+ commonConfig.put(JSPTestCase.FACES_CONFIG_FILE, SingleJSPTestCase.FACES_CONFIG_FILE_NAME_1_1);
+
+ final TestSuite suite = new ConfigurableTestSuite(commonConfig, "JSF 1.1 EL Validation Tests");
+
+ CommonTests.getFaces_common_suite(suite);
+
+ return suite;
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/AllTests_1_2.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/AllTests_1_2.java
new file mode 100644
index 000000000..81ddcffff
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/AllTests_1_2.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * 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.validation.el.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.test.util.ConfigurableTestSuite;
+import org.eclipse.jst.jsf.test.util.ConfigurableTestCase.TestConfiguration;
+import org.eclipse.jst.jsf.validation.el.tests.base.BaseTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.base.JSPTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.ResourceBundleTestCase;
+
+public class AllTests_1_2 {
+ public static Test suite()
+ {
+ final TestSuite suite = new TestSuite("JSF EL Validation Testing (1.2 only)");
+
+ final TestConfiguration configuration = new TestConfiguration();
+ configuration.put(BaseTestCase.PROXY_SETTING_HOST, "www-proxy.us.oracle.com");
+ configuration.put(BaseTestCase.PROXY_SETTING_PORT, "80");
+
+ suite.addTest(getFacesSuite((TestConfiguration) configuration.clone()));
+ return suite;
+ }
+
+ public static Test getFacesSuite(final TestConfiguration commonConfig)
+ {
+ // add JSF 1.2 specific configs to common config
+ commonConfig.put(BaseTestCase.JSF_FACET_VERSION, IJSFCoreConstants.FACET_VERSION_1_2);
+ commonConfig.put(JSPTestCase.FACES_CONFIG_FILE, SingleJSPTestCase.FACES_CONFIG_FILE_NAME_1_2);
+
+ final TestSuite suite = new ConfigurableTestSuite(commonConfig, "JSF 1.2 EL Validation Tests");
+
+ // JSF 1.2 only tests
+ suite.addTest(new ConfigurableTestSuite(ResourceBundleTestCase.class));
+ CommonTests.getFaces_common_suite(suite);
+
+ return suite;
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/CommonTests.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/CommonTests.java
new file mode 100644
index 000000000..6c5ad4d90
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/CommonTests.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * 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.validation.el.tests;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.jst.jsf.test.util.ConfigurableTestSuite;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.ArithmeticAddTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.ArithmeticDivideTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.ArithmeticMinusTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.ArithmeticModuloTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.ArithmeticMultiplyTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.AssignabilityTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.BadSyntaxTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.BeanPropertyResolutionTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.BeanVariableResolutionTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.BracketOperatorTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.BuiltInSymbolsTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.DataTableResolutionTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.GreaterThanEqTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.GreaterThanTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.JSPFunctionsTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.LessThanEqTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.LessThanTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.LoadBundleResolutionTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.LogicalAndTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.LogicalEqualsTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.LogicalNotEqualsTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.LogicalNotTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.LogicalOrTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.MarkerOffsetsTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.MethodBindingTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.PropertiesOfMapsTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.UnaryEmptyTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.UnaryMinusTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.ext.BeanPropertyResolutionTestCase_JSFExt;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.ext.BeanPropertyResolutionTestCase_JSPFExt;
+import org.eclipse.jst.jsf.validation.el.tests.jsp.ext.BeanPropertyResolutionTestCase_JSPXExt;
+import org.eclipse.jst.jsf.validation.el.tests.preferences.EndToEndTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.preferences.TestELValidationPreferences;
+
+public class CommonTests
+{
+ static void getFaces_common_suite(TestSuite suite)
+ {
+ //$JUnit-BEGIN$
+ suite.addTest(new ConfigurableTestSuite(BadSyntaxTestCase.class));
+ suite.addTest(new ConfigurableTestSuite(BeanPropertyResolutionTestCase.class));
+ suite.addTest(new ConfigurableTestSuite(BeanVariableResolutionTestCase.class));
+ suite.addTest(new ConfigurableTestSuite(LoadBundleResolutionTestCase.class));
+ suite.addTest(new ConfigurableTestSuite(DataTableResolutionTestCase.class));
+ suite.addTest(new ConfigurableTestSuite(BuiltInSymbolsTestCase.class));
+ suite.addTest(new ConfigurableTestSuite(AssignabilityTestCase.class));
+ suite.addTest(new ConfigurableTestSuite(JSPFunctionsTestCase.class));
+ suite.addTest(new ConfigurableTestSuite(MethodBindingTestCase.class));
+ suite.addTest(new ConfigurableTestSuite(PropertiesOfMapsTestCase.class));
+ suite.addTest(new ConfigurableTestSuite(BracketOperatorTestCase.class));
+
+ suite.addTest(new ConfigurableTestSuite(ArithmeticAddTestCase.class));
+ suite.addTest(new ConfigurableTestSuite(ArithmeticDivideTestCase.class));
+ suite.addTest(new ConfigurableTestSuite(ArithmeticMinusTestCase.class));
+ suite.addTest(new ConfigurableTestSuite(ArithmeticModuloTestCase.class));
+ suite.addTest(new ConfigurableTestSuite(ArithmeticMultiplyTestCase.class));
+
+ suite.addTest(new ConfigurableTestSuite(GreaterThanEqTestCase.class));
+ suite.addTest(new ConfigurableTestSuite(GreaterThanTestCase.class));
+ suite.addTest(new ConfigurableTestSuite(LessThanEqTestCase.class));
+ suite.addTest(new ConfigurableTestSuite(LessThanTestCase.class));
+
+ suite.addTest(new ConfigurableTestSuite(LogicalAndTestCase.class));
+ suite.addTest(new ConfigurableTestSuite(LogicalOrTestCase.class));
+ suite.addTest(new ConfigurableTestSuite(LogicalEqualsTestCase.class));
+ suite.addTest(new ConfigurableTestSuite(LogicalNotEqualsTestCase.class));
+ suite.addTest(new ConfigurableTestSuite(LogicalNotTestCase.class));
+
+ suite.addTest(new ConfigurableTestSuite(UnaryEmptyTestCase.class));
+ suite.addTest(new ConfigurableTestSuite(UnaryMinusTestCase.class));
+
+ suite.addTest(new ConfigurableTestSuite(MarkerOffsetsTestCase.class));
+
+ // file extension sensitivity
+ suite.addTest(new ConfigurableTestSuite(BeanPropertyResolutionTestCase_JSFExt.class));
+ suite.addTest(new ConfigurableTestSuite(BeanPropertyResolutionTestCase_JSPXExt.class));
+ suite.addTest(new ConfigurableTestSuite(BeanPropertyResolutionTestCase_JSPFExt.class));
+
+ // preferences
+ suite.addTest(new ConfigurableTestSuite(EndToEndTestCase.class));
+ suite.addTest(new ConfigurableTestSuite(TestELValidationPreferences.class));
+
+ //$JUnit-END$
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/ELValidationTestPlugin.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/ELValidationTestPlugin.java
new file mode 100644
index 000000000..89dafe2c0
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/ELValidationTestPlugin.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2006 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.validation.el.tests;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class ELValidationTestPlugin extends AbstractUIPlugin
+{
+ /**
+ * The plug-in ID
+ */
+ public static final String PLUGIN_ID = "org.eclipse.jst.jsf.validation.el.tests";
+
+ // The shared instance
+ private static ELValidationTestPlugin plugin;
+
+ /**
+ * The constructor
+ */
+ public ELValidationTestPlugin() {
+ 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 ELValidationTestPlugin getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/PerfSuite.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/PerfSuite.java
new file mode 100644
index 000000000..179f3ce7e
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/PerfSuite.java
@@ -0,0 +1,15 @@
+/*******************************************************************************
+ * 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.validation.el.tests;
+
+public class PerfSuite {
+ // TODO:
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/base/BaseTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/base/BaseTestCase.java
new file mode 100644
index 000000000..c63d6c754
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/base/BaseTestCase.java
@@ -0,0 +1,347 @@
+/*******************************************************************************
+ * 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.validation.el.tests.base;
+
+import java.io.ByteArrayInputStream;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jst.common.project.facet.core.JavaFacet;
+import org.eclipse.jst.jsf.context.IModelContext;
+import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext;
+import org.eclipse.jst.jsf.core.JSFVersion;
+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.designtime.resolver.AbstractStructuredDocumentSymbolResolverFactory;
+import org.eclipse.jst.jsf.designtime.resolver.CachingSymbolContextResolver;
+import org.eclipse.jst.jsf.designtime.resolver.IStructuredDocumentSymbolResolverFactory;
+import org.eclipse.jst.jsf.designtime.resolver.ISymbolContextResolver;
+import org.eclipse.jst.jsf.facesconfig.emf.ManagedBeanType;
+import org.eclipse.jst.jsf.test.util.ConfigurableTestCase;
+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.eclipse.jst.jsf.validation.el.tests.ELValidationTestPlugin;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+
+/**
+ * Base class for all JSP test cases in this plugin
+ *
+ * @author cbateman
+ *
+ */
+public abstract class BaseTestCase extends ConfigurableTestCase
+{
+ public static final String PROXY_SETTING_HOST = "proxySettings_Host";
+ public static final String PROXY_SETTING_PORT = "proxySettings_Port";
+ public static final String JSF_FACET_VERSION = "jsfFacetVersion";
+
+ private final JSFVersion _defaultJSFVersion;
+ protected final IStructuredDocumentSymbolResolverFactory _symbolResolverFactory
+ = new MySymbolResolverFactory();;
+
+ /**
+ * Default constructor
+ */
+ public BaseTestCase(JSFVersion defaultJSFVersion)
+ {
+ super();
+ _defaultJSFVersion = defaultJSFVersion;
+ }
+
+ /**
+ * @param name
+ */
+ public BaseTestCase(String name, JSFVersion defaultJSFVersion) {
+ super(name);
+ _defaultJSFVersion = defaultJSFVersion;
+ }
+
+ /**
+ * The dynamic web project test environment
+ */
+ protected WebProjectTestEnvironment _testEnv;
+ /**
+ * A handle to the Java project test environment
+ */
+ protected JDTTestEnvironment _jdtTestEnv;
+
+ private MyConfiguration _configuration;
+
+ protected void doStandaloneSetup()
+ {
+ super.doStandaloneSetup();
+ _configuration = new MyConfiguration("www-proxy.uk.oracle.com","80",_defaultJSFVersion);
+ }
+
+ protected void doTestSuiteSetup()
+ {
+ super.doTestSuiteSetup();
+ _configuration = new MyConfiguration(_testConfiguration);
+ }
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ JSFTestUtil.setValidationEnabled(false);
+
+ if (_configuration.isProxyEnabled())
+ {
+ JSFTestUtil.setInternetProxyPreferences
+ (true, _configuration.getProxyHostName()
+ , _configuration.getProxyPort());
+ }
+
+ // if JSF 1.1, use web facet 2.4, if higher then use 2.5
+ final String webProjVersion =
+ (_configuration.getJsfVersion() == JSFVersion.V1_0
+ || _configuration.getJsfVersion() == JSFVersion.V1_1)
+ ? "2.4" : "2.5";
+
+ _testEnv = new WebProjectTestEnvironment
+ ("ELValidationTest_"+this.getClass().getName()+"_"+getName()+"_"+_configuration.getJsfVersion()
+ , JavaFacet.VERSION_1_5
+ , ProjectFacetsManager.getProjectFacet( "jst.web" ).getVersion(webProjVersion));
+ _testEnv.createProject(false);
+ assertNotNull(_testEnv);
+ assertNotNull(_testEnv.getTestProject());
+ assertTrue(_testEnv.getTestProject().isAccessible());
+
+ // sub-classes may custom their JSF env; primarily to decide what version
+ // of JSF
+ configureJSFEnvironment();
+
+ _jdtTestEnv = new JDTTestEnvironment(_testEnv);
+ configureJDTTestEnvironment(_jdtTestEnv);
+ }
+
+ /**
+ * Used to configure the JSF environment. After successful
+ * return, sub-classes must ensure that their JSF facet is
+ * installed and that there is at least one faces-config (in WEB-INF)
+ * installed
+ *
+ * @throws Exception
+ */
+ protected abstract JSFFacetedTestEnvironment configureJSFEnvironment() throws Exception;
+
+ /**
+ * Add all Java and property file resources to the Java source path
+ * needed for testing. Sub-classes may override.
+ *
+ * @param jdtTestEnv
+ * @throws Exception
+ */
+ protected void configureJDTTestEnvironment(JDTTestEnvironment jdtTestEnv) throws Exception
+ {
+ // load enums first, since other classes have dependencies
+ TestFileResource resource = new TestFileResource();
+ resource.load(ELValidationTestPlugin.getDefault().getBundle(),
+ "/testdata/classes/MyEnum1.java.data");
+ jdtTestEnv.addSourceFile("src", "beans", "MyEnum1", resource.toString());
+
+ resource = new TestFileResource();
+ resource.load(ELValidationTestPlugin.getDefault().getBundle(),
+ "/testdata/classes/MyEnum2.java.data");
+ jdtTestEnv.addSourceFile("src", "beans", "MyEnum2", resource.toString());
+
+ resource = new TestFileResource();
+ resource.load(ELValidationTestPlugin.getDefault().getBundle(),
+ "/testdata/classes/MyBean.java.data");
+ jdtTestEnv.addSourceFile("src", "beans", "MyBean", resource.toString());
+
+ resource = new TestFileResource();
+ resource.load(ELValidationTestPlugin.getDefault().getBundle(),
+ "/testdata/classes/MapBean.java.data");
+ jdtTestEnv.addSourceFile("src", "beans", "MapBean", resource.toString());
+
+ resource = new TestFileResource();
+ resource.load(ELValidationTestPlugin.getDefault().getBundle(),
+ "/testdata/classes/MyBeanSettable.java.data");
+ jdtTestEnv.addSourceFile("src", "beans", "MyBeanSettable", resource.toString());
+
+ resource = new TestFileResource();
+ resource.load(ELValidationTestPlugin.getDefault().getBundle(),
+ "/testdata/classes/MyBeanSubClass.java.data");
+ jdtTestEnv.addSourceFile("src", "beans", "MyBeanSubClass", resource.toString());
+
+ resource = new TestFileResource();
+ resource.load(ELValidationTestPlugin.getDefault().getBundle(),
+ "/testdata/classes/BeanWithMapProperties.java.data");
+ jdtTestEnv.addSourceFile("src", "beans", "BeanWithMapProperties", resource.toString());
+
+ resource = new TestFileResource();
+ resource.load(ELValidationTestPlugin.getDefault().getBundle(),
+ "/testdata/classes/BeanWithListProperties.java.data");
+ jdtTestEnv.addSourceFile("src", "beans", "BeanWithListProperties", resource.toString());
+
+ resource = new TestFileResource();
+ resource.load(ELValidationTestPlugin.getDefault().getBundle(),
+ "/testdata/classes/ListBean.java.data");
+ jdtTestEnv.addSourceFile("src", "beans", "ListBean", resource.toString());
+
+ resource = new TestFileResource();
+ resource.load(ELValidationTestPlugin.getDefault().getBundle(),
+ "/testdata/classes/Bundle.properties.data");
+ jdtTestEnv.addResourceFile("src", new ByteArrayInputStream(resource.toBytes()),
+ "beans", "Bundle.properties");
+ }
+
+ protected void tearDown() throws Exception
+ {
+ _testEnv.getTestProject().close(null);
+ //_testEnv.getTestProject().delete(true, null);
+ }
+
+ /**
+ * Performs pre-condition and other sanity checks on what was done in setUp()
+ */
+ public void testSanity()
+ {
+ final IJavaProject javaProject = _jdtTestEnv.getJavaProject();
+ assertNotNull(javaProject);
+
+ try
+ {
+ IType type = javaProject.findType("beans.MyBean");
+ assertNotNull(type);
+
+ type = javaProject.findType("beans.MapBean");
+ assertNotNull(type);
+
+ type = javaProject.findType("beans.MyBeanSettable");
+ assertNotNull(type);
+
+ type = javaProject.findType("beans.MyBeanSubClass");
+ assertNotNull(type);
+
+ type = javaProject.findType("beans.BeanWithMapProperties");
+ assertNotNull(type);
+
+ type = javaProject.findType("beans.BeanWithListProperties");
+ assertNotNull(type);
+
+ type = javaProject.findType("beans.ListBean");
+ assertNotNull(type);
+
+ IPackageFragmentRoot srcRoot = _jdtTestEnv.getPackageFragmentRoot("src");
+ assertTrue(srcRoot.exists());
+ IPackageFragment frag = srcRoot.getPackageFragment("beans");
+ assertTrue(frag.exists());
+ IFolder res = (IFolder) frag.getResource();
+ IFile bundleFile = res.getFile("Bundle.properties");
+ assertTrue(bundleFile.exists());
+
+ IJSFAppConfigManager cfgManager =
+ JSFAppConfigManagerFactory.getJSFAppConfigManagerInstance(_jdtTestEnv.getProjectEnvironment().getTestProject());
+ assertNotNull(cfgManager);
+
+ List<ManagedBeanType> mbeans = cfgManager.getManagedBeans();
+ Map<String, ManagedBeanType> nameTest = new HashMap<String, ManagedBeanType>();
+
+ for (final ManagedBeanType mbean : mbeans)
+ {
+ nameTest.put(mbean.getManagedBeanName().getTextContent(), mbean);
+ }
+
+ assertTrue(nameTest.containsKey("myBean"));
+ assertTrue(nameTest.containsKey("mapBean"));
+ assertTrue(nameTest.containsKey("myBeanSettable"));
+ assertTrue(nameTest.containsKey("myBeanSubClass"));
+ assertTrue(nameTest.containsKey("beanWithMapProperties"));
+ assertTrue(nameTest.containsKey("beanWithListProperties"));
+ assertTrue(nameTest.containsKey("listBean"));
+ }
+ catch(JavaModelException jme)
+ {
+ assertTrue("JDT error: "+jme.getLocalizedMessage(), false);
+ }
+ catch (CoreException ce)
+ {
+ assertTrue("Problem loading bundle: "+ce.getLocalizedMessage(), false);
+ }
+ }
+
+ private static class MySymbolResolverFactory extends AbstractStructuredDocumentSymbolResolverFactory
+ {
+ private ISymbolContextResolver _resolver;
+
+ @Override
+ public ISymbolContextResolver getSymbolContextResolver(
+ IModelContext context)
+ {
+ if (_resolver == null)
+ {
+ _resolver = new CachingSymbolContextResolver((IStructuredDocumentContext) context);
+ }
+ else
+ {
+ if (!_resolver.hasSameResolution(context))
+ {
+ _resolver = new CachingSymbolContextResolver((IStructuredDocumentContext) context);
+ }
+ }
+ return _resolver;
+ }
+ }
+
+ private static class MyConfiguration
+ {
+ private final String _proxyHostName;
+ private final String _proxyPort;
+ private final JSFVersion _jsfVersion;
+
+ MyConfiguration(final String proxyHostName, final String proxyPort, final JSFVersion jsfVersion)
+ {
+ _proxyHostName = proxyHostName;
+ _proxyPort = proxyPort;
+ _jsfVersion = jsfVersion;
+ }
+
+ MyConfiguration(TestConfiguration configuration)
+ {
+ _proxyHostName = configuration.get(BaseTestCase.PROXY_SETTING_HOST);
+ _proxyPort = configuration.get(BaseTestCase.PROXY_SETTING_PORT);
+ _jsfVersion = JSFVersion.valueOfString(configuration.get(BaseTestCase.JSF_FACET_VERSION));
+ }
+
+ public boolean isProxyEnabled()
+ {
+ return _proxyHostName != null && _proxyPort != null;
+ }
+
+ public String getProxyHostName() {
+ return _proxyHostName;
+ }
+
+ public String getProxyPort() {
+ return _proxyPort;
+ }
+
+ public JSFVersion getJsfVersion() {
+ return _jsfVersion;
+ }
+
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/base/ELAssert.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/base/ELAssert.java
new file mode 100644
index 000000000..f758472ff
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/base/ELAssert.java
@@ -0,0 +1,396 @@
+package org.eclipse.jst.jsf.validation.el.tests.base;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import junit.framework.Assert;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jst.jsf.context.resolver.structureddocument.IStructuredDocumentContextResolverFactory;
+import org.eclipse.jst.jsf.context.resolver.structureddocument.internal.ITextRegionContextResolver;
+import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext;
+import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContextFactory;
+import org.eclipse.jst.jsf.core.internal.JSFCorePlugin;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.designtime.resolver.IStructuredDocumentSymbolResolverFactory;
+import org.eclipse.jst.jsf.validation.internal.ValidationPreferences;
+import org.eclipse.jst.jsf.validation.internal.el.ELExpressionValidator;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+
+public class ELAssert extends Assert
+{
+
+ /**
+ * Asserts that the list of problems contains one whose id == code
+ *
+ * @param problems
+ * @param code
+ */
+ public static void assertContainsProblem(List<ReportedProblem> problems, int code)
+ {
+ ELAssert.assertContainsProblem(problems, code, -1, -1);
+ }
+
+ /**
+ * @param document
+ * @param docPos
+ * @return the ELText at docPos in document or null if no such text
+ */
+ public static String getELText(IStructuredDocument document, int docPos)
+ {
+ final IStructuredDocumentContext context =
+ IStructuredDocumentContextFactory.INSTANCE.getContext(document, docPos);
+ if (context == null)
+ {
+ fail("context is null");
+ }
+ final ITextRegionContextResolver resolver =
+ IStructuredDocumentContextResolverFactory.INSTANCE.getTextRegionResolver(context);
+ return resolver.getRegionText();
+ }
+
+ /**
+ * @param document
+ * @param docPos
+ * @param file
+ * @return a new expression validator for docPos in the document
+ */
+ public static ELExpressionValidator createELValidator(
+ IStructuredDocument document, int docPos, IFile file, MockELValidationReporter reporter,
+ IStructuredDocumentSymbolResolverFactory factory)
+ {
+ final String elText = getELText(document, docPos);
+ final IStructuredDocumentContext context =
+ IStructuredDocumentContextFactory.INSTANCE.getContext(document, docPos);
+ final ValidationPreferences prefs =
+ new ValidationPreferences(JSFCorePlugin.getDefault().getPreferenceStore());
+ prefs.load();
+
+ return new ELExpressionValidator(context, elText, factory, reporter);
+ }
+
+ /**
+ * Uses assertSyntaxProblems with max severity of error.
+ *
+ * @param document
+ * @param docPos
+ * @param file
+ * @param expectedProblems
+ * @return the list of found syntax problems
+ */
+ public static List<ReportedProblem> assertSyntaxError(IStructuredDocument document,
+ IStructuredDocumentSymbolResolverFactory factory,
+ int docPos,
+ IFile file,
+ int expectedProblems)
+ {
+ return assertSyntaxProblems(document, factory, docPos, file, expectedProblems, IMessage.HIGH_SEVERITY/* "high" is Warning for some reason*/);
+ }
+
+ /**
+ * Uses assertSyntaxProblems with max severity of warning.
+ *
+ * @param document
+ * @param docPos
+ * @param file
+ * @param expectedProblems
+ * @return the list of syntax problems
+ */
+ public static List<ReportedProblem> assertSyntaxWarning(IStructuredDocument document,
+ IStructuredDocumentSymbolResolverFactory factory,
+
+ int docPos,
+ IFile file,
+ int expectedProblems)
+ {
+ return assertSyntaxProblems(document, factory, docPos, file, expectedProblems, IMessage.NORMAL_SEVERITY/* "normal" is Warning for some reason*/);
+ }
+
+ /**
+ * Checks the el expression in document at docPos in file. Asserts
+ * that there exactly the number of expectedProblems expected and that
+ * the highest error severity is expectedMaxSeverity. Returns the list
+ * of syntax errors
+ *
+ * @param document
+ * @param docPos
+ * @param file
+ * @param expectedProblems
+ * @param expectedMaxSeverity
+ * @return the (possibly empty) list of problems
+ */
+ public static List<ReportedProblem> assertSyntaxProblems(IStructuredDocument document,
+ IStructuredDocumentSymbolResolverFactory factory,
+ int docPos,
+ IFile file,
+ int expectedProblems,
+ int expectedMaxSeverity)
+ {
+ final MockELValidationReporter reporter = new MockELValidationReporter();
+
+ final ELExpressionValidator validator =
+ createELValidator(document, docPos, file, reporter, factory);
+ validator.validateXMLNode();
+
+ final List<ReportedProblem> problems = reporter.getSyntaxProblems();
+ assertEquals(expectedProblems, problems.size());
+ int worstSeverity = 0;
+
+ for (final ReportedProblem problem : problems)
+ {
+ // for some reason, the number values are lower for higher severity
+ // constants
+ worstSeverity = maxSeverity(worstSeverity, problem.getSeverity());
+ }
+
+
+ assertEquals(expectedMaxSeverity, worstSeverity);
+
+ return problems;
+ }
+
+ /**
+ * Asserts that the provided expression generates no problem diagnostics
+ * whatsever and that the resolved type is as expected
+ *
+ * @param document
+ * @param docPos
+ * @param file
+ * @param expectedSignature
+ */
+ public static void assertNoError(IStructuredDocument document,
+ IStructuredDocumentSymbolResolverFactory factory, int docPos,
+ IFile file, String expectedSignature)
+ {
+ assertNoError(document, factory, docPos, file, expectedSignature, -1);
+ }
+
+ /**
+ * Asserts that the provided expression generates no problem diagnostics
+ * whatsever and that the resolved type is as expected and checks
+ * assignability if value positive, non-zero.
+ *
+ * @param document
+ * @param docPos
+ * @param file
+ * @param expectedSignature
+ * @param assignability
+ */
+ public static void assertNoError(IStructuredDocument document,
+ IStructuredDocumentSymbolResolverFactory factory, int docPos,
+ IFile file, String expectedSignature, int assignability)
+ {
+ final MockELValidationReporter reporter = new MockELValidationReporter();
+
+ ELExpressionValidator validator = createELValidator(document, docPos,
+ file, reporter, factory);
+ validator.validateXMLNode();
+ assertEquals(0, reporter.getSyntaxProblems().size());
+ assertEquals(0, reporter.getSemanticProblems().size());
+
+ if (expectedSignature != null)
+ {
+ assertNotNull(validator.getExpressionType());
+ assertEquals(expectedSignature, validator.getExpressionType()
+ .getSignatures()[0]);
+ }
+
+ if (assignability >= 0)
+ {
+ assertEquals(assignability, validator.getExpressionType()
+ .getAssignmentTypeMask());
+ }
+ }
+
+ /**
+ * Asserts that the provided expression generates one or more problem
+ * diagnostics of which the most severe is of ERROR severity and that
+ * the total number expected is returned
+ * Asserts also that no syntax errors are present.
+ *
+ * @param document
+ * @param docPos
+ * @param file
+ * @param expectedSignature
+ * @param expectedProblems
+ * @return the list of semantic warnings
+ */
+ public static List<ReportedProblem> assertSemanticError(
+ IStructuredDocument document,
+ IStructuredDocumentSymbolResolverFactory factory, int docPos,
+ IFile file, String expectedSignature, int expectedProblems)
+ {
+ return assertSemanticProblems(document, factory, docPos, file,
+ expectedSignature, expectedProblems, IMessage.HIGH_SEVERITY/*
+ * "high"
+ * is
+ * Error
+ * for
+ * some
+ * reason
+ */);
+ }
+
+ /**
+ * Asserts that the provided expression generates one or more problem
+ * diagnostics of which the most severe is of WARNING severity and that
+ * the total number expected is returned
+ * Asserts also that no syntax errors are present.
+ *
+ * @param document
+ * @param docPos
+ * @param file
+ * @param expectedSignature
+ * @param expectedProblems
+ * @return the list of semantic warnings
+ */
+ public static List<ReportedProblem> assertSemanticWarning(
+ IStructuredDocument document,
+ IStructuredDocumentSymbolResolverFactory factory, int docPos,
+ IFile file, String expectedSignature, int expectedProblems)
+ {
+ return assertSemanticProblems(document, factory, docPos, file,
+ expectedSignature, expectedProblems, IMessage.NORMAL_SEVERITY/*
+ * "normal"
+ * is
+ * Warning
+ * for
+ * some
+ * reason
+ */);
+ }
+
+ /**
+ * Asserts that the provided expression generates one or more problem
+ * diagnostics of which the most severe is of INFO (LOW) severity and that
+ * the total number expected is returned .
+ * Asserts also that no syntax errors are present.
+ *
+ * @param document
+ * @param docPos
+ * @param file
+ * @param expectedSignature
+ * @param expectedProblems
+ * @return the list of semantic warnings
+ */
+ public static List<ReportedProblem> assertSemanticInfo(
+ IStructuredDocument document,
+ IStructuredDocumentSymbolResolverFactory factory,
+ int docPos, IFile file, String expectedSignature,
+ int expectedProblems)
+ {
+ return assertSemanticProblems(document, factory, docPos, file,
+ expectedSignature, expectedProblems, IMessage.LOW_SEVERITY/*
+ * "low"
+ * is
+ * Warning
+ * for
+ * some
+ * reason
+ */);
+ }
+
+ /**
+ * @param document
+ * @param docPos
+ * @param file
+ * @param expectedSignature
+ * @param expectedProblems
+ * @param expectedMaxSeverity
+ * @return the list of semantic problems found
+ */
+ public static List<ReportedProblem> assertSemanticProblems(final IStructuredDocument document,
+ IStructuredDocumentSymbolResolverFactory factory,
+
+ final int docPos,
+ final IFile file,
+ final String expectedSignature,
+ final int expectedProblems,
+ final int expectedMaxSeverity)
+ {
+ final MockELValidationReporter reporter = new MockELValidationReporter();
+
+ final ELExpressionValidator validator =
+ createELValidator(document, docPos, file, reporter, factory);
+ validator.validateXMLNode();
+
+ if (expectedSignature != null
+ && validator.getExpressionType() != null)
+ {
+ assertEquals(expectedSignature, validator.getExpressionType().getSignatures()[0]);
+ }
+
+ assertEquals(0, reporter.getSyntaxProblems().size());
+ final List<ReportedProblem> problems = reporter.getSemanticProblems();
+ assertEquals(expectedProblems, problems.size());
+ int worstSeverity = 0;
+
+ for (final ReportedProblem problem : problems)
+ {
+ // for some reason, the number values are lower for higher severity
+ // constants
+ worstSeverity = maxSeverity(worstSeverity, problem.getSeverity());
+ }
+
+ assertEquals(expectedMaxSeverity, worstSeverity);
+
+ return problems;
+ }
+
+ /**
+ * Asserts that the list of problems contains one whose id == code
+ * If startPos > -1, also checks the offset and length on the matching
+ * problem against startPos and length
+ *
+ * @param problems
+ * @param code
+ * @param startPos
+ * @param length
+ */
+ public static void assertContainsProblem(List<ReportedProblem> problems, int code, int startPos, int length)
+ {
+ final Set<Integer> probsFound = new HashSet<Integer>();
+
+ for (final ReportedProblem problem : problems)
+ {
+ probsFound.add(new Integer(problem.getErrorCode()));
+ if (problem.getErrorCode() == code)
+ {
+ assertTrue("Offset of message must be >= 0", problem.getOffset()>=0);
+ assertTrue("Length of message marker must be >=0", problem.getLength()>=0);
+
+ if (startPos >= 0)
+ {
+ assertEquals("Offset must be == startPos", startPos, problem.getOffset());
+ assertEquals("Length must be == length", problem.getLength(), length);
+ }
+
+ // found the required code, so exit without throwing
+ // any error assertions
+ return;
+ }
+ }
+ // if we reach this point then we have not found the asserted
+ // error code
+ assertTrue("Expected find error code matching "+code+" found "+probsFound.toString(), false);
+ }
+
+ static int maxSeverity(int sev1, int sev2)
+ {
+ if (sev1 == 0)
+ {
+ return sev2;
+ }
+ else if (sev2 == 0)
+ {
+ return sev1;
+ }
+ else
+ {
+ // if both are non-0, then the most sever is the lowest value
+ return Math.min(sev1, sev2);
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/base/JSPTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/base/JSPTestCase.java
new file mode 100644
index 000000000..917731a3f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/base/JSPTestCase.java
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * 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 - initial implementation
+ *******************************************************************************/
+package org.eclipse.jst.jsf.validation.el.tests.base;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
+import org.eclipse.jst.jsf.validation.el.tests.ELValidationTestPlugin;
+
+public class JSPTestCase extends BaseTestCase
+{
+ public static final String FACES_CONFIG_FILE = "facesConfigFile";
+
+ /**
+ * Test config
+ */
+ private MyConfiguration _myConfig;
+ private final JSFVersion _defaultJSFVersion;
+ private final String _defaultFacesConfigFile;
+
+ public JSPTestCase(final JSFVersion defaultJSFVersion, final String defaultFacesConfigFile)
+ {
+ super(defaultJSFVersion);
+ _defaultJSFVersion = defaultJSFVersion;
+ _defaultFacesConfigFile = defaultFacesConfigFile;
+ }
+
+ protected void doStandaloneSetup()
+ {
+ super.doStandaloneSetup();
+
+ // NOTE: defaults to 1.1 tests for standalone testing
+ _myConfig = new MyConfiguration
+ (_defaultJSFVersion
+ , _defaultFacesConfigFile);
+ }
+
+ protected void doTestSuiteSetup()
+ {
+ super.doTestSuiteSetup();
+
+ _myConfig = new MyConfiguration(_testConfiguration);
+ }
+
+ @Override
+ protected JSFFacetedTestEnvironment configureJSFEnvironment() throws Exception
+ {
+ JSFFacetedTestEnvironment jsfFacedEnv = new JSFFacetedTestEnvironment(_testEnv);
+ jsfFacedEnv.initialize(_myConfig.getFacetVersion().toString());
+
+ _testEnv.loadResourceInWebRoot(ELValidationTestPlugin.getDefault().getBundle(),
+ _myConfig.getFacesConfigFile(),
+ "/WEB-INF/faces-config.xml");
+ return jsfFacedEnv;
+ }
+
+ protected IFile loadJSP(final String srcFileName, final String destFileName) throws Exception
+ {
+ return (IFile) _testEnv.loadResourceInWebRoot
+ (ELValidationTestPlugin.getDefault().getBundle(),
+ srcFileName, destFileName);
+ }
+
+ protected static class MyConfiguration
+ {
+ private final JSFVersion _facetVersion;
+ private final String _facesConfigFile;
+
+ MyConfiguration(JSFVersion facetVersion, String facesConfigFile)
+ {
+ super();
+ _facetVersion = facetVersion;
+ _facesConfigFile = facesConfigFile;
+ }
+
+ MyConfiguration(TestConfiguration testConfiguration)
+ {
+ _facetVersion = JSFVersion.valueOfString(testConfiguration.get(BaseTestCase.JSF_FACET_VERSION));
+ _facesConfigFile = testConfiguration.get(FACES_CONFIG_FILE);
+ }
+
+ public JSFVersion getFacetVersion() {
+ return _facetVersion;
+ }
+
+ public String getFacesConfigFile() {
+ return _facesConfigFile;
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/base/MockELValidationReporter.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/base/MockELValidationReporter.java
new file mode 100644
index 000000000..148057d70
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/base/MockELValidationReporter.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * 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.validation.el.tests.base;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.validation.internal.IJSFViewValidator.IValidationReporter;
+import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+
+public class MockELValidationReporter implements IValidationReporter
+{
+ final List<ReportedProblem> _syntaxProblems;
+ final List<ReportedProblem> _semanticProblems;
+
+ public MockELValidationReporter()
+ {
+ _syntaxProblems = new ArrayList<ReportedProblem>();
+ _semanticProblems = new ArrayList<ReportedProblem>();
+ }
+
+ public void report(Diagnostic problem, int start, int length)
+ {
+ if (isASyntaxError(problem))
+ {
+ _syntaxProblems.add(new ReportedProblem(problem, start, length));
+ }
+ else
+ {
+ _semanticProblems.add(new ReportedProblem(problem, start, length));
+ }
+ }
+
+ public List<ReportedProblem> getSyntaxProblems()
+ {
+ return _syntaxProblems;
+ }
+
+ public List<ReportedProblem> getSemanticProblems()
+ {
+ return _semanticProblems;
+ }
+
+ private boolean isASyntaxError(final Diagnostic problem)
+ {
+ return problem.getCode() == DiagnosticFactory.GENERAL_SYNTAX_ERROR_ID;
+ }
+
+ public void report(IMessage message)
+ {
+ throw new UnsupportedOperationException();
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/base/SingleJSPTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/base/SingleJSPTestCase.java
new file mode 100644
index 000000000..9336eaf06
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/base/SingleJSPTestCase.java
@@ -0,0 +1,183 @@
+/*******************************************************************************
+ * 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.validation.el.tests.base;
+
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+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;
+
+public abstract class SingleJSPTestCase extends JSPTestCase
+{
+
+ public static final String FACES_CONFIG_FILE_NAME_1_1 = "/testdata/web/faces-config_1_1.xml.data";
+ public static final String FACES_CONFIG_FILE_NAME_1_2 = "/testdata/web/faces-config_1_2.xml.data";
+
+ /**
+ * 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;
+ /**
+ * Name of the test data file containing the JSP source for this test
+ */
+ private final String _srcFileName;
+
+ /**
+ * Name of the file and path where the JSP source should be put in the
+ * test project
+ */
+ protected final String _destFileName;
+
+
+ protected SingleJSPTestCase(final String srcFileName, final String destFileName, final JSFVersion defaultJSFVersion, final String defaultFacesConfigFile)
+ {
+ super(defaultJSFVersion, defaultFacesConfigFile);
+ _srcFileName = srcFileName;
+ _destFileName = destFileName;
+ }
+
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ _testJSP = loadJSP(_srcFileName, _destFileName);
+
+ _structuredModel = StructuredModelManager.getModelManager().getModelForRead(_testJSP);
+ _structuredDocument = _structuredModel.getStructuredDocument();
+ }
+
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+
+ if (_structuredModel != null)
+ {
+ _structuredModel.releaseFromRead();
+ }
+ }
+
+ /**
+ * Tests for expressions that generate no problems.
+ */
+ public abstract void testNoErrorExprs();
+ /**
+ * Tests for expressions that generate problems with the highest severity being WARNING
+ */
+ public abstract void testWarningExprs();
+ /**
+ * Tests for expressions that generate problems with the highest severity being ERROR
+ */
+ public abstract void testErrorExprs();
+
+
+ /**
+ * Same as BaseTestCase.assertNoError but automatically uses _testJSP for the file
+ * and _structuredDocument.
+ *
+ * @param document
+ * @param docPos
+ * @param expectedSignature
+ */
+ protected void assertNoError(int docPos, String expectedSignature) {
+ ELAssert.assertNoError(_structuredDocument, _symbolResolverFactory, docPos, _testJSP, expectedSignature);
+ }
+
+ /**
+ * Calls BaseTestCase.assertNoError using the already known document and file handle
+ * for this JSP test case.
+ *
+ * @param docPos
+ * @param expectedSignature
+ * @param assignability
+ */
+ protected void assertNoError(int docPos, String expectedSignature, int assignability)
+ {
+ ELAssert.assertNoError(_structuredDocument, _symbolResolverFactory, docPos, _testJSP, expectedSignature, assignability);
+
+ }
+
+ /**
+ * Calls BaseTestCase.assertSyntax using the already known document and file handle
+ * for this JSP test case.
+ *
+ * @param docPos
+ * @param expectedProblems
+ * @return the list of syntax errors (may be empty)
+ */
+ protected List<ReportedProblem> assertSyntaxError(int docPos, int expectedProblems)
+ {
+ return ELAssert.assertSyntaxError(_structuredDocument, _symbolResolverFactory, docPos, _testJSP,
+ expectedProblems);
+ }
+
+ /**
+ * Calls BaseTestCase.assertSyntax using the already known document and file handle
+ * for this JSP test case.
+ *
+ * @param docPos
+ * @param expectedProblems
+ * @return the list of syntax warnings found (may be empty)
+ */
+ protected List<ReportedProblem> assertSyntaxWarning(int docPos, int expectedProblems)
+ {
+ return ELAssert.assertSyntaxWarning(_structuredDocument, _symbolResolverFactory, docPos, _testJSP,
+ expectedProblems);
+ }
+
+ /**
+ * Same as BaseTestCase.assertSemanticError but automatically uses _testJSP for the file
+ *
+ * @param document
+ * @param docPos
+ * @param expectedSignature
+ * @param expectedProblems
+ * @return the list of errors found
+ */
+ protected List<ReportedProblem> assertSemanticError(int docPos, String expectedSignature, int expectedProblems) {
+ return ELAssert.assertSemanticError(_structuredDocument, _symbolResolverFactory, docPos, _testJSP, expectedSignature,
+ expectedProblems);
+ }
+
+ /**
+ * Same as BaseTestCase.assertSemanticWarning but automatically uses _testJSP for the file
+ * and _structuredDocument for the document
+ * @param document
+ * @param docPos
+ * @param expectedSignature
+ * @param expectedProblems
+ * @return the list of errors found
+ */
+ protected List<ReportedProblem> assertSemanticWarning(int docPos, String expectedSignature, int expectedProblems) {
+ return ELAssert.assertSemanticWarning(_structuredDocument, _symbolResolverFactory, docPos, _testJSP, expectedSignature,
+ expectedProblems);
+ }
+
+ protected List<ReportedProblem> assertSemanticInfo(int docPos, String expectedSignature, int expectedProblems)
+ {
+ return ELAssert.assertSemanticInfo(_structuredDocument, _symbolResolverFactory, docPos, _testJSP, expectedSignature,
+ expectedProblems);
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ArithmeticAddTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ArithmeticAddTestCase.java
new file mode 100644
index 000000000..5fa2f7099
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ArithmeticAddTestCase.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+
+import java.util.List;
+
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jst.jsf.common.internal.types.TypeConstants;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
+
+/**
+ * Test suite for testing validation of arithmetic add
+ *
+ * @author cbateman
+ *
+ */
+public class ArithmeticAddTestCase extends SingleJSPTestCase
+{
+ public ArithmeticAddTestCase()
+ {
+ super("/testdata/jsps/arithmeticAdd.jsp.data", "/arithmeticAdd.jsp", JSFVersion.V1_1, FACES_CONFIG_FILE_NAME_1_1);
+ }
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ public void testSanity()
+ {
+ super.testSanity();
+
+ assertEquals("myBean.integerProperty + 3", ELAssert.getELText(_structuredDocument,874));
+ assertEquals("myBean.stringProperty + 3", ELAssert.getELText(_structuredDocument,934));
+ assertEquals("myBean.integerProperty + myBean.integerProperty", ELAssert.getELText(_structuredDocument,992));
+ assertEquals("myBean.bigIntegerProperty + 4", ELAssert.getELText(_structuredDocument,1072));
+ assertEquals("myBean.bigIntegerProperty + 5.5", ELAssert.getELText(_structuredDocument,1134));
+ assertEquals("myBean.bigDoubleProperty + 5.5", ELAssert.getELText(_structuredDocument,1198));
+ assertEquals("myBean.doubleProperty + 5", ELAssert.getELText(_structuredDocument,1261));
+
+ assertEquals("5 + 3", ELAssert.getELText(_structuredDocument,1343));
+ assertEquals("5.5 + 4", ELAssert.getELText(_structuredDocument,1378));
+ assertEquals("5.5 + null", ELAssert.getELText(_structuredDocument,1415));
+ assertEquals("'5' + '4'", ELAssert.getELText(_structuredDocument,1458));
+ assertEquals("null + null", ELAssert.getELText(_structuredDocument,1500));
+ assertEquals("5.5 + 3.5", ELAssert.getELText(_structuredDocument,1545));
+
+ assertEquals("5 + true", ELAssert.getELText(_structuredDocument,1605));
+ assertEquals("myBean.integerProperty + myBean.booleanProperty", ELAssert.getELText(_structuredDocument,1643));
+ assertEquals("myBean.stringArrayProperty + myBean.booleanProperty", ELAssert.getELText(_structuredDocument,1720));
+ assertEquals("myBean.integerProperty + true ", ELAssert.getELText(_structuredDocument,1804));
+ assertEquals("'a' + 'b'", ELAssert.getELText(_structuredDocument,1867));
+ assertEquals("myBean.bigIntegerProperty + true", ELAssert.getELText(_structuredDocument,1909));
+ }
+
+ @Override
+ public void testNoErrorExprs()
+ {
+ assertNoError(874, Signature.SIG_LONG);
+ assertNoError(934, Signature.SIG_LONG);
+ assertNoError(992, Signature.SIG_LONG);
+ assertNoError(1072, TypeConstants.TYPE_BIG_INTEGER);
+ assertNoError(1134, TypeConstants.TYPE_BIG_DOUBLE);
+ assertNoError(1198, TypeConstants.TYPE_BIG_DOUBLE);
+ assertNoError(1261, Signature.SIG_DOUBLE);
+ }
+
+ @Override
+ public void testWarningExprs()
+ {
+ List<ReportedProblem> list = assertSemanticWarning(1343, Signature.SIG_LONG, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1378, Signature.SIG_DOUBLE, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1415, Signature.SIG_DOUBLE, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1458, Signature.SIG_LONG, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1500, Signature.SIG_LONG, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_BOTH_OPERANDS_NULL_ID);
+
+ list = assertSemanticWarning(1545, Signature.SIG_DOUBLE, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+ }
+
+ @Override
+ public void testErrorExprs()
+ {
+ List<ReportedProblem> list = assertSemanticError(1605, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(1643, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(1720, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(1804, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(1867, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_COERCE_LITERALS_TO_NUMBERS_ID);
+
+ list = assertSemanticError(1909, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ArithmeticDivideTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ArithmeticDivideTestCase.java
new file mode 100644
index 000000000..4e8bdd968
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ArithmeticDivideTestCase.java
@@ -0,0 +1,186 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import java.util.List;
+
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jst.jsf.common.internal.types.TypeConstants;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
+
+
+/**
+ * Test suite for arithimetic divide (/, div)
+ * @author cbateman
+ *
+ */
+public class ArithmeticDivideTestCase extends SingleJSPTestCase
+{
+ public ArithmeticDivideTestCase()
+ {
+ super("/testdata/jsps/arithmeticDivide.jsp.data", "/WEB-INF/arithmeticDivide.jsp", JSFVersion.V1_1, FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ public void testSanity()
+ {
+ super.testSanity();
+ assertEquals("myBean.integerProperty / 3", ELAssert.getELText(_structuredDocument,828));
+ assertEquals("myBean.integerProperty div 3", ELAssert.getELText(_structuredDocument,887));
+ assertEquals("myBean.stringProperty / 3", ELAssert.getELText(_structuredDocument,948));
+ assertEquals("myBean.stringProperty div 3", ELAssert.getELText(_structuredDocument,1006));
+ assertEquals("myBean.integerProperty / myBean.integerProperty", ELAssert.getELText(_structuredDocument,1066));
+ assertEquals("myBean.integerProperty div myBean.integerProperty", ELAssert.getELText(_structuredDocument,1146));
+ assertEquals("myBean.bigIntegerProperty / 4", ELAssert.getELText(_structuredDocument,1228));
+ assertEquals("myBean.bigIntegerProperty / 5.5", ELAssert.getELText(_structuredDocument,1290));
+ assertEquals("myBean.bigDoubleProperty / 5.5", ELAssert.getELText(_structuredDocument,1354));
+ assertEquals("myBean.doubleProperty / 5", ELAssert.getELText(_structuredDocument,1417));
+
+ assertEquals("5 / 3", ELAssert.getELText(_structuredDocument,1505));
+ assertEquals("5 div 3", ELAssert.getELText(_structuredDocument,1540));
+ assertEquals("5.5 / 4", ELAssert.getELText(_structuredDocument,1577));
+ assertEquals("5.5 div 4", ELAssert.getELText(_structuredDocument,1614));
+ assertEquals("'5' / '4'", ELAssert.getELText(_structuredDocument,1656));
+ assertEquals("'5' div '4'", ELAssert.getELText(_structuredDocument,1698));
+ assertEquals("null / null", ELAssert.getELText(_structuredDocument,1742));
+ assertEquals("null div null", ELAssert.getELText(_structuredDocument,1786));
+ assertEquals("5.5 / 3.5", ELAssert.getELText(_structuredDocument,1832));
+
+ assertEquals("5 / true", ELAssert.getELText(_structuredDocument,1897));
+ assertEquals("5 div true", ELAssert.getELText(_structuredDocument,1935));
+ assertEquals("myBean.integerProperty / myBean.booleanProperty", ELAssert.getELText(_structuredDocument,1975));
+ assertEquals("myBean.integerProperty div myBean.booleanProperty", ELAssert.getELText(_structuredDocument,2052));
+ assertEquals("myBean.stringArrayProperty / myBean.booleanProperty", ELAssert.getELText(_structuredDocument,2131));
+ assertEquals("myBean.integerProperty div myBean.booleanProperty", ELAssert.getELText(_structuredDocument,2212));
+ assertEquals("myBean.integerProperty / true ", ELAssert.getELText(_structuredDocument,2294));
+ assertEquals("myBean.integerProperty div true ", ELAssert.getELText(_structuredDocument,2357));
+ assertEquals("'a' / 'b'", ELAssert.getELText(_structuredDocument,2422));
+ assertEquals("'a' div 'b'", ELAssert.getELText(_structuredDocument,2464));
+ assertEquals("5.5 / null", ELAssert.getELText(_structuredDocument,2505));
+ assertEquals("5.5 div null", ELAssert.getELText(_structuredDocument,2545));
+ assertEquals("5/0", ELAssert.getELText(_structuredDocument,2587));
+ assertEquals("5 div 0", ELAssert.getELText(_structuredDocument,2620));
+ assertEquals("myBean.bigIntegerProperty + true", ELAssert.getELText(_structuredDocument,2657));
+ assertEquals("myBean.bigDoubleProperty / null", ELAssert.getELText(_structuredDocument,2719));
+ assertEquals("myBean.bigDoubleProperty div true", ELAssert.getELText(_structuredDocument,2780));
+ }
+
+ @Override
+ public void testNoErrorExprs()
+ {
+ assertNoError(828, Signature.SIG_DOUBLE);
+ assertNoError(887, Signature.SIG_DOUBLE);
+ assertNoError(948, Signature.SIG_DOUBLE);
+ assertNoError(1006, Signature.SIG_DOUBLE);
+ assertNoError(1066, Signature.SIG_DOUBLE);
+ assertNoError(1146, Signature.SIG_DOUBLE);
+ assertNoError(1228, TypeConstants.TYPE_BIG_DOUBLE);
+ assertNoError(1290, TypeConstants.TYPE_BIG_DOUBLE);
+ assertNoError(1354, TypeConstants.TYPE_BIG_DOUBLE);
+ assertNoError(1417, Signature.SIG_DOUBLE);
+ }
+
+ @Override
+ public void testWarningExprs()
+ {
+ List<ReportedProblem> list = assertSemanticWarning(1505, Signature.SIG_DOUBLE, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1540, Signature.SIG_DOUBLE, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1577, Signature.SIG_DOUBLE, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1614, Signature.SIG_DOUBLE, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1656, Signature.SIG_DOUBLE, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1698, Signature.SIG_DOUBLE, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1742, Signature.SIG_LONG, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_BOTH_OPERANDS_NULL_ID);
+
+ list = assertSemanticWarning(1786, Signature.SIG_LONG, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_BOTH_OPERANDS_NULL_ID);
+
+ list = assertSemanticWarning(1832, Signature.SIG_DOUBLE, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+ }
+
+ @Override
+ public void testErrorExprs()
+ {
+ List<ReportedProblem> list = assertSemanticError(1897, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(1935, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(1975, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2052, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2131, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2212, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2294, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2357, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2422, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2464, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2505, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_POSSIBLE_DIVISION_BY_ZERO_ID);
+
+ list = assertSemanticError(2545, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_POSSIBLE_DIVISION_BY_ZERO_ID);
+
+ list = assertSemanticError(2587, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_POSSIBLE_DIVISION_BY_ZERO_ID);
+
+ list = assertSemanticError(2620, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_POSSIBLE_DIVISION_BY_ZERO_ID);
+
+ list = assertSemanticError(2657, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2719, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_POSSIBLE_DIVISION_BY_ZERO_ID);
+
+ list = assertSemanticError(2780, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ArithmeticMinusTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ArithmeticMinusTestCase.java
new file mode 100644
index 000000000..fc4b888ac
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ArithmeticMinusTestCase.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import java.util.List;
+
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jst.jsf.common.internal.types.TypeConstants;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
+
+/**
+ * Test suite for arithmetic subtract.
+ *
+ * @author cbateman
+ *
+ */
+public class ArithmeticMinusTestCase extends SingleJSPTestCase
+{
+ public ArithmeticMinusTestCase()
+ {
+ super("/testdata/jsps/arithmeticMinus.jsp.data", "/WEB-INF/arithmeticMinus.jsp", JSFVersion.V1_1, FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ public void testSanity()
+ {
+ super.testSanity();
+
+ assertEquals("myBean.integerProperty - 3", ELAssert.getELText(_structuredDocument,828));
+ assertEquals("myBean.stringProperty - 3", ELAssert.getELText(_structuredDocument,887));
+ assertEquals("myBean.integerProperty - myBean.integerProperty", ELAssert.getELText(_structuredDocument,945));
+ assertEquals("myBean.bigIntegerProperty - 4", ELAssert.getELText(_structuredDocument,1025));
+ assertEquals("myBean.bigIntegerProperty - 5.5", ELAssert.getELText(_structuredDocument,1087));
+ assertEquals("myBean.bigDoubleProperty - 5.5", ELAssert.getELText(_structuredDocument,1151));
+ assertEquals("myBean.doubleProperty - 5", ELAssert.getELText(_structuredDocument,1214));
+
+ assertEquals("5 - 3", ELAssert.getELText(_structuredDocument,1302));
+ assertEquals("5.5 - 4", ELAssert.getELText(_structuredDocument,1337));
+ assertEquals("5.5 - null", ELAssert.getELText(_structuredDocument,1374));
+ assertEquals("'5' - '4'", ELAssert.getELText(_structuredDocument,1417));
+ assertEquals("null - null", ELAssert.getELText(_structuredDocument,1459));
+ assertEquals("5.5 - 3.5", ELAssert.getELText(_structuredDocument,1504));
+
+ assertEquals("5 - true", ELAssert.getELText(_structuredDocument,1564));
+ assertEquals("myBean.integerProperty - myBean.booleanProperty", ELAssert.getELText(_structuredDocument,1602));
+ assertEquals("myBean.stringArrayProperty - myBean.booleanProperty", ELAssert.getELText(_structuredDocument,1679));
+ assertEquals("myBean.integerProperty - true ", ELAssert.getELText(_structuredDocument,1763));
+ assertEquals("'a' - 'b'", ELAssert.getELText(_structuredDocument,1826));
+ assertEquals("myBean.bigIntegerProperty - true", ELAssert.getELText(_structuredDocument,1868));
+ }
+
+ @Override
+ public void testNoErrorExprs()
+ {
+ assertNoError(828, Signature.SIG_LONG);
+ assertNoError(887, Signature.SIG_LONG);
+ assertNoError(945, Signature.SIG_LONG);
+ assertNoError(1025, TypeConstants.TYPE_BIG_INTEGER);
+ assertNoError(1087, TypeConstants.TYPE_BIG_DOUBLE);
+ assertNoError(1151, TypeConstants.TYPE_BIG_DOUBLE);
+ assertNoError(1214, Signature.SIG_DOUBLE);
+ }
+
+ @Override
+ public void testWarningExprs()
+ {
+ List<ReportedProblem> list = assertSemanticWarning(1302, Signature.SIG_LONG, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1337, Signature.SIG_DOUBLE, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1374, Signature.SIG_DOUBLE, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1417, Signature.SIG_LONG, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1459, Signature.SIG_LONG, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_BOTH_OPERANDS_NULL_ID);
+
+ list = assertSemanticWarning(1504, Signature.SIG_DOUBLE, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+ }
+
+ @Override
+ public void testErrorExprs()
+ {
+ List<ReportedProblem> list = assertSemanticError(1564, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(1602, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(1679, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(1763, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(1826, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_COERCE_LITERALS_TO_NUMBERS_ID);
+
+ list = assertSemanticError(1868, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ArithmeticModuloTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ArithmeticModuloTestCase.java
new file mode 100644
index 000000000..1d37f47e2
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ArithmeticModuloTestCase.java
@@ -0,0 +1,181 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import java.util.List;
+
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jst.jsf.common.internal.types.TypeConstants;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
+
+/**
+ * Test suite for arithmetic remainder (mod, %)
+ * @author cbateman
+ *
+ */
+public class ArithmeticModuloTestCase extends SingleJSPTestCase
+{
+ public ArithmeticModuloTestCase()
+ {
+ super("/testdata/jsps/arithmeticModulo.jsp.data", "/WEB-INF/arithmeticModulo.jsp", JSFVersion.V1_1,FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ public void testSanity()
+ {
+ super.testSanity();
+
+ assertEquals("myBean.integerProperty % 3", ELAssert.getELText(_structuredDocument,828));
+ assertEquals("myBean.integerProperty mod 3", ELAssert.getELText(_structuredDocument,887));
+ assertEquals("myBean.stringProperty % 3", ELAssert.getELText(_structuredDocument,948));
+ assertEquals("myBean.stringProperty mod 3", ELAssert.getELText(_structuredDocument,1006));
+ assertEquals("myBean.integerProperty % myBean.integerProperty", ELAssert.getELText(_structuredDocument,1066));
+ assertEquals("myBean.integerProperty mod myBean.integerProperty", ELAssert.getELText(_structuredDocument,1146));
+ assertEquals("myBean.bigIntegerProperty mod 4", ELAssert.getELText(_structuredDocument,1228));
+ assertEquals("myBean.doubleProperty mod 4", ELAssert.getELText(_structuredDocument,1292));
+ assertEquals("myBean.doubleProperty mod 5.43", ELAssert.getELText(_structuredDocument,1351));
+
+ assertEquals("5 % 3", ELAssert.getELText(_structuredDocument,1437));
+ assertEquals("5 mod 3", ELAssert.getELText(_structuredDocument,1472));
+ assertEquals("5.5 % 4 ", ELAssert.getELText(_structuredDocument,1509));
+ assertEquals("5.5 mod 4 ", ELAssert.getELText(_structuredDocument,1547));
+ assertEquals("'5' % '4'", ELAssert.getELText(_structuredDocument,1590));
+ assertEquals("'5' mod '4'", ELAssert.getELText(_structuredDocument,1632));
+ assertEquals("null % null", ELAssert.getELText(_structuredDocument,1676));
+ assertEquals("null mod null", ELAssert.getELText(_structuredDocument,1720));
+
+ assertEquals("5 % true", ELAssert.getELText(_structuredDocument,1784));
+ assertEquals("5 mod true", ELAssert.getELText(_structuredDocument,1822));
+ assertEquals("myBean.stringArrayProperty % myBean.booleanProperty", ELAssert.getELText(_structuredDocument,1862));
+ assertEquals("myBean.stringArrayProperty mod myBean.booleanProperty", ELAssert.getELText(_structuredDocument,1943));
+ assertEquals("myBean.integerProperty % true ", ELAssert.getELText(_structuredDocument,2029));
+ assertEquals("myBean.integerProperty mod true ", ELAssert.getELText(_structuredDocument,2092));
+ assertEquals("'a' % 'b'", ELAssert.getELText(_structuredDocument,2157));
+ assertEquals("'a' mod 'b'", ELAssert.getELText(_structuredDocument,2199));
+ assertEquals("5.5 % null", ELAssert.getELText(_structuredDocument,2240));
+ assertEquals("5.5 mod null", ELAssert.getELText(_structuredDocument,2280));
+ assertEquals("5%0", ELAssert.getELText(_structuredDocument,2322));
+ assertEquals("5 mod 0", ELAssert.getELText(_structuredDocument,2355));
+ assertEquals("myBean.integerProperty % myBean.booleanProperty", ELAssert.getELText(_structuredDocument,2392));
+ assertEquals("myBean.integerProperty mod myBean.booleanProperty", ELAssert.getELText(_structuredDocument,2469));
+ assertEquals("myBean.bigIntegerProperty % myBean.booleanProperty", ELAssert.getELText(_structuredDocument,2548));
+ assertEquals("myBean.bigIntegerProperty mod null", ELAssert.getELText(_structuredDocument,2628));
+ assertEquals("myBean.doubleProperty % true", ELAssert.getELText(_structuredDocument,2691));
+ }
+
+ @Override
+ public void testNoErrorExprs()
+ {
+ assertNoError(828,Signature.SIG_LONG);
+ assertNoError(887, Signature.SIG_LONG);
+ assertNoError(948, Signature.SIG_LONG);
+ assertNoError(1006, Signature.SIG_LONG);
+ assertNoError(1066, Signature.SIG_LONG);
+ assertNoError(1146, Signature.SIG_LONG);
+ assertNoError(1228, TypeConstants.TYPE_BIG_INTEGER);
+ assertNoError(1292, Signature.SIG_DOUBLE);
+ assertNoError(1351, Signature.SIG_DOUBLE);
+ }
+
+ @Override
+ public void testWarningExprs()
+ {
+ List<ReportedProblem> list = assertSemanticWarning(1437, Signature.SIG_LONG, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1472, Signature.SIG_LONG, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1509, Signature.SIG_DOUBLE, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1547, Signature.SIG_DOUBLE, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1590, Signature.SIG_LONG, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1632, Signature.SIG_LONG, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1676, Signature.SIG_LONG, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_BOTH_OPERANDS_NULL_ID);
+
+ list = assertSemanticWarning(1720, Signature.SIG_LONG, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_BOTH_OPERANDS_NULL_ID);
+
+ }
+
+ @Override
+ public void testErrorExprs()
+ {
+ List<ReportedProblem> list = assertSemanticError(1784, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(1822, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(1862, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(1943, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2029, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2092, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2157, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2199, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2240, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_POSSIBLE_DIVISION_BY_ZERO_ID);
+
+ list = assertSemanticError(2280, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_POSSIBLE_DIVISION_BY_ZERO_ID);
+
+ list = assertSemanticError(2322, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_POSSIBLE_DIVISION_BY_ZERO_ID);
+
+ list = assertSemanticError(2355, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_POSSIBLE_DIVISION_BY_ZERO_ID);
+
+ list = assertSemanticError(2392, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2469, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2548, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2628, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_POSSIBLE_DIVISION_BY_ZERO_ID);
+
+ list = assertSemanticError(2691, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ArithmeticMultiplyTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ArithmeticMultiplyTestCase.java
new file mode 100644
index 000000000..77190c055
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ArithmeticMultiplyTestCase.java
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import java.util.List;
+
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jst.jsf.common.internal.types.TypeConstants;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
+
+/**
+ * Test cases for arithmetic multiply
+ *
+ * @author cbateman
+ *
+ */
+public class ArithmeticMultiplyTestCase extends SingleJSPTestCase
+{
+ public ArithmeticMultiplyTestCase()
+ {
+ super("/testdata/jsps/arithmeticMultiply.jsp.data", "/WEB-INF/arithmeticMultiply.jsp", JSFVersion.V1_1,FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ public void testSanity()
+ {
+ super.testSanity();
+ assertEquals("myBean.integerProperty * 3", ELAssert.getELText(_structuredDocument,828));
+ assertEquals("myBean.stringProperty * 3", ELAssert.getELText(_structuredDocument,887));
+ assertEquals("myBean.integerProperty * myBean.integerProperty", ELAssert.getELText(_structuredDocument,945));
+ assertEquals("myBean.bigIntegerProperty * 4", ELAssert.getELText(_structuredDocument,1025));
+ assertEquals("myBean.bigIntegerProperty * 5.5", ELAssert.getELText(_structuredDocument,1087));
+ assertEquals("myBean.bigDoubleProperty * 5.5", ELAssert.getELText(_structuredDocument,1151));
+ assertEquals("myBean.doubleProperty * 5", ELAssert.getELText(_structuredDocument,1214));
+
+ assertEquals("5 * 3", ELAssert.getELText(_structuredDocument,1302));
+ assertEquals("5.5 * 4", ELAssert.getELText(_structuredDocument,1337));
+ assertEquals("5.5 * null", ELAssert.getELText(_structuredDocument,1374));
+ assertEquals("'5' * '4'", ELAssert.getELText(_structuredDocument,1417));
+ assertEquals("null * null", ELAssert.getELText(_structuredDocument,1459));
+ assertEquals("5.5 * 3.5", ELAssert.getELText(_structuredDocument,1504));
+
+ assertEquals("5 * true", ELAssert.getELText(_structuredDocument,1567));
+ assertEquals("myBean.integerProperty * myBean.booleanProperty", ELAssert.getELText(_structuredDocument,1605));
+ assertEquals("myBean.stringArrayProperty * myBean.booleanProperty", ELAssert.getELText(_structuredDocument,1682));
+ assertEquals("myBean.integerProperty * true ", ELAssert.getELText(_structuredDocument,1766));
+ assertEquals("'a' * 'b'", ELAssert.getELText(_structuredDocument,1829));
+ assertEquals("myBean.bigIntegerProperty * true", ELAssert.getELText(_structuredDocument,1871));
+ }
+
+ @Override
+ public void testNoErrorExprs()
+ {
+ assertNoError(828,Signature.SIG_LONG);
+ assertNoError(887,Signature.SIG_LONG);
+ assertNoError(945,Signature.SIG_LONG);
+ assertNoError(1025, TypeConstants.TYPE_BIG_INTEGER);
+ assertNoError(1087, TypeConstants.TYPE_BIG_DOUBLE);
+ assertNoError(1151, TypeConstants.TYPE_BIG_DOUBLE);
+ assertNoError(1214, Signature.SIG_DOUBLE);
+ }
+
+ @Override
+ public void testWarningExprs()
+ {
+ List<ReportedProblem> list = assertSemanticWarning(1302, Signature.SIG_LONG, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1337, Signature.SIG_DOUBLE, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1374, Signature.SIG_DOUBLE, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1417, Signature.SIG_LONG, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1459, Signature.SIG_LONG, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_BOTH_OPERANDS_NULL_ID);
+
+ list = assertSemanticWarning(1504, Signature.SIG_DOUBLE, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+ }
+
+ @Override
+ public void testErrorExprs()
+ {
+ List<ReportedProblem> list = assertSemanticError(1567, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(1605, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(1682, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(1766, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(1829, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_COERCE_LITERALS_TO_NUMBERS_ID);
+
+ list = assertSemanticError(1871, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/AssignabilityTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/AssignabilityTestCase.java
new file mode 100644
index 000000000..c79112ec3
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/AssignabilityTestCase.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jst.jsf.common.internal.types.IAssignable;
+import org.eclipse.jst.jsf.common.internal.types.TypeConstants;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+
+/**
+ * Test cases for assignability test on variable and properties
+ *
+ * @author cbateman
+ */
+public class AssignabilityTestCase extends SingleJSPTestCase
+{
+ public AssignabilityTestCase()
+ {
+ super("/testdata/jsps/assignability.jsp.data", "/assignability.jsp", JSFVersion.V1_1,FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(JSFCoreUtilHelper.createSimpleRegistryFactory());
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(JSFCoreUtilHelper.createSimpleRegistryFactory());
+ }
+
+ @Override
+ public void testSanity()
+ {
+ assertEquals("myBean.integerProperty + 3", ELAssert.getELText(_structuredDocument,880));
+ assertEquals("myBean.writableStringProperty", ELAssert.getELText(_structuredDocument,938));
+ assertEquals("myBean.stringProperty", ELAssert.getELText(_structuredDocument,997));
+ assertEquals("bundle.bundleProp2", ELAssert.getELText(_structuredDocument,1047));
+ assertEquals("requestScope.myBeanSubClass", ELAssert.getELText(_structuredDocument,1097));
+ assertEquals("myBean.validate", ELAssert.getELText(_structuredDocument,1156));
+ }
+
+ @Override
+ public void testNoErrorExprs()
+ {
+ assertNoError(880, Signature.SIG_LONG, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(938, TypeConstants.TYPE_STRING, IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(997, TypeConstants.TYPE_STRING, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1047, TypeConstants.TYPE_STRING, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1097, "Lbeans.MyBeanSubClass;", IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ // TODO: this will fail when the jsf-impl/api jars are injected since then we will
+ // have fully resolved (L) signatures instead of (Q) unresolved ones.
+ assertNoError(1156, "(QFacesContext;QUIComponent;Ljava.lang.Object;)V", IAssignable.ASSIGNMENT_TYPE_NONE);
+ }
+
+ @Override
+ public void testWarningExprs()
+ {
+ // no warnings
+ }
+
+ @Override
+ public void testErrorExprs()
+ {
+ // no errors
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/BadSyntaxTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/BadSyntaxTestCase.java
new file mode 100644
index 000000000..1fb9840a6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/BadSyntaxTestCase.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import java.util.List;
+
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
+
+/**
+ * Test cases for syntax error testing
+ *
+ * @author cbateman
+ *
+ */
+public class BadSyntaxTestCase extends SingleJSPTestCase
+{
+ public BadSyntaxTestCase() {
+ super("/testdata/jsps/badSyntax.jsp.data", "/badSyntax.jsp", JSFVersion.V1_1,FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ public void testSanity()
+ {
+ assertEquals(" ", ELAssert.getELText(_structuredDocument,870));
+ assertEquals("myBean.integerProperty + ", ELAssert.getELText(_structuredDocument,902));
+ assertEquals("&& myBean.booleanProperty", ELAssert.getELText(_structuredDocument,958));
+ assertEquals("&!", ELAssert.getELText(_structuredDocument,1014));
+ assertEquals("f?x", ELAssert.getELText(_structuredDocument,1047));
+ }
+
+
+ @Override
+ public void testNoErrorExprs() {
+ // no non-error cases
+ }
+
+
+ @Override
+ public void testWarningExprs()
+ {
+ List<ReportedProblem> list = assertSyntaxWarning(870,1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.GENERAL_SYNTAX_ERROR_ID);
+
+ list = assertSyntaxWarning(902,1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.GENERAL_SYNTAX_ERROR_ID);
+
+ list = assertSyntaxWarning(958,1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.GENERAL_SYNTAX_ERROR_ID);
+
+ list = assertSyntaxWarning(1014,1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.GENERAL_SYNTAX_ERROR_ID);
+
+ list = assertSyntaxWarning(1047,1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.GENERAL_SYNTAX_ERROR_ID);
+ }
+
+ @Override
+ public void testErrorExprs()
+ {
+ // no error cases
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/BeanPropertyResolutionTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/BeanPropertyResolutionTestCase.java
new file mode 100644
index 000000000..d6cbffab8
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/BeanPropertyResolutionTestCase.java
@@ -0,0 +1,180 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import java.util.List;
+
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jst.jsf.common.internal.types.IAssignable;
+import org.eclipse.jst.jsf.common.internal.types.TypeConstants;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
+
+/**
+ * Test cases for bean property resolution
+ *
+ * @author cbateman
+ */
+public class BeanPropertyResolutionTestCase extends SingleJSPTestCase
+{
+ public BeanPropertyResolutionTestCase() {
+ super("/testdata/jsps/beanPropertyResolution.jsp.data", "/beanPropertyResolution.jsp", JSFVersion.V1_1,FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ /**
+ * Allow sub-classing for sensitivity analysis (i.e. different dest file extensions)
+ *
+ * @param srcFile
+ * @param destFile
+ */
+ protected BeanPropertyResolutionTestCase(final String srcFile, final String destFile)
+ {
+ super(srcFile,destFile, JSFVersion.V1_1,FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ public void testSanity()
+ {
+ assertEquals("myBean.stringProperty", ELAssert.getELText(_structuredDocument,523));
+ assertEquals("myBean.integerProperty", ELAssert.getELText(_structuredDocument,577));
+ assertEquals("myBean.booleanProperty", ELAssert.getELText(_structuredDocument,632));
+ assertEquals("myBean.doubleProperty", ELAssert.getELText(_structuredDocument,687));
+ assertEquals("myBean.mapProperty", ELAssert.getELText(_structuredDocument,741));
+ assertEquals("myBean.stringArrayProperty", ELAssert.getELText(_structuredDocument,792));
+ assertEquals("myBean.collectionProperty", ELAssert.getELText(_structuredDocument,851));
+ assertEquals("myBean.listProperty", ELAssert.getELText(_structuredDocument,909));
+ assertEquals("myBean.comparableProperty", ELAssert.getELText(_structuredDocument,961));
+ assertEquals("myBean.bigIntegerProperty", ELAssert.getELText(_structuredDocument,1019));
+ assertEquals("myBean.bigDoubleProperty", ELAssert.getELText(_structuredDocument,1077));
+ assertEquals("myBean.writableStringProperty", ELAssert.getELText(_structuredDocument,1134));
+ assertEquals("myBean.isStyleBooleanProperty", ELAssert.getELText(_structuredDocument,1196));
+ assertEquals("myBean.colors", ELAssert.getELText(_structuredDocument,1258));
+ assertEquals("myBean.coins", ELAssert.getELText(_structuredDocument,1304));
+
+ assertEquals("myBeanSubClass.stringProperty", ELAssert.getELText(_structuredDocument,1382));
+ assertEquals("myBeanSubClass.integerProperty", ELAssert.getELText(_structuredDocument,1444));
+ assertEquals("myBeanSubClass.booleanProperty", ELAssert.getELText(_structuredDocument,1507));
+ assertEquals("myBeanSubClass.doubleProperty", ELAssert.getELText(_structuredDocument,1570));
+ assertEquals("myBeanSubClass.mapProperty", ELAssert.getELText(_structuredDocument,1632));
+ assertEquals("myBeanSubClass.stringArrayProperty", ELAssert.getELText(_structuredDocument,1691));
+ assertEquals("myBeanSubClass.collectionProperty", ELAssert.getELText(_structuredDocument,1758));
+ assertEquals("myBeanSubClass.listProperty", ELAssert.getELText(_structuredDocument,1824));
+ assertEquals("myBeanSubClass.comparableProperty", ELAssert.getELText(_structuredDocument,1884));
+ assertEquals("myBeanSubClass.bigIntegerProperty", ELAssert.getELText(_structuredDocument,1950));
+ assertEquals("myBeanSubClass.bigDoubleProperty", ELAssert.getELText(_structuredDocument,2016));
+ assertEquals("myBeanSubClass.writableStringProperty", ELAssert.getELText(_structuredDocument,2081));
+ assertEquals("myBeanSubClass.isStyleBooleanProperty", ELAssert.getELText(_structuredDocument,2151));
+ assertEquals("myBeanSubClass.subClassStringProperty", ELAssert.getELText(_structuredDocument,2221));
+ assertEquals("myBeanSubClass.colors", ELAssert.getELText(_structuredDocument,2291));
+ assertEquals("myBeanSubClass.coins", ELAssert.getELText(_structuredDocument,2345));
+
+ assertEquals("myBeanSubClass.stringProperty", ELAssert.getELText(_structuredDocument,2425));
+ assertEquals("myBeanSettable.integerProperty", ELAssert.getELText(_structuredDocument,2487));
+ assertEquals("myBeanSettable.booleanProperty", ELAssert.getELText(_structuredDocument,2550));
+ assertEquals("myBeanSettable.doubleProperty", ELAssert.getELText(_structuredDocument,2613));
+ assertEquals("myBeanSettable.mapProperty", ELAssert.getELText(_structuredDocument,2675));
+ assertEquals("myBeanSettable.stringArrayProperty", ELAssert.getELText(_structuredDocument,2734));
+ assertEquals("myBeanSettable.collectionProperty", ELAssert.getELText(_structuredDocument,2801));
+ assertEquals("myBeanSettable.listProperty", ELAssert.getELText(_structuredDocument,2867));
+ assertEquals("myBeanSettable.comparableProperty", ELAssert.getELText(_structuredDocument,2927));
+ assertEquals("myBeanSettable.bigIntegerProperty", ELAssert.getELText(_structuredDocument,2993));
+ assertEquals("myBeanSettable.bigDoubleProperty", ELAssert.getELText(_structuredDocument,3059));
+ assertEquals("myBeanSettable.writableStringProperty", ELAssert.getELText(_structuredDocument,3124));
+ assertEquals("myBeanSettable.isStyleBooleanProperty", ELAssert.getELText(_structuredDocument,3194));
+ assertEquals("myBeanSettable.colors", ELAssert.getELText(_structuredDocument,3264));
+ assertEquals("myBeanSettable.coins", ELAssert.getELText(_structuredDocument,3318));
+
+ assertEquals("myBean.subClassStringProperty", ELAssert.getELText(_structuredDocument,3398));
+ assertEquals("myBeanSubClass.notAMember", ELAssert.getELText(_structuredDocument,3460));
+ assertEquals("myBeanSettable.alsoNotAMember", ELAssert.getELText(_structuredDocument,3518));
+ }
+
+ @Override
+ public void testNoErrorExprs()
+ {
+ assertNoError(523, TypeConstants.TYPE_STRING, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(577, Signature.SIG_INT, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(632, Signature.SIG_BOOLEAN, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(687, Signature.SIG_DOUBLE, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(741, TypeConstants.TYPE_MAP, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(792, Signature.createArraySignature(TypeConstants.TYPE_STRING, 1), IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(851, TypeConstants.TYPE_COLLECTION, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(909, "Ljava.util.List;", IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(961, TypeConstants.TYPE_COMPARABLE, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1019, TypeConstants.TYPE_BIG_INTEGER, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1077, TypeConstants.TYPE_BIG_DOUBLE, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1134, TypeConstants.TYPE_STRING, IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(1196, Signature.SIG_BOOLEAN, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1258, "Lbeans.MyEnum2;", IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1304, "Lbeans.MyEnum1;", IAssignable.ASSIGNMENT_TYPE_RHS);
+
+ assertNoError(1382, TypeConstants.TYPE_STRING, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1444, Signature.SIG_INT, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1507, Signature.SIG_BOOLEAN, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1570, Signature.SIG_DOUBLE, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1632, TypeConstants.TYPE_MAP, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1691, Signature.createArraySignature(TypeConstants.TYPE_STRING, 1), IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1758, TypeConstants.TYPE_COLLECTION, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1824, "Ljava.util.List;", IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1884, TypeConstants.TYPE_COMPARABLE, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1950, TypeConstants.TYPE_BIG_INTEGER, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(2016, TypeConstants.TYPE_BIG_DOUBLE, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(2081, TypeConstants.TYPE_STRING, IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(2151, Signature.SIG_BOOLEAN, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(2221, TypeConstants.TYPE_STRING, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(2291, "Lbeans.MyEnum2;", IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(2345, "Lbeans.MyEnum1;", IAssignable.ASSIGNMENT_TYPE_RHS);
+
+ assertNoError(2425, TypeConstants.TYPE_STRING, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(2487, Signature.SIG_INT, IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(2550, Signature.SIG_BOOLEAN, IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(2613, Signature.SIG_DOUBLE, IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(2675, TypeConstants.TYPE_MAP, IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(2734, Signature.createArraySignature(TypeConstants.TYPE_STRING, 1), IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(2801, TypeConstants.TYPE_COLLECTION, IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(2867, "Ljava.util.List;", IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(2927, TypeConstants.TYPE_COMPARABLE, IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(2993, TypeConstants.TYPE_BIG_INTEGER, IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(3059, TypeConstants.TYPE_BIG_DOUBLE, IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(3124, TypeConstants.TYPE_STRING, IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(3194, Signature.SIG_BOOLEAN, IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(3264, "Lbeans.MyEnum2;", IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(3318, "Lbeans.MyEnum1;", IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ }
+
+ @Override
+ public void testWarningExprs()
+ {
+ List<ReportedProblem> list = assertSemanticWarning(3398,null,1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.MEMBER_NOT_FOUND_ID);
+
+ list = assertSemanticWarning(3460,null,1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.MEMBER_NOT_FOUND_ID);
+
+ list = assertSemanticWarning(3518,null,1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.MEMBER_NOT_FOUND_ID);
+ }
+
+ @Override
+ public void testErrorExprs()
+ {
+ // no error cases
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/BeanVariableResolutionTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/BeanVariableResolutionTestCase.java
new file mode 100644
index 000000000..4b791180d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/BeanVariableResolutionTestCase.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import java.util.List;
+
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
+
+/**
+ * Test cases for bean variable resolution
+ *
+ * @author cbateman
+ *
+ */
+public class BeanVariableResolutionTestCase extends SingleJSPTestCase
+{
+ public BeanVariableResolutionTestCase() {
+ super("/testdata/jsps/beanVariableResolution.jsp.data", "/beanVariableResolution.jsp", JSFVersion.V1_1,FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ public void testSanity()
+ {
+ assertEquals("myBean", ELAssert.getELText(_structuredDocument,523));
+ assertEquals("myBeanSubClass", ELAssert.getELText(_structuredDocument,562));
+ assertEquals("mapBean", ELAssert.getELText(_structuredDocument,609));
+ assertEquals("mapBean1", ELAssert.getELText(_structuredDocument,649));
+ assertEquals("hiddenBean", ELAssert.getELText(_structuredDocument,690));
+ assertEquals("myBean_none", ELAssert.getELText(_structuredDocument,733));
+ assertEquals("myBeanSettable", ELAssert.getELText(_structuredDocument,777));
+
+ assertEquals("myBean1", ELAssert.getELText(_structuredDocument,851));
+ assertEquals("someOtherBeanName", ELAssert.getELText(_structuredDocument,891));
+ }
+
+ @Override
+ public void testNoErrorExprs()
+ {
+ assertNoError(523, "Lbeans.MyBean;");
+ assertNoError(562, "Lbeans.MyBeanSubClass;");
+ assertNoError(609, "Lbeans.MapBean;");
+ assertNoError(649, "Lbeans.MapBean;");
+ assertNoError(690, "Lbeans.MyBean;");
+ assertNoError(733, "Lbeans.MyBean;");
+ assertNoError(777, "Lbeans.MyBeanSettable;");
+ }
+
+ @Override
+ public void testWarningExprs()
+ {
+ List<ReportedProblem> list = assertSemanticInfo(851, null, 1);
+ ELAssert.assertContainsProblem(list,DiagnosticFactory.VARIABLE_NOT_FOUND_ID);
+
+ list = assertSemanticInfo(891, null, 1);
+ ELAssert.assertContainsProblem(list,DiagnosticFactory.VARIABLE_NOT_FOUND_ID);
+ }
+
+ @Override
+ public void testErrorExprs()
+ {
+ // no error cases
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/BracketOperatorTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/BracketOperatorTestCase.java
new file mode 100644
index 000000000..c17d43908
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/BracketOperatorTestCase.java
@@ -0,0 +1,239 @@
+/*******************************************************************************
+ * 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 - initial implementation
+ *******************************************************************************/
+package org.eclipse.jst.jsf.validation.el.tests.jsp;
+
+import java.util.List;
+
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jst.jsf.common.internal.types.TypeConstants;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
+
+/**
+ * Main test cases for the bracket operator -- x['y']
+ * @author cbateman
+ *
+ */
+public class BracketOperatorTestCase extends SingleJSPTestCase
+{
+ public BracketOperatorTestCase()
+ {
+ super("/testdata/jsps/bracketOperator.jsp.data", "/bracketOperator.jsp", JSFVersion.V1_1,FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(JSFCoreUtilHelper.createSimpleRegistryFactory());
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(null);
+ }
+
+ @Override
+ public void testSanity()
+ {
+ super.testSanity();
+
+ assertEquals("bundle['x.y']", ELAssert.getELText(_structuredDocument,816));
+ assertEquals("beanWithMapProperties['integerProperty']", ELAssert.getELText(_structuredDocument,862));
+ assertEquals("bundle['x']", ELAssert.getELText(_structuredDocument,940));
+ assertEquals("beanWithMapProperties.treeMap", ELAssert.getELText(_structuredDocument,991));
+ assertEquals("beanWithMapProperties.treeMap.foo", ELAssert.getELText(_structuredDocument,1059));
+ assertEquals("beanWithMapProperties['treeMap'].foo", ELAssert.getELText(_structuredDocument,1125));
+ assertEquals("beanWithMapProperties['treeMap']['foo']", ELAssert.getELText(_structuredDocument,1195));
+ assertEquals("beanWithMapProperties.treeMap['foo']", ELAssert.getELText(_structuredDocument,1267));
+ assertEquals("mapBean['foo']", ELAssert.getELText(_structuredDocument,1343));
+ assertEquals("mapBean['foo.x']", ELAssert.getELText(_structuredDocument,1390));
+ assertEquals("mapBean['getIgnoredIntProperty']", ELAssert.getELText(_structuredDocument,1439));
+ assertEquals("beanWithMapProperties['actionProperty']", ELAssert.getELText(_structuredDocument,1508));
+ assertEquals("myBean.stringArrayProperty[0]", ELAssert.getELText(_structuredDocument,1578));
+ assertEquals("myBean.stringArrayProperty[myBean.integerProperty]", ELAssert.getELText(_structuredDocument,1637));
+ assertEquals("myBean.stringArrayProperty['0']", ELAssert.getELText(_structuredDocument,1717));
+ assertEquals("myBean.intArrayProperty[1]", ELAssert.getELText(_structuredDocument,1778));
+ assertEquals("myBean.intArrayProperty[1] > 0", ELAssert.getELText(_structuredDocument,1834));
+ assertEquals("empty myBean.arrayOfArrayOfStringProperty", ELAssert.getELText(_structuredDocument,1894));
+ assertEquals("empty myBean.arrayOfArrayOfStringProperty[1]", ELAssert.getELText(_structuredDocument,1965));
+ assertEquals("myBean.arrayOfArrayOfStringProperty[0][1]", ELAssert.getELText(_structuredDocument,2039));
+ assertEquals("myBean.arrayOfArrayOfStringProperty[myBean.intArrayProperty[0]][myBean.intArrayProperty[1]]", ELAssert.getELText(_structuredDocument,2110));
+ assertEquals("beanWithListProperties.listProperty[0]", ELAssert.getELText(_structuredDocument,2232));
+ assertEquals("beanWithListProperties.listProperty[myBean.integerProperty]", ELAssert.getELText(_structuredDocument,2300));
+ assertEquals("beanWithListProperties.listProperty['0']", ELAssert.getELText(_structuredDocument,2389));
+ assertEquals("beanWithListProperties.listProperty['0'].someValue", ELAssert.getELText(_structuredDocument,2459));
+ assertEquals("beanWithListProperties.arrayListProperty[0]", ELAssert.getELText(_structuredDocument,2539));
+ assertEquals("beanWithListProperties.arrayListProperty[myBean.integerProperty]", ELAssert.getELText(_structuredDocument,2612));
+ assertEquals("beanWithListProperties.arrayListProperty['0']", ELAssert.getELText(_structuredDocument,2706));
+ assertEquals("beanWithListProperties.arrayListProperty['0'].someValue", ELAssert.getELText(_structuredDocument,2781));
+ assertEquals("listBean[0]", ELAssert.getELText(_structuredDocument,2869));
+ assertEquals("listBean[myBean.integerProperty]", ELAssert.getELText(_structuredDocument,2910));
+ assertEquals("listBean['0']", ELAssert.getELText(_structuredDocument,2972));
+ assertEquals("listBean['0'].someValue", ELAssert.getELText(_structuredDocument,3015));
+
+ assertEquals("bundle['y']", ELAssert.getELText(_structuredDocument,3093));
+ assertEquals("bundle['x.z']", ELAssert.getELText(_structuredDocument,3137));
+ assertEquals("beanWithMapProperties['actionProperty.foo']", ELAssert.getELText(_structuredDocument,3183));
+ assertEquals("beanWithMapProperties['treeMap.foo']", ELAssert.getELText(_structuredDocument,3259));
+ assertEquals("beanWithMapProperties['mapProperty.foo']", ELAssert.getELText(_structuredDocument,3328));
+ assertEquals("beanWithMapProperties['mapProperty.foo.x']", ELAssert.getELText(_structuredDocument,3401));
+ assertEquals("beanWithMapProperties['treeMap.foo.x']", ELAssert.getELText(_structuredDocument,3476));
+ assertEquals("myBean.stringArrayProperty[myBean.stringProperty]", ELAssert.getELText(_structuredDocument,3547));
+ assertEquals("myBean.stringArrayProperty[-1]", ELAssert.getELText(_structuredDocument,3628));
+ assertEquals("beanWithListProperties.listProperty.someProperty", ELAssert.getELText(_structuredDocument,3689));
+ assertEquals("beanWithListProperties.arrayListProperty.someProperty", ELAssert.getELText(_structuredDocument,3767));
+ assertEquals("beanWithListProperties.arrayListProperty[-1]", ELAssert.getELText(_structuredDocument,3850));
+ assertEquals("listBean[-1]", ELAssert.getELText(_structuredDocument,3924));
+ assertEquals("bundle['y']", ELAssert.getELText(_structuredDocument,3969));
+ assertEquals("bundle[null]", ELAssert.getELText(_structuredDocument,4013));
+ assertEquals("listBean.stringProperty", ELAssert.getELText(_structuredDocument,4121));
+
+ assertEquals("listBean['stringProperty']", ELAssert.getELText(_structuredDocument,4175));
+ assertEquals("myBean.stringArrayProperty['a']", ELAssert.getELText(_structuredDocument,4256));
+ assertEquals("beanWithListProperties.arrayListProperty['a']", ELAssert.getELText(_structuredDocument,4317));
+ assertEquals("beanWithListProperties.arrayListProperty[true]", ELAssert.getELText(_structuredDocument,4392));
+ assertEquals("listBean['a']", ELAssert.getELText(_structuredDocument,4468));
+ assertEquals("listBean[true]", ELAssert.getELText(_structuredDocument,4511));
+ }
+
+
+ @Override
+ public void testNoErrorExprs()
+ {
+ assertNoError(816, TypeConstants.TYPE_STRING);
+ assertNoError(862, Signature.SIG_INT);
+ // assertNoError(967, TypeConstants.TYPE_STRING);
+ assertNoError(991, "Ljava.util.TreeMap;");
+ assertNoError(1059, TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(1125, TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(1195, TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(1267, TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(1343, TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(1390, TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(1439, TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(1508, Signature.createMethodSignature(new String[0], TypeConstants.TYPE_STRING));
+
+ assertNoError(1578, TypeConstants.TYPE_STRING);
+ assertNoError(1637, TypeConstants.TYPE_STRING);
+ assertNoError(1717, TypeConstants.TYPE_STRING);
+
+ assertNoError(1778, Signature.SIG_INT);
+ assertNoError(1834, Signature.SIG_BOOLEAN);
+ assertNoError(1894, Signature.SIG_BOOLEAN);
+ assertNoError(1965, Signature.SIG_BOOLEAN);
+
+ assertNoError(2039, TypeConstants.TYPE_STRING);
+ assertNoError(2110, TypeConstants.TYPE_STRING);
+
+
+ assertNoError(2232, TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(2300, TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(2389, TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(2459, TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(2539, TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(2612, TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(2706, TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(2781, TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(2869, TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(2910, TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(2972, TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(3015, TypeConstants.TYPE_JAVAOBJECT);
+ }
+
+ @Override
+ public void testWarningExprs()
+ {
+ List<ReportedProblem> list = assertSemanticWarning(3093, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.MEMBER_NOT_FOUND_ID);
+
+ list = assertSemanticWarning(3137, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.MEMBER_NOT_FOUND_ID);
+
+ list = assertSemanticWarning(3183, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.MEMBER_NOT_FOUND_ID);
+
+ list = assertSemanticWarning(3259, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.MEMBER_NOT_FOUND_ID);
+
+ list = assertSemanticWarning(3328, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.MEMBER_NOT_FOUND_ID);
+
+ list = assertSemanticWarning(3401, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.MEMBER_NOT_FOUND_ID);
+
+ list = assertSemanticWarning(3476, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.MEMBER_NOT_FOUND_ID);
+
+ list = assertSemanticWarning(3547, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_STRING_CONVERSION_NOT_GUARANTEED_ID);
+
+ list = assertSemanticWarning(3628, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.POSSIBLE_ARRAY_INDEX_OUT_OF_BOUNDS_ID);
+
+ list = assertSemanticWarning(3689, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.MEMBER_NOT_FOUND_ID);
+
+ list = assertSemanticWarning(3767, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.MEMBER_NOT_FOUND_ID);
+
+ list = assertSemanticWarning(3850, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.POSSIBLE_ARRAY_INDEX_OUT_OF_BOUNDS_ID);
+
+ list = assertSemanticWarning(3924, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.POSSIBLE_ARRAY_INDEX_OUT_OF_BOUNDS_ID);
+
+ list = assertSemanticWarning(3969, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.MEMBER_NOT_FOUND_ID);
+
+ list = assertSemanticWarning(4013, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_DOT_WITH_VALUEB_NULL_ID);
+
+ // the dot notation member is not found because base is a list
+ list = assertSemanticWarning(4121, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.MEMBER_NOT_FOUND_ID);
+ }
+
+ @Override
+ public void testErrorExprs()
+ {
+ assertEquals("listBean['stringProperty']", ELAssert.getELText(_structuredDocument,4175));
+ assertEquals("myBean.stringArrayProperty['a']", ELAssert.getELText(_structuredDocument,4256));
+ assertEquals("beanWithListProperties.arrayListProperty['a']", ELAssert.getELText(_structuredDocument,4317));
+ assertEquals("beanWithListProperties.arrayListProperty[true]", ELAssert.getELText(_structuredDocument,4392));
+ assertEquals("listBean['a']", ELAssert.getELText(_structuredDocument,4468));
+ assertEquals("listBean[true]", ELAssert.getELText(_structuredDocument,4511));
+
+ List<ReportedProblem> list = assertSemanticError(4175, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(4256, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(4317, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(4392, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(4468, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(4511, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/BuiltInSymbolsTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/BuiltInSymbolsTestCase.java
new file mode 100644
index 000000000..5dc6086d9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/BuiltInSymbolsTestCase.java
@@ -0,0 +1,199 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jst.jsf.common.internal.types.TypeConstants;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+
+/**
+ * Test cases for built-in (implicit) symbol resolution
+ *
+ * @author cbateman
+ *
+ */
+public class BuiltInSymbolsTestCase extends SingleJSPTestCase
+{
+ public BuiltInSymbolsTestCase()
+ {
+ super("/testdata/jsps/builtinSymbols.jsp.data", "/builtinSymbols.jsp", JSFVersion.V1_1,FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(JSFCoreUtilHelper.createSimpleRegistryFactory());
+ }
+
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(null);
+ }
+
+ @Override
+ public void testSanity()
+ {
+ assertEquals("applicationScope", ELAssert.getELText(_structuredDocument,975));
+ assertEquals("sessionScope", ELAssert.getELText(_structuredDocument,1024));
+ assertEquals("requestScope", ELAssert.getELText(_structuredDocument,1069));
+ assertEquals("cookie", ELAssert.getELText(_structuredDocument,1114));
+ assertEquals("facesContext", ELAssert.getELText(_structuredDocument,1153));
+ assertEquals("header", ELAssert.getELText(_structuredDocument,1198));
+ assertEquals("headerValues", ELAssert.getELText(_structuredDocument,1237));
+ assertEquals("initParam", ELAssert.getELText(_structuredDocument,1282));
+ assertEquals("param", ELAssert.getELText(_structuredDocument,1324));
+ assertEquals("paramValues", ELAssert.getELText(_structuredDocument,1362));
+ assertEquals("view", ELAssert.getELText(_structuredDocument,1406));
+ assertEquals("applicationScope.mapBean", ELAssert.getELText(_structuredDocument,1492));
+ assertEquals("sessionScope.myBean", ELAssert.getELText(_structuredDocument,1596));
+ assertEquals("sessionScope.mapBean1", ELAssert.getELText(_structuredDocument,1645));
+ assertEquals("sessionScope.myBeanSettable", ELAssert.getELText(_structuredDocument,1696));
+ assertEquals("requestScope.myBeanSubClass", ELAssert.getELText(_structuredDocument,1803));
+ assertEquals("requestScope.hiddenBean", ELAssert.getELText(_structuredDocument,1860));
+ assertEquals("requestScope.bundle", ELAssert.getELText(_structuredDocument,1913));
+ assertEquals("requestScope.bundle2", ELAssert.getELText(_structuredDocument,1962));
+ assertEquals("empty cookie", ELAssert.getELText(_structuredDocument,2096));
+ assertEquals("empty header", ELAssert.getELText(_structuredDocument,2138));
+ assertEquals("empty headerValues", ELAssert.getELText(_structuredDocument,2180));
+ assertEquals("empty param", ELAssert.getELText(_structuredDocument,2228));
+ assertEquals("empty paramValues", ELAssert.getELText(_structuredDocument,2269));
+ assertEquals("facesContext.application", ELAssert.getELText(_structuredDocument,2367));
+ assertEquals("facesContext.clientIdsWithMessages", ELAssert.getELText(_structuredDocument,2421));
+ assertEquals("facesContext.externalContext", ELAssert.getELText(_structuredDocument,2485));
+ assertEquals("facesContext.maximumSeverity", ELAssert.getELText(_structuredDocument,2543));
+ assertEquals("facesContext.messages", ELAssert.getELText(_structuredDocument,2601));
+ assertEquals("facesContext.renderKit", ELAssert.getELText(_structuredDocument,2652));
+ assertEquals("facesContext.renderResponse", ELAssert.getELText(_structuredDocument,2704));
+ assertEquals("facesContext.responseComplete", ELAssert.getELText(_structuredDocument,2761));
+ assertEquals("facesContext.responseStream", ELAssert.getELText(_structuredDocument,2820));
+ assertEquals("facesContext.responseWriter", ELAssert.getELText(_structuredDocument,2877));
+ assertEquals("facesContext.viewRoot", ELAssert.getELText(_structuredDocument,2934));
+ assertEquals("view.viewId", ELAssert.getELText(_structuredDocument,3030));
+ assertEquals("view.family", ELAssert.getELText(_structuredDocument,3071));
+ assertEquals("view.locale", ELAssert.getELText(_structuredDocument,3112));
+ assertEquals("view.renderKitId", ELAssert.getELText(_structuredDocument,3153));
+ assertEquals("view.viewId", ELAssert.getELText(_structuredDocument,3199));
+ assertEquals("sessionScope.myBean.integerProperty", ELAssert.getELText(_structuredDocument,3295));
+ assertEquals("requestScope.bundle.bundleProp2", ELAssert.getELText(_structuredDocument,3363));
+ assertEquals("3 + sessionScope.myBean.integerProperty", ELAssert.getELText(_structuredDocument,3478));
+
+ assertEquals("applicationScope.notAMember", ELAssert.getELText(_structuredDocument,3572));
+ assertEquals("sessionScope.notAMember", ELAssert.getELText(_structuredDocument,3632));
+ assertEquals("requestScope.notAMember", ELAssert.getELText(_structuredDocument,3688));
+ assertEquals("cookie.notAMember", ELAssert.getELText(_structuredDocument,3744));
+ assertEquals("facesContext.notAMember", ELAssert.getELText(_structuredDocument,3794));
+ assertEquals("header.notAMember", ELAssert.getELText(_structuredDocument,3850));
+ assertEquals("headerValues.notAMember", ELAssert.getELText(_structuredDocument,3900));
+ assertEquals("initParam.notAMember", ELAssert.getELText(_structuredDocument,3956));
+ assertEquals("param.notAMember", ELAssert.getELText(_structuredDocument,4009));
+ assertEquals("paramValues.notAMember", ELAssert.getELText(_structuredDocument,4058));
+ assertEquals("view.notAMember", ELAssert.getELText(_structuredDocument,4113));
+ assertEquals("applicationScope.myBean_none", ELAssert.getELText(_structuredDocument,4209));
+ assertEquals("sessionScope.myBean_none", ELAssert.getELText(_structuredDocument,4270));
+ assertEquals("requestScope.myBean_none", ELAssert.getELText(_structuredDocument,4327));
+
+ assertEquals("!initParam", ELAssert.getELText(_structuredDocument,4400));
+ }
+
+ @Override
+ public void testNoErrorExprs()
+ {
+ assertNoError(975, TypeConstants.TYPE_MAP);
+ assertNoError(1024, TypeConstants.TYPE_MAP);
+ assertNoError(1069, TypeConstants.TYPE_MAP);
+ assertNoError(1114, TypeConstants.TYPE_MAP);
+ assertNoError(1153, "Ljavax.faces.context.FacesContext;");
+ assertNoError(1198, TypeConstants.TYPE_MAP);
+ assertNoError(1237, TypeConstants.TYPE_MAP);
+ assertNoError(1282, TypeConstants.TYPE_MAP);
+ assertNoError(1324, TypeConstants.TYPE_MAP);
+ assertNoError(1362, TypeConstants.TYPE_MAP);
+ assertNoError(1406, "Ljavax.faces.component.UIViewRoot;");
+ assertNoError(1492, "Lbeans.MapBean;");
+ assertNoError(1596, "Lbeans.MyBean;");
+ assertNoError(1645, "Lbeans.MapBean;");
+ assertNoError(1696, "Lbeans.MyBeanSettable;");
+ assertNoError(1803, "Lbeans.MyBeanSubClass;");
+ assertNoError(1860, "Lbeans.MyBean;");
+
+ assertNoError(1913, TypeConstants.TYPE_MAP);
+ assertNoError(1962, TypeConstants.TYPE_MAP);
+
+ assertNoError(2096, Signature.SIG_BOOLEAN);
+ assertNoError(2138, Signature.SIG_BOOLEAN);
+ assertNoError(2180, Signature.SIG_BOOLEAN);
+ assertNoError(2228, Signature.SIG_BOOLEAN);
+ assertNoError(2269, Signature.SIG_BOOLEAN);
+ // TODO: can't check these until we can import the required API jars
+ // into the project
+ // assertEquals("facesContext.application", getELText(_structuredDocument,2367));
+ // assertEquals("facesContext.clientIdsWithMessages", getELText(_structuredDocument,2421));
+ // assertEquals("facesContext.externalContext", getELText(_structuredDocument,2485));
+ // assertEquals("facesContext.maximumSeverity", getELText(_structuredDocument,2543));
+ // assertEquals("facesContext.messages", getELText(_structuredDocument,2601));
+ // assertEquals("facesContext.renderKit", getELText(_structuredDocument,2652));
+ // assertEquals("facesContext.renderResponse", getELText(_structuredDocument,2704));
+ // assertEquals("facesContext.responseComplete", getELText(_structuredDocument,2761));
+ // assertEquals("facesContext.responseStream", getELText(_structuredDocument,2820));
+ // assertEquals("facesContext.responseWriter", getELText(_structuredDocument,2877));
+ // assertEquals("facesContext.viewRoot", getELText(_structuredDocument,2934));
+ // assertEquals("view.viewId", getELText(_structuredDocument,3030));
+ // assertEquals("view.family", getELText(_structuredDocument,3071));
+ // assertEquals("view.locale", getELText(_structuredDocument,3112));
+ // assertEquals("view.renderKitId", getELText(_structuredDocument,3153));
+ // assertEquals("view.viewId", getELText(_structuredDocument,3199));
+ assertNoError(3295, Signature.SIG_INT);
+ assertNoError(3363, TypeConstants.TYPE_STRING);
+ assertNoError(3478, Signature.SIG_LONG);
+
+ // can't know what's actually in the scope map. so anything unresolved is just
+ // no error Java object.
+ assertNoError(3572, TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(3632,TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(3688,TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(3744,TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(3794,TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(3850,TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(3900,TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(3956,TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(4009,TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(4058,TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(4113,TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(4209,TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(4270,TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(4327,TypeConstants.TYPE_JAVAOBJECT);
+ }
+ @Override
+ public void testWarningExprs()
+ {
+ // no warnings. The issues marked warnings in the jsp test data
+ // are no longer, since we realized that maps can contain anything...
+ // the only exceptino is FacesContext which is resovled to a map
+ // at test time since the API is not in the classpath. This
+ // should be changed if start using jsf api/impl in these tests TODO
+ }
+
+ @Override
+ public void testErrorExprs()
+ {
+ /* reduced to warning for bug 243674
+ final List<ReportedProblem> list = assertSemanticError(4400,null,1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID);
+ */
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/DataTableResolutionTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/DataTableResolutionTestCase.java
new file mode 100644
index 000000000..8fc3053cd
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/DataTableResolutionTestCase.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import java.util.List;
+
+import org.eclipse.jst.jsf.common.internal.types.TypeConstants;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
+
+public class DataTableResolutionTestCase extends SingleJSPTestCase
+{
+ public DataTableResolutionTestCase()
+ {
+ super("/testdata/jsps/dataTableResolution.jsp.data", "/dataTableResolution.jsp", JSFVersion.V1_1,FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(JSFCoreUtilHelper.createSimpleRegistryFactory());
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(null);
+ }
+
+ @Override
+ public void testSanity()
+ {
+ assertEquals("foo.x", ELAssert.getELText(_structuredDocument,879));
+ assertEquals("row1.name", ELAssert.getELText(_structuredDocument,1036));
+ assertEquals("row3.stringProperty", ELAssert.getELText(_structuredDocument,1188));
+ assertEquals("row4.anyField", ELAssert.getELText(_structuredDocument,1363));
+
+ assertEquals("row2WrongVar.x", ELAssert.getELText(_structuredDocument,1554));
+ assertEquals("row2.wrongMember", ELAssert.getELText(_structuredDocument,1687));
+ }
+
+ @Override
+ public void testNoErrorExprs()
+ {
+ assertNoError(879, TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(1036, TypeConstants.TYPE_STRING);
+ assertNoError(1188, TypeConstants.TYPE_STRING);
+ assertNoError(1363, TypeConstants.TYPE_JAVAOBJECT);
+ }
+
+ @Override
+ public void testWarningExprs()
+ {
+ List<ReportedProblem> problems = assertSemanticInfo(1554, null, 1);
+ ELAssert.assertContainsProblem(problems, DiagnosticFactory.VARIABLE_NOT_FOUND_ID);
+
+ problems = assertSemanticWarning(1687, null, 1);
+ ELAssert.assertContainsProblem(problems, DiagnosticFactory.MEMBER_NOT_FOUND_ID);
+ }
+
+ @Override
+ public void testErrorExprs() {
+ // no errors
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/GenericsTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/GenericsTestCase.java
new file mode 100644
index 000000000..73a0024eb
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/GenericsTestCase.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+
+public class GenericsTestCase extends SingleJSPTestCase
+{
+ public GenericsTestCase()
+ {
+ super("/testdata/jsps/propertiesOfMaps.jsp.data", "/propertiesOfMaps.jsp", JSFVersion.V1_1,FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ public void testSanity()
+ {
+ assertEquals("beanWithMapProperties.integerProperty", ELAssert.getELText(_structuredDocument,880));
+ assertEquals("bundle.bundleProp1", ELAssert.getELText(_structuredDocument,955));
+ assertEquals("bundle.x.y", ELAssert.getELText(_structuredDocument,1006));
+ assertEquals("beanWithMapProperties.treeMap.foo", ELAssert.getELText(_structuredDocument,1049));
+ assertEquals("beanWithMapProperties.treeMap.foo.x", ELAssert.getELText(_structuredDocument,1115));
+ assertEquals("beanWithMapProperties.mapProperty.foo", ELAssert.getELText(_structuredDocument,1183));
+ assertEquals("beanWithMapProperties.mapProperty.foo.x", ELAssert.getELText(_structuredDocument,1253));
+ assertEquals("mapBean.foo", ELAssert.getELText(_structuredDocument,1325));
+ assertEquals("mapBean.foo.x", ELAssert.getELText(_structuredDocument,1369));
+ assertEquals("mapBean.getIgnoredIntProperty", ELAssert.getELText(_structuredDocument,1415));
+ assertEquals("bundle.y", ELAssert.getELText(_structuredDocument,1478));
+ assertEquals("bundle.bundleProp1.z", ELAssert.getELText(_structuredDocument,1519));
+ }
+
+ @Override
+ public void testErrorExprs() {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void testNoErrorExprs() {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void testWarningExprs() {
+ // TODO Auto-generated method stub
+
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/GreaterThanEqTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/GreaterThanEqTestCase.java
new file mode 100644
index 000000000..96974e8d5
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/GreaterThanEqTestCase.java
@@ -0,0 +1,210 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import java.util.List;
+
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
+
+/**
+ * Test cases for greater than or equal (ge, >=)
+ *
+ * @author cbateman
+ *
+ */
+public class GreaterThanEqTestCase extends SingleJSPTestCase {
+
+ public GreaterThanEqTestCase()
+ {
+ super("/testdata/jsps/greaterThanEq.jsp.data", "/greaterThanEq.jsp", JSFVersion.V1_1,FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ public void testSanity()
+ {
+ super.testSanity();
+ assertEquals("myBean.stringProperty >= '3'", ELAssert.getELText(_structuredDocument,828));
+ assertEquals("myBean.stringProperty ge '3'", ELAssert.getELText(_structuredDocument,889));
+ assertEquals("myBean.integerProperty >= 3", ELAssert.getELText(_structuredDocument,950));
+ assertEquals("myBean.integerProperty ge 3", ELAssert.getELText(_structuredDocument,1010));
+ assertEquals("myBean.integerProperty >= '4' ", ELAssert.getELText(_structuredDocument,1070));
+ assertEquals("myBean.integerProperty ge '4' ", ELAssert.getELText(_structuredDocument,1133));
+ assertEquals("myBean.comparableProperty >= myBean.collectionProperty", ELAssert.getELText(_structuredDocument,1197));
+ assertEquals("myBean.comparableProperty ge myBean.collectionProperty", ELAssert.getELText(_structuredDocument,1284));
+ assertEquals("myBean.integerProperty >= -3", ELAssert.getELText(_structuredDocument,1373));
+ assertEquals("myBean.doubleProperty >= 5", ELAssert.getELText(_structuredDocument,1434));
+ assertEquals("5 ge myBean.bigIntegerProperty", ELAssert.getELText(_structuredDocument,1493));
+ assertEquals("myBean.bigDoubleProperty >= myBean.bigIntegerProperty", ELAssert.getELText(_structuredDocument,1556));
+ assertEquals("myBean.coins >= 'quarter'", ELAssert.getELText(_structuredDocument,1642));
+ assertEquals("myBean.coins ge 'quarter'", ELAssert.getELText(_structuredDocument,1700));
+ assertEquals("myBean.rawEnum >= 'quarter'", ELAssert.getELText(_structuredDocument,1758));
+ assertEquals("myBean.coinEnum ge 'quarter'", ELAssert.getELText(_structuredDocument,1818));
+ assertEquals("myBean.rawEnum >= myBean.coins", ELAssert.getELText(_structuredDocument,1875));
+ assertEquals("myBean.coinEnum >= myBean.colors", ELAssert.getELText(_structuredDocument,1934));
+
+ assertEquals("5 >= 3", ELAssert.getELText(_structuredDocument,2026));
+ assertEquals("5 ge 3", ELAssert.getELText(_structuredDocument,2062));
+ assertEquals("'4' >= '34'", ELAssert.getELText(_structuredDocument,2098));
+ assertEquals("'4' ge '34'", ELAssert.getELText(_structuredDocument,2139));
+ assertEquals("'34' >= '34'", ELAssert.getELText(_structuredDocument,2180));
+ assertEquals("'34' ge '34'", ELAssert.getELText(_structuredDocument,2222));
+ assertEquals("-5 >= 2", ELAssert.getELText(_structuredDocument,2264));
+ assertEquals("-5 ge 2", ELAssert.getELText(_structuredDocument,2301));
+ assertEquals("2 >= -5", ELAssert.getELText(_structuredDocument,2338));
+ assertEquals("2 ge -5", ELAssert.getELText(_structuredDocument,2375));
+ assertEquals("-5 >= -5", ELAssert.getELText(_structuredDocument,2412));
+ assertEquals("-5 ge -5", ELAssert.getELText(_structuredDocument,2450));
+ assertEquals("myBean.integerProperty >= null", ELAssert.getELText(_structuredDocument,2488));
+ assertEquals("null ge myBean.integerProperty", ELAssert.getELText(_structuredDocument,2548));
+
+ assertEquals("5 >= true", ELAssert.getELText(_structuredDocument,2629));
+ assertEquals("5 ge true", ELAssert.getELText(_structuredDocument,2668));
+ assertEquals("myBean.integerProperty >= myBean.booleanProperty", ELAssert.getELText(_structuredDocument,2707));
+ assertEquals("myBean.integerProperty ge myBean.booleanProperty", ELAssert.getELText(_structuredDocument,2785));
+ assertEquals("myBean.stringArrayProperty >= myBean.booleanProperty", ELAssert.getELText(_structuredDocument,2863));
+ assertEquals("myBean.stringArrayProperty ge myBean.booleanProperty", ELAssert.getELText(_structuredDocument,2945));
+ assertEquals("myBean.integerProperty >= true ", ELAssert.getELText(_structuredDocument,3030));
+ assertEquals("myBean.integerProperty ge true ", ELAssert.getELText(_structuredDocument,3094));
+ assertEquals("myBean.booleanProperty >= true", ELAssert.getELText(_structuredDocument,3158));
+ assertEquals("myBean.booleanProperty ge true", ELAssert.getELText(_structuredDocument,3221));
+ assertEquals("true >= false", ELAssert.getELText(_structuredDocument,3282));
+ assertEquals("true ge false", ELAssert.getELText(_structuredDocument,3326));
+ assertEquals("myBean.coins >= myBean.colors", ELAssert.getELText(_structuredDocument,3369));
+ assertEquals("myBean.coins ge myBean.colors", ELAssert.getELText(_structuredDocument,3428));
+ }
+
+ @Override
+ public void testNoErrorExprs()
+ {
+ assertNoError(828, Signature.SIG_BOOLEAN);
+ assertNoError(889, Signature.SIG_BOOLEAN);
+ assertNoError(950, Signature.SIG_BOOLEAN);
+ assertNoError(1010, Signature.SIG_BOOLEAN);
+ assertNoError(1070, Signature.SIG_BOOLEAN);
+ assertNoError(1133, Signature.SIG_BOOLEAN);
+ assertNoError(1197, Signature.SIG_BOOLEAN);
+ assertNoError(1284, Signature.SIG_BOOLEAN);
+ assertNoError(1373, Signature.SIG_BOOLEAN);
+ assertNoError(1434, Signature.SIG_BOOLEAN);
+ assertNoError(1493, Signature.SIG_BOOLEAN);
+ assertNoError(1556, Signature.SIG_BOOLEAN);
+ assertNoError(1642, Signature.SIG_BOOLEAN);
+ assertNoError(1700, Signature.SIG_BOOLEAN);
+ assertNoError(1758, Signature.SIG_BOOLEAN);
+ assertNoError(1818, Signature.SIG_BOOLEAN);
+ assertNoError(1875, Signature.SIG_BOOLEAN);
+ assertNoError(1934, Signature.SIG_BOOLEAN);
+ }
+
+ @Override
+ public void testWarningExprs()
+ {
+ List<ReportedProblem> list = assertSemanticWarning(2026, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2062, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2098, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2139, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2180, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2222, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2264, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2301, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2338, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2375, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2412, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2450, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2488, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2548, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME_ID);
+
+ }
+
+ @Override
+ public void testErrorExprs()
+ {
+ List<ReportedProblem> list = assertSemanticError(2629, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2668, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2707, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2785, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2863, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(2945, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(3030, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(3094, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(3158, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(3221, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(3282, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(3326, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(3369, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COMPARISON_OF_ENUMS_INCOMPATIBLE_ID);
+
+ list = assertSemanticError(3428, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COMPARISON_OF_ENUMS_INCOMPATIBLE_ID);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/GreaterThanTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/GreaterThanTestCase.java
new file mode 100644
index 000000000..cb876f474
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/GreaterThanTestCase.java
@@ -0,0 +1,213 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import java.util.List;
+
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
+
+/**
+ * Test cases for greater than (gt, >)
+ *
+ * @author cbateman
+ */
+public class GreaterThanTestCase extends SingleJSPTestCase
+{
+ public GreaterThanTestCase()
+ {
+ super("/testdata/jsps/greaterThan.jsp.data", "/greaterThan.jsp", JSFVersion.V1_1,FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ public void testSanity()
+ {
+ super.testSanity();
+
+ assertEquals("myBean.stringProperty > '3'", ELAssert.getELText(_structuredDocument,828));
+ assertEquals("myBean.stringProperty gt '3'", ELAssert.getELText(_structuredDocument,888));
+ assertEquals("myBean.integerProperty > 3", ELAssert.getELText(_structuredDocument,949));
+ assertEquals("myBean.integerProperty gt 3", ELAssert.getELText(_structuredDocument,1008));
+ assertEquals("myBean.integerProperty > '4' ", ELAssert.getELText(_structuredDocument,1068));
+ assertEquals("myBean.integerProperty gt '4' ", ELAssert.getELText(_structuredDocument,1130));
+ assertEquals("myBean.comparableProperty > myBean.collectionProperty", ELAssert.getELText(_structuredDocument,1194));
+ assertEquals("myBean.comparableProperty gt myBean.collectionProperty", ELAssert.getELText(_structuredDocument,1280));
+ assertEquals("myBean.integerProperty > -3", ELAssert.getELText(_structuredDocument,1367));
+ assertEquals("myBean.doubleProperty > 5", ELAssert.getELText(_structuredDocument,1427));
+ assertEquals("5 gt myBean.bigIntegerProperty", ELAssert.getELText(_structuredDocument,1485));
+ assertEquals("myBean.bigDoubleProperty > myBean.bigIntegerProperty", ELAssert.getELText(_structuredDocument,1548));
+ assertEquals("myBean.coins > 'quarter'", ELAssert.getELText(_structuredDocument,1633));
+ assertEquals("myBean.coins gt 'quarter'", ELAssert.getELText(_structuredDocument,1690));
+ assertEquals("myBean.rawEnum > 'quarter'", ELAssert.getELText(_structuredDocument,1748));
+ assertEquals("myBean.coinEnum gt 'quarter'", ELAssert.getELText(_structuredDocument,1807));
+ assertEquals("myBean.rawEnum > myBean.coins", ELAssert.getELText(_structuredDocument,1864));
+ assertEquals("myBean.coinEnum > myBean.colors", ELAssert.getELText(_structuredDocument,1922));
+
+ assertEquals("5 > 3", ELAssert.getELText(_structuredDocument,2010));
+ assertEquals("5 gt 3", ELAssert.getELText(_structuredDocument,2045));
+ assertEquals("'4' > '34'", ELAssert.getELText(_structuredDocument,2081));
+ assertEquals("'4' gt '34'", ELAssert.getELText(_structuredDocument,2121));
+ assertEquals("'34' > '34'", ELAssert.getELText(_structuredDocument,2162));
+ assertEquals("'34' gt '34'", ELAssert.getELText(_structuredDocument,2203));
+ assertEquals("-5 > 2", ELAssert.getELText(_structuredDocument,2245));
+ assertEquals("-5 gt 2", ELAssert.getELText(_structuredDocument,2281));
+ assertEquals("2 > -5", ELAssert.getELText(_structuredDocument,2318));
+ assertEquals("2 gt -5", ELAssert.getELText(_structuredDocument,2354));
+ assertEquals("-5 > -5", ELAssert.getELText(_structuredDocument,2391));
+ assertEquals("-5 gt -5", ELAssert.getELText(_structuredDocument,2428));
+ assertEquals("myBean.integerProperty > null", ELAssert.getELText(_structuredDocument,2466));
+ assertEquals("null gt myBean.integerProperty", ELAssert.getELText(_structuredDocument,2525));
+
+ assertEquals("5 > true", ELAssert.getELText(_structuredDocument,2606));
+ assertEquals("5 gt true", ELAssert.getELText(_structuredDocument,2644));
+ assertEquals("myBean.integerProperty > myBean.booleanProperty", ELAssert.getELText(_structuredDocument,2683));
+ assertEquals("myBean.integerProperty gt myBean.booleanProperty", ELAssert.getELText(_structuredDocument,2760));
+ assertEquals("myBean.stringArrayProperty > myBean.booleanProperty", ELAssert.getELText(_structuredDocument,2838));
+ assertEquals("myBean.stringArrayProperty gt myBean.booleanProperty", ELAssert.getELText(_structuredDocument,2919));
+ assertEquals("myBean.integerProperty > true ", ELAssert.getELText(_structuredDocument,3004));
+ assertEquals("myBean.integerProperty gt true ", ELAssert.getELText(_structuredDocument,3067));
+ assertEquals("myBean.booleanProperty > true", ELAssert.getELText(_structuredDocument,3131));
+ assertEquals("myBean.booleanProperty gt true", ELAssert.getELText(_structuredDocument,3193));
+ assertEquals("true > false", ELAssert.getELText(_structuredDocument,3254));
+ assertEquals("true gt false", ELAssert.getELText(_structuredDocument,3297));
+ assertEquals("true > false", ELAssert.getELText(_structuredDocument,3341));
+ assertEquals("myBean.coins > myBean.colors", ELAssert.getELText(_structuredDocument,3383));
+ assertEquals("myBean.coins gt myBean.colors", ELAssert.getELText(_structuredDocument,3441));
+ }
+
+ @Override
+ public void testNoErrorExprs()
+ {
+ assertNoError(828, Signature.SIG_BOOLEAN);
+ assertNoError(888, Signature.SIG_BOOLEAN);
+ assertNoError(949, Signature.SIG_BOOLEAN);
+ assertNoError(1008, Signature.SIG_BOOLEAN);
+ assertNoError(1068, Signature.SIG_BOOLEAN);
+ assertNoError(1130, Signature.SIG_BOOLEAN);
+ assertNoError(1194, Signature.SIG_BOOLEAN);
+ assertNoError(1280, Signature.SIG_BOOLEAN);
+ assertNoError(1367, Signature.SIG_BOOLEAN);
+ assertNoError(1427, Signature.SIG_BOOLEAN);
+ assertNoError(1485, Signature.SIG_BOOLEAN);
+ assertNoError(1548, Signature.SIG_BOOLEAN);
+ assertNoError(1633, Signature.SIG_BOOLEAN);
+ assertNoError(1690, Signature.SIG_BOOLEAN);
+ assertNoError(1748, Signature.SIG_BOOLEAN);
+ assertNoError(1807, Signature.SIG_BOOLEAN);
+ assertNoError(1864, Signature.SIG_BOOLEAN);
+ assertNoError(1922, Signature.SIG_BOOLEAN);
+ }
+
+ @Override
+ public void testWarningExprs()
+ {
+ List<ReportedProblem> list = assertSemanticWarning(2010, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2045, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2081, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2121, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2162, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2203, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2245, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2281, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2318, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2354, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2391, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2428, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2466, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2525, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME_ID);
+ }
+
+ @Override
+ public void testErrorExprs()
+ {
+ List<ReportedProblem> list = assertSemanticError(2606, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2644, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2683, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2760, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2838, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(2919, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(3004, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(3067, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(3131, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(3193, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(3254, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(3297, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(3341, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(3383, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COMPARISON_OF_ENUMS_INCOMPATIBLE_ID);
+
+ list = assertSemanticError(3441, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COMPARISON_OF_ENUMS_INCOMPATIBLE_ID);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/JSPFunctionsTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/JSPFunctionsTestCase.java
new file mode 100644
index 000000000..ea05f129b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/JSPFunctionsTestCase.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import java.util.List;
+
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
+
+/**
+ * Test cases for functions
+ *
+ * @author cbateman
+ */
+public class JSPFunctionsTestCase extends SingleJSPTestCase
+{
+ public JSPFunctionsTestCase() {
+ super("/testdata/jsps/jspFunctions.jsp.data", "/jspFunctions.jsp", JSFVersion.V1_1,FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ public void testSanity()
+ {
+ assertEquals("f:someFunc(6) > 8", ELAssert.getELText(_structuredDocument,940));
+ assertEquals("f:someFunc(6)", ELAssert.getELText(_structuredDocument,990));
+ assertEquals("f:someFunc(true)", ELAssert.getELText(_structuredDocument,1036));
+
+ assertEquals("someFunc(6) > 8", ELAssert.getELText(_structuredDocument,1226));
+ assertEquals("someFunc(6)", ELAssert.getELText(_structuredDocument,1274));
+ assertEquals("someFunc(true)", ELAssert.getELText(_structuredDocument,1318));
+ }
+
+ @Override
+ public void testNoErrorExprs()
+ {
+ assertNoError(940, null);
+ assertNoError(990, null);
+ assertNoError(1036, null);
+ }
+
+ @Override
+ public void testWarningExprs()
+ {
+ // note: this will change to non-error when functions are properly supported
+ // by the parser
+ List<ReportedProblem> list = assertSyntaxWarning(1226, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.GENERAL_SYNTAX_ERROR_ID);
+
+ list = assertSyntaxWarning(1274, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.GENERAL_SYNTAX_ERROR_ID);
+
+ list = assertSyntaxWarning(1318, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.GENERAL_SYNTAX_ERROR_ID);
+ }
+
+ @Override
+ public void testErrorExprs()
+ {
+ // no error cases
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LessThanEqTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LessThanEqTestCase.java
new file mode 100644
index 000000000..2047b1b87
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LessThanEqTestCase.java
@@ -0,0 +1,209 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import java.util.List;
+
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
+
+/**
+ * Test cases for less than or equal (<=, le)
+ *
+ * @author cbateman
+ */
+public class LessThanEqTestCase extends SingleJSPTestCase
+{
+
+ public LessThanEqTestCase() {
+ super("/testdata/jsps/lessThanEq.jsp.data", "/lessThanEq.jsp", JSFVersion.V1_1,FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ public void testSanity()
+ {
+ super.testSanity();
+
+ assertEquals("myBean.stringProperty <= '3'", ELAssert.getELText(_structuredDocument,827));
+ assertEquals("myBean.stringProperty le '3'", ELAssert.getELText(_structuredDocument,888));
+ assertEquals("myBean.integerProperty <= 3", ELAssert.getELText(_structuredDocument,949));
+ assertEquals("myBean.integerProperty le 3", ELAssert.getELText(_structuredDocument,1009));
+ assertEquals("myBean.integerProperty <= '4' ", ELAssert.getELText(_structuredDocument,1069));
+ assertEquals("myBean.integerProperty le '4' ", ELAssert.getELText(_structuredDocument,1132));
+ assertEquals("myBean.comparableProperty <= myBean.collectionProperty", ELAssert.getELText(_structuredDocument,1196));
+ assertEquals("myBean.comparableProperty le myBean.collectionProperty", ELAssert.getELText(_structuredDocument,1283));
+ assertEquals("myBean.integerProperty <= -3", ELAssert.getELText(_structuredDocument,1370));
+ assertEquals("myBean.doubleProperty <= 5", ELAssert.getELText(_structuredDocument,1431));
+ assertEquals("5 le myBean.bigIntegerProperty", ELAssert.getELText(_structuredDocument,1490));
+ assertEquals("myBean.bigDoubleProperty <= myBean.bigIntegerProperty", ELAssert.getELText(_structuredDocument,1553));
+ assertEquals("myBean.coins <= 'quarter'", ELAssert.getELText(_structuredDocument,1639));
+ assertEquals("myBean.coins le 'quarter'", ELAssert.getELText(_structuredDocument,1697));
+ assertEquals("myBean.rawEnum <= 'quarter'", ELAssert.getELText(_structuredDocument,1755));
+ assertEquals("myBean.coinEnum le 'quarter'", ELAssert.getELText(_structuredDocument,1815));
+ assertEquals("myBean.rawEnum <= myBean.coins", ELAssert.getELText(_structuredDocument,1872));
+ assertEquals("myBean.coinEnum <= myBean.colors", ELAssert.getELText(_structuredDocument,1931));
+
+ assertEquals("5 <= 3", ELAssert.getELText(_structuredDocument,2022));
+ assertEquals("5 le 3", ELAssert.getELText(_structuredDocument,2058));
+ assertEquals("'4' <= '34'", ELAssert.getELText(_structuredDocument,2094));
+ assertEquals("'4' le '34'", ELAssert.getELText(_structuredDocument,2135));
+ assertEquals("'34' <= '34'", ELAssert.getELText(_structuredDocument,2176));
+ assertEquals("'34' le '34'", ELAssert.getELText(_structuredDocument,2218));
+ assertEquals("-5 <= 2", ELAssert.getELText(_structuredDocument,2260));
+ assertEquals("-5 le 2", ELAssert.getELText(_structuredDocument,2297));
+ assertEquals("2 <= -5", ELAssert.getELText(_structuredDocument,2334));
+ assertEquals("2 le -5", ELAssert.getELText(_structuredDocument,2371));
+ assertEquals("-5 <= -5", ELAssert.getELText(_structuredDocument,2408));
+ assertEquals("-5 le -5", ELAssert.getELText(_structuredDocument,2446));
+ assertEquals("myBean.integerProperty <= null", ELAssert.getELText(_structuredDocument,2484));
+ assertEquals("null le myBean.integerProperty", ELAssert.getELText(_structuredDocument,2544));
+
+ assertEquals("5 <= true", ELAssert.getELText(_structuredDocument,2625));
+ assertEquals("5 le true", ELAssert.getELText(_structuredDocument,2664));
+ assertEquals("myBean.integerProperty <= myBean.booleanProperty", ELAssert.getELText(_structuredDocument,2703));
+ assertEquals("myBean.integerProperty le myBean.booleanProperty", ELAssert.getELText(_structuredDocument,2781));
+ assertEquals("myBean.stringArrayProperty <= myBean.booleanProperty", ELAssert.getELText(_structuredDocument,2859));
+ assertEquals("myBean.stringArrayProperty le myBean.booleanProperty", ELAssert.getELText(_structuredDocument,2941));
+ assertEquals("myBean.integerProperty <= true ", ELAssert.getELText(_structuredDocument,3026));
+ assertEquals("myBean.integerProperty le true ", ELAssert.getELText(_structuredDocument,3090));
+ assertEquals("myBean.booleanProperty <= true", ELAssert.getELText(_structuredDocument,3154));
+ assertEquals("myBean.booleanProperty le true", ELAssert.getELText(_structuredDocument,3217));
+ assertEquals("true <= false", ELAssert.getELText(_structuredDocument,3278));
+ assertEquals("true le false", ELAssert.getELText(_structuredDocument,3322));
+ assertEquals("myBean.coins <= myBean.colors", ELAssert.getELText(_structuredDocument,3365));
+ assertEquals("myBean.coins le myBean.colors", ELAssert.getELText(_structuredDocument,3424));
+ }
+
+ @Override
+ public void testNoErrorExprs()
+ {
+ assertNoError(827, Signature.SIG_BOOLEAN);
+ assertNoError(888, Signature.SIG_BOOLEAN);
+ assertNoError(949, Signature.SIG_BOOLEAN);
+ assertNoError(1009, Signature.SIG_BOOLEAN);
+ assertNoError(1069, Signature.SIG_BOOLEAN);
+ assertNoError(1132, Signature.SIG_BOOLEAN);
+ assertNoError(1196, Signature.SIG_BOOLEAN);
+ assertNoError(1283, Signature.SIG_BOOLEAN);
+ assertNoError(1370, Signature.SIG_BOOLEAN);
+ assertNoError(1431, Signature.SIG_BOOLEAN);
+ assertNoError(1490, Signature.SIG_BOOLEAN);
+ assertNoError(1553, Signature.SIG_BOOLEAN);
+ assertNoError(1639, Signature.SIG_BOOLEAN);
+ assertNoError(1697, Signature.SIG_BOOLEAN);
+ assertNoError(1755, Signature.SIG_BOOLEAN);
+ assertNoError(1815, Signature.SIG_BOOLEAN);
+ assertNoError(1872, Signature.SIG_BOOLEAN);
+ assertNoError(1931, Signature.SIG_BOOLEAN);
+ }
+
+ @Override
+ public void testWarningExprs()
+ {
+ List<ReportedProblem> list = assertSemanticWarning(2022, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2058, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2094, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2135, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2176, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2218, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2260, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2297, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2334, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2371, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2408, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2446, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2484, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2544, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME_ID);
+ }
+
+ @Override
+ public void testErrorExprs()
+ {
+ List<ReportedProblem> list = assertSemanticError(2625, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2664, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2703, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2781, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2859, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(2941, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(3026, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(3090, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(3154, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(3217, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(3278, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(3322, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(3365, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COMPARISON_OF_ENUMS_INCOMPATIBLE_ID);
+
+ list = assertSemanticError(3424, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COMPARISON_OF_ENUMS_INCOMPATIBLE_ID);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LessThanTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LessThanTestCase.java
new file mode 100644
index 000000000..235c06453
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LessThanTestCase.java
@@ -0,0 +1,214 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import java.util.List;
+
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
+
+/**
+ * Test cases for less than (<, lt)
+ *
+ * @author cbateman
+ */
+public class LessThanTestCase extends SingleJSPTestCase
+{
+ public LessThanTestCase()
+ {
+ super("/testdata/jsps/lessThan.jsp.data", "/lessThan.jsp", JSFVersion.V1_1,FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ public void testSanity()
+ {
+ super.testSanity();
+
+ assertEquals("myBean.stringProperty < '3'", ELAssert.getELText(_structuredDocument,828));
+ assertEquals("myBean.stringProperty lt '3'", ELAssert.getELText(_structuredDocument,888));
+ assertEquals("myBean.integerProperty < 3", ELAssert.getELText(_structuredDocument,949));
+ assertEquals("myBean.integerProperty lt 3", ELAssert.getELText(_structuredDocument,1008));
+ assertEquals("myBean.integerProperty < '4' ", ELAssert.getELText(_structuredDocument,1068));
+ assertEquals("myBean.integerProperty lt '4' ", ELAssert.getELText(_structuredDocument,1130));
+ assertEquals("myBean.comparableProperty < myBean.collectionProperty", ELAssert.getELText(_structuredDocument,1194));
+ assertEquals("myBean.comparableProperty lt myBean.collectionProperty", ELAssert.getELText(_structuredDocument,1280));
+ assertEquals("myBean.integerProperty < -3", ELAssert.getELText(_structuredDocument,1367));
+ assertEquals("myBean.doubleProperty < 5", ELAssert.getELText(_structuredDocument,1427));
+ assertEquals("5 lt myBean.bigIntegerProperty", ELAssert.getELText(_structuredDocument,1485));
+ assertEquals("myBean.bigDoubleProperty < myBean.bigIntegerProperty", ELAssert.getELText(_structuredDocument,1548));
+ assertEquals("myBean.coins < 'quarter'", ELAssert.getELText(_structuredDocument,1633));
+ assertEquals("myBean.coins lt 'quarter'", ELAssert.getELText(_structuredDocument,1690));
+ assertEquals("myBean.rawEnum < 'quarter'", ELAssert.getELText(_structuredDocument,1748));
+ assertEquals("myBean.coinEnum lt 'quarter'", ELAssert.getELText(_structuredDocument,1807));
+ assertEquals("myBean.rawEnum < myBean.coins", ELAssert.getELText(_structuredDocument,1864));
+ assertEquals("myBean.coinEnum < myBean.colors", ELAssert.getELText(_structuredDocument,1922));
+
+ assertEquals("5 < 3", ELAssert.getELText(_structuredDocument,2010));
+ assertEquals("5 lt 3", ELAssert.getELText(_structuredDocument,2045));
+ assertEquals("'4' < '34'", ELAssert.getELText(_structuredDocument,2081));
+ assertEquals("'4' lt '34'", ELAssert.getELText(_structuredDocument,2121));
+ assertEquals("'34' < '34'", ELAssert.getELText(_structuredDocument,2162));
+ assertEquals("'34' lt '34'", ELAssert.getELText(_structuredDocument,2203));
+ assertEquals("-5 < 2", ELAssert.getELText(_structuredDocument,2245));
+ assertEquals("-5 lt 2", ELAssert.getELText(_structuredDocument,2281));
+ assertEquals("2 < -5", ELAssert.getELText(_structuredDocument,2318));
+ assertEquals("2 lt -5", ELAssert.getELText(_structuredDocument,2354));
+ assertEquals("-5 < -5", ELAssert.getELText(_structuredDocument,2391));
+ assertEquals("-5 lt -5", ELAssert.getELText(_structuredDocument,2428));
+ assertEquals("myBean.integerProperty < null", ELAssert.getELText(_structuredDocument,2466));
+ assertEquals("null lt myBean.integerProperty", ELAssert.getELText(_structuredDocument,2525));
+
+ assertEquals("5 < true", ELAssert.getELText(_structuredDocument,2606));
+ assertEquals("5 lt true", ELAssert.getELText(_structuredDocument,2644));
+ assertEquals("myBean.integerProperty < myBean.booleanProperty", ELAssert.getELText(_structuredDocument,2683));
+ assertEquals("myBean.integerProperty lt myBean.booleanProperty", ELAssert.getELText(_structuredDocument,2760));
+ assertEquals("myBean.stringArrayProperty < myBean.booleanProperty", ELAssert.getELText(_structuredDocument,2838));
+ assertEquals("myBean.stringArrayProperty lt myBean.booleanProperty", ELAssert.getELText(_structuredDocument,2919));
+ assertEquals("myBean.integerProperty < true ", ELAssert.getELText(_structuredDocument,3004));
+ assertEquals("myBean.integerProperty lt true ", ELAssert.getELText(_structuredDocument,3067));
+ assertEquals("myBean.booleanProperty < true", ELAssert.getELText(_structuredDocument,3131));
+ assertEquals("myBean.booleanProperty lt true", ELAssert.getELText(_structuredDocument,3193));
+ assertEquals("true < false", ELAssert.getELText(_structuredDocument,3254));
+ assertEquals("true lt false", ELAssert.getELText(_structuredDocument,3297));
+ assertEquals("true < false", ELAssert.getELText(_structuredDocument,3341));
+ assertEquals("myBean.coins < myBean.colors", ELAssert.getELText(_structuredDocument,3383));
+ assertEquals("myBean.coins lt myBean.colors", ELAssert.getELText(_structuredDocument,3441));
+ }
+
+ @Override
+ public void testNoErrorExprs()
+ {
+ assertNoError(828, Signature.SIG_BOOLEAN);
+ assertNoError(888, Signature.SIG_BOOLEAN);
+ assertNoError(949, Signature.SIG_BOOLEAN);
+ assertNoError(1008, Signature.SIG_BOOLEAN);
+ assertNoError(1068, Signature.SIG_BOOLEAN);
+ assertNoError(1130, Signature.SIG_BOOLEAN);
+ assertNoError(1194, Signature.SIG_BOOLEAN);
+ assertNoError(1280, Signature.SIG_BOOLEAN);
+ assertNoError(1367, Signature.SIG_BOOLEAN);
+ assertNoError(1427, Signature.SIG_BOOLEAN);
+ assertNoError(1485, Signature.SIG_BOOLEAN);
+ assertNoError(1548, Signature.SIG_BOOLEAN);
+ assertNoError(1633, Signature.SIG_BOOLEAN);
+ assertNoError(1690, Signature.SIG_BOOLEAN);
+ assertNoError(1748, Signature.SIG_BOOLEAN);
+ assertNoError(1807, Signature.SIG_BOOLEAN);
+ assertNoError(1864, Signature.SIG_BOOLEAN);
+ assertNoError(1922, Signature.SIG_BOOLEAN);
+ }
+
+ @Override
+ public void testWarningExprs()
+ {
+ List<ReportedProblem> list = assertSemanticWarning(2010, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2045, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2081, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2121, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2162, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2203, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2245, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2281, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2318, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2354, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2391, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2428, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2466, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2525, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME_ID);
+
+ }
+
+ @Override
+ public void testErrorExprs()
+ {
+ List<ReportedProblem> list = assertSemanticError(2606, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2644, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2683, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2760, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(2838, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(2919, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(3004, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(3067, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(3131, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(3193, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(3254, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(3297, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(3341, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(3383, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COMPARISON_OF_ENUMS_INCOMPATIBLE_ID);
+
+ list = assertSemanticError(3441, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COMPARISON_OF_ENUMS_INCOMPATIBLE_ID);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LoadBundleResolutionTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LoadBundleResolutionTestCase.java
new file mode 100644
index 000000000..793745c18
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LoadBundleResolutionTestCase.java
@@ -0,0 +1,178 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import java.io.ByteArrayInputStream;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jst.jsf.common.internal.types.TypeConstants;
+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.JSFVersion;
+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.util.JSFCoreUtilHelper;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.metadataprocessors.MetaDataEnabledProcessingFactory;
+import org.eclipse.jst.jsf.metadataprocessors.features.IValidValues;
+import org.eclipse.jst.jsf.test.util.TestFileResource;
+import org.eclipse.jst.jsf.validation.el.tests.ELValidationTestPlugin;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
+import org.w3c.dom.Attr;
+
+/**
+ * Test cases for load bundle resolution
+ *
+ * @author cbateman
+ */
+public class LoadBundleResolutionTestCase extends SingleJSPTestCase
+{
+ public LoadBundleResolutionTestCase()
+ {
+ super("/testdata/jsps/loadBundleResolution.jsp.data", "/loadBundleResolution.jsp", JSFVersion.V1_1,FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ 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(ELValidationTestPlugin.getDefault().getBundle(),
+ "/testdata/classes/Bundle.properties.data");
+ _jdtTestEnv.addResourceFile("src", new ByteArrayInputStream(resource.toBytes()),
+ "", "Bundle.properties");
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(JSFCoreUtilHelper.createSimpleRegistryFactory());
+
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(null);
+ }
+
+ @Override
+ public void testSanity()
+ {
+ assertEquals("bundle.bundleProp2", ELAssert.getELText(_structuredDocument,1003));
+ assertEquals("noPackageBundle.bundleProp2", ELAssert.getELText(_structuredDocument,1051));
+ assertEquals("bundle.bundleProp1 && myBean.stringProperty", ELAssert.getELText(_structuredDocument,1111));
+ assertEquals("empty bundle", ELAssert.getELText(_structuredDocument,1187));
+ assertEquals("empty bundle.bundleProp2", ELAssert.getELText(_structuredDocument,1232));
+ assertEquals("bundle.bundleProp2 + 5", ELAssert.getELText(_structuredDocument,1289));
+ assertEquals("bundleProp2", ELAssert.getELText(_structuredDocument,1341));
+ assertEquals("bundle.x.y", ELAssert.getELText(_structuredDocument,1382));
+ assertEquals("noPackageBundle.x.y", ELAssert.getELText(_structuredDocument,1422));
+
+ assertEquals("-bundle.bundleProp1", ELAssert.getELText(_structuredDocument,1496));
+ assertEquals("bundle.bundleProp3", ELAssert.getELText(_structuredDocument,1548));
+ assertEquals("msg", ELAssert.getELText(_structuredDocument,1599));
+ assertEquals("bundle.x", ELAssert.getELText(_structuredDocument,1635));
+ assertEquals("noPackageBundle.notAProperty", ELAssert.getELText(_structuredDocument,1673));
+ }
+
+ @Override
+ public void testNoErrorExprs()
+ {
+ assertNoError(1003, TypeConstants.TYPE_STRING);
+ assertNoError(1051, TypeConstants.TYPE_STRING);
+ assertNoError(1111, Signature.SIG_BOOLEAN);
+ assertNoError(1187, Signature.SIG_BOOLEAN);
+ assertNoError(1232, Signature.SIG_BOOLEAN);
+ assertNoError(1289, Signature.SIG_LONG);
+ //assertNoError(1341, TypeConstants.TYPE_STRING);
+ assertNoError(1382, TypeConstants.TYPE_STRING);
+ // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=190671
+ assertNoError(1422, TypeConstants.TYPE_STRING);
+ }
+
+ @Override
+ public void testWarningExprs()
+ {
+ List<ReportedProblem> list = assertSemanticWarning(1496, Signature.SIG_LONG, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_STRING_CONVERSION_NOT_GUARANTEED_ID);
+
+ list = assertSemanticWarning(1548, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.MEMBER_NOT_FOUND_ID);
+
+ // ensure that we are validating that the basename for the missing bundle
+ // is being validated since the related variable will not be flagged
+ // this check replaces a previous check at 1640 for a variable not
+ // found warning. Rather than marking loadBundle variables bad when
+ // we can't find the variable, we now mark the basename bad instead
+ // of the variable
+ // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=190671
+ ensureMissingBundleValidation();
+
+ list = assertSemanticWarning(1635, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.MEMBER_IS_INTERMEDIATE_ID);
+
+ list = assertSemanticWarning(1673, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.MEMBER_NOT_FOUND_ID);
+ }
+
+ @Override
+ public void testErrorExprs()
+ {
+ // no error
+ }
+
+
+ private void ensureMissingBundleValidation()
+ {
+ final IStructuredDocumentContext context =
+ IStructuredDocumentContextFactory.INSTANCE.getContext(_structuredDocument, 839);
+
+ final IDOMContextResolver contextResolver =
+ IStructuredDocumentContextResolverFactory.INSTANCE.getDOMContextResolver(context);
+
+ final Attr attr = (Attr) contextResolver.getNode();
+ String attributeVal = attr.getValue();
+ assertEquals("TestMessages", attributeVal);
+ assertEquals(IJSFConstants.ATTR_BASENAME, attr.getLocalName());
+
+ // verify that attribute value validation is picking up on missing bundles
+ final List<?> vv =
+ MetaDataEnabledProcessingFactory.getInstance()
+ .getAttributeValueRuntimeTypeFeatureProcessors
+ (IValidValues.class, context, ITLDConstants.URI_JSF_CORE
+ , IJSFConstants.TAG_LOADBUNDLE, IJSFConstants.ATTR_BASENAME);
+
+ boolean validatesMissingBundle = false;
+
+ for (final Iterator<?> it = vv.iterator();it.hasNext();)
+ {
+ final IValidValues v = (IValidValues)it.next();
+ if (attributeVal == null)
+ {
+ attributeVal = "";//ensure to be non-null
+ }
+ if (!v.isValidValue(attributeVal.trim())){
+ if (v.getValidationMessages().size() > 0)
+ {
+ validatesMissingBundle = true;
+ break;
+ }
+ }
+ }
+
+ assertTrue(validatesMissingBundle);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LogicalAndTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LogicalAndTestCase.java
new file mode 100644
index 000000000..b1f6252bc
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LogicalAndTestCase.java
@@ -0,0 +1,133 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import java.util.List;
+
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
+
+/**
+ * Test cases for logical AND (and, &&)
+ *
+ * @author cbateman
+ */
+public class LogicalAndTestCase extends SingleJSPTestCase
+{
+
+ public LogicalAndTestCase() {
+ super("/testdata/jsps/logicalAND.jsp.data", "/logicalAND.jsp", JSFVersion.V1_1,FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ public void testSanity()
+ {
+ assertEquals("myBean.booleanProperty && myBean.booleanProperty", ELAssert.getELText(_structuredDocument,828));
+ assertEquals("myBean.booleanProperty and myBean.booleanProperty", ELAssert.getELText(_structuredDocument,909));
+ assertEquals("myBean.booleanProperty && true ", ELAssert.getELText(_structuredDocument,988));
+ assertEquals("myBean.booleanProperty and true ", ELAssert.getELText(_structuredDocument,1049));
+ assertEquals("'true' && myBean.booleanProperty", ELAssert.getELText(_structuredDocument,1114));
+ assertEquals("'true' and myBean.booleanProperty", ELAssert.getELText(_structuredDocument,1180));
+
+ assertEquals("false && myBean.booleanProperty", ELAssert.getELText(_structuredDocument,1269));
+ assertEquals("false and myBean.booleanProperty", ELAssert.getELText(_structuredDocument,1333));
+ assertEquals("null && myBean.booleanProperty ", ELAssert.getELText(_structuredDocument,1398));
+ assertEquals("null and myBean.booleanProperty ", ELAssert.getELText(_structuredDocument,1462));
+ assertEquals("'notTrue' && myBean.booleanProperty", ELAssert.getELText(_structuredDocument,1527));
+ assertEquals("myBean.booleanProperty && false", ELAssert.getELText(_structuredDocument,1598));
+ assertEquals("myBean.booleanProperty and false", ELAssert.getELText(_structuredDocument,1662));
+ assertEquals("myBean.booleanProperty && null ", ELAssert.getELText(_structuredDocument,1727));
+ assertEquals("myBean.booleanProperty and null", ELAssert.getELText(_structuredDocument,1791));
+ assertEquals("myBean.booleanProperty && 'notTrue'", ELAssert.getELText(_structuredDocument,1855));
+ assertEquals("true && false", ELAssert.getELText(_structuredDocument,1922));
+ assertEquals("null && true", ELAssert.getELText(_structuredDocument,1965));
+
+ assertEquals("myBean.integerProperty && true", ELAssert.getELText(_structuredDocument,2037));
+ assertEquals("true && myBean.integerProperty", ELAssert.getELText(_structuredDocument,2100));
+ assertEquals("4 && true", ELAssert.getELText(_structuredDocument,2163));
+ }
+
+
+
+ @Override
+ public void testNoErrorExprs()
+ {
+ assertNoError(828, Signature.SIG_BOOLEAN);
+ assertNoError(909, Signature.SIG_BOOLEAN);
+ assertNoError(988, Signature.SIG_BOOLEAN);
+ assertNoError(1049, Signature.SIG_BOOLEAN);
+ assertNoError(1114, Signature.SIG_BOOLEAN);
+ assertNoError(1180, Signature.SIG_BOOLEAN);
+ }
+
+ @Override
+ public void testWarningExprs()
+ {
+ List<ReportedProblem> list = assertSemanticWarning(1269, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_FIRST_ARGUMENT_SHORT_CIRCUITS_ID);
+
+ list = assertSemanticWarning(1333, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_FIRST_ARGUMENT_SHORT_CIRCUITS_ID);
+
+ list = assertSemanticWarning(1398, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_FIRST_ARGUMENT_SHORT_CIRCUITS_ID);
+
+ list = assertSemanticWarning(1462, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_FIRST_ARGUMENT_SHORT_CIRCUITS_ID);
+
+ list = assertSemanticWarning(1527, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_FIRST_ARGUMENT_SHORT_CIRCUITS_ID);
+
+ list = assertSemanticWarning(1598, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_SECOND_ARGUMENT_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1662, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_SECOND_ARGUMENT_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1727, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_SECOND_ARGUMENT_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1791, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_SECOND_ARGUMENT_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1855, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_SECOND_ARGUMENT_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1922, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_SECOND_ARGUMENT_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1965, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_FIRST_ARGUMENT_SHORT_CIRCUITS_ID);
+ }
+
+ @Override
+ public void testErrorExprs()
+ {
+ List<ReportedProblem> list = assertSemanticError(2037, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID);
+
+ list = assertSemanticError(2100, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID);
+
+ list = assertSemanticError(2163, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LogicalEqualsTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LogicalEqualsTestCase.java
new file mode 100644
index 000000000..0ab8e5b2c
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LogicalEqualsTestCase.java
@@ -0,0 +1,219 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import java.util.List;
+
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
+
+/**
+ * Test cases for logical equals (eq, ==)
+ *
+ * @author cbateman
+ */
+public class LogicalEqualsTestCase extends SingleJSPTestCase
+{
+ public LogicalEqualsTestCase()
+ {
+ super("/testdata/jsps/logicalEquals.jsp.data", "/logicalEquals.jsp", JSFVersion.V1_1,FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ public void testSanity()
+ {
+ assertEquals("myBean.stringProperty == '3'", ELAssert.getELText(_structuredDocument,828));
+ assertEquals("myBean.stringProperty eq '3'", ELAssert.getELText(_structuredDocument,889));
+ assertEquals("myBean.integerProperty == 3", ELAssert.getELText(_structuredDocument,950));
+ assertEquals("myBean.integerProperty eq 3", ELAssert.getELText(_structuredDocument,1010));
+ assertEquals("myBean.booleanProperty == true", ELAssert.getELText(_structuredDocument,1070));
+ assertEquals("myBean.booleanProperty eq true", ELAssert.getELText(_structuredDocument,1133));
+ assertEquals("myBean.integerProperty == '4' ", ELAssert.getELText(_structuredDocument,1196));
+ assertEquals("myBean.integerProperty eq '4' ", ELAssert.getELText(_structuredDocument,1259));
+ assertEquals("myBean.bigDoubleProperty == 4.5", ELAssert.getELText(_structuredDocument,1322));
+ assertEquals("myBean.doubleProperty eq 67", ELAssert.getELText(_structuredDocument,1386));
+ assertEquals("myBean.bigIntegerProperty == 500", ELAssert.getELText(_structuredDocument,1446));
+ assertEquals("myBean.stringArrayProperty == '3'", ELAssert.getELText(_structuredDocument,1511));
+ assertEquals("myBean.stringArrayProperty eq myBean.listProperty", ELAssert.getELText(_structuredDocument,1577));
+ assertEquals("myBean.coins == 'dime'", ELAssert.getELText(_structuredDocument,1655));
+ assertEquals("myBean.coins eq 'dime'", ELAssert.getELText(_structuredDocument,1707));
+ assertEquals("myBean.colors == 'red'", ELAssert.getELText(_structuredDocument,1759));
+ assertEquals("myBean.colors eq 'red'", ELAssert.getELText(_structuredDocument,1810));
+ assertEquals("myBean.coins == myBean.stringProperty", ELAssert.getELText(_structuredDocument,1861));
+ assertEquals("myBean.coins eq myBean.stringProperty", ELAssert.getELText(_structuredDocument,1927));
+ assertEquals("myBean.rawEnum == 'red'", ELAssert.getELText(_structuredDocument,1993));
+ assertEquals("myBean.coinEnum == myBean.coins", ELAssert.getELText(_structuredDocument,2045));
+
+ assertEquals("5 == 3", ELAssert.getELText(_structuredDocument,2128));
+ assertEquals("5 eq 3", ELAssert.getELText(_structuredDocument,2164));
+ assertEquals("true == false", ELAssert.getELText(_structuredDocument,2200));
+ assertEquals("true eq false", ELAssert.getELText(_structuredDocument,2243));
+ assertEquals("'4' == '34'", ELAssert.getELText(_structuredDocument,2286));
+ assertEquals("'4' eq '34'", ELAssert.getELText(_structuredDocument,2327));
+ assertEquals("'34' == '34'", ELAssert.getELText(_structuredDocument,2368));
+ assertEquals("'34' eq '34'", ELAssert.getELText(_structuredDocument,2410));
+ assertEquals("myBean.integerProperty == null", ELAssert.getELText(_structuredDocument,2452));
+ assertEquals("null eq myBean.integerProperty", ELAssert.getELText(_structuredDocument,2512));
+ assertEquals("5.4 == 4.3", ELAssert.getELText(_structuredDocument,2572));
+ assertEquals("true == true", ELAssert.getELText(_structuredDocument,2612));
+ assertEquals("myBean.coins == 'notAValue'", ELAssert.getELText(_structuredDocument,2654));
+ assertEquals("myBean.coins eq 'notAValue'", ELAssert.getELText(_structuredDocument,2711));
+ assertEquals("myBean.coins == 'notAValue' && myBean.coins == 'dime'", ELAssert.getELText(_structuredDocument,2768));
+ assertEquals("myBean.coins eq 'notAValue' && myBean.coins eq 'dime'", ELAssert.getELText(_structuredDocument,2851));
+ assertEquals("myBean.coins == myBean.colors", ELAssert.getELText(_structuredDocument,2934));
+ assertEquals("myBean.coins == myBean.stringArrayProperty", ELAssert.getELText(_structuredDocument,2993));
+ assertEquals("'blah' == myBean.coins", ELAssert.getELText(_structuredDocument,3065));
+ assertEquals("myBean.coins eq 'blah'", ELAssert.getELText(_structuredDocument,3117));
+
+ assertEquals("5 == true", ELAssert.getELText(_structuredDocument,3188));
+ assertEquals("5 eq true", ELAssert.getELText(_structuredDocument,3227));
+ assertEquals("myBean.integerProperty == myBean.booleanProperty", ELAssert.getELText(_structuredDocument,3266));
+ assertEquals("myBean.integerProperty eq myBean.booleanProperty", ELAssert.getELText(_structuredDocument,3344));
+ assertEquals("myBean.stringArrayProperty == myBean.booleanProperty", ELAssert.getELText(_structuredDocument,3422));
+ assertEquals("myBean.booleanProperty eq myBean.stringArrayProperty", ELAssert.getELText(_structuredDocument,3504));
+ assertEquals("myBean.integerProperty == true ", ELAssert.getELText(_structuredDocument,3589));
+ assertEquals("myBean.integerProperty eq true ", ELAssert.getELText(_structuredDocument,3653));
+ assertEquals("false == myBean.integerProperty", ELAssert.getELText(_structuredDocument,3717));
+ }
+
+ @Override
+ public void testNoErrorExprs()
+ {
+ assertNoError(828, Signature.SIG_BOOLEAN);
+ assertNoError(889, Signature.SIG_BOOLEAN);
+ assertNoError(950, Signature.SIG_BOOLEAN);
+ assertNoError(1010, Signature.SIG_BOOLEAN);
+ assertNoError(1070, Signature.SIG_BOOLEAN);
+ assertNoError(1133, Signature.SIG_BOOLEAN);
+ assertNoError(1196, Signature.SIG_BOOLEAN);
+ assertNoError(1259, Signature.SIG_BOOLEAN);
+ assertNoError(1322, Signature.SIG_BOOLEAN);
+ assertNoError(1386, Signature.SIG_BOOLEAN);
+ assertNoError(1446, Signature.SIG_BOOLEAN);
+ assertNoError(1511, Signature.SIG_BOOLEAN);
+ assertNoError(1577, Signature.SIG_BOOLEAN);
+ assertNoError(1655, Signature.SIG_BOOLEAN);
+ assertNoError(1707, Signature.SIG_BOOLEAN);
+ assertNoError(1759, Signature.SIG_BOOLEAN);
+ assertNoError(1810, Signature.SIG_BOOLEAN);
+ assertNoError(1861, Signature.SIG_BOOLEAN);
+ assertNoError(1927, Signature.SIG_BOOLEAN);
+ assertNoError(1993, Signature.SIG_BOOLEAN);
+ assertNoError(2045, Signature.SIG_BOOLEAN);
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=235637
+ // can only call comparison null always same if can verify both
+ // sides of the expression are null
+ assertNoError(2452, Signature.SIG_BOOLEAN);
+ assertNoError(2512, Signature.SIG_BOOLEAN);
+ }
+
+ @Override
+ public void testWarningExprs()
+ {
+ List<ReportedProblem> list = assertSemanticWarning(2128, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2164, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2200, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2243, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2286, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2327, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2368, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2410, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+
+ list = assertSemanticWarning(2572, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2612, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2654, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_COMPARISON_WITH_ENUM_ALWAYS_SAME_ID);
+
+ list = assertSemanticWarning(2711, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_COMPARISON_WITH_ENUM_ALWAYS_SAME_ID);
+
+ list = assertSemanticWarning(2768, Signature.SIG_BOOLEAN, 2);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_COMPARISON_WITH_ENUM_ALWAYS_SAME_ID);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_FIRST_ARGUMENT_SHORT_CIRCUITS_ID);
+
+ list = assertSemanticWarning(2851, Signature.SIG_BOOLEAN, 2);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_COMPARISON_WITH_ENUM_ALWAYS_SAME_ID);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_FIRST_ARGUMENT_SHORT_CIRCUITS_ID);
+
+ list = assertSemanticWarning(2934, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_COMPARISON_WITH_ENUM_ALWAYS_SAME_ID);
+
+ list = assertSemanticWarning(2993, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_COMPARISON_WITH_ENUM_ALWAYS_SAME_ID);
+
+ list = assertSemanticWarning(3065, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_COMPARISON_WITH_ENUM_ALWAYS_SAME_ID);
+
+ list = assertSemanticWarning(3117, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_COMPARISON_WITH_ENUM_ALWAYS_SAME_ID);
+ }
+
+ @Override
+ public void testErrorExprs()
+ {
+ List<ReportedProblem> list = assertSemanticError(3188, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(3227, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(3266, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(3344, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(3422, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID);
+
+ list = assertSemanticError(3504, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID);
+
+ list = assertSemanticError(3589, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(3653, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(3717, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LogicalNotEqualsTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LogicalNotEqualsTestCase.java
new file mode 100644
index 000000000..817e9e51b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LogicalNotEqualsTestCase.java
@@ -0,0 +1,206 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import java.util.List;
+
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
+
+/**
+ * Test cases for logical not equals (ne, !=)
+ *
+ * @author cbateman
+ */
+public class LogicalNotEqualsTestCase extends SingleJSPTestCase
+{
+ public LogicalNotEqualsTestCase()
+ {
+ super("/testdata/jsps/logicalNotEquals.jsp.data", "/logicalNotEquals.jsp", JSFVersion.V1_1,FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ public void testSanity()
+ {
+ assertEquals("myBean.stringProperty != '3'", ELAssert.getELText(_structuredDocument,828));
+ assertEquals("myBean.stringProperty ne '3'", ELAssert.getELText(_structuredDocument,889));
+ assertEquals("myBean.integerProperty != 3", ELAssert.getELText(_structuredDocument,950));
+ assertEquals("myBean.integerProperty ne 3", ELAssert.getELText(_structuredDocument,1010));
+ assertEquals("myBean.booleanProperty != true", ELAssert.getELText(_structuredDocument,1070));
+ assertEquals("myBean.booleanProperty ne true", ELAssert.getELText(_structuredDocument,1133));
+ assertEquals("myBean.integerProperty != '4' ", ELAssert.getELText(_structuredDocument,1196));
+ assertEquals("myBean.integerProperty ne '4' ", ELAssert.getELText(_structuredDocument,1259));
+ assertEquals("myBean.bigDoubleProperty != 4.5", ELAssert.getELText(_structuredDocument,1322));
+ assertEquals("myBean.doubleProperty ne 67", ELAssert.getELText(_structuredDocument,1386));
+ assertEquals("myBean.bigIntegerProperty != 500", ELAssert.getELText(_structuredDocument,1446));
+ assertEquals("myBean.stringArrayProperty != '3'", ELAssert.getELText(_structuredDocument,1511));
+ assertEquals("myBean.stringArrayProperty ne myBean.listProperty", ELAssert.getELText(_structuredDocument,1577));
+ assertEquals("myBean.coins != 'dime'", ELAssert.getELText(_structuredDocument,1655));
+ assertEquals("myBean.coins ne 'dime'", ELAssert.getELText(_structuredDocument,1707));
+ assertEquals("myBean.colors != 'red'", ELAssert.getELText(_structuredDocument,1759));
+ assertEquals("myBean.colors ne 'red'", ELAssert.getELText(_structuredDocument,1810));
+ assertEquals("myBean.coins != myBean.stringProperty", ELAssert.getELText(_structuredDocument,1861));
+ assertEquals("myBean.coins ne myBean.stringProperty", ELAssert.getELText(_structuredDocument,1927));
+ assertEquals("myBean.rawEnum != 'red'", ELAssert.getELText(_structuredDocument,1993));
+ assertEquals("myBean.coinEnum ne myBean.coins", ELAssert.getELText(_structuredDocument,2045));
+
+ assertEquals("5 != 3", ELAssert.getELText(_structuredDocument,2128));
+ assertEquals("5 ne 3", ELAssert.getELText(_structuredDocument,2164));
+ assertEquals("true != false", ELAssert.getELText(_structuredDocument,2200));
+ assertEquals("true ne false", ELAssert.getELText(_structuredDocument,2243));
+ assertEquals("'4' != '34'", ELAssert.getELText(_structuredDocument,2286));
+ assertEquals("'4' ne '34'", ELAssert.getELText(_structuredDocument,2327));
+ assertEquals("'34' != '34'", ELAssert.getELText(_structuredDocument,2368));
+ assertEquals("'34' ne '34'", ELAssert.getELText(_structuredDocument,2410));
+ assertEquals("myBean.integerProperty != null", ELAssert.getELText(_structuredDocument,2452));
+ assertEquals("null ne myBean.integerProperty", ELAssert.getELText(_structuredDocument,2512));
+ assertEquals("5.4 != 4.3", ELAssert.getELText(_structuredDocument,2572));
+ assertEquals("true != true", ELAssert.getELText(_structuredDocument,2612));
+ assertEquals("myBean.coins != 'notAValue'", ELAssert.getELText(_structuredDocument,2654));
+ assertEquals("myBean.coins ne 'notAValue'", ELAssert.getELText(_structuredDocument,2711));
+ assertEquals("myBean.coins != 'notAValue' || myBean.coins != 'dime'", ELAssert.getELText(_structuredDocument,2768));
+ assertEquals("myBean.coins ne 'notAValue' || myBean.coins ne 'dime'", ELAssert.getELText(_structuredDocument,2851));
+ assertEquals("myBean.coins != myBean.colors", ELAssert.getELText(_structuredDocument,2934));
+
+ assertEquals("5 != true", ELAssert.getELText(_structuredDocument,3012));
+ assertEquals("5 ne true", ELAssert.getELText(_structuredDocument,3051));
+ assertEquals("myBean.integerProperty != myBean.booleanProperty", ELAssert.getELText(_structuredDocument,3090));
+ assertEquals("myBean.integerProperty ne myBean.booleanProperty", ELAssert.getELText(_structuredDocument,3168));
+ assertEquals("myBean.stringArrayProperty != myBean.booleanProperty", ELAssert.getELText(_structuredDocument,3246));
+ assertEquals("myBean.booleanProperty ne myBean.stringArrayProperty", ELAssert.getELText(_structuredDocument,3328));
+ assertEquals("myBean.integerProperty != true ", ELAssert.getELText(_structuredDocument,3413));
+ assertEquals("myBean.integerProperty ne true ", ELAssert.getELText(_structuredDocument,3477));
+ assertEquals("false != myBean.integerProperty", ELAssert.getELText(_structuredDocument,3541));
+ }
+
+ @Override
+ public void testNoErrorExprs()
+ {
+ assertNoError(828, Signature.SIG_BOOLEAN);
+ assertNoError(889, Signature.SIG_BOOLEAN);
+ assertNoError(950, Signature.SIG_BOOLEAN);
+ assertNoError(1010, Signature.SIG_BOOLEAN);
+ assertNoError(1070, Signature.SIG_BOOLEAN);
+ assertNoError(1133, Signature.SIG_BOOLEAN);
+ assertNoError(1196, Signature.SIG_BOOLEAN);
+ assertNoError(1259, Signature.SIG_BOOLEAN);
+ assertNoError(1322, Signature.SIG_BOOLEAN);
+ assertNoError(1386, Signature.SIG_BOOLEAN);
+ assertNoError(1446, Signature.SIG_BOOLEAN);
+ assertNoError(1511, Signature.SIG_BOOLEAN);
+ assertNoError(1577, Signature.SIG_BOOLEAN);
+ assertNoError(1655, Signature.SIG_BOOLEAN);
+ assertNoError(1707, Signature.SIG_BOOLEAN);
+ assertNoError(1759, Signature.SIG_BOOLEAN);
+ assertNoError(1810, Signature.SIG_BOOLEAN);
+ assertNoError(1861, Signature.SIG_BOOLEAN);
+ assertNoError(1927, Signature.SIG_BOOLEAN);
+ assertNoError(1993, Signature.SIG_BOOLEAN);
+ assertNoError(2045, Signature.SIG_BOOLEAN);
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=235637
+ // can only call comparison null always same if can verify both
+ // sides of the expression are null
+ assertNoError(2452, Signature.SIG_BOOLEAN);
+ assertNoError(2512, Signature.SIG_BOOLEAN);
+ }
+
+ @Override
+ public void testWarningExprs()
+ {
+ List<ReportedProblem> list = assertSemanticWarning(2128, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2164, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2200, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2243, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2286, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2327, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2368, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2410, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2572, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2612, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2654, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_COMPARISON_WITH_ENUM_ALWAYS_SAME_ID);
+
+ list = assertSemanticWarning(2711, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_COMPARISON_WITH_ENUM_ALWAYS_SAME_ID);
+
+ list = assertSemanticWarning(2768, Signature.SIG_BOOLEAN, 2);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_COMPARISON_WITH_ENUM_ALWAYS_SAME_ID);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_FIRST_ARGUMENT_SHORT_CIRCUITS_ID);
+
+ list = assertSemanticWarning(2851, Signature.SIG_BOOLEAN, 2);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_COMPARISON_WITH_ENUM_ALWAYS_SAME_ID);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_FIRST_ARGUMENT_SHORT_CIRCUITS_ID);
+
+ list = assertSemanticWarning(2934, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_COMPARISON_WITH_ENUM_ALWAYS_SAME_ID);
+ }
+
+ @Override
+ public void testErrorExprs()
+ {
+ List<ReportedProblem> list = assertSemanticError(3012, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(3051, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(3090, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(3168, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(3246, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID);
+
+ list = assertSemanticError(3328, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID);
+
+ list = assertSemanticError(3413, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(3477, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(3541, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LogicalNotTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LogicalNotTestCase.java
new file mode 100644
index 000000000..24c2e7851
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LogicalNotTestCase.java
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import java.util.List;
+
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
+
+/**
+ * Test cases for logical not (not, !)
+ *
+ * @author cbateman
+ */
+public class LogicalNotTestCase extends SingleJSPTestCase {
+
+ public LogicalNotTestCase()
+ {
+ super("/testdata/jsps/logicalNOT.jsp.data", "/logicalNOT.jsp", JSFVersion.V1_1,FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ public void testSanity()
+ {
+ assertEquals("!myBean.booleanProperty", ELAssert.getELText(_structuredDocument,829));
+ assertEquals("not myBean.booleanProperty", ELAssert.getELText(_structuredDocument,885));
+ assertEquals("!myBean.stringProperty", ELAssert.getELText(_structuredDocument,941));
+ assertEquals("not myBean.stringProperty", ELAssert.getELText(_structuredDocument,993));
+
+ assertEquals("!true", ELAssert.getELText(_structuredDocument,1075));
+ assertEquals("not true", ELAssert.getELText(_structuredDocument,1113));
+ assertEquals("!false", ELAssert.getELText(_structuredDocument,1154));
+ assertEquals("not false", ELAssert.getELText(_structuredDocument,1193));
+ assertEquals("! 'true'", ELAssert.getELText(_structuredDocument,1235));
+ assertEquals("not 'true'", ELAssert.getELText(_structuredDocument,1276));
+ assertEquals("! 'notTrue'", ELAssert.getELText(_structuredDocument,1319));
+ assertEquals("not 'notTrue'", ELAssert.getELText(_structuredDocument,1363));
+
+ assertEquals("!5", ELAssert.getELText(_structuredDocument,1430));
+ assertEquals("not 5", ELAssert.getELText(_structuredDocument,1462));
+ assertEquals("!myBean.integerProperty", ELAssert.getELText(_structuredDocument,1497));
+ assertEquals("not myBean.integerProperty", ELAssert.getELText(_structuredDocument,1550));
+ assertEquals("!myBean.collectionProperty", ELAssert.getELText(_structuredDocument,1606));
+ assertEquals("not myBean.collectionProperty", ELAssert.getELText(_structuredDocument,1662));
+ assertEquals("!myBean.stringArrayProperty", ELAssert.getELText(_structuredDocument,1721));
+ assertEquals("not myBean.stringArrayProperty", ELAssert.getELText(_structuredDocument,1778));
+ assertEquals("!myBean.mapProperty", ELAssert.getELText(_structuredDocument,1838));
+ assertEquals("not myBean.mapProperty", ELAssert.getELText(_structuredDocument,1887));
+ }
+
+ @Override
+ public void testNoErrorExprs()
+ {
+ assertNoError(829, Signature.SIG_BOOLEAN);
+ assertNoError(885, Signature.SIG_BOOLEAN);
+ assertNoError(941, Signature.SIG_BOOLEAN);
+ assertNoError(993, Signature.SIG_BOOLEAN);
+ }
+
+ @Override
+ public void testWarningExprs()
+ {
+ List<ReportedProblem> list = assertSemanticWarning(1075, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_CONSTANT_EXPRESSION_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1113, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_CONSTANT_EXPRESSION_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1154, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_CONSTANT_EXPRESSION_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1193, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_CONSTANT_EXPRESSION_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1235, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_CONSTANT_EXPRESSION_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1276, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_CONSTANT_EXPRESSION_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1319, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_CONSTANT_EXPRESSION_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1363, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_CONSTANT_EXPRESSION_EVAL_SAME_ID);
+ }
+
+ @Override
+ public void testErrorExprs()
+ {
+ /* reduced to warning for bug 243674
+ List<ReportedProblem> list = assertSemanticError(1430, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID);
+
+ list = assertSemanticError(1462, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID);
+
+ list = assertSemanticError(1497, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID);
+
+ list = assertSemanticError(1550, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID);
+
+ list = assertSemanticError(1606, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID);
+
+ list = assertSemanticError(1662, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID);
+
+ list = assertSemanticError(1721, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID);
+
+ list = assertSemanticError(1778, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID);
+
+ list = assertSemanticError(1838, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID);
+
+ list = assertSemanticError(1887, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID);
+ */
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LogicalOrTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LogicalOrTestCase.java
new file mode 100644
index 000000000..22908b926
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LogicalOrTestCase.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import java.util.List;
+
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
+
+/**
+ * Test cases for logical OR (or, ||)
+ *
+ * @author cbateman
+ */
+public class LogicalOrTestCase extends SingleJSPTestCase
+{
+ public LogicalOrTestCase()
+ {
+ super("/testdata/jsps/logicalOR.jsp.data", "/logicalOR.jsp", JSFVersion.V1_1,FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ public void testSanity()
+ {
+ assertEquals("myBean.booleanProperty or myBean.booleanProperty", ELAssert.getELText(_structuredDocument,828));
+ assertEquals("myBean.booleanProperty || myBean.booleanProperty", ELAssert.getELText(_structuredDocument,909));
+ assertEquals("false || myBean.booleanProperty", ELAssert.getELText(_structuredDocument,990));
+ assertEquals("false or myBean.booleanProperty", ELAssert.getELText(_structuredDocument,1054));
+ assertEquals("null || myBean.booleanProperty ", ELAssert.getELText(_structuredDocument,1118));
+ assertEquals("null or myBean.booleanProperty ", ELAssert.getELText(_structuredDocument,1182));
+ assertEquals("'notTrue' || myBean.booleanProperty", ELAssert.getELText(_structuredDocument,1246));
+ assertEquals("myBean.booleanProperty || false", ELAssert.getELText(_structuredDocument,1321));
+ assertEquals("myBean.booleanProperty or false", ELAssert.getELText(_structuredDocument,1385));
+ assertEquals("myBean.booleanProperty || null ", ELAssert.getELText(_structuredDocument,1449));
+ assertEquals("myBean.booleanProperty or null", ELAssert.getELText(_structuredDocument,1513));
+ assertEquals("myBean.booleanProperty || 'notTrue'", ELAssert.getELText(_structuredDocument,1576));
+ assertEquals("myBean.booleanProperty or 'notTrue'", ELAssert.getELText(_structuredDocument,1646));
+
+ assertEquals("'true' or myBean.booleanProperty", ELAssert.getELText(_structuredDocument,1738));
+ assertEquals("'true' || myBean.booleanProperty", ELAssert.getELText(_structuredDocument,1804));
+ assertEquals("myBean.booleanProperty or true ", ELAssert.getELText(_structuredDocument,1867));
+ assertEquals("myBean.booleanProperty || true ", ELAssert.getELText(_structuredDocument,1928));
+ assertEquals("myBean.booleanProperty || 'true'", ELAssert.getELText(_structuredDocument,1989));
+ assertEquals("false || true", ELAssert.getELText(_structuredDocument,2051));
+ assertEquals("null || true", ELAssert.getELText(_structuredDocument,2094));
+
+ assertEquals("myBean.integerProperty || false", ELAssert.getELText(_structuredDocument,2161));
+ assertEquals("false || myBean.integerProperty", ELAssert.getELText(_structuredDocument,2225));
+ assertEquals("4 || false", ELAssert.getELText(_structuredDocument,2289));
+ }
+
+ @Override
+ public void testNoErrorExprs()
+ {
+ assertNoError(828, Signature.SIG_BOOLEAN);
+ assertNoError(909, Signature.SIG_BOOLEAN);
+ assertNoError(990, Signature.SIG_BOOLEAN);
+ assertNoError(1054, Signature.SIG_BOOLEAN);
+ assertNoError(1118, Signature.SIG_BOOLEAN);
+ assertNoError(1182, Signature.SIG_BOOLEAN);
+ assertNoError(1246, Signature.SIG_BOOLEAN);
+ assertNoError(1321, Signature.SIG_BOOLEAN);
+ assertNoError(1385, Signature.SIG_BOOLEAN);
+ assertNoError(1449, Signature.SIG_BOOLEAN);
+ assertNoError(1513, Signature.SIG_BOOLEAN);
+ assertNoError(1576, Signature.SIG_BOOLEAN);
+ assertNoError(1646, Signature.SIG_BOOLEAN);
+ }
+
+ @Override
+ public void testWarningExprs()
+ {
+ List<ReportedProblem> list = assertSemanticWarning(1738, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_FIRST_ARGUMENT_SHORT_CIRCUITS_ID);
+
+ list = assertSemanticWarning(1804, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_FIRST_ARGUMENT_SHORT_CIRCUITS_ID);
+
+ list = assertSemanticWarning(1867, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_SECOND_ARGUMENT_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1928, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_SECOND_ARGUMENT_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1989, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_SECOND_ARGUMENT_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2051, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_SECOND_ARGUMENT_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2094, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_SECOND_ARGUMENT_ALWAYS_EVAL_SAME_ID);
+ }
+
+ @Override
+ public void testErrorExprs()
+ {
+ final List<ReportedProblem> list = assertSemanticError(2161, null,1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID);
+
+ assertSemanticError(2225, null,1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID);
+
+ assertSemanticError(2289, null,1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/MarkerOffsetsTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/MarkerOffsetsTestCase.java
new file mode 100644
index 000000000..e2e831e81
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/MarkerOffsetsTestCase.java
@@ -0,0 +1,180 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import java.util.List;
+
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
+
+/**
+ * Used to verify that marker offset/lengths are calculated correctly
+ * for each type error message. This test case should aim for coverage
+ * of all diagnostic creation for EL. Note that we can't currently get coverage
+ * on ternaries (parser bug), empty bracket or missing bracket because these things
+ * are validated outside the EL validator.
+ *
+ * @author cbateman
+ *
+ */
+public class MarkerOffsetsTestCase extends SingleJSPTestCase
+{
+ public MarkerOffsetsTestCase() {
+ super("/testdata/jsps/markerOffsets.jsp.data", "/markerOffsets.jsp", JSFVersion.V1_1,FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ public void testSanity()
+ {
+ assertEquals("5 + 3", ELAssert.getELText(_structuredDocument,880));
+ assertEquals("null / null", ELAssert.getELText(_structuredDocument,915));
+ assertEquals("myBean.integerProperty == null", ELAssert.getELText(_structuredDocument,956));
+ assertEquals("false && myBean.booleanProperty", ELAssert.getELText(_structuredDocument,1015));
+ assertEquals("myBean.booleanProperty && false", ELAssert.getELText(_structuredDocument,1075));
+ assertEquals("!false", ELAssert.getELText(_structuredDocument,1135));
+ assertEquals("empty 5", ELAssert.getELText(_structuredDocument,1171));
+ assertEquals("-null", ELAssert.getELText(_structuredDocument,1208));
+ assertEquals("-myBean.stringProperty", ELAssert.getELText(_structuredDocument,1243));
+ assertEquals("myBean.integerProperty - (5 + 3)", ELAssert.getELText(_structuredDocument,1376));
+ assertEquals("myBean.booleanProperty && myBean.integerProperty + 5 == null", ELAssert.getELText(_structuredDocument,1438));
+ assertEquals("notABean.stringProperty", ELAssert.getELText(_structuredDocument,1569));
+ assertEquals("myBean.notAProperty", ELAssert.getELText(_structuredDocument,1622));
+ assertEquals("myBean.integerProperty + 5 + myBean.notAProperty", ELAssert.getELText(_structuredDocument,1671));
+ assertEquals("myBean.integerProperty++", ELAssert.getELText(_structuredDocument,1769));
+ assertEquals("myBean.", ELAssert.getELText(_structuredDocument,1823));
+ assertEquals(" ", ELAssert.getELText(_structuredDocument,1860));
+
+ assertEquals("myBean.integerProperty / 0", ELAssert.getELText(_structuredDocument,1978));
+ assertEquals("myBean.integerProperty + myBean.booleanProperty", ELAssert.getELText(_structuredDocument,2034));
+ assertEquals("myBean.integerProperty && myBean.booleanProperty", ELAssert.getELText(_structuredDocument,2111));
+ assertEquals("myBean.booleanProperty >= myBean.collectionProperty", ELAssert.getELText(_structuredDocument,2189));
+ assertEquals("5 + 'noNumberConversion'", ELAssert.getELText(_structuredDocument,2270));
+ assertEquals("-true", ELAssert.getELText(_structuredDocument,2324));
+ assertEquals("!5", ELAssert.getELText(_structuredDocument,2359));
+ assertEquals("myBean.doubleProperty + myBean.getIntegerProperty", ELAssert.getELText(_structuredDocument,2418));
+
+ }
+
+ @Override
+ public void testNoErrorExprs()
+ {
+ // marker offset tests are only meaningful for validation warnings and errors
+ // since we are testing the length and offset values for their corresponding markers
+ }
+ @Override
+ public void testWarningExprs()
+ {
+ // UPDATE REMINDER! The third argument in assertContainsProblem is the start
+ // offset (absolute) of the marker expected. Before updating the assertSemanticWarning
+ // make a note to the difference
+ List<ReportedProblem> list = assertSemanticWarning(880, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID, 880, 5);
+
+ list = assertSemanticWarning(915, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_BOTH_OPERANDS_NULL_ID, 915, 11);
+
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=235637
+ // can only call comparison null always same if can verify both
+ // sides of the expression are null
+// list = assertSemanticWarning(956, null, 1);
+// assertContainsProblem(list, DiagnosticFactory.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME_ID, 956, 30);
+
+ list = assertSemanticWarning(1015, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_FIRST_ARGUMENT_SHORT_CIRCUITS_ID, 1015, 31);
+
+ list = assertSemanticWarning(1075, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_SECOND_ARGUMENT_ALWAYS_EVAL_SAME_ID, 1075, 31);
+
+ list = assertSemanticWarning(1135, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_CONSTANT_EXPRESSION_EVAL_SAME_ID, 1135, 6);
+
+ list = assertSemanticWarning(1171, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_EMPTY_ALWAYS_FALSE_ON_TYPE_ID, 1171, 7);
+
+ list = assertSemanticWarning(1208, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_MINUS_ON_NULL_ALWAYS_ZERO_ID, 1208, 5);
+
+ list = assertSemanticWarning(1243, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_STRING_CONVERSION_NOT_GUARANTEED_ID, 1243, 22);
+
+ list = assertSemanticWarning(1376, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID, 1402, 5);
+
+// list = assertSemanticWarning(1438, null, 2);
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=235637
+ // can only call comparison null always same if can verify both
+ // sides of the expression are null
+// assertContainsProblem(list, DiagnosticFactory.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME_ID, 1464, 34);
+// assertContainsProblem(list, DiagnosticFactory.BINARY_OP_SECOND_ARGUMENT_ALWAYS_EVAL_SAME_ID, 1438, 60);
+
+ list = assertSemanticInfo(1569, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.VARIABLE_NOT_FOUND_ID, 1569, 8);
+
+ list = assertSemanticWarning(1622, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.MEMBER_NOT_FOUND_ID, 1629, 12);
+
+ list = assertSemanticWarning(1671, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.MEMBER_NOT_FOUND_ID, 1707, 12);
+
+ list = assertSyntaxWarning(1769, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.GENERAL_SYNTAX_ERROR_ID, 1792, 1);
+
+ // Is really correct to have the property offset start on the dot?
+ list = assertSemanticWarning(1823, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.MEMBER_NOT_FOUND_ID, 1829, 1);
+
+ list = assertSyntaxWarning(1860, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.GENERAL_SYNTAX_ERROR_ID, 1860, 1);
+ }
+
+ @Override
+ public void testErrorExprs()
+ {
+ // UPDATE REMINDER! The third argument in assertContainsProblem is the start
+ // offset (absolute) of the marker expected. Before updating the assertSemanticWarning
+ // make a note to the difference
+ List<ReportedProblem> list = assertSemanticError(1978, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_POSSIBLE_DIVISION_BY_ZERO_ID, 1978, 26);
+
+ list = assertSemanticError(2034, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID, 2034, 47);
+
+ list = assertSemanticError(2111, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID, 2111, 48);
+
+ list = assertSemanticError(2189, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID, 2189, 51);
+
+ list = assertSemanticError(2270, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_COERCE_LITERALS_TO_NUMBERS_ID, 2270, 24);
+
+ list = assertSemanticError(2324, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID, 2324, 5);
+
+ /* reduced to warning for bug 243674
+ list = assertSemanticError(2359, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID, 2359, 2);
+ */
+
+ list = assertSemanticError(2418, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.CANNOT_APPLY_OPERATOR_TO_METHOD_BINDING_ID, 2442, 25);
+ }
+
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/MethodBindingTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/MethodBindingTestCase.java
new file mode 100644
index 000000000..846a1c596
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/MethodBindingTestCase.java
@@ -0,0 +1,145 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import java.util.List;
+
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jst.jsf.common.internal.types.TypeConstants;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
+
+/**
+ * Test cases for method bindings
+ *
+ * @author cbateman
+ */
+public class MethodBindingTestCase extends SingleJSPTestCase
+{
+ public MethodBindingTestCase()
+ {
+ super("/testdata/jsps/methodBinding.jsp.data", "/methodBinding.jsp", JSFVersion.V1_1,FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ public void testSanity()
+ {
+ assertEquals("myBean.getStringProperty", ELAssert.getELText(_structuredDocument,825));
+ assertEquals("myBean.getIntegerProperty", ELAssert.getELText(_structuredDocument,885));
+ assertEquals("myBean.getBooleanProperty", ELAssert.getELText(_structuredDocument,946));
+ assertEquals("myBean.getDoubleProperty", ELAssert.getELText(_structuredDocument,1007));
+ assertEquals("myBean.getMapProperty", ELAssert.getELText(_structuredDocument,1067));
+ assertEquals("myBean.getStringArrayProperty", ELAssert.getELText(_structuredDocument,1124));
+ assertEquals("myBean.getCollectionProperty", ELAssert.getELText(_structuredDocument,1189));
+ assertEquals("myBean.getListProperty", ELAssert.getELText(_structuredDocument,1253));
+ assertEquals("myBean.getComparableProperty", ELAssert.getELText(_structuredDocument,1311));
+ assertEquals("myBean.getBigIntegerProperty", ELAssert.getELText(_structuredDocument,1375));
+ assertEquals("myBean.getBigDoubleProperty", ELAssert.getELText(_structuredDocument,1439));
+ assertEquals("myBean.recursiveCall", ELAssert.getELText(_structuredDocument,1502));
+ assertEquals("myBean.getWritableStringProperty", ELAssert.getELText(_structuredDocument,1558));
+ assertEquals("myBean.setWritableStringProperty", ELAssert.getELText(_structuredDocument,1626));
+ assertEquals("myBean.validate", ELAssert.getELText(_structuredDocument,1694));
+ assertEquals("myBean.validate2", ELAssert.getELText(_structuredDocument,1745));
+ assertEquals("myBean.getSelf", ELAssert.getELText(_structuredDocument,1797));
+ assertEquals("myBean.isIsStyleBooleanProperty", ELAssert.getELText(_structuredDocument,1847));
+ assertEquals("myBeanSubClass.getStringProperty", ELAssert.getELText(_structuredDocument,1915));
+ assertEquals("myBeanSubClass.getIntegerProperty", ELAssert.getELText(_structuredDocument,1983));
+ assertEquals("myBeanSubClass.getBooleanProperty", ELAssert.getELText(_structuredDocument,2052));
+ assertEquals("myBeanSubClass.getDoubleProperty", ELAssert.getELText(_structuredDocument,2121));
+ assertEquals("myBeanSubClass.getMapProperty", ELAssert.getELText(_structuredDocument,2189));
+ assertEquals("myBeanSubClass.getStringArrayProperty", ELAssert.getELText(_structuredDocument,2254));
+ assertEquals("myBeanSubClass.getCollectionProperty", ELAssert.getELText(_structuredDocument,2327));
+ assertEquals("myBeanSubClass.getListProperty", ELAssert.getELText(_structuredDocument,2399));
+ assertEquals("myBeanSubClass.getComparableProperty", ELAssert.getELText(_structuredDocument,2465));
+ assertEquals("myBeanSubClass.getBigIntegerProperty", ELAssert.getELText(_structuredDocument,2537));
+ assertEquals("myBeanSubClass.getBigDoubleProperty", ELAssert.getELText(_structuredDocument,2609));
+ assertEquals("myBeanSubClass.recursiveCall", ELAssert.getELText(_structuredDocument,2680));
+ assertEquals("myBeanSubClass.getWritableStringProperty", ELAssert.getELText(_structuredDocument,2744));
+ assertEquals("myBeanSubClass.setWritableStringProperty", ELAssert.getELText(_structuredDocument,2820));
+ assertEquals("myBeanSubClass.validate", ELAssert.getELText(_structuredDocument,2896));
+ assertEquals("myBeanSubClass.validate2", ELAssert.getELText(_structuredDocument,2955));
+ assertEquals("myBeanSubClass.getSelf", ELAssert.getELText(_structuredDocument,3015));
+ assertEquals("myBeanSubClass.isIsStyleBooleanProperty", ELAssert.getELText(_structuredDocument,3073));
+ assertEquals("myBeanSubClass.getSubClassStringProperty", ELAssert.getELText(_structuredDocument,3148));
+
+ assertEquals("-myBean.validate", ELAssert.getELText(_structuredDocument,3272));
+ assertEquals("myBean.getIntegerProperty + myBean.getDoubleProperty", ELAssert.getELText(_structuredDocument,3320));
+ }
+
+ @Override
+ public void testNoErrorExprs() {
+ final String[] noStrings = new String[0];
+ assertNoError(825, Signature.createMethodSignature(noStrings, TypeConstants.TYPE_STRING));
+ assertNoError(885, Signature.createMethodSignature(noStrings, Signature.SIG_INT));
+ assertNoError(946, Signature.createMethodSignature(noStrings, Signature.SIG_BOOLEAN));
+ assertNoError(1007, Signature.createMethodSignature(noStrings, Signature.SIG_DOUBLE));
+ assertNoError(1067, Signature.createMethodSignature(noStrings, TypeConstants.TYPE_MAP));
+ assertNoError(1124, Signature.createMethodSignature(noStrings, Signature.createArraySignature(TypeConstants.TYPE_STRING,1)));
+ assertNoError(1189, Signature.createMethodSignature(noStrings, TypeConstants.TYPE_COLLECTION));
+ assertNoError(1253, Signature.createMethodSignature(noStrings, "Ljava.util.List;"));
+ assertNoError(1311, Signature.createMethodSignature(noStrings, TypeConstants.TYPE_COMPARABLE));
+ assertNoError(1375, Signature.createMethodSignature(noStrings, TypeConstants.TYPE_BIG_INTEGER));
+ assertNoError(1439, Signature.createMethodSignature(noStrings, TypeConstants.TYPE_BIG_DOUBLE));
+ assertNoError(1502, Signature.createMethodSignature(noStrings, "Lbeans.MyBean;"));
+ assertNoError(1558, Signature.createMethodSignature(noStrings, TypeConstants.TYPE_STRING));
+ assertNoError(1626, Signature.createMethodSignature(new String[]{TypeConstants.TYPE_STRING}, Signature.SIG_VOID));
+ assertNoError(1694, "(QFacesContext;QUIComponent;Ljava.lang.Object;)V");
+ assertNoError(1745, "(QFacesContext;QUIComponent;[Ljava.lang.Object;)V");
+ assertNoError(1797, Signature.createMethodSignature(noStrings, "Lbeans.MyBean;"));
+ assertNoError(1847, Signature.createMethodSignature(noStrings, Signature.SIG_BOOLEAN));
+
+ assertNoError(1915, Signature.createMethodSignature(noStrings, TypeConstants.TYPE_STRING));
+ assertNoError(1983, Signature.createMethodSignature(noStrings, Signature.SIG_INT));
+ assertNoError(2052, Signature.createMethodSignature(noStrings, Signature.SIG_BOOLEAN));
+ assertNoError(2121, Signature.createMethodSignature(noStrings, Signature.SIG_DOUBLE));
+ assertNoError(2189, Signature.createMethodSignature(noStrings, TypeConstants.TYPE_MAP));
+ assertNoError(2254, Signature.createMethodSignature(noStrings, Signature.createArraySignature(TypeConstants.TYPE_STRING,1)));
+ assertNoError(2327, Signature.createMethodSignature(noStrings, TypeConstants.TYPE_COLLECTION));
+ assertNoError(2399, Signature.createMethodSignature(noStrings, "Ljava.util.List;"));
+ assertNoError(2465, Signature.createMethodSignature(noStrings, TypeConstants.TYPE_COMPARABLE));
+ assertNoError(2537, Signature.createMethodSignature(noStrings, TypeConstants.TYPE_BIG_INTEGER));
+ assertNoError(2609, Signature.createMethodSignature(noStrings, TypeConstants.TYPE_BIG_DOUBLE));
+ assertNoError(2680, Signature.createMethodSignature(noStrings, "Lbeans.MyBean;"));
+ assertNoError(2744, Signature.createMethodSignature(noStrings, TypeConstants.TYPE_STRING));
+ assertNoError(2820, Signature.createMethodSignature(new String[]{TypeConstants.TYPE_STRING}, Signature.SIG_VOID));
+ assertNoError(2896, "(QFacesContext;QUIComponent;Ljava.lang.Object;)V");
+ assertNoError(2955, "(QFacesContext;QUIComponent;[Ljava.lang.Object;)V");
+ assertNoError(3015, Signature.createMethodSignature(noStrings, "Lbeans.MyBean;"));
+ assertNoError(3073, Signature.createMethodSignature(noStrings, Signature.SIG_BOOLEAN));
+ assertNoError(3148, Signature.createMethodSignature(noStrings, TypeConstants.TYPE_STRING));
+ }
+
+ @Override
+ public void testWarningExprs()
+ {
+ // no warning cases
+ }
+
+ @Override
+ public void testErrorExprs()
+ {
+ List<ReportedProblem> list = assertSemanticError(3272, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.CANNOT_APPLY_OPERATOR_TO_METHOD_BINDING_ID);
+
+ list = assertSemanticError(3320, null, 2);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.CANNOT_APPLY_OPERATOR_TO_METHOD_BINDING_ID);
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/PropertiesOfListTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/PropertiesOfListTestCase.java
new file mode 100644
index 000000000..612b57224
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/PropertiesOfListTestCase.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+
+public class PropertiesOfListTestCase extends SingleJSPTestCase
+{
+ public PropertiesOfListTestCase()
+ {
+ super("/testdata/jsps/propertiesOfMaps.jsp.data", "/propertiesOfMaps.jsp", JSFVersion.V1_1,FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ public void testErrorExprs() {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void testNoErrorExprs() {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void testWarningExprs() {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/PropertiesOfMapsTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/PropertiesOfMapsTestCase.java
new file mode 100644
index 000000000..2960ea26c
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/PropertiesOfMapsTestCase.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jst.jsf.common.internal.types.TypeConstants;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+
+/**
+ * Tests cases with the default property resolver where maps are being
+ * queried for their properties. This is different than with beans, since
+ * for unconstrained maps, we often can't fully validate type
+ *
+ * @author cbateman
+ *
+ */
+public class PropertiesOfMapsTestCase extends SingleJSPTestCase
+{
+ public PropertiesOfMapsTestCase()
+ {
+ super("/testdata/jsps/propertiesOfMaps.jsp.data", "/propertiesOfMaps.jsp", JSFVersion.V1_1,FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(JSFCoreUtilHelper.createSimpleRegistryFactory());
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(null);
+ }
+
+ @Override
+ public void testSanity()
+ {
+ assertEquals("beanWithMapProperties.integerProperty", ELAssert.getELText(_structuredDocument,880));
+ assertEquals("bundle.bundleProp1", ELAssert.getELText(_structuredDocument,955));
+ assertEquals("bundle.x.y", ELAssert.getELText(_structuredDocument,1006));
+ assertEquals("beanWithMapProperties.treeMap.foo", ELAssert.getELText(_structuredDocument,1049));
+ assertEquals("beanWithMapProperties.treeMap.foo.x", ELAssert.getELText(_structuredDocument,1115));
+ assertEquals("beanWithMapProperties.mapProperty.foo", ELAssert.getELText(_structuredDocument,1183));
+ assertEquals("beanWithMapProperties.mapProperty.foo.x", ELAssert.getELText(_structuredDocument,1253));
+ assertEquals("mapBean.foo", ELAssert.getELText(_structuredDocument,1325));
+ assertEquals("mapBean.foo.x", ELAssert.getELText(_structuredDocument,1369));
+ assertEquals("mapBean.getIgnoredIntProperty", ELAssert.getELText(_structuredDocument,1415));
+
+ assertEquals("bundle.y", ELAssert.getELText(_structuredDocument,1478));
+ assertEquals("bundle.bundleProp1.z", ELAssert.getELText(_structuredDocument,1519));
+ }
+
+ @Override
+ public void testNoErrorExprs()
+ {
+ assertNoError(880, Signature.SIG_INT);
+ assertNoError(955, TypeConstants.TYPE_STRING);
+ assertNoError(1006, TypeConstants.TYPE_STRING);
+ assertNoError(1049, TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(1115, TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(1183, TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(1253, TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(1325, TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(1369, TypeConstants.TYPE_JAVAOBJECT);
+ assertNoError(1415, TypeConstants.TYPE_JAVAOBJECT);
+ }
+
+ @Override
+ public void testWarningExprs()
+ {
+ assertSemanticWarning(1478, null, 1);
+ assertSemanticWarning(1519, null, 1);
+ }
+
+ @Override
+ public void testErrorExprs()
+ {
+ // do nothing; no error cases
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ResourceBundleTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ResourceBundleTestCase.java
new file mode 100644
index 000000000..f86c2951f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ResourceBundleTestCase.java
@@ -0,0 +1,140 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import java.io.ByteArrayInputStream;
+import java.util.List;
+
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jst.jsf.common.internal.types.TypeConstants;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.test.util.TestFileResource;
+import org.eclipse.jst.jsf.validation.el.tests.ELValidationTestPlugin;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
+
+/**
+ * Tests the introduction of symbols through resource-bundle element the
+ * application configuration file (faces-config.xml)
+ *
+ * JSF 1.2 and later only
+ *
+ * @author cbateman
+ *
+ */
+public class ResourceBundleTestCase extends SingleJSPTestCase {
+
+ public ResourceBundleTestCase()
+ {
+ super("/testdata/jsps/resourceBundleResolution.jsp.data", "/resourceBundle.jsp", JSFVersion.V1_2, FACES_CONFIG_FILE_NAME_1_2 );
+ }
+
+
+ @Override
+ protected void doStandaloneSetup() {
+ super.doStandaloneSetup();
+ }
+
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ // add a resource bundle to the default package to test regression on bug 144525
+ TestFileResource resource = new TestFileResource();
+ resource.load(ELValidationTestPlugin.getDefault().getBundle(),
+ "/testdata/classes/Bundle.properties.data");
+ _jdtTestEnv.addResourceFile("src", new ByteArrayInputStream(resource.toBytes()),
+ "", "Bundle.properties");
+
+ // add a second res bundle to ensure that res bundle is not somehow being
+ // confused by a loadBundle variable
+ resource = new TestFileResource();
+ resource.load(ELValidationTestPlugin.getDefault().getBundle(),
+ "/testdata/classes/Bundle2.properties.data");
+ _jdtTestEnv.addResourceFile("src", new ByteArrayInputStream(resource.toBytes()),
+ "beans", "Bundle2.properties");
+ }
+
+ @Override
+ public void testSanity()
+ {
+ assertEquals("resBundleProp1.bundleProp2", ELAssert.getELText(_structuredDocument,887));
+ assertEquals("noPackageBundle.bundleProp2", ELAssert.getELText(_structuredDocument,943));
+ assertEquals("resBundleProp1.bundleProp1 && myBean.stringProperty", ELAssert.getELText(_structuredDocument,1003));
+ assertEquals("empty resBundleProp1", ELAssert.getELText(_structuredDocument,1087));
+ assertEquals("empty resBundleProp1.bundleProp2", ELAssert.getELText(_structuredDocument,1140));
+ assertEquals("resBundleProp1.bundleProp2 + 5", ELAssert.getELText(_structuredDocument,1205));
+ assertEquals("bundleProp2", ELAssert.getELText(_structuredDocument,1265));
+ assertEquals("resBundleProp1.x.y", ELAssert.getELText(_structuredDocument,1306));
+ assertEquals("noPackageBundle.x.y", ELAssert.getELText(_structuredDocument,1354));
+ assertEquals("resBundleProp2.name", ELAssert.getELText(_structuredDocument,1406));
+ assertEquals("resBundleProp2.movie", ELAssert.getELText(_structuredDocument,1455));
+
+ assertEquals("-resBundleProp1.bundleProp1", ELAssert.getELText(_structuredDocument,1530));
+ assertEquals("resBundleProp1.bundleProp3", ELAssert.getELText(_structuredDocument,1590));
+ assertEquals("msg", ELAssert.getELText(_structuredDocument,1649));
+ assertEquals("resBundleProp1.x", ELAssert.getELText(_structuredDocument,1685));
+ assertEquals("noPackageBundle.notAProperty", ELAssert.getELText(_structuredDocument,1731));
+ assertEquals("resBundleProp2.bundleProp2", ELAssert.getELText(_structuredDocument,1792));
+ assertEquals("resBundleProp2.notAPropAtAll", ELAssert.getELText(_structuredDocument,1848));
+ }
+
+ @Override
+ public void testNoErrorExprs()
+ {
+ assertNoError(887, TypeConstants.TYPE_STRING);
+ assertNoError(943, TypeConstants.TYPE_STRING);
+ assertNoError(1003, Signature.SIG_BOOLEAN);
+ assertNoError(1087, Signature.SIG_BOOLEAN);
+ assertNoError(1140, Signature.SIG_BOOLEAN);
+ assertNoError(1205, Signature.SIG_LONG);
+ //assertNoError(1265, TypeConstants.TYPE_MAP);
+ assertNoError(1306, TypeConstants.TYPE_STRING);
+ assertNoError(1354, TypeConstants.TYPE_STRING);
+ assertNoError(1406, TypeConstants.TYPE_STRING);
+ assertNoError(1455, TypeConstants.TYPE_STRING);
+ }
+
+ @Override
+ public void testWarningExprs()
+ {
+ List<ReportedProblem> problems = assertSemanticWarning(1530, null, 1);
+ ELAssert.assertContainsProblem(problems, DiagnosticFactory.UNARY_OP_STRING_CONVERSION_NOT_GUARANTEED_ID);
+
+ problems = assertSemanticWarning(1590, null, 1);
+ ELAssert.assertContainsProblem(problems, DiagnosticFactory.MEMBER_NOT_FOUND_ID);
+
+ problems = assertSemanticInfo(1649, null, 1);
+ ELAssert.assertContainsProblem(problems, DiagnosticFactory.VARIABLE_NOT_FOUND_ID);
+
+ problems = assertSemanticWarning(1685, null, 1);
+ ELAssert.assertContainsProblem(problems, DiagnosticFactory.MEMBER_IS_INTERMEDIATE_ID);
+
+ problems = assertSemanticWarning(1731, null, 1);
+ ELAssert.assertContainsProblem(problems, DiagnosticFactory.MEMBER_NOT_FOUND_ID);
+
+ problems = assertSemanticWarning(1792, null, 1);
+ ELAssert.assertContainsProblem(problems, DiagnosticFactory.MEMBER_NOT_FOUND_ID);
+
+ problems = assertSemanticWarning(1848, null, 1);
+ ELAssert.assertContainsProblem(problems, DiagnosticFactory.MEMBER_NOT_FOUND_ID);
+ }
+
+ @Override
+ public void testErrorExprs()
+ {
+ // no errors
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/UnaryEmptyTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/UnaryEmptyTestCase.java
new file mode 100644
index 000000000..21bad3f12
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/UnaryEmptyTestCase.java
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import java.util.List;
+
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
+
+/**
+ * Test cases for unary empty
+ *
+ * @author cbateman
+ */
+public class UnaryEmptyTestCase extends SingleJSPTestCase
+{
+ public UnaryEmptyTestCase()
+ {
+ super("/testdata/jsps/emptyOperator.jsp.data", "/emptyOperator.jsp", JSFVersion.V1_1,FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ public void testSanity()
+ {
+ super.testSanity();
+
+ assertEquals("empty myBean.collectionProperty", ELAssert.getELText(_structuredDocument,828));
+ assertEquals("empty myBean.mapProperty", ELAssert.getELText(_structuredDocument,892));
+ assertEquals("empty myBean.stringArrayProperty", ELAssert.getELText(_structuredDocument,949));
+ assertEquals("empty myBean.stringProperty", ELAssert.getELText(_structuredDocument,1014));
+ assertEquals("myBean.stringProperty", ELAssert.getELText(_structuredDocument,1074));
+ assertEquals("empty myBean.listProperty", ELAssert.getELText(_structuredDocument,1128));
+ assertEquals("empty mapBean", ELAssert.getELText(_structuredDocument,1183));
+
+ assertEquals("empty 5", ELAssert.getELText(_structuredDocument,1250));
+ assertEquals("empty myBean.integerProperty", ELAssert.getELText(_structuredDocument,1287));
+ assertEquals("empty false", ELAssert.getELText(_structuredDocument,1345));
+ assertEquals("empty myBean.booleanProperty", ELAssert.getELText(_structuredDocument,1386));
+ assertEquals("empty ''", ELAssert.getELText(_structuredDocument,1444));
+ assertEquals("empty 'notEmpty'", ELAssert.getELText(_structuredDocument,1485));
+ assertEquals("empty null", ELAssert.getELText(_structuredDocument,1535));
+ assertEquals("empty 456", ELAssert.getELText(_structuredDocument,1578));
+ }
+
+ @Override
+ public void testNoErrorExprs()
+ {
+ assertNoError(828, Signature.SIG_BOOLEAN);
+ assertNoError(892, Signature.SIG_BOOLEAN);
+ assertNoError(949, Signature.SIG_BOOLEAN);
+ assertNoError(1014, Signature.SIG_BOOLEAN);
+ // assertNoError(1074, Signature.SIG_BOOLEAN);
+ assertNoError(1128, Signature.SIG_BOOLEAN);
+ assertNoError(1183, Signature.SIG_BOOLEAN);
+
+ }
+
+ @Override
+ public void testWarningExprs()
+ {
+ List<ReportedProblem> list = assertSemanticWarning(1250, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_EMPTY_ALWAYS_FALSE_ON_TYPE_ID);
+
+ list = assertSemanticWarning(1287, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_EMPTY_ALWAYS_FALSE_ON_TYPE_ID);
+
+ list = assertSemanticWarning(1345, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_EMPTY_ALWAYS_FALSE_ON_TYPE_ID);
+
+ list = assertSemanticWarning(1386, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_EMPTY_ALWAYS_FALSE_ON_TYPE_ID);
+
+ list = assertSemanticWarning(1444, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_CONSTANT_EXPRESSION_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1485, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_CONSTANT_EXPRESSION_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1535, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_CONSTANT_EXPRESSION_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(1578, Signature.SIG_BOOLEAN, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_EMPTY_ALWAYS_FALSE_ON_TYPE_ID);
+ }
+
+ @Override
+ public void testErrorExprs()
+ {
+ // no error cases
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/UnaryMinusTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/UnaryMinusTestCase.java
new file mode 100644
index 000000000..76afa7e52
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/UnaryMinusTestCase.java
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp;
+
+import java.util.List;
+
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jst.jsf.common.internal.types.TypeConstants;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
+
+/**
+ * Test cases for unary minus
+ *
+ * @author cbateman
+ */
+public class UnaryMinusTestCase extends SingleJSPTestCase
+{
+ public UnaryMinusTestCase()
+ {
+ super("/testdata/jsps/unaryMinus.jsp.data", "/unaryMinus.jsp", JSFVersion.V1_1,FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ public void testSanity()
+ {
+ assertEquals("-myBean.integerProperty", ELAssert.getELText(_structuredDocument,828));
+ assertEquals("-myBean.doubleProperty", ELAssert.getELText(_structuredDocument,881));
+ assertEquals("-myBean.bigDoubleProperty", ELAssert.getELText(_structuredDocument,933));
+ assertEquals("-myBean.bigIntegerProperty", ELAssert.getELText(_structuredDocument,988));
+ assertEquals("-5", ELAssert.getELText(_structuredDocument,1127));
+ assertEquals("-5.5", ELAssert.getELText(_structuredDocument,1162));
+ assertEquals("-'5'", ELAssert.getELText(_structuredDocument,1199));
+ assertEquals("-'5.5'", ELAssert.getELText(_structuredDocument,1236));
+
+ assertEquals("-myBean.stringProperty", ELAssert.getELText(_structuredDocument,1072));
+ assertEquals("-null", ELAssert.getELText(_structuredDocument,1275));
+
+ assertEquals("-false", ELAssert.getELText(_structuredDocument,1332));
+ assertEquals("-true", ELAssert.getELText(_structuredDocument,1368));
+ assertEquals("-myBean.booleanProperty", ELAssert.getELText(_structuredDocument,1403));
+ assertEquals("-myBean.collectionProperty", ELAssert.getELText(_structuredDocument,1456));
+ assertEquals("-myBean.mapProperty", ELAssert.getELText(_structuredDocument,1512));
+ assertEquals("-myBean.stringArrayProperty", ELAssert.getELText(_structuredDocument,1561));
+ assertEquals("-'notANumber'", ELAssert.getELText(_structuredDocument,1618));
+ }
+
+ @Override
+ public void testNoErrorExprs()
+ {
+ assertNoError(828, Signature.SIG_INT);
+ assertNoError(881, Signature.SIG_DOUBLE);
+ assertNoError(933, TypeConstants.TYPE_BIG_DOUBLE);
+ assertNoError(988, TypeConstants.TYPE_BIG_INTEGER);
+ assertNoError(1127, Signature.SIG_LONG);
+ assertNoError(1162, Signature.SIG_DOUBLE);
+ assertNoError(1199, Signature.SIG_LONG);
+ assertNoError(1236, Signature.SIG_DOUBLE);
+
+ }
+
+ @Override
+ public void testWarningExprs()
+ {
+ List<ReportedProblem> list = assertSemanticWarning(1072, Signature.SIG_LONG, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_STRING_CONVERSION_NOT_GUARANTEED_ID);
+
+ list = assertSemanticWarning(1275, Signature.SIG_LONG, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_MINUS_ON_NULL_ALWAYS_ZERO_ID);
+ }
+
+ @Override
+ public void testErrorExprs()
+ {
+ List<ReportedProblem> list = assertSemanticError(1332, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(1368, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(1403, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(1456, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(1512, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(1561, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+
+ list = assertSemanticError(1618, null, 1);
+ ELAssert.assertContainsProblem(list, DiagnosticFactory.UNARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ext/BeanPropertyResolutionTestCase_JSFExt.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ext/BeanPropertyResolutionTestCase_JSFExt.java
new file mode 100644
index 000000000..2e7cd6716
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ext/BeanPropertyResolutionTestCase_JSFExt.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp.ext;
+
+import org.eclipse.jst.jsf.validation.el.tests.jsp.BeanPropertyResolutionTestCase;
+
+/**
+ * Test cases for bean property resolution
+ *
+ * @author cbateman
+ */
+public class BeanPropertyResolutionTestCase_JSFExt extends BeanPropertyResolutionTestCase
+{
+ public BeanPropertyResolutionTestCase_JSFExt() {
+ super("/testdata/jsps/beanPropertyResolution.jsp.data", "/beanPropertyResolution.jsf");
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ext/BeanPropertyResolutionTestCase_JSPFExt.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ext/BeanPropertyResolutionTestCase_JSPFExt.java
new file mode 100644
index 000000000..f0e0fdf2b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ext/BeanPropertyResolutionTestCase_JSPFExt.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp.ext;
+
+import org.eclipse.jst.jsf.validation.el.tests.jsp.BeanPropertyResolutionTestCase;
+
+/**
+ * Test cases for bean property resolution
+ *
+ * @author cbateman
+ */
+public class BeanPropertyResolutionTestCase_JSPFExt extends BeanPropertyResolutionTestCase
+{
+ public BeanPropertyResolutionTestCase_JSPFExt() {
+ super("/testdata/jsps/beanPropertyResolution.jsp.data", "/beanPropertyResolution.jspf");
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ext/BeanPropertyResolutionTestCase_JSPXExt.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ext/BeanPropertyResolutionTestCase_JSPXExt.java
new file mode 100644
index 000000000..e3acdcbff
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/ext/BeanPropertyResolutionTestCase_JSPXExt.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * 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.validation.el.tests.jsp.ext;
+
+import org.eclipse.jst.jsf.validation.el.tests.jsp.BeanPropertyResolutionTestCase;
+
+/**
+ * Test cases for bean property resolution
+ *
+ * @author cbateman
+ */
+public class BeanPropertyResolutionTestCase_JSPXExt extends BeanPropertyResolutionTestCase
+{
+ public BeanPropertyResolutionTestCase_JSPXExt() {
+ super("/testdata/jsps/beanPropertyResolution.jsp.data", "/beanPropertyResolution.jspx");
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/perf/PropertyFileStressTest.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/perf/PropertyFileStressTest.java
new file mode 100644
index 000000000..e8363616f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/perf/PropertyFileStressTest.java
@@ -0,0 +1,134 @@
+package org.eclipse.jst.jsf.validation.el.tests.perf;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jst.jsf.context.symbol.IMapTypeDescriptor;
+import org.eclipse.jst.jsf.context.symbol.SymbolFactory;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.designtime.internal.symbols.ResourceBundleMapSourceFactory;
+import org.eclipse.jst.jsf.test.util.PerfTracker;
+import org.eclipse.jst.jsf.test.util.TestFileResource;
+import org.eclipse.jst.jsf.validation.el.tests.ELValidationTestPlugin;
+import org.eclipse.jst.jsf.validation.el.tests.base.JSPTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+
+public class PropertyFileStressTest extends JSPTestCase
+{
+
+ private IFile _propertiesFile;
+
+ public PropertyFileStressTest()
+ {
+ super(JSFVersion.V1_1, SingleJSPTestCase.FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ // add a resource bundle
+ final TestFileResource resource = new TestFileResource();
+ resource.load(ELValidationTestPlugin.getDefault().getBundle(),
+ "/testdata/classes/stress1.properties.data");
+ _propertiesFile = _jdtTestEnv.addResourceFile("src",
+ new ByteArrayInputStream(resource.toBytes()), "res",
+ "stress1.properties");
+ assertTrue(_propertiesFile.isAccessible());
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ // TODO Auto-generated method stub
+ super.tearDown();
+ }
+
+ @Override
+ public void testSanity() throws RuntimeException
+ {
+ super.testSanity();
+ Map<?,?> resourceBundleMapSource;
+ try
+ {
+ resourceBundleMapSource = ResourceBundleMapSourceFactory
+ .getResourceBundleMapSource(_testEnv.getTestProject(),
+ "res.stress1");
+ } catch (JavaModelException e)
+ {
+ throw new RuntimeException(e);
+ } catch (IOException e)
+ {
+ throw new RuntimeException(e);
+ } catch (CoreException e)
+ {
+ throw new RuntimeException(e);
+ }
+ assertEquals(8687, resourceBundleMapSource.size());
+ }
+
+ public void testMapDescriptor_GetProperties() throws JavaModelException,
+ IOException, CoreException
+ {
+ final int NUM_RESOURCE_TESTS = 1000;
+ final PerfTracker perfTracker = new PerfTracker(
+ "testMapDescriptor_GetProperties", NUM_RESOURCE_TESTS);
+
+ for (int i = 0; i < NUM_RESOURCE_TESTS; i++)
+ {
+ final Map<?,?> mapSource = ResourceBundleMapSourceFactory
+ .getResourceBundleMapSource(_testEnv.getTestProject(),
+ "res.stress1");
+ final IMapTypeDescriptor typeDesc = SymbolFactory.eINSTANCE
+ .createIMapTypeDescriptor();
+ typeDesc.setMapSource(mapSource);
+ final long startTime = System.nanoTime();
+ typeDesc.getProperties();
+ perfTracker.recordTime(System.nanoTime() - startTime);
+ }
+ perfTracker.printReport(System.out);
+ }
+
+ public void testResourceMapSourceFactory() throws JavaModelException,
+ IOException, CoreException
+ {
+ final int NUM_RESOURCE_TESTS = 1000;
+ final PerfTracker perfTracker = new PerfTracker(
+ "testResourceMapSourceFactory", NUM_RESOURCE_TESTS);
+
+ for (int i = 0; i < NUM_RESOURCE_TESTS; i++)
+ {
+ final long startTime = System.nanoTime();
+ @SuppressWarnings("unused")
+ Map<?,?> resourceBundleMapSource = ResourceBundleMapSourceFactory
+ .getResourceBundleMapSource(_testEnv.getTestProject(),
+ "res.stress1");
+ perfTracker.recordTime(System.nanoTime() - startTime);
+ }
+ perfTracker.printReport(System.out);
+ }
+
+ public void testResourceMapSource_GetEntrySet() throws JavaModelException,
+ IOException, CoreException
+ {
+ final int NUM_RESOURCE_TESTS = 1000;
+ final PerfTracker perfTracker = new PerfTracker(
+ "testResourceMapSource_GetEntrySet", NUM_RESOURCE_TESTS);
+
+ for (int i = 0; i < NUM_RESOURCE_TESTS; i++)
+ {
+ Map<?,?> resourceBundleMapSource = ResourceBundleMapSourceFactory
+ .getResourceBundleMapSource(_testEnv.getTestProject(),
+ "res.stress1");
+ final long startTime = System.nanoTime();
+ resourceBundleMapSource.entrySet();
+ perfTracker.recordTime(System.nanoTime() - startTime);
+ }
+ perfTracker.printReport(System.out);
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/perf/StressTest.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/perf/StressTest.java
new file mode 100644
index 000000000..c19881665
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/perf/StressTest.java
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * 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.validation.el.tests.perf;
+
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jst.jsf.context.symbol.ISymbol;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.designtime.DesignTimeApplicationManager;
+import org.eclipse.jst.jsf.designtime.context.DTFacesContext;
+import org.eclipse.jst.jsf.designtime.el.AbstractDTPropertyResolver;
+import org.eclipse.jst.jsf.designtime.el.AbstractDTVariableResolver;
+import org.eclipse.jst.jsf.test.util.PerfTracker;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.JSPTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.base.MockELValidationReporter;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.el.ELExpressionValidator;
+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;
+
+/**
+ * TODO: should the resolver specific stuff be split to different test plugin?
+ *
+ * @author cbateman
+ *
+ */
+public class StressTest extends JSPTestCase
+{
+ public StressTest()
+ {
+ super(JSFVersion.V1_1, SingleJSPTestCase.FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ protected IFile _testJSP;
+ private IStructuredModel _structuredModel;
+ private IStructuredDocument _structuredDocument;
+
+
+ @Override
+ protected void setUp() throws Exception {
+ // TODO Auto-generated method stub
+ super.setUp();
+
+ _testJSP = loadJSP("/testdata/jsps/perfTest1.jsp.data", "/perfTest1.jsp");
+
+ _structuredModel = StructuredModelManager.getModelManager().getModelForRead(_testJSP);
+ _structuredDocument = _structuredModel.getStructuredDocument();
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+
+ if (_structuredModel != null)
+ {
+ _structuredModel.releaseFromRead();
+ }
+ }
+
+ public void testStressVariableResolver()
+ {
+ final int numTimes = 100000;
+
+ final AbstractDTVariableResolver variableRes =
+ DesignTimeApplicationManager.getInstance(_testEnv.getTestProject()).getVariableResolver();
+ final DTFacesContext facesContext =
+ DesignTimeApplicationManager.getInstance(_testEnv.getTestProject()).getFacesContext(_testJSP);
+ final PerfTracker perfTracker = new PerfTracker("Stress Variable Resolver", numTimes);
+
+ // resolve the same variable 100K times
+ for (int x = 0; x < numTimes; x++)
+ {
+ final long startTime = System.nanoTime();
+
+ ISymbol var = variableRes.resolveVariable(facesContext, "myBean", _testJSP);
+
+ perfTracker.recordTime(System.nanoTime() - startTime);
+
+ assertNotNull(var);
+ assertEquals("myBean",var.getName());
+ }
+
+ perfTracker.printReport(System.out);
+ }
+
+ public void testStressPropertyResolver()
+ {
+ final int numTimes = 1000;
+
+ final AbstractDTVariableResolver variableRes =
+ DesignTimeApplicationManager.getInstance(_testEnv.getTestProject()).getVariableResolver();
+ final DTFacesContext facesContext =
+ DesignTimeApplicationManager.getInstance(_testEnv.getTestProject()).getFacesContext(_testJSP);
+ final ISymbol var = variableRes.resolveVariable(facesContext, "myBean", _testJSP);
+ final AbstractDTPropertyResolver propRes =
+ DesignTimeApplicationManager.getInstance(_testEnv.getTestProject()).getPropertyResolver();
+ final PerfTracker perfTracker = new PerfTracker("Stress Property Resolver", numTimes);
+
+ // resolve the same variable 100K times
+ for (int x = 0; x < numTimes; x++)
+ {
+ final long startTime = System.nanoTime();
+
+ final ISymbol property = propRes.getProperty(var, "stringProperty");
+
+ perfTracker.recordTime(System.nanoTime() - startTime);
+
+ assertNotNull(property);
+ assertEquals("stringProperty",property.getName());
+ }
+
+ perfTracker.printReport(System.out);
+ }
+
+ public void testStressSimpleValueBindingValidation()
+ {
+ final int numTimes = 1000;
+ final int elOffset = 795;
+ assertEquals("myBean.stringProperty", ELAssert.getELText(_structuredDocument,elOffset));
+
+ final PerfTracker perfTracker =
+ new PerfTracker("Stress Simple Bean Property Validation", numTimes);
+
+ // resolve the same variable 100K times
+ for (int x = 0; x < numTimes; x++)
+ {
+ final MockELValidationReporter reporter =
+ new MockELValidationReporter();
+ final ELExpressionValidator validator =
+ ELAssert.createELValidator(_structuredDocument, elOffset, _testJSP, reporter,
+ _symbolResolverFactory);
+
+ final long startTime = System.nanoTime();
+
+ validator.validateXMLNode();
+
+ perfTracker.recordTime(System.nanoTime() - startTime);
+ }
+
+ perfTracker.printReport(System.out);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/preferences/EndToEndTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/preferences/EndToEndTestCase.java
new file mode 100644
index 000000000..05c9d5a33
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/preferences/EndToEndTestCase.java
@@ -0,0 +1,196 @@
+/*******************************************************************************
+ * 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 - initial implementation
+ *******************************************************************************/
+package org.eclipse.jst.jsf.validation.el.tests.preferences;
+
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.jface.preference.IPersistentPreferenceStore;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.internal.JSFCorePlugin;
+import org.eclipse.jst.jsf.core.tests.validation.MockValidationReporter.ReportedProblem;
+import org.eclipse.jst.jsf.validation.el.tests.base.ELAssert;
+import org.eclipse.jst.jsf.validation.el.tests.base.JSPTestCase;
+import org.eclipse.jst.jsf.validation.el.tests.base.MockELValidationReporter;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.ELValidationPreferences;
+import org.eclipse.jst.jsf.validation.internal.Severity;
+import org.eclipse.jst.jsf.validation.internal.el.ELExpressionValidator;
+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.validation.internal.provisional.core.IMessage;
+
+public class EndToEndTestCase extends JSPTestCase
+{
+ public EndToEndTestCase()
+ {
+ super(JSFVersion.V1_1, SingleJSPTestCase.FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ protected IFile _testJSP;
+ private IStructuredModel _structuredModel;
+ private IStructuredDocument _structuredDocument;
+ private ELValidationPreferences _prefs;
+
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ _testJSP = loadJSP("/testdata/jsps/preferenceTest1.jsp.data", "/preferenceTest1.jsp");
+
+ _structuredModel = StructuredModelManager.getModelManager().getModelForRead(_testJSP);
+ _structuredDocument = _structuredModel.getStructuredDocument();
+
+ _prefs = new ELValidationPreferences();
+ _prefs.load(JSFCorePlugin.getDefault().getPreferenceStore());
+ PrefTestUtil.assertExpectedDefaults(_prefs);
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+
+ if (_structuredModel != null)
+ {
+ _structuredModel.releaseFromRead();
+ }
+
+ // ensure that preferences are always forced back to default
+ _prefs.setDefaults();
+ PrefTestUtil.assertExpectedDefaults(_prefs);
+ _prefs.commit(JSFCorePlugin.getDefault().getPreferenceStore());
+ ((IPersistentPreferenceStore)JSFCorePlugin.getDefault().getPreferenceStore()).save();
+ }
+
+ @Override
+ public void testSanity()
+ {
+ assertEquals("5+3", ELAssert.getELText(_structuredDocument,799));
+ assertEquals("null+null", ELAssert.getELText(_structuredDocument,831));
+ assertEquals("5 + true", ELAssert.getELText(_structuredDocument,876));
+ assertEquals("'a' + 'b'", ELAssert.getELText(_structuredDocument,920));
+ assertEquals("5 / 0", ELAssert.getELText(_structuredDocument,958));
+ assertEquals("myBean.subClassStringProperty", ELAssert.getELText(_structuredDocument,1028));
+ assertEquals("myBean1", ELAssert.getELText(_structuredDocument,1093));
+ assertEquals("listBean[-1]", ELAssert.getELText(_structuredDocument,1129));
+ assertEquals("myBean.stringArrayProperty > myBean.booleanProperty", ELAssert.getELText(_structuredDocument,1177));
+ assertEquals("myBean.coins > myBean.colors", ELAssert.getELText(_structuredDocument,1264));
+ assertEquals("false && myBean.booleanProperty", ELAssert.getELText(_structuredDocument,1328));
+ assertEquals("myBean.booleanProperty && false", ELAssert.getELText(_structuredDocument,1395));
+ assertEquals("5 == true", ELAssert.getELText(_structuredDocument,1462));
+ assertEquals("!false", ELAssert.getELText(_structuredDocument,1507));
+ assertEquals("!5", ELAssert.getELText(_structuredDocument,1549));
+ assertEquals("myBean.doubleProperty + myBean.getIntegerProperty", ELAssert.getELText(_structuredDocument,1587));
+
+ }
+
+ public void testIgnoreAll() throws Exception
+ {
+ testSeverityAll(Diagnostic.OK, 0);
+ }
+
+ public void testWarningsAll() throws Exception
+ {
+ testSeverityAll(Diagnostic.WARNING, IMessage.NORMAL_SEVERITY);
+ }
+
+ public void testErrorAll() throws Exception
+ {
+ testSeverityAll(Diagnostic.ERROR, IMessage.HIGH_SEVERITY);
+ }
+
+
+ private void testSeverityAll(final int diagSeverity, final int messageSeverity) throws Exception
+ {
+ final Severity severity =
+ ELValidationPreferences.mapDiagToSeverity(diagSeverity);
+ PrefTestUtil.setByKey(severity, _prefs);
+ PrefTestUtil.assertSetByKey(severity, _prefs);
+
+ final IPreferenceStore prefStore =
+ JSFCorePlugin.getDefault().getPreferenceStore();
+ _prefs.commit(prefStore);
+ ((IPersistentPreferenceStore)prefStore).save();
+ _prefs.load(prefStore);
+
+ assertErrorLevel(799, messageSeverity);
+ assertErrorLevel(831, messageSeverity);
+ assertErrorLevel(876, messageSeverity);
+ assertErrorLevel(920, messageSeverity);
+ assertErrorLevel(958, messageSeverity);
+ assertErrorLevel(1028, messageSeverity);
+ assertErrorLevel(1093, messageSeverity);
+ assertErrorLevel(1129, messageSeverity);
+ assertErrorLevel(1177, messageSeverity);
+ assertErrorLevel(1264, messageSeverity);
+ assertErrorLevel(1328, messageSeverity);
+ assertErrorLevel(1395, messageSeverity);
+ assertErrorLevel(1462, messageSeverity);
+ assertErrorLevel(1507, messageSeverity);
+ assertErrorLevel(1549, messageSeverity);
+ assertErrorLevel(1587, messageSeverity);
+ }
+
+ private void assertErrorLevel(final int docPos, final int severity)
+ {
+ final MyMockValidationReporter reporter = new MyMockValidationReporter();
+ final ELExpressionValidator validator =
+ ELAssert.createELValidator(_structuredDocument, docPos, _testJSP, reporter, _symbolResolverFactory);
+ validator.validateXMLNode();
+ final List<ReportedProblem> syntaxProblems = reporter.getSyntaxProblems();
+
+ for (final ReportedProblem message : syntaxProblems)
+ {
+ assertEquals(severity, message.getSeverity());
+ }
+
+ final List<ReportedProblem> semanticProblems = reporter.getSemanticProblems();
+ for (final ReportedProblem message : semanticProblems)
+ {
+ assertEquals(severity, message.getSeverity());
+ }
+ }
+
+ private class MyMockValidationReporter extends MockELValidationReporter
+ {
+ @Override
+ public void report(Diagnostic problem, int start, int length)
+ {
+ Diagnostic modifiedProblem =
+ new SeverityModifiableDiagnostic(problem);
+ super.report(modifiedProblem, start, length);
+ }
+
+ private class SeverityModifiableDiagnostic extends BasicDiagnostic
+ {
+
+ /**
+ * @param severity
+ * @param source
+ * @param code
+ * @param message
+ * @param data
+ */
+ private SeverityModifiableDiagnostic(final Diagnostic sourceDiag)
+ {
+ super(_prefs.getDiagnosticSeverity(sourceDiag.getCode()), sourceDiag.getSource(),
+ sourceDiag.getCode(), sourceDiag.getMessage(), sourceDiag.getData().toArray());
+ }
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/preferences/PrefTestUtil.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/preferences/PrefTestUtil.java
new file mode 100644
index 000000000..ccd2e705b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/preferences/PrefTestUtil.java
@@ -0,0 +1,130 @@
+/*******************************************************************************
+ * 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 - initial implementation
+ *******************************************************************************/
+package org.eclipse.jst.jsf.validation.el.tests.preferences;
+
+import junit.framework.Assert;
+
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.jst.jsf.validation.internal.ELValidationPreferences;
+import org.eclipse.jst.jsf.validation.internal.Severity;
+import org.eclipse.jst.jsf.validation.internal.el.diagnostics.DiagnosticFactory;
+
+final class PrefTestUtil extends Assert
+{
+
+ static void assertSeverityLevel(ELValidationPreferences prefs, int diagnosticId, int value)
+ {
+ final String key = ELValidationPreferences.getKeyById(diagnosticId);
+ final Severity sev = prefs.getSeverity(key);
+ final int diagnosticSeverity =
+ ELValidationPreferences.mapSeverityToDiag(sev.toString());
+ assertEquals(value, diagnosticSeverity);
+ }
+
+ static void setByKey(Severity severity, ELValidationPreferences prefs)
+ {
+ prefs.setSeverity(ELValidationPreferences.BINARY_OP_BOTH_OPERANDS_NULL, severity);
+ prefs.setSeverity(ELValidationPreferences.BINARY_OP_POSSIBLE_DIVISION_BY_ZERO, severity);
+ prefs.setSeverity(ELValidationPreferences.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION, severity);
+ prefs.setSeverity(ELValidationPreferences.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME, severity);
+ prefs.setSeverity(ELValidationPreferences.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME, severity);
+ prefs.setSeverity(ELValidationPreferences.BINARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN, severity);
+ prefs.setSeverity(ELValidationPreferences.BINARY_OP_FIRST_ARGUMENT_SHORT_CIRCUITS, severity);
+ prefs.setSeverity(ELValidationPreferences.BINARY_OP_SECOND_ARGUMENT_ALWAYS_EVAL_SAME, severity);
+ prefs.setSeverity(ELValidationPreferences.BINARY_OP_NO_AVAILABLE_TYPE_COERCION, severity);
+ prefs.setSeverity(ELValidationPreferences.BINARY_OP_COULD_NOT_COERCE_LITERALS_TO_NUMBERS, severity);
+ prefs.setSeverity(ELValidationPreferences.UNARY_OP_CONSTANT_EXPRESSION_EVAL_SAME, severity);
+ prefs.setSeverity(ELValidationPreferences.UNARY_OP_EMPTY_ALWAYS_FALSE_ON_TYPE, severity);
+ prefs.setSeverity(ELValidationPreferences.UNARY_OP_MINUS_ON_NULL_ALWAYS_ZERO, severity);
+ prefs.setSeverity(ELValidationPreferences.UNARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION, severity);
+ prefs.setSeverity(ELValidationPreferences.UNARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN, severity);
+ prefs.setSeverity(ELValidationPreferences.TERNARY_OP_CHOICE_IS_ALWAYS_SAME, severity);
+ prefs.setSeverity(ELValidationPreferences.TERNARY_OP_CANNOT_COERCE_CHOICE_TO_BOOLEAN, severity);
+ prefs.setSeverity(ELValidationPreferences.UNARY_OP_STRING_CONVERSION_NOT_GUARANTEED, severity);
+ prefs.setSeverity(ELValidationPreferences.CANNOT_APPLY_OPERATOR_TO_METHOD_BINDING, severity);
+ prefs.setSeverity(ELValidationPreferences.MEMBER_NOT_FOUND, severity);
+ prefs.setSeverity(ELValidationPreferences.VARIABLE_NOT_FOUND, severity);
+ prefs.setSeverity(ELValidationPreferences.MISSING_CLOSING_EXPR_BRACKET, severity);
+ prefs.setSeverity(ELValidationPreferences.GENERAL_SYNTAX_ERROR, severity);
+ prefs.setSeverity(ELValidationPreferences.EMPTY_EL_EXPRESSION, severity);
+ prefs.setSeverity(ELValidationPreferences.BINARY_OP_DOT_WITH_VALUEB_NULL, severity);
+ prefs.setSeverity(ELValidationPreferences.BINARY_OP_DOT_WITH_DOTTED_KEY_SHOULD_USE_ARRAY, severity);
+ prefs.setSeverity(ELValidationPreferences.POSSIBLE_ARRAY_INDEX_OUT_OF_BOUNDS, severity);
+ prefs.setSeverity(ELValidationPreferences.BINARY_COMPARISON_WITH_ENUM_ALWAYS_SAME, severity);
+ prefs.setSeverity(ELValidationPreferences.BINARY_OP_COMPARISON_OF_ENUMS_INCOMPATIBLE, severity);
+ }
+ static void assertSetByKey(Severity severity, ELValidationPreferences prefs)
+ {
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.BINARY_OP_BOTH_OPERANDS_NULL));
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.BINARY_OP_POSSIBLE_DIVISION_BY_ZERO));
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION));
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME));
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME));
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.BINARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN));
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.BINARY_OP_FIRST_ARGUMENT_SHORT_CIRCUITS));
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.BINARY_OP_SECOND_ARGUMENT_ALWAYS_EVAL_SAME));
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.BINARY_OP_NO_AVAILABLE_TYPE_COERCION));
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.BINARY_OP_COULD_NOT_COERCE_LITERALS_TO_NUMBERS));
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.UNARY_OP_CONSTANT_EXPRESSION_EVAL_SAME));
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.UNARY_OP_EMPTY_ALWAYS_FALSE_ON_TYPE));
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.UNARY_OP_MINUS_ON_NULL_ALWAYS_ZERO));
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.UNARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION));
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.UNARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN));
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.TERNARY_OP_CHOICE_IS_ALWAYS_SAME));
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.TERNARY_OP_CANNOT_COERCE_CHOICE_TO_BOOLEAN));
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.UNARY_OP_STRING_CONVERSION_NOT_GUARANTEED));
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.CANNOT_APPLY_OPERATOR_TO_METHOD_BINDING));
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.MEMBER_NOT_FOUND));
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.VARIABLE_NOT_FOUND));
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.MISSING_CLOSING_EXPR_BRACKET));
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.GENERAL_SYNTAX_ERROR));
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.EMPTY_EL_EXPRESSION));
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.BINARY_OP_DOT_WITH_VALUEB_NULL));
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.BINARY_OP_DOT_WITH_DOTTED_KEY_SHOULD_USE_ARRAY));
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.POSSIBLE_ARRAY_INDEX_OUT_OF_BOUNDS));
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.BINARY_COMPARISON_WITH_ENUM_ALWAYS_SAME));
+ assertEquals(severity, prefs.getSeverity(ELValidationPreferences.BINARY_OP_COMPARISON_OF_ENUMS_INCOMPATIBLE));
+ }
+
+ static void assertExpectedDefaults(ELValidationPreferences prefs)
+ {
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.BINARY_OP_BOTH_OPERANDS_NULL_ID, Diagnostic.WARNING);
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.BINARY_OP_POSSIBLE_DIVISION_BY_ZERO_ID,Diagnostic.ERROR);
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID, Diagnostic.ERROR);
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID,Diagnostic.WARNING);
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME_ID,Diagnostic.WARNING);
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.BINARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID,Diagnostic.ERROR);
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.BINARY_OP_FIRST_ARGUMENT_SHORT_CIRCUITS_ID,Diagnostic.WARNING);
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.BINARY_OP_SECOND_ARGUMENT_ALWAYS_EVAL_SAME_ID, Diagnostic.WARNING);
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID,Diagnostic.ERROR);
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.BINARY_OP_COULD_NOT_COERCE_LITERALS_TO_NUMBERS_ID,Diagnostic.ERROR);
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.UNARY_OP_CONSTANT_EXPRESSION_EVAL_SAME_ID,Diagnostic.WARNING);
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.UNARY_OP_EMPTY_ALWAYS_FALSE_ON_TYPE_ID,Diagnostic.WARNING);
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.UNARY_OP_MINUS_ON_NULL_ALWAYS_ZERO_ID,Diagnostic.WARNING);
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.UNARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID,Diagnostic.ERROR);
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.UNARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID,Diagnostic.WARNING); /* Bug 243674 */
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.TERNARY_OP_CHOICE_IS_ALWAYS_SAME_ID,Diagnostic.WARNING);
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.TERNARY_OP_CANNOT_COERCE_CHOICE_TO_BOOLEAN_ID,Diagnostic.ERROR);
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.UNARY_OP_STRING_CONVERSION_NOT_GUARANTEED_ID,Diagnostic.WARNING);
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.CANNOT_APPLY_OPERATOR_TO_METHOD_BINDING_ID,Diagnostic.ERROR);
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.MEMBER_NOT_FOUND_ID,Diagnostic.WARNING);
+ // everything below warning is mapped to ok for Severity enum
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.VARIABLE_NOT_FOUND_ID,Diagnostic.OK);
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.MISSING_CLOSING_EXPR_BRACKET_ID,Diagnostic.ERROR);
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.GENERAL_SYNTAX_ERROR_ID,Diagnostic.WARNING);
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.EMPTY_EL_EXPRESSION_ID,Diagnostic.WARNING);
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.BINARY_OP_DOT_WITH_VALUEB_NULL_ID, Diagnostic.WARNING);
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.BINARY_OP_DOT_WITH_DOTTED_KEY_SHOULD_USE_ARRAY_ID, Diagnostic.WARNING);
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.POSSIBLE_ARRAY_INDEX_OUT_OF_BOUNDS_ID,Diagnostic.WARNING);
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.BINARY_COMPARISON_WITH_ENUM_ALWAYS_SAME_ID,Diagnostic.WARNING);
+ PrefTestUtil.assertSeverityLevel(prefs, DiagnosticFactory.BINARY_OP_COMPARISON_OF_ENUMS_INCOMPATIBLE_ID,Diagnostic.ERROR);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/preferences/TestELValidationPreferences.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/preferences/TestELValidationPreferences.java
new file mode 100644
index 000000000..9ec5499da
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/preferences/TestELValidationPreferences.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * 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 - initial implementation
+ *******************************************************************************/
+package org.eclipse.jst.jsf.validation.el.tests.preferences;
+
+import java.io.IOException;
+
+import junit.framework.TestCase;
+
+import org.eclipse.jface.preference.IPersistentPreferenceStore;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jst.jsf.core.internal.JSFCorePlugin;
+import org.eclipse.jst.jsf.validation.internal.ELValidationPreferences;
+import org.eclipse.jst.jsf.validation.internal.Severity;
+
+/**
+ * Basic unit tests for ELValidationPreferences
+ * @author cbateman
+ *
+ */
+public class TestELValidationPreferences extends TestCase
+{
+ private ELValidationPreferences _prefs;
+
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ _prefs =
+ new ELValidationPreferences();
+ _prefs.load(JSFCorePlugin.getDefault().getPreferenceStore());
+ PrefTestUtil.assertExpectedDefaults(_prefs);
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+
+ // ensure that preferences are always forced back to default
+ _prefs.setDefaults();
+ PrefTestUtil.assertExpectedDefaults(_prefs);
+ _prefs.commit(JSFCorePlugin.getDefault().getPreferenceStore());
+ ((IPersistentPreferenceStore)JSFCorePlugin.getDefault().getPreferenceStore()).save();
+ }
+
+ public void testLoad()
+ {
+ PrefTestUtil.assertExpectedDefaults(_prefs);
+ }
+
+ public void testSetDefaults()
+ {
+ _prefs.setDefaults();
+
+ PrefTestUtil.assertExpectedDefaults(_prefs);
+ }
+
+ public void testSetByKey()
+ {
+ PrefTestUtil.setByKey(Severity.IGNORE, _prefs);
+ PrefTestUtil.assertSetByKey(Severity.IGNORE, _prefs);
+ }
+
+ public void testSetByKeyAndSave() throws IOException
+ {
+ final IPreferenceStore prefStore =
+ JSFCorePlugin.getDefault().getPreferenceStore();
+ PrefTestUtil.setByKey(Severity.IGNORE, _prefs);
+ PrefTestUtil.assertSetByKey(Severity.IGNORE, _prefs);
+ _prefs.commit(prefStore);
+ ((IPersistentPreferenceStore)prefStore).save();
+ _prefs.load(prefStore);
+ PrefTestUtil.assertSetByKey(Severity.IGNORE, _prefs);
+ }
+
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/preferences/ValidationMessageFactory.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/preferences/ValidationMessageFactory.java
new file mode 100644
index 000000000..588cb855b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/preferences/ValidationMessageFactory.java
@@ -0,0 +1,178 @@
+/*******************************************************************************
+ * 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.validation.el.tests.preferences;
+
+import java.util.Locale;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.jst.jsf.core.internal.JSFCorePlugin;
+import org.eclipse.jst.jsf.validation.internal.ELValidationPreferences;
+import org.eclipse.jst.jsf.validation.internal.ValidationPreferences;
+import org.eclipse.wst.validation.internal.core.Message;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+
+/**
+ * Creates configured validation Message objects.
+ *
+ * TODO: This is duplicated from jsf.ui because I didn't want to cause a dependency
+ * on that plugin. Should this logic really be in UI? IMessage is not an SSE
+ * framework.
+ *
+ * @author cbateman
+ *
+ */
+public final class ValidationMessageFactory
+{
+ /**
+ * @param diagnostic
+ * @param offset
+ * @param length
+ * @param file
+ * @param prefs
+ * @return a configured message
+ */
+ public static Message createFromDiagnostic(final Diagnostic diagnostic, final int offset, final int length, final IFile file, final ValidationPreferences prefs)
+ {
+ final ELValidationPreferences elPrefs =
+ prefs.getElPrefs();
+
+ final int severity =
+ elPrefs.getDiagnosticSeverity(diagnostic.getCode());
+
+ final Message message =
+ new MyLocalizedMessage(
+ convertSeverity(severity),
+ diagnostic.getMessage(),
+ file,
+ diagnostic.getCode());
+
+ message.setOffset(offset);
+ message.setLength(length);
+
+ return message;
+ }
+
+ /**
+ * @param severity
+ * @return a Message severity equivilent to diagnostic.getSeverity()
+ */
+ private static int convertSeverity(final int severity)
+ {
+ switch (severity)
+ {
+ 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;
+ }
+ }
+
+ private ValidationMessageFactory()
+ {
+ // no external instantiation
+ }
+
+ /**
+ * EL customized localizable validation message
+ * @author cbateman
+ *
+ */
+ static class MyLocalizedMessage extends Message
+ {
+ private final String _message;
+ private final int _errorCode;
+
+ /**
+ * @param severity
+ * @param messageText
+ * @param targetObject
+ * @param errorCode
+ */
+ public MyLocalizedMessage(int severity, String messageText, IResource targetObject, int errorCode) {
+ this(severity, messageText, (Object) targetObject, errorCode);
+ }
+
+ /**
+ * @param severity
+ * @param messageText
+ * @param targetObject
+ * @param errorCode
+ */
+ private MyLocalizedMessage(int severity, String messageText, Object targetObject, int errorCode) {
+ super(JSFCorePlugin.getDefault().getBundle().getSymbolicName(), severity,
+ messageText);
+ _message = messageText;
+ setTargetObject(targetObject);
+ _errorCode = errorCode;
+ }
+
+ /**
+ * @return the localized message
+ */
+ public String getLocalizedMessage() {
+ return _message;
+ }
+
+ /**
+ * @see org.eclipse.wst.validation.internal.core.Message#getText()
+ */
+ public String getText() {
+ return getLocalizedMessage();
+ }
+
+ /**
+ * @see org.eclipse.wst.validation.internal.core.Message#getText(java.lang.ClassLoader)
+ */
+ public String getText(ClassLoader cl) {
+ return getLocalizedMessage();
+ }
+
+ /**
+ * @see org.eclipse.wst.validation.internal.core.Message#getText(java.util.Locale)
+ */
+ public String getText(Locale l) {
+ return getLocalizedMessage();
+ }
+
+ public String getText(Locale l, ClassLoader cl) {
+ return getLocalizedMessage();
+ }
+
+ /**
+ * @return the error code related to this message
+ */
+ public int getErrorCode() {
+ return _errorCode;
+ }
+
+
+ /**
+ * @param offset
+ * @return true if this message applies to document offset
+ */
+ public boolean appliesTo(int offset)
+ {
+ return (offset >= getOffset() && offset < getOffset()+getLength());
+ }
+ }
+
+}
+
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/util/CreateTestCaseForJSP.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/util/CreateTestCaseForJSP.java
new file mode 100644
index 000000000..380983bf0
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/util/CreateTestCaseForJSP.java
@@ -0,0 +1,165 @@
+/*******************************************************************************
+ * 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.validation.el.tests.util;
+
+import java.util.Iterator;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
+import org.eclipse.jst.jsf.validation.el.tests.ELValidationTestPlugin;
+import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
+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.sse.core.internal.provisional.text.IStructuredDocumentRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionCollection;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
+import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
+
+/**
+ * Utility class for generating test skeleton for a single JSP test
+ *
+ * @author cbateman
+ */
+public class CreateTestCaseForJSP extends TestCase
+{
+ private final static String jspFile = "preferenceTest1";
+ private static IFile file;
+ private static IStructuredModel model;
+
+ private WebProjectTestEnvironment _testEnv;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ _testEnv = new WebProjectTestEnvironment("ELValidationTest_"+getName());
+ _testEnv.createProject(false);
+ assertNotNull(_testEnv);
+ assertNotNull(_testEnv.getTestProject());
+ assertTrue(_testEnv.getTestProject().isAccessible());
+
+ file =
+ (IFile)
+ _testEnv.loadResourceInWebRoot(
+ ELValidationTestPlugin.getDefault().getBundle(),
+ "/testdata/jsps/"+jspFile+".jsp.data",
+ "/WEB-INF/"+jspFile+".jsp");
+
+ model = StructuredModelManager.getModelManager().getModelForRead(file);
+
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ model.releaseFromRead();
+ }
+
+ /**
+ * Test gen
+ */
+ public void testDoTestGen()
+ {
+ System.out.println(" protected void setUp() throws Exception");
+ System.out.println(" {");
+ System.out.println(" _srcFileName = \"/testdata/jsps/"+jspFile+".jsp.data\";");
+ System.out.println(" _destFileName = \"/"+jspFile+".jsp\";");
+ System.out.println(" super.setUp();");
+ System.out.println(" }\n");
+
+ System.out.println(" public void testSanity()");
+ System.out.println(" {");
+ final ELRegionHandler handler = new ELRegionHandler()
+ {
+ public void handleRegion(ITextRegionCollection parentRegion, ITextRegion elRegion) {
+ final int contentStart =
+ parentRegion.getStartOffset(elRegion);
+
+ final String elTextStr = "\""+parentRegion.getText(elRegion)+ "\"";
+
+ System.out.println(" assertEquals("+elTextStr+", getELText(_structuredDocument,"+contentStart+"));");
+ }
+ };
+ processJSP(model.getStructuredDocument(), handler);
+ System.out.println(" }");
+ }
+
+ /**
+ * Process a single JSP files
+ *
+ * @param document
+ * @param handler
+ */
+ public static void processJSP(final IStructuredDocument document, final ELRegionHandler handler)
+ {
+ IStructuredDocumentRegion curNode = document.getFirstStructuredDocumentRegion();
+ while (null != curNode)
+ {
+ if (curNode.getFirstRegion().getType() == DOMRegionContext.XML_TAG_OPEN )
+ {
+ final Iterator<?> regions = curNode.getRegions().iterator();
+ ITextRegion region = null;
+
+ while (regions.hasNext())
+ {
+ region = (ITextRegion) regions.next();
+
+ if (region instanceof ITextRegionCollection
+ && region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE)
+ {
+ final ITextRegionCollection parentRegion = (ITextRegionCollection) region;
+ final ITextRegionList regionList = parentRegion.getRegions();
+ if (regionList.size() >= 4)
+ {
+ final ITextRegion openQuote = regionList.get(0);
+ final ITextRegion openVBLQuote = regionList.get(1);
+
+ if ( (openQuote.getType() == DOMJSPRegionContexts.XML_TAG_ATTRIBUTE_VALUE_DQUOTE
+ || openQuote.getType() == DOMJSPRegionContexts.XML_TAG_ATTRIBUTE_VALUE_SQUOTE)
+ && (openVBLQuote.getType() == DOMJSPRegionContexts.JSP_VBL_OPEN))
+ {
+ // we appear to be inside "#{", so next should be a VBL_CONTENT if there's anything
+ // here to validate
+ final ITextRegion content = regionList.get(2);
+ if (content.getType() == DOMJSPRegionContexts.JSP_VBL_CONTENT)
+ {
+ handler.handleRegion(parentRegion, content);
+ }
+ }
+ }
+ }
+ }
+ }
+ curNode = curNode.getNext();
+ }
+ }
+
+ /**
+ * Used as a callback interface when an EL region is found in a StructuredModel
+ *
+ * @author cbateman
+ */
+ public interface ELRegionHandler
+ {
+ /**
+ * Called when an EL region is found
+ *
+ * @param parentRegion
+ * @param elRegion
+ */
+ public void handleRegion(ITextRegionCollection parentRegion, ITextRegion elRegion);
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/util/FindELRegions.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/util/FindELRegions.java
new file mode 100644
index 000000000..b61479503
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/util/FindELRegions.java
@@ -0,0 +1,139 @@
+/*******************************************************************************
+ * 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.validation.el.tests.util;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
+import org.eclipse.jst.jsf.validation.el.tests.ELValidationTestPlugin;
+import org.eclipse.jst.jsf.validation.el.tests.util.CreateTestCaseForJSP.ELRegionHandler;
+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.sse.core.internal.provisional.text.ITextRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionCollection;
+
+/**
+ * Generates sanity checks for all JSP test files listed in jspFiles array
+ *
+ * @author cbateman
+ */
+public class FindELRegions extends TestCase
+{
+ private final static String[] jspFiles =
+ {
+ "arithmeticAdd"
+ , "arithmeticDivide"
+ , "arithmeticMinus"
+ , "arithmeticModulo"
+ , "arithmeticMultiply"
+ , "assignability"
+ , "badSyntax"
+ , "beansProperties"
+ , "beanSubClass"
+ , "builtinSymbols"
+ , "complexArithmetic1"
+ , "complexComparison"
+ , "emptyOperator"
+ , "expressionTypeChecking"
+ , "greaterThan"
+ , "greaterThanEq"
+ , "htmlSyntax"
+ , "jspFunctions"
+ , "lessThan"
+ , "lessThanEq"
+ , "listBeans"
+ , "loadBundleExpressions"
+ , "logicalAND"
+ , "logicalEquals"
+ , "logicalNOT"
+ , "logicalNotEquals"
+ , "logicalOR"
+ , "methodBinding"
+ , "test"
+ , "unaryMinus"
+ , "variableNaming"
+ };
+
+ private final static IFile[] files = new IFile[jspFiles.length];
+ private final static IStructuredModel[] models = new IStructuredModel[jspFiles.length];
+
+
+ private WebProjectTestEnvironment _testEnv;
+
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ _testEnv = new WebProjectTestEnvironment("ELValidationTest_"+getName());
+ _testEnv.createProject(false);
+ assertNotNull(_testEnv);
+ assertNotNull(_testEnv.getTestProject());
+ assertTrue(_testEnv.getTestProject().isAccessible());
+
+ for (int i = 0; i < jspFiles.length; i++)
+ {
+ files[i] =
+ (IFile)
+ _testEnv.loadResourceInWebRoot(ELValidationTestPlugin.getDefault().getBundle(),
+ "/testdata/jsps/"+jspFiles[i]+".jsp.data",
+ "/WEB-INF/"+jspFiles[i]+".jsp");
+
+ models[i] = StructuredModelManager.getModelManager().getModelForRead(files[i]);
+ }
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+
+ for (int i = 0; i < jspFiles.length; i++)
+ {
+ models[i].releaseFromRead();
+ }
+ }
+
+ /**
+ * Prints assertions for all regions in all models
+ */
+ public void testGenReport()
+ {
+ for (int i = 0; i < models.length; i++)
+ {
+ printRegionsForModel(i);
+ }
+ }
+
+
+
+ private void printRegionsForModel(final int i)
+ {
+ final IStructuredDocument document = models[i].getStructuredDocument();
+
+ final ELRegionHandler handler = new ELRegionHandler()
+ {
+ public void handleRegion(ITextRegionCollection parentRegion, ITextRegion elRegion) {
+ final int contentStart =
+ parentRegion.getStartOffset(elRegion);
+
+ final String elTextStr = "\""+parentRegion.getText(elRegion)+ "\"";
+ System.out.println("assertEquals("+elTextStr+", getELText(_structuredDocument,"+contentStart+"));");
+
+ }
+ };
+
+
+ CreateTestCaseForJSP.processJSP(document, handler);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/test.xml b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/test.xml
new file mode 100644
index 000000000..4b8556cda
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/test.xml
@@ -0,0 +1,60 @@
+<?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.validation.el.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.validation.el.tests.*xml"/>
+ </delete>
+ </target>
+
+ <!-- This target defines the tests that need to be run. -->
+ <target name="suite_1_1">
+ <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.validation.el.tests.AllTests_1_1" />
+ <property name="plugin-path" value="${eclipse-home}/plugins/${plugin-name}"/>
+ </ant>
+ </target>
+
+ <target name="suite_1_2">
+ <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.validation.el.tests.AllTests_1_2" />
+ <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_1_1,suite_1_2,cleanup">
+ <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="includes" value="org.eclipse.jst.jsf.validation.el.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.validation.el.tests/testdata/classes/BeanWithListProperties.java.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/BeanWithListProperties.java.data
new file mode 100644
index 000000000..859a202ca
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/BeanWithListProperties.java.data
@@ -0,0 +1,25 @@
+package beans;
+
+
+public class BeanWithListProperties
+{
+ public java.util.List getListProperty()
+ {
+ return new HashMap();
+ }
+
+ public int getIntegerProperty()
+ {
+ return -1;
+ }
+
+ public java.util.ArrayList getArrayListProperty()
+ {
+ return new java.util.ArrayList();
+ }
+
+ public String actionProperty()
+ {
+ return "go";
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/BeanWithMapProperties.java.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/BeanWithMapProperties.java.data
new file mode 100644
index 000000000..2e9904a58
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/BeanWithMapProperties.java.data
@@ -0,0 +1,26 @@
+package beans;
+
+import java.util.HashMap;
+import java.util.TreeMap;
+
+public class BeanWithMapProperties {
+ public java.util.Map getMapProperty()
+ {
+ return new HashMap();
+ }
+
+ public int getIntegerProperty()
+ {
+ return -1;
+ }
+
+ public TreeMap getTreeMap()
+ {
+ return new TreeMap();
+ }
+
+ public String actionProperty()
+ {
+ return "go";
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/Bundle.properties.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/Bundle.properties.data
new file mode 100644
index 000000000..d09b57b74
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/Bundle.properties.data
@@ -0,0 +1,3 @@
+bundleProp1=blah
+bundleProp2=chicken
+x.y=blah \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/Bundle2.properties.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/Bundle2.properties.data
new file mode 100644
index 000000000..1d5f80b06
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/Bundle2.properties.data
@@ -0,0 +1,2 @@
+name=Jessica Alba
+movie=Elektra
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/ListBean.java.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/ListBean.java.data
new file mode 100644
index 000000000..bbb246b75
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/ListBean.java.data
@@ -0,0 +1,29 @@
+package beans;
+
+import java.util.AbstractList;
+
+/**
+ * A bean class that implements java.util.List
+ *
+ * @author cbateman
+ *
+ */
+public class ListBean 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.validation.el.tests/testdata/classes/MapBean.java.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MapBean.java.data
new file mode 100644
index 000000000..6116974f9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MapBean.java.data
@@ -0,0 +1,18 @@
+package beans;
+
+
+import java.util.AbstractMap;
+import java.util.Collections;
+import java.util.Set;
+
+public class MapBean extends AbstractMap
+{
+ public Set entrySet() {
+ return Collections.EMPTY_SET;
+ }
+
+ public int ignoredMapProperty()
+ {
+ return -1;
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyBean.java.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyBean.java.data
new file mode 100644
index 000000000..8a03b4994
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyBean.java.data
@@ -0,0 +1,154 @@
+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 MyBean
+{
+ public String getStringProperty()
+ {
+ return "";
+ }
+
+ public int getIntegerProperty()
+ {
+ return 0;
+ }
+
+ public boolean getBooleanProperty()
+ {
+ return false;
+ }
+
+ public double getDoubleProperty()
+ {
+ return 1.04;
+ }
+
+ public Map getMapProperty()
+ {
+ return Collections.EMPTY_MAP;
+ }
+
+ public String[] getStringArrayProperty()
+ {
+ return new String[0];
+ }
+
+ public Collection getCollectionProperty()
+ {
+ return Collections.EMPTY_LIST;
+ }
+
+ public List getListProperty()
+ {
+ return Collections.EMPTY_LIST;
+ }
+
+ public Comparable getComparableProperty()
+ {
+ return null;
+ }
+
+ public BigInteger getBigIntegerProperty()
+ {
+ return BigInteger.ONE;
+ }
+
+ public BigDecimal getBigDoubleProperty()
+ {
+ return new BigDecimal(0.5);
+ }
+
+ public MyBean recursiveCall()
+ {
+ return this;
+ }
+
+ public String getWritableStringProperty()
+ {
+ return "";
+ }
+
+ public void setWritableStringProperty(String newValue)
+ {
+ ;
+ }
+
+ public void validate(FacesContext facesContext,
+ UIComponent component,
+ Object object
+ )
+ {
+
+ }
+
+ public void validate2(FacesContext facesContext,
+ UIComponent component,
+ Object[] object
+ )
+ {
+
+ }
+
+ public MyBean getSelf()
+ {
+ return this;
+ }
+
+ public boolean isIsStyleBooleanProperty()
+ {
+ return false;
+ }
+
+ public int[] getIntArrayProperty()
+ {
+ return new int[] {0, 1, 2};
+ }
+
+ public String[][] getArrayOfArrayOfStringProperty()
+ {
+ return new String[3][];
+ }
+
+ public ArrayElementType[] getArrayElements()
+ {
+ return new ArrayElementType[] {new ArrayElementType()};
+ }
+
+ private static class ArrayElementType
+ {
+ public String getName()
+ {
+ return "foo";
+ }
+ }
+
+ public MyEnum1 getCoins() {
+ return MyEnum1.dime;
+ }
+
+ public MyEnum2 getColors() {
+ return MyEnum2.red;
+ }
+
+ public java.lang.Enum getRawEnum()
+ {
+ // doesn't matter what we return as long as is an enum
+ return MyEnum2.red;
+ }
+
+ public java.lang.Enum<MyEnum1> getCoinEnum()
+ {
+ // doesn't matter what we return as long as is an enum of type MyEnum1
+ return MyEnum1.dime;
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyBeanSettable.java.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyBeanSettable.java.data
new file mode 100644
index 000000000..8931f2cc8
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyBeanSettable.java.data
@@ -0,0 +1,188 @@
+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 setComparableProperty(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)
+ {
+
+ }
+
+ public MyEnum1 getCoins() {
+ return this.coins;
+ }
+
+ public void setCoins(MyEnum1 coins) {
+ this.coins = coins;
+ }
+
+ public MyEnum2 getColors() {
+ return colors;
+ }
+
+ public void setColors(MyEnum2 colors) {
+ this.colors = colors;
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyBeanSubClass.java.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyBeanSubClass.java.data
new file mode 100644
index 000000000..aa0a1615b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyBeanSubClass.java.data
@@ -0,0 +1,10 @@
+package beans;
+
+
+public class MyBeanSubClass extends MyBean
+{
+ public String getSubClassStringProperty()
+ {
+ return "chicken";
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyEnum1.java.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyEnum1.java.data
new file mode 100644
index 000000000..3e8234196
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyEnum1.java.data
@@ -0,0 +1,7 @@
+package beans;
+
+public enum MyEnum1
+{
+ penny, nickel, dime, quarter;
+}
+
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyEnum2.java.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyEnum2.java.data
new file mode 100644
index 000000000..d6fb9506d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyEnum2.java.data
@@ -0,0 +1,7 @@
+package beans;
+
+public enum MyEnum2
+{
+ red, green, blue, tRuE;
+}
+
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/stress1.properties.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/stress1.properties.data
new file mode 100644
index 000000000..5445d003f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/stress1.properties.data
@@ -0,0 +1,8689 @@
+#randomly generated
+#Mon Jan 26 18:19:13 PST 2009
+UNRJyzuUem=XAgYvwyIBpchGxKeZtXlotnrQUQ
+TZrT=
+FOesbjPY=WjEpLTfxf
+VnrTPqJwi=CmXQyPakKkaNswpFxSuuZ
+hbmpJp=mBHEbedXgyCMyYtPuJuOtnSonFDkcGAXjDYByYVtLLLfCYKnYkWOMZfUZoW
+XqykmwbqRdgaCf=
+ozq=hVSQrHRQtTgaEOpgCUlVPtIiLCFOGZRCiKYfOYPIwYIxpMNzKTvbrl
+rYmFOPOnZTT=eNepZbQFEq
+AgZpsYMQHkH=MADELnWasxadOdpupGLefcMJxqZQGC
+vPawglHJNctvOyF=kjxGbwvhGIpcYySMfRuCpSerIAFqzrUjvX
+habK=GaQKSazQfaUmWOmeiwKDVrOQHrSFHL
+EzdHobnag=iMEBkYjJhPdFHVKYVvNZnjWQxZPcneHdEjLjfnxXyP
+JnnmpoB=cARVeEYUGIcdDcTDGFmTVOJxMHZVjoeRYwXb
+dkVFsMDhmbIB=KUoKuVicJbpHTPDvHfZDxiOOQnTWITfoyBOLBycMmLjEcriqths
+ZTRT=oCMvocdwWwQHORI
+ndBlwyFy=JEVe
+nQNSRzd=aJicWGqyUAHkRjslKquenXrxWReaaXBumGdoZIE
+cao=TGqaITNqJVOrdILgZjBkqjpwCG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OfdtKW=QPdWpbTfDMNk
+zsNq=mGBFRUrwMpmFQDrEZrxAlffJDTwsBFUfb
+RvVZYbHTPELMbWF=ldbwtjiDaiQanOdYcgnEpsKzwFCdjbsgJk
+kPyT=EExelfiEanCwCSWLtSp
+CFCrZmBVDdqCgx=xgMGrcrnjpUZnsEIKDYhUczQSABOemIvTiohzleTWZqNDDhimQK
+wNDpzh=WDvidHtuPzOdARvUZYqmdqeJRxnzXjJ
+GopCDhUkhlE=IcBObvVNNsWZImCaDiflLVwJ
+TTSLA=uLrSdrxnjf
+fyqSV=fsRvapYBNzlZhepivDvJ
+PLzJN=KsevHawFBTj
+=RRBRCGdtzeRexEOVqruUtVEceSfUYTxwlJyGCiWBobnIbRUy
+SaNXh=gZhFmoeSrNToriiE
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/arithmeticAdd.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/arithmeticAdd.jsp.data
new file mode 100644
index 000000000..0215c5544
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/arithmeticAdd.jsp.data
@@ -0,0 +1,52 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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:outputLabel rendered="true"></h:outputLabel>
+ <h:outputText value="#{myBean.integerProperty + 3}"/>
+ <h:outputText value="#{myBean.stringProperty + 3}"/>
+ <h:outputText value="#{myBean.integerProperty + myBean.integerProperty}"/>
+ <h:outputText value="#{myBean.bigIntegerProperty + 4}"/>
+ <h:outputText value="#{myBean.bigIntegerProperty + 5.5}"/>
+ <h:outputText value="#{myBean.bigDoubleProperty + 5.5}"/>
+ <h:outputText value="#{myBean.doubleProperty + 5}"/>
+
+ <!-- warnings -->
+ <h:outputText value="#{5 + 3}"/>
+ <h:outputText value="#{5.5 + 4}"/>
+ <h:outputText value="#{5.5 + null}"/>
+ <h:outputText value="#{'5' + '4'}"/>
+ <h:outputText value="#{null + null}"/>
+ <h:outputtText value="#{5.5 + 3.5}"/>
+
+ <!-- errors -->
+ <h:outputText value="#{5 + true}"/>
+ <h:outputText value="#{myBean.integerProperty + myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.stringArrayProperty + myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.integerProperty + true }"/>
+ <h:outputText value="#{'a' + 'b'}"/>
+ <h:outputText value="#{myBean.bigIntegerProperty + true}"/>
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/arithmeticDivide.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/arithmeticDivide.jsp.data
new file mode 100644
index 000000000..2e78126d1
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/arithmeticDivide.jsp.data
@@ -0,0 +1,68 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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="#{myBean.integerProperty / 3}"/>
+ <h:outputText value="#{myBean.integerProperty div 3}"/>
+ <h:outputText value="#{myBean.stringProperty / 3}"/>
+ <h:outputText value="#{myBean.stringProperty div 3}"/>
+ <h:outputText value="#{myBean.integerProperty / myBean.integerProperty}"/>
+ <h:outputText value="#{myBean.integerProperty div myBean.integerProperty}"/>
+ <h:outputText value="#{myBean.bigIntegerProperty / 4}"/>
+ <h:outputText value="#{myBean.bigIntegerProperty / 5.5}"/>
+ <h:outputText value="#{myBean.bigDoubleProperty / 5.5}"/>
+ <h:outputText value="#{myBean.doubleProperty / 5}"/>
+
+
+ <!-- warnings -->
+ <h:outputText value="#{5 / 3}"/>
+ <h:outputText value="#{5 div 3}"/>
+ <h:outputText value="#{5.5 / 4}"/>
+ <h:outputText value="#{5.5 div 4}"/>
+ <h:outputText value="#{'5' / '4'}"/>
+ <h:outputText value="#{'5' div '4'}"/>
+ <h:outputText value="#{null / null}"/>
+ <h:outputText value="#{null div null}"/>
+ <h:outputText value="#{5.5 / 3.5}"/>
+
+ <!-- errors -->
+ <h:outputText value="#{5 / true}"/>
+ <h:outputText value="#{5 div true}"/>
+ <h:outputText value="#{myBean.integerProperty / myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.integerProperty div myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.stringArrayProperty / myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.integerProperty div myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.integerProperty / true }"/>
+ <h:outputText value="#{myBean.integerProperty div true }"/>
+ <h:outputText value="#{'a' / 'b'}"/>
+ <h:outputText value="#{'a' div 'b'}"/>
+ <h:outputText value="#{5.5 / null}"/>
+ <h:outputText value="#{5.5 div null}"/>
+ <h:outputText value="#{5/0}"/>
+ <h:outputText value="#{5 div 0}"/>
+ <h:outputText value="#{myBean.bigIntegerProperty + true}"/>
+ <h:outputText value="#{myBean.bigDoubleProperty / null}"/>
+ <h:outputText value="#{myBean.bigDoubleProperty div true}"/>
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/arithmeticMinus.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/arithmeticMinus.jsp.data
new file mode 100644
index 000000000..1aebb7af3
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/arithmeticMinus.jsp.data
@@ -0,0 +1,51 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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="#{myBean.integerProperty - 3}"/>
+ <h:outputText value="#{myBean.stringProperty - 3}"/>
+ <h:outputText value="#{myBean.integerProperty - myBean.integerProperty}"/>
+ <h:outputText value="#{myBean.bigIntegerProperty - 4}"/>
+ <h:outputText value="#{myBean.bigIntegerProperty - 5.5}"/>
+ <h:outputText value="#{myBean.bigDoubleProperty - 5.5}"/>
+ <h:outputText value="#{myBean.doubleProperty - 5}"/>
+
+
+ <!-- warnings -->
+ <h:outputText value="#{5 - 3}"/>
+ <h:outputText value="#{5.5 - 4}"/>
+ <h:outputText value="#{5.5 - null}"/>
+ <h:outputText value="#{'5' - '4'}"/>
+ <h:outputText value="#{null - null}"/>
+ <h:outputtText value="#{5.5 - 3.5}"/>
+
+ <!-- errors -->
+ <h:outputText value="#{5 - true}"/>
+ <h:outputText value="#{myBean.integerProperty - myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.stringArrayProperty - myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.integerProperty - true }"/>
+ <h:outputText value="#{'a' - 'b'}"/>
+ <h:outputText value="#{myBean.bigIntegerProperty - true}"/>
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/arithmeticModulo.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/arithmeticModulo.jsp.data
new file mode 100644
index 000000000..8eb8bb7f6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/arithmeticModulo.jsp.data
@@ -0,0 +1,65 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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="#{myBean.integerProperty % 3}"/>
+ <h:outputText value="#{myBean.integerProperty mod 3}"/>
+ <h:outputText value="#{myBean.stringProperty % 3}"/>
+ <h:outputText value="#{myBean.stringProperty mod 3}"/>
+ <h:outputText value="#{myBean.integerProperty % myBean.integerProperty}"/>
+ <h:outputText value="#{myBean.integerProperty mod myBean.integerProperty}"/>
+ <h:outputText value="#{myBean.bigIntegerProperty mod 4}"/>
+ <h:outputText value="#{myBean.doubleProperty mod 4"/>
+ <h:outputText value="#{myBean.doubleProperty mod 5.43"/>
+
+ <!-- warnings -->
+ <h:outputText value="#{5 % 3}"/>
+ <h:outputText value="#{5 mod 3}"/>
+ <h:outputText value="#{5.5 % 4 }"/>
+ <h:outputText value="#{5.5 mod 4 }"/>
+ <h:outputText value="#{'5' % '4'}"/>
+ <h:outputText value="#{'5' mod '4'}"/>
+ <h:outputText value="#{null % null}"/>
+ <h:outputText value="#{null mod null}"/>
+
+ <!-- errors -->
+ <h:outputText value="#{5 % true}"/>
+ <h:outputText value="#{5 mod true}"/>
+ <h:outputText value="#{myBean.stringArrayProperty % myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.stringArrayProperty mod myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.integerProperty % true }"/>
+ <h:outputText value="#{myBean.integerProperty mod true }"/>
+ <h:outputText value="#{'a' % 'b'}"/>
+ <h:outputText value="#{'a' mod 'b'}"/>
+ <h:outputText value="#{5.5 % null}"/>
+ <h:outputText value="#{5.5 mod null}"/>
+ <h:outputText value="#{5%0}"/>
+ <h:outputText value="#{5 mod 0}"/>
+ <h:outputText value="#{myBean.integerProperty % myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.integerProperty mod myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.bigIntegerProperty % myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.bigIntegerProperty mod null"/>
+ <h:outputText value="#{myBean.doubleProperty % true}"/>
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/arithmeticMultiply.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/arithmeticMultiply.jsp.data
new file mode 100644
index 000000000..2a308d8cb
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/arithmeticMultiply.jsp.data
@@ -0,0 +1,51 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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="#{myBean.integerProperty * 3}"/>
+ <h:outputText value="#{myBean.stringProperty * 3}"/>
+ <h:outputText value="#{myBean.integerProperty * myBean.integerProperty}"/>
+ <h:outputText value="#{myBean.bigIntegerProperty * 4}"/>
+ <h:outputText value="#{myBean.bigIntegerProperty * 5.5}"/>
+ <h:outputText value="#{myBean.bigDoubleProperty * 5.5}"/>
+ <h:outputText value="#{myBean.doubleProperty * 5}"/>
+
+
+ <!-- warnings -->
+ <h:outputText value="#{5 * 3}"/>
+ <h:outputText value="#{5.5 * 4}"/>
+ <h:outputText value="#{5.5 * null}"/>
+ <h:outputText value="#{'5' * '4'}"/>
+ <h:outputText value="#{null * null}"/>
+ <h:outputtText value="#{5.5 * 3.5}"/>
+
+ <!-- errors -->
+ <h:outputText value="#{5 * true}"/>
+ <h:outputText value="#{myBean.integerProperty * myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.stringArrayProperty * myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.integerProperty * true }"/>
+ <h:outputText value="#{'a' * 'b'}"/>
+ <h:outputText value="#{myBean.bigIntegerProperty * true}"/>
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/assignability.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/assignability.jsp.data
new file mode 100644
index 000000000..cce912217
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/assignability.jsp.data
@@ -0,0 +1,35 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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 var="bundle" basename="beans.Bundle"/>
+ <h1>JSP Page</h1>
+ <!-- no errors -->
+ <h:outputText value="#{myBean.integerProperty + 3}"/>
+ <h:inputText value="#{myBean.writableStringProperty}"/>
+ <h:inputText value="#{myBean.stringProperty}"/>
+ <h:inputText value="#{bundle.bundleProp2}"/>
+ <h:inputText value="#{requestScope.myBeanSubClass}"/>
+ <h:inputText value="#{myBean.validate}"/>
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/badSyntax.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/badSyntax.jsp.data
new file mode 100644
index 000000000..f76331726
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/badSyntax.jsp.data
@@ -0,0 +1,36 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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>
+ <!-- warnings -->
+ <h:outputText value="#{}"/>
+ <h:outputText value="#{ }"/>
+ <h:outputText value="#{myBean.integerProperty + }"/>
+ <h:outputText value="#{&& myBean.booleanProperty}"/>
+ <h:outputText value="#{&!}"/>
+ <h:outputText value="#{f?x}"/>
+
+ <!-- errors -->
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/beanPropertyResolution.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/beanPropertyResolution.jsp.data
new file mode 100644
index 000000000..cdde6c000
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/beanPropertyResolution.jsp.data
@@ -0,0 +1,78 @@
+<%@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="#{myBean.stringProperty}"/>
+ <h:outputText value="#{myBean.integerProperty}"/>
+ <h:outputText value="#{myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.doubleProperty}"/>
+ <h:outputText value="#{myBean.mapProperty}"/>
+ <h:outputText value="#{myBean.stringArrayProperty}"/>
+ <h:outputText value="#{myBean.collectionProperty}"/>
+ <h:outputText value="#{myBean.listProperty}"/>
+ <h:outputText value="#{myBean.comparableProperty}"/>
+ <h:outputText value="#{myBean.bigIntegerProperty}"/>
+ <h:outputText value="#{myBean.bigDoubleProperty}"/>
+ <h:outputText value="#{myBean.writableStringProperty}"/>
+ <h:outputText value="#{myBean.isStyleBooleanProperty}"/>
+ <h:outputText value="#{myBean.colors}"/>
+ <h:outputText value="#{myBean.coins}"/>
+
+ <!-- sub-class resolution -->
+ <h:outputText value="#{myBeanSubClass.stringProperty}"/>
+ <h:outputText value="#{myBeanSubClass.integerProperty}"/>
+ <h:outputText value="#{myBeanSubClass.booleanProperty}"/>
+ <h:outputText value="#{myBeanSubClass.doubleProperty}"/>
+ <h:outputText value="#{myBeanSubClass.mapProperty}"/>
+ <h:outputText value="#{myBeanSubClass.stringArrayProperty}"/>
+ <h:outputText value="#{myBeanSubClass.collectionProperty}"/>
+ <h:outputText value="#{myBeanSubClass.listProperty}"/>
+ <h:outputText value="#{myBeanSubClass.comparableProperty}"/>
+ <h:outputText value="#{myBeanSubClass.bigIntegerProperty}"/>
+ <h:outputText value="#{myBeanSubClass.bigDoubleProperty}"/>
+ <h:outputText value="#{myBeanSubClass.writableStringProperty}"/>
+ <h:outputText value="#{myBeanSubClass.isStyleBooleanProperty}"/>
+ <h:outputText value="#{myBeanSubClass.subClassStringProperty}"/>
+ <h:outputText value="#{myBeanSubClass.colors}"/>
+ <h:outputText value="#{myBeanSubClass.coins}"/>
+
+ <!-- settable properties -->
+ <h:outputText value="#{myBeanSubClass.stringProperty}"/>
+ <h:outputText value="#{myBeanSettable.integerProperty}"/>
+ <h:outputText value="#{myBeanSettable.booleanProperty}"/>
+ <h:outputText value="#{myBeanSettable.doubleProperty}"/>
+ <h:outputText value="#{myBeanSettable.mapProperty}"/>
+ <h:outputText value="#{myBeanSettable.stringArrayProperty}"/>
+ <h:outputText value="#{myBeanSettable.collectionProperty}"/>
+ <h:outputText value="#{myBeanSettable.listProperty}"/>
+ <h:outputText value="#{myBeanSettable.comparableProperty}"/>
+ <h:outputText value="#{myBeanSettable.bigIntegerProperty}"/>
+ <h:outputText value="#{myBeanSettable.bigDoubleProperty}"/>
+ <h:outputText value="#{myBeanSettable.writableStringProperty}"/>
+ <h:outputText value="#{myBeanSettable.isStyleBooleanProperty}"/>
+ <h:outputText value="#{myBeanSettable.colors}"/>
+ <h:outputText value="#{myBeanSettable.coins}"/>
+
+ <!-- warnings -->
+ <h:outputText value="#{myBean.subClassStringProperty}"/>
+ <h:outputText value="#{myBeanSubClass.notAMember}"/>
+ <h:outputText value="#{myBeanSettable.alsoNotAMember}"/>
+
+ <!-- errors -->
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/beanVariableResolution.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/beanVariableResolution.jsp.data
new file mode 100644
index 000000000..45ec455b2
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/beanVariableResolution.jsp.data
@@ -0,0 +1,35 @@
+<%@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="#{myBean}"/>
+ <h:outputText value="#{myBeanSubClass}"/>
+ <h:outputText value="#{mapBean}"/>
+ <h:outputText value="#{mapBean1}"/>
+ <h:outputText value="#{hiddenBean}"/>
+ <h:outputText value="#{myBean_none}"/>
+ <h:outputText value="#{myBeanSettable}"/>
+
+ <!-- warnings -->
+ <h:outputText value="#{myBean1}"/>
+ <h:outputText value="#{someOtherBeanName}"/>
+
+ <!-- errors -->
+
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/bracketOperator.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/bracketOperator.jsp.data
new file mode 100644
index 000000000..7c48bb88b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/bracketOperator.jsp.data
@@ -0,0 +1,96 @@
+<%@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">
+
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>JSP Page</title>
+ </head>
+ <body>
+ <f:view>
+ <f:loadBundle var="bundle" basename="beans.Bundle"/>
+ <h1>JSP Page</h1>
+ <!-- no errors -->
+ <h:outputText value="#{bundle['x.y']}"/>
+ <h:outputText value="#{beanWithMapProperties['integerProperty']}"/>
+ <h:outputText value="#{bundle['x']}"/>
+
+ <h:outputText value="#{beanWithMapProperties.treeMap}"/>
+
+ <h:outputText value="#{beanWithMapProperties.treeMap.foo}"/>
+ <h:outputText value="#{beanWithMapProperties['treeMap'].foo}"/>
+ <h:outputText value="#{beanWithMapProperties['treeMap']['foo']}"/>
+ <h:outputText value="#{beanWithMapProperties.treeMap['foo']}"/>
+
+
+ <h:outputText value="#{mapBean['foo']}"/>
+ <h:outputText value="#{mapBean['foo.x']}"/>
+ <h:outputText value="#{mapBean['getIgnoredIntProperty']}"/>
+ <h:commandButton action="#{beanWithMapProperties['actionProperty']}"/>
+
+ <h:outputText value="#{myBean.stringArrayProperty[0]}"/>
+ <h:outputText value="#{myBean.stringArrayProperty[myBean.integerProperty]}"/>
+ <h:outputText value="#{myBean.stringArrayProperty['0']}"/>
+ <h:outputText value="#{myBean.intArrayProperty[1]}"/>
+ <h:outputText value="#{myBean.intArrayProperty[1] > 0}"/>
+ <h:outputText value="#{empty myBean.arrayOfArrayOfStringProperty}"/>
+ <h:outputText value="#{empty myBean.arrayOfArrayOfStringProperty[1]}"/>
+ <h:outputText value="#{myBean.arrayOfArrayOfStringProperty[0][1]}"/>
+ <h:outputText value="#{myBean.arrayOfArrayOfStringProperty[myBean.intArrayProperty[0]][myBean.intArrayProperty[1]]}"/>
+
+ <h:outputText value="#{beanWithListProperties.listProperty[0]}"/>
+ <h:outputText value="#{beanWithListProperties.listProperty[myBean.integerProperty]}"/>
+ <h:outputText value="#{beanWithListProperties.listProperty['0']}"/>
+ <h:outputText value="#{beanWithListProperties.listProperty['0'].someValue}"/>
+ <h:outputText value="#{beanWithListProperties.arrayListProperty[0]}"/>
+ <h:outputText value="#{beanWithListProperties.arrayListProperty[myBean.integerProperty]}"/>
+ <h:outputText value="#{beanWithListProperties.arrayListProperty['0']}"/>
+ <h:outputText value="#{beanWithListProperties.arrayListProperty['0'].someValue}"/>
+
+ <h:outputText value="#{listBean[0]}"/>
+ <h:outputText value="#{listBean[myBean.integerProperty]}"/>
+ <h:outputText value="#{listBean['0']}"/>
+ <h:outputText value="#{listBean['0'].someValue}"/>
+
+ <!-- warnings -->
+ <h:outputText value="#{bundle['y']}"/>
+ <h:outputText value="#{bundle['x.z']}"/>
+ <h:outputText value="#{beanWithMapProperties['actionProperty.foo']}"/>
+ <h:outputText value="#{beanWithMapProperties['treeMap.foo']}"/>
+ <h:outputText value="#{beanWithMapProperties['mapProperty.foo']}"/>
+ <h:outputText value="#{beanWithMapProperties['mapProperty.foo.x']}"/>
+ <h:outputText value="#{beanWithMapProperties['treeMap.foo.x']}"/>
+ <h:outputText value="#{myBean.stringArrayProperty[myBean.stringProperty]"/>
+ <h:outputText value="#{myBean.stringArrayProperty[-1]}"/>
+
+ <h:outputText value="#{beanWithListProperties.listProperty.someProperty}"/>
+ <h:outputText value="#{beanWithListProperties.arrayListProperty.someProperty"}/>
+ <h:outputText value="#{beanWithListProperties.arrayListProperty[-1]}"/>
+ <h:outputText value="#{listBean[-1]}"/>
+ <h:outputText value="#{bundle['y']}"/>
+ <h:outputText value="#{bundle[null]}"/>
+ <!-- because it is a list the bean properties are invisible -->
+ <h:outputText value="#{listBean.stringProperty}"}/>
+ <h:outputText value="#{listBean['stringProperty']}"}/>
+
+ <!-- errors -->
+ <h:outputText value="#{myBean.stringArrayProperty['a']}"/>
+ <h:outputText value="#{beanWithListProperties.arrayListProperty['a']}"/>
+ <h:outputText value="#{beanWithListProperties.arrayListProperty[true]}"/>
+ <h:outputText value="#{listBean['a']}"/>
+ <h:outputText value="#{listBean[true]}"/>
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/builtinSymbols.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/builtinSymbols.jsp.data
new file mode 100644
index 000000000..ebc0494f2
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/builtinSymbols.jsp.data
@@ -0,0 +1,112 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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>
+ <f:loadBundle var="bundle" basename="beans.Bundle"/>
+ <f:loadBundle var="bundle2" basename="beans.Bundle"/>
+
+ <!-- no errors -->
+ <!-- check all built-ins -->
+ <h:outputText value="#{applicationScope}"/>
+ <h:outputText value="#{sessionScope}"/>
+ <h:outputText value="#{requestScope}"/>
+ <h:outputText value="#{cookie}"/>
+ <h:outputText value="#{facesContext}"/>
+ <h:outputText value="#{header}"/>
+ <h:outputText value="#{headerValues}"/>
+ <h:outputText value="#{initParam}"/>
+ <h:outputText value="#{param}"/>
+ <h:outputText value="#{paramValues}"/>
+ <h:outputText value="#{view}"/>
+
+ <!-- check known application scope variables -->
+ <h:outputText value="#{applicationScope.mapBean}"/>
+
+ <!-- check known session scope variables -->
+ <h:outputText value="#{sessionScope.myBean}"/>
+ <h:outputText value="#{sessionScope.mapBean1}"/>
+ <h:outputText value="#{sessionScope.myBeanSettable}"/>
+
+ <!-- check known request scope variables -->
+ <h:outputText value="#{requestScope.myBeanSubClass}"/>
+ <h:outputText value="#{requestScope.hiddenBean}"/>
+ <h:outputText value="#{requestScope.bundle}"/>
+ <h:outputText value="#{requestScope.bundle2}"/>
+
+ <!-- these only get runtime members, so just check that they can be empty -->
+ <h:outputText value="#{empty cookie}"/>
+ <h:outputText value="#{empty header}"/>
+ <h:outputText value="#{empty headerValues}"/>
+ <h:outputText value="#{empty param}"/>
+ <h:outputText value="#{empty paramValues}"/>
+
+ <!-- test known members of facesContext -->
+ <h:outputText value="#{facesContext.application}"/>
+ <h:outputText value="#{facesContext.clientIdsWithMessages}"/>
+ <h:outputText value="#{facesContext.externalContext}"/>
+ <h:outputText value="#{facesContext.maximumSeverity}"/>
+ <h:outputText value="#{facesContext.messages}"/>
+ <h:outputText value="#{facesContext.renderKit}"/>
+ <h:outputText value="#{facesContext.renderResponse}"/>
+ <h:outputText value="#{facesContext.responseComplete}"/>
+ <h:outputText value="#{facesContext.responseStream}"/>
+ <h:outputText value="#{facesContext.responseWriter}"/>
+ <h:outputText value="#{facesContext.viewRoot}"/>
+
+ <!-- test known members of viewRoot -->
+ <h:outputText value="#{view.viewId}"/>
+ <h:outputText value="#{view.family}"/>
+ <h:outputText value="#{view.locale}"/>
+ <h:outputText value="#{view.renderKitId}"/>
+ <h:outputText value="#{view.viewId}"/>
+
+ <!- check objects accessed through scoping -->
+ <h:outputText value="#{sessionScope.myBean.integerProperty}"/>
+ <h:outputText value="#{requestScope.bundle.bundleProp2}"/>
+
+ <!-- a little interaction through scope map -->
+ <h:outputText value="#{3 + sessionScope.myBean.integerProperty}"/>
+
+ <!-- warnings -->
+ <h:outputText value="#{applicationScope.notAMember}"/>
+ <h:outputText value="#{sessionScope.notAMember}"/>
+ <h:outputText value="#{requestScope.notAMember}"/>
+ <h:outputText value="#{cookie.notAMember}"/>
+ <h:outputText value="#{facesContext.notAMember}"/>
+ <h:outputText value="#{header.notAMember}"/>
+ <h:outputText value="#{headerValues.notAMember}"/>
+ <h:outputText value="#{initParam.notAMember}"/>
+ <h:outputText value="#{param.notAMember}"/>
+ <h:outputText value="#{paramValues.notAMember}"/>
+ <h:outputText value="#{view.notAMember}"/>
+
+ <!-- right bean, wrong scope map -->
+ <h:outputText value="#{applicationScope.myBean_none}"/>
+ <h:outputText value="#{sessionScope.myBean_none}"/>
+ <h:outputText value="#{requestScope.myBean_none}"/>
+
+ <!-- errors -->
+ <h:outputText value="#{!initParam}"/>
+
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/complexArithmetic1.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/complexArithmetic1.jsp.data
new file mode 100644
index 000000000..06a073c69
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/complexArithmetic1.jsp.data
@@ -0,0 +1,46 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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="#{myBean.integerProperty + 3 * myBean.integerProperty}"/>
+ <h:outputText value="#{(myBean.stringProperty + 3) / 5}"/>
+ <h:outputText value="#{myBean.integerProperty + myBean.integerProperty * '5'}"/>
+
+
+ <!-- warnings -->
+ <h:outputText value="#{5 + 3 / 5}"/>
+ <h:outputText value="#{1+2+3+4+5+6}"/>
+ <h:outputText value="#{1-2-3}"/>
+ <h:outputText value="#{1*2*3*4*5*6}"/>
+ <h:outputText value="#{1*2*3*4*5*6}"/>
+ <h:outputText value="#{'5' + '4'}"/>
+ <h:outputText value="#{null + null}"/>
+ <h:outputText value="#{1+2-3+4-5+6}"/>
+
+ <!-- errors -->
+ <h:outputText value="#{'a' + 'b' + 'c' * 'd'}"/>
+ <h:outputText value="#{(5.5 + 4) / (5-5)}"/>
+
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/complexComparison.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/complexComparison.jsp.data
new file mode 100644
index 000000000..778aa80e7
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/complexComparison.jsp.data
@@ -0,0 +1,36 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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="#{myBean.integerProperty > -3 and myBean.integerProperty > -3}"/>
+ <h:outputText value="#{myBean.integerProperty > -3 && myBean.integerProperty > -3}"/>
+
+
+ <!-- warnings -->
+
+ <!-- errors -->
+
+
+ </f:view>
+ </body>
+</html> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/dataTableResolution.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/dataTableResolution.jsp.data
new file mode 100644
index 000000000..9afe72c14
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/dataTableResolution.jsp.data
@@ -0,0 +1,67 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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:dataTable var="foo">
+ <h:column>
+ <h:inputText value="#{foo.x}"/>
+ </h:column>
+ </h:dataTable>
+
+ <h:dataTable var="row1" value="#{myBean.arrayElements}">
+ <h:column>
+ <h:inputText value="#{row1.name}"/>
+ </h:column>
+ </h:dataTable>
+
+ <h:dataTable var="row3" value="#{myBean.self}">
+ <h:column>
+ <h:inputText value="#{row3.stringProperty}"/>
+ </h:column>
+ </h:dataTable>
+
+ <h:dataTable var="row4" value="#{myBean.listProperty}">
+ <h:column>
+ <h:inputText value="#{row4.anyField}"/>
+ </h:column>
+ </h:dataTable>
+
+ <!-- warnings -->
+ <h:dataTable var="row2" value="#{myBean.arrayElements}">
+ <h:column>
+ <h:inputText value="#{row2WrongVar.x}"/>
+ </h:column>
+ </h:dataTable>
+
+ <h:dataTable var="foo">
+ <h:column>
+ <h:inputText value="#{row2.wrongMember}"/>
+ </h:column>
+ </h:dataTable>
+
+ <!-- errors -->
+
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/emptyOperator.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/emptyOperator.jsp.data
new file mode 100644
index 000000000..0e1131f51
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/emptyOperator.jsp.data
@@ -0,0 +1,44 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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="#{empty myBean.collectionProperty}"/>
+ <h:outputText value="#{empty myBean.mapProperty}"/>
+ <h:outputText value="#{empty myBean.stringArrayProperty}"/>
+ <h:outputText value="#{empty myBean.stringProperty}"/>
+ <h:outputText value="#{myBean.stringProperty}"/>
+ <h:outputText value="#{empty myBean.listProperty}"/>
+ <h:outputText value="#{empty mapBean}"/>
+
+ <!-- warnings -->
+ <h:outputText value="#{empty 5}"/>
+ <h:outputText value="#{empty myBean.integerProperty}"/>
+ <h:outputText value="#{empty false}"/>
+ <h:outputText value="#{empty myBean.booleanProperty}"/>
+ <h:outputText value="#{empty ''}"/>
+ <h:outputText value="#{empty 'notEmpty'}"/>\
+ <h:outputText value="#{empty null}"/>
+ <h:outputText value="#{empty 456}"/>
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/generics.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/generics.jsp.data
new file mode 100644
index 000000000..a78a9e67d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/generics.jsp.data
@@ -0,0 +1,33 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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 -->
+
+ <!-- warnings -->
+
+ <!-- errors -->
+ </f:view>
+ </body>
+</html>
+
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/greaterThan.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/greaterThan.jsp.data
new file mode 100644
index 000000000..e6eaa3d55
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/greaterThan.jsp.data
@@ -0,0 +1,78 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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="#{myBean.stringProperty > '3'}"/>
+ <h:outputText value="#{myBean.stringProperty gt '3'}"/>
+ <h:outputText value="#{myBean.integerProperty > 3}"/>
+ <h:outputText value="#{myBean.integerProperty gt 3}"/>
+ <h:outputText value="#{myBean.integerProperty > '4' }"/>
+ <h:outputText value="#{myBean.integerProperty gt '4' }"/>
+ <h:outputText value="#{myBean.comparableProperty > myBean.collectionProperty}"/>
+ <h:outputText value="#{myBean.comparableProperty gt myBean.collectionProperty}"/>
+ <h:outputText value="#{myBean.integerProperty > -3}"/>
+ <h:outputText value="#{myBean.doubleProperty > 5}"/>
+ <h:outputText value="#{5 gt myBean.bigIntegerProperty}"/>
+ <h:outputText value="#{myBean.bigDoubleProperty > myBean.bigIntegerProperty}"/>
+ <h:outputText value="#{myBean.coins > 'quarter'}"/>
+ <h:outputText value="#{myBean.coins gt 'quarter'}"/>
+ <h:outputText value="#{myBean.rawEnum > 'quarter'}"/>
+ <h:outputText value="#{myBean.coinEnum gt 'quarter'}"/>
+ <h:outputText value="#{myBean.rawEnum > myBean.coins}"/>
+ <h:outputText value="#{myBean.coinEnum > myBean.colors}"/>
+
+ <!-- warnings -->
+ <h:outputText value="#{5 > 3}"/>
+ <h:outputText value="#{5 gt 3}"/>
+ <h:outputText value="#{'4' > '34'}"/>
+ <h:outputText value="#{'4' gt '34'}"/>
+ <h:outputText value="#{'34' > '34'}"/>
+ <h:outputText value="#{'34' gt '34'}"/>
+ <h:outputText value="#{-5 > 2}"/>
+ <h:outputText value="#{-5 gt 2}"/>
+ <h:outputText value="#{2 > -5}"/>
+ <h:outputText value="#{2 gt -5}"/>
+ <h:outputText value="#{-5 > -5}"/>
+ <h:outputText value="#{-5 gt -5}"/>
+ <h:outputText value="#{myBean.integerProperty > null}"/>
+ <h:outputText value="#{null gt myBean.integerProperty}"/>
+
+ <!-- errors -->
+ <h:outputText value="#{5 > true}"/>
+ <h:outputText value="#{5 gt true}"/>
+ <h:outputText value="#{myBean.integerProperty > myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.integerProperty gt myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.stringArrayProperty > myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.stringArrayProperty gt myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.integerProperty > true }"/>
+ <h:outputText value="#{myBean.integerProperty gt true }"/>
+ <h:outputText value="#{myBean.booleanProperty > true}"/>
+ <h:outputText value="#{myBean.booleanProperty gt true}"/>
+ <h:outputText value="#{true > false}"/>
+ <h:outputText value="#{true gt false}"/>
+ <h:outputText value="#{true > false}"/>
+ <h:outputText value="#{myBean.coins > myBean.colors}"/>
+ <h:outputText value="#{myBean.coins gt myBean.colors}"/>
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/greaterThanEq.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/greaterThanEq.jsp.data
new file mode 100644
index 000000000..dbbc2c720
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/greaterThanEq.jsp.data
@@ -0,0 +1,77 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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="#{myBean.stringProperty >= '3'}"/>
+ <h:outputText value="#{myBean.stringProperty ge '3'}"/>
+ <h:outputText value="#{myBean.integerProperty >= 3}"/>
+ <h:outputText value="#{myBean.integerProperty ge 3}"/>
+ <h:outputText value="#{myBean.integerProperty >= '4' }"/>
+ <h:outputText value="#{myBean.integerProperty ge '4' }"/>
+ <h:outputText value="#{myBean.comparableProperty >= myBean.collectionProperty}"/>
+ <h:outputText value="#{myBean.comparableProperty ge myBean.collectionProperty}"/>
+ <h:outputText value="#{myBean.integerProperty >= -3}"/>
+ <h:outputText value="#{myBean.doubleProperty >= 5}"/>
+ <h:outputText value="#{5 ge myBean.bigIntegerProperty}"/>
+ <h:outputText value="#{myBean.bigDoubleProperty >= myBean.bigIntegerProperty}"/>
+ <h:outputText value="#{myBean.coins >= 'quarter'}"/>
+ <h:outputText value="#{myBean.coins ge 'quarter'}"/>
+ <h:outputText value="#{myBean.rawEnum >= 'quarter'}"/>
+ <h:outputText value="#{myBean.coinEnum ge 'quarter'}"/>
+ <h:outputText value="#{myBean.rawEnum >= myBean.coins}"/>
+ <h:outputText value="#{myBean.coinEnum >= myBean.colors}"/>
+
+ <!-- warnings -->
+ <h:outputText value="#{5 >= 3}"/>
+ <h:outputText value="#{5 ge 3}"/>
+ <h:outputText value="#{'4' >= '34'}"/>
+ <h:outputText value="#{'4' ge '34'}"/>
+ <h:outputText value="#{'34' >= '34'}"/>
+ <h:outputText value="#{'34' ge '34'}"/>
+ <h:outputText value="#{-5 >= 2}"/>
+ <h:outputText value="#{-5 ge 2}"/>
+ <h:outputText value="#{2 >= -5}"/>
+ <h:outputText value="#{2 ge -5}"/>
+ <h:outputText value="#{-5 >= -5}"/>
+ <h:outputText value="#{-5 ge -5}"/>
+ <h:outputText value="#{myBean.integerProperty >= null}"/>
+ <h:outputText value="#{null ge myBean.integerProperty}"/>
+
+ <!-- errors -->
+ <h:outputText value="#{5 >= true}"/>
+ <h:outputText value="#{5 ge true}"/>
+ <h:outputText value="#{myBean.integerProperty >= myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.integerProperty ge myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.stringArrayProperty >= myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.stringArrayProperty ge myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.integerProperty >= true }"/>
+ <h:outputText value="#{myBean.integerProperty ge true }"/>
+ <h:outputText value="#{myBean.booleanProperty >= true}"/>
+ <h:outputText value="#{myBean.booleanProperty ge true}"/>
+ <h:outputText value="#{true >= false}"/>
+ <h:outputText value="#{true ge false}"/>
+ <h:outputText value="#{myBean.coins >= myBean.colors}"/>
+ <h:outputText value="#{myBean.coins ge myBean.colors}"/>
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/jspFunctions.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/jspFunctions.jsp.data
new file mode 100644
index 000000000..d484c3f53
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/jspFunctions.jsp.data
@@ -0,0 +1,42 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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 -->
+ <!-- functions not supported by JSF 1.1 so we should always ignore
+ sub-expressions with functions -->
+ <h:outputText value="#{f:someFunc(6) > 8}"/>
+ <h:outputText value="#{f:someFunc(6)}"/>
+ <h:outputText value="#{f:someFunc(true)}"/>
+
+ <!-- warnings -->
+ <!-- these warnings are parser bugs: unqualified function invocation does
+ not get parsed correctly -->
+ <h:outputText value="#{someFunc(6) > 8}"/>
+ <h:outputText value="#{someFunc(6)}"/>
+ <h:outputText value="#{someFunc(true)}"/>
+
+ <!-- errors -->
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/lessThan.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/lessThan.jsp.data
new file mode 100644
index 000000000..5049370ad
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/lessThan.jsp.data
@@ -0,0 +1,78 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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="#{myBean.stringProperty < '3'}"/>
+ <h:outputText value="#{myBean.stringProperty lt '3'}"/>
+ <h:outputText value="#{myBean.integerProperty < 3}"/>
+ <h:outputText value="#{myBean.integerProperty lt 3}"/>
+ <h:outputText value="#{myBean.integerProperty < '4' }"/>
+ <h:outputText value="#{myBean.integerProperty lt '4' }"/>
+ <h:outputText value="#{myBean.comparableProperty < myBean.collectionProperty}"/>
+ <h:outputText value="#{myBean.comparableProperty lt myBean.collectionProperty}"/>
+ <h:outputText value="#{myBean.integerProperty < -3}"/>
+ <h:outputText value="#{myBean.doubleProperty < 5}"/>
+ <h:outputText value="#{5 lt myBean.bigIntegerProperty}"/>
+ <h:outputText value="#{myBean.bigDoubleProperty < myBean.bigIntegerProperty}"/>
+ <h:outputText value="#{myBean.coins < 'quarter'}"/>
+ <h:outputText value="#{myBean.coins lt 'quarter'}"/>
+ <h:outputText value="#{myBean.rawEnum < 'quarter'}"/>
+ <h:outputText value="#{myBean.coinEnum lt 'quarter'}"/>
+ <h:outputText value="#{myBean.rawEnum < myBean.coins}"/>
+ <h:outputText value="#{myBean.coinEnum < myBean.colors}"/>
+
+ <!-- warnings -->
+ <h:outputText value="#{5 < 3}"/>
+ <h:outputText value="#{5 lt 3}"/>
+ <h:outputText value="#{'4' < '34'}"/>
+ <h:outputText value="#{'4' lt '34'}"/>
+ <h:outputText value="#{'34' < '34'}"/>
+ <h:outputText value="#{'34' lt '34'}"/>
+ <h:outputText value="#{-5 < 2}"/>
+ <h:outputText value="#{-5 lt 2}"/>
+ <h:outputText value="#{2 < -5}"/>
+ <h:outputText value="#{2 lt -5}"/>
+ <h:outputText value="#{-5 < -5}"/>
+ <h:outputText value="#{-5 lt -5}"/>
+ <h:outputText value="#{myBean.integerProperty < null}"/>
+ <h:outputText value="#{null lt myBean.integerProperty}"/>
+
+ <!-- errors -->
+ <h:outputText value="#{5 < true}"/>
+ <h:outputText value="#{5 lt true}"/>
+ <h:outputText value="#{myBean.integerProperty < myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.integerProperty lt myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.stringArrayProperty < myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.stringArrayProperty lt myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.integerProperty < true }"/>
+ <h:outputText value="#{myBean.integerProperty lt true }"/>
+ <h:outputText value="#{myBean.booleanProperty < true}"/>
+ <h:outputText value="#{myBean.booleanProperty lt true}"/>
+ <h:outputText value="#{true < false}"/>
+ <h:outputText value="#{true lt false}"/>
+ <h:outputText value="#{true < false}"/>
+ <h:outputText value="#{myBean.coins < myBean.colors}"/>
+ <h:outputText value="#{myBean.coins lt myBean.colors}"/>
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/lessThanEq.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/lessThanEq.jsp.data
new file mode 100644
index 000000000..b866bc107
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/lessThanEq.jsp.data
@@ -0,0 +1,77 @@
+%@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/jsp/jstl/core" prefix="c"%>
+<%@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="#{myBean.stringProperty <= '3'}"/>
+ <h:outputText value="#{myBean.stringProperty le '3'}"/>
+ <h:outputText value="#{myBean.integerProperty <= 3}"/>
+ <h:outputText value="#{myBean.integerProperty le 3}"/>
+ <h:outputText value="#{myBean.integerProperty <= '4' }"/>
+ <h:outputText value="#{myBean.integerProperty le '4' }"/>
+ <h:outputText value="#{myBean.comparableProperty <= myBean.collectionProperty}"/>
+ <h:outputText value="#{myBean.comparableProperty le myBean.collectionProperty}"/>
+ <h:outputText value="#{myBean.integerProperty <= -3}"/>
+ <h:outputText value="#{myBean.doubleProperty <= 5}"/>
+ <h:outputText value="#{5 le myBean.bigIntegerProperty}"/>
+ <h:outputText value="#{myBean.bigDoubleProperty <= myBean.bigIntegerProperty}"/>
+ <h:outputText value="#{myBean.coins <= 'quarter'}"/>
+ <h:outputText value="#{myBean.coins le 'quarter'}"/>
+ <h:outputText value="#{myBean.rawEnum <= 'quarter'}"/>
+ <h:outputText value="#{myBean.coinEnum le 'quarter'}"/>
+ <h:outputText value="#{myBean.rawEnum <= myBean.coins}"/>
+ <h:outputText value="#{myBean.coinEnum <= myBean.colors}"/>
+
+ <!-- warnings -->
+ <h:outputText value="#{5 <= 3}"/>
+ <h:outputText value="#{5 le 3}"/>
+ <h:outputText value="#{'4' <= '34'}"/>
+ <h:outputText value="#{'4' le '34'}"/>
+ <h:outputText value="#{'34' <= '34'}"/>
+ <h:outputText value="#{'34' le '34'}"/>
+ <h:outputText value="#{-5 <= 2}"/>
+ <h:outputText value="#{-5 le 2}"/>
+ <h:outputText value="#{2 <= -5}"/>
+ <h:outputText value="#{2 le -5}"/>
+ <h:outputText value="#{-5 <= -5}"/>
+ <h:outputText value="#{-5 le -5}"/>
+ <h:outputText value="#{myBean.integerProperty <= null}"/>
+ <h:outputText value="#{null le myBean.integerProperty}"/>
+
+ <!-- errors -->
+ <h:outputText value="#{5 <= true}"/>
+ <h:outputText value="#{5 le true}"/>
+ <h:outputText value="#{myBean.integerProperty <= myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.integerProperty le myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.stringArrayProperty <= myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.stringArrayProperty le myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.integerProperty <= true }"/>
+ <h:outputText value="#{myBean.integerProperty le true }"/>
+ <h:outputText value="#{myBean.booleanProperty <= true}"/>
+ <h:outputText value="#{myBean.booleanProperty le true}"/>
+ <h:outputText value="#{true <= false}"/>
+ <h:outputText value="#{true le false}"/>
+ <h:outputText value="#{myBean.coins <= myBean.colors}"/>
+ <h:outputText value="#{myBean.coins le myBean.colors}"/>
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/listBeans.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/listBeans.jsp.data
new file mode 100644
index 000000000..cf69f76d1
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/listBeans.jsp.data
@@ -0,0 +1,34 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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="#{myBean['abc']}"/>
+
+ <!-- warnings -->
+
+ <!-- errors -->
+
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/loadBundleResolution.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/loadBundleResolution.jsp.data
new file mode 100644
index 000000000..58879c990
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/loadBundleResolution.jsp.data
@@ -0,0 +1,50 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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 var="bundle" basename="beans.Bundle"/>
+ <f:loadBundle var="msg" basename="TestMessages"/>
+ <f:loadBundle var="noPackageBundle" basename="Bundle"/>
+
+ <h1>JSP Page</h1>
+ <!-- no errors -->
+ <h:outputText value="#{bundle.bundleProp2}"/>
+ <h:outputText value="#{noPackageBundle.bundleProp2}"/>
+ <h:outputText value="#{bundle.bundleProp1 && myBean.stringProperty}"/>
+ <h:outputText value="#{empty bundle}"/>
+ <h:outputText value="#{empty bundle.bundleProp2}"/>
+ <h:outputText value="#{bundle.bundleProp2 + 5}"/>
+ <h:outputText value="#{bundleProp2}"/>
+ <h:outputText value="#{bundle.x.y}"/>
+ <h:outputText value="#{noPackageBundle.x.y}"/>
+
+ <!-- warnings -->
+ <h:outputText value="#{-bundle.bundleProp1}"/>
+ <h:outputText value="#{bundle.bundleProp3}"/>
+ <h:outputText value="#{msg}"/>
+ <h:outputText value="#{bundle.x}"/>
+ <h:outputText value="#{noPackageBundle.notAProperty}"/>
+
+ <!-- errors -->
+
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/logicalAND.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/logicalAND.jsp.data
new file mode 100644
index 000000000..bcafa50ab
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/logicalAND.jsp.data
@@ -0,0 +1,53 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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="#{myBean.booleanProperty && myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.booleanProperty and myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.booleanProperty && true }"/>
+ <h:outputText value="#{myBean.booleanProperty and true }"/>
+ <h:outputText value="#{'true' && myBean.booleanProperty}"}/>
+ <h:outputText value="#{'true' and myBean.booleanProperty}"}/>
+
+ <!-- warnings -->
+ <h:outputText value="#{false && myBean.booleanProperty}"/>
+ <h:outputText value="#{false and myBean.booleanProperty}"/>
+ <h:outputText value="#{null && myBean.booleanProperty }"/>
+ <h:outputText value="#{null and myBean.booleanProperty }"/>
+ <h:outputText value="#{'notTrue' && myBean.booleanProperty}" }/>
+
+ <h:outputText value="#{myBean.booleanProperty && false}"/>
+ <h:outputText value="#{myBean.booleanProperty and false}"/>
+ <h:outputText value="#{myBean.booleanProperty && null }"/>
+ <h:outputText value="#{myBean.booleanProperty and null}"/>
+ <h:outputText value="#{myBean.booleanProperty && 'notTrue'}" }/>
+ <h:outputText value="#{true && false}"/>
+ <h:outputText value="#{null && true}"/>
+
+ <!-- errors -->
+ <h:outputText value="#{myBean.integerProperty && true}"/>
+ <h:outputText value="#{true && myBean.integerProperty}"/>
+ <h:outputText value="#{4 && true}/>
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/logicalEquals.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/logicalEquals.jsp.data
new file mode 100644
index 000000000..a7abbe930
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/logicalEquals.jsp.data
@@ -0,0 +1,81 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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="#{myBean.stringProperty == '3'}"/>
+ <h:outputText value="#{myBean.stringProperty eq '3'}"/>
+ <h:outputText value="#{myBean.integerProperty == 3}"/>
+ <h:outputText value="#{myBean.integerProperty eq 3}"/>
+ <h:outputText value="#{myBean.booleanProperty == true}"/>
+ <h:outputText value="#{myBean.booleanProperty eq true}"/>
+ <h:outputText value="#{myBean.integerProperty == '4' }"/>
+ <h:outputText value="#{myBean.integerProperty eq '4' }"/>
+ <h:outputText value="#{myBean.bigDoubleProperty == 4.5}"/>
+ <h:outputText value="#{myBean.doubleProperty eq 67}"/>
+ <h:outputText value="#{myBean.bigIntegerProperty == 500}"/>
+ <h:outputText value="#{myBean.stringArrayProperty == '3'}"/>
+ <h:outputText value="#{myBean.stringArrayProperty eq myBean.listProperty}"/>
+ <h:outputText value="#{myBean.coins == 'dime'}" />
+ <h:outputText value="#{myBean.coins eq 'dime'}" />
+ <h:outputText value="#{myBean.colors == 'red'}"/>
+ <h:outputText value="#{myBean.colors eq 'red'}"/>
+ <h:outputText value="#{myBean.coins == myBean.stringProperty}"/>
+ <h:outputText value="#{myBean.coins eq myBean.stringProperty}"/>
+ <h:outputText value="#{myBean.rawEnum == 'red'}"/>
+ <h:outputText value="#{myBean.coinEnum == myBean.coins}"/>
+
+ <!-- warnings -->
+ <h:outputText value="#{5 == 3}"/>
+ <h:outputText value="#{5 eq 3}"/>
+ <h:outputText value="#{true == false}"/>
+ <h:outputText value="#{true eq false}"/>
+ <h:outputText value="#{'4' == '34'}"/>
+ <h:outputText value="#{'4' eq '34'}"/>
+ <h:outputText value="#{'34' == '34'}"/>
+ <h:outputText value="#{'34' eq '34'}"/>
+ <h:outputText value="#{myBean.integerProperty == null}"/>
+ <h:outputText value="#{null eq myBean.integerProperty}"/>
+ <h:outputText value="#{5.4 == 4.3}"/>
+ <h:outputText value="#{true == true}"/>
+ <h:outputText value="#{myBean.coins == 'notAValue'}"/>
+ <h:outputText value="#{myBean.coins eq 'notAValue'}"/>
+ <h:outputText value="#{myBean.coins == 'notAValue' && myBean.coins == 'dime'}"/>
+ <h:outputText value="#{myBean.coins eq 'notAValue' && myBean.coins eq 'dime'}"/>
+ <h:outputText value="#{myBean.coins == myBean.colors}"/>
+ <h:outputText value="#{myBean.coins == myBean.stringArrayProperty}"/>
+ <h:outputText value="#{'blah' == myBean.coins}"/>
+ <h:outputText value="#{myBean.coins eq 'blah'}"/>
+
+ <!-- errors -->
+ <h:outputText value="#{5 == true}"/>
+ <h:outputText value="#{5 eq true}"/>
+ <h:outputText value="#{myBean.integerProperty == myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.integerProperty eq myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.stringArrayProperty == myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.booleanProperty eq myBean.stringArrayProperty}"/>
+ <h:outputText value="#{myBean.integerProperty == true }"/>
+ <h:outputText value="#{myBean.integerProperty eq true }"/>
+ <h:outputText value="#{false == myBean.integerProperty}"/>
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/logicalNOT.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/logicalNOT.jsp.data
new file mode 100644
index 000000000..6944ceb6e
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/logicalNOT.jsp.data
@@ -0,0 +1,53 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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="#{!myBean.booleanProperty}"/>
+ <h:outputText value="#{not myBean.booleanProperty}"/>
+ <h:outputText value="#{!myBean.stringProperty}"/>
+ <h:outputText value="#{not myBean.stringProperty}"/>
+
+ <!-- warnings -->
+ <h:outputText value="#{!true}"/>
+ <h:outputText value="#{not true}"/>
+ <h:outputText value="#{!false}"/>
+ <h:outputText value="#{not false}"/>
+ <h:outputText value="#{! 'true'}"/>
+ <h:outputText value="#{not 'true'}"/>
+ <h:outputText value="#{! 'notTrue'}"/>
+ <h:outputText value="#{not 'notTrue'}"/>
+
+ <!-- error cases -->
+ <h:outputText value="#{!5}"/>
+ <h:outputText value="#{not 5}"/>
+ <h:outputText value="#{!myBean.integerProperty}"/>
+ <h:outputText value="#{not myBean.integerProperty}"/>
+ <h:outputText value="#{!myBean.collectionProperty}"/>
+ <h:outputText value="#{not myBean.collectionProperty}"/>
+ <h:outputText value="#{!myBean.stringArrayProperty}"/>
+ <h:outputText value="#{not myBean.stringArrayProperty}"/>
+ <h:outputText value="#{!myBean.mapProperty}"/>
+ <h:outputText value="#{not myBean.mapProperty}"/>
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/logicalNotEquals.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/logicalNotEquals.jsp.data
new file mode 100644
index 000000000..01e75d0ad
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/logicalNotEquals.jsp.data
@@ -0,0 +1,78 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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="#{myBean.stringProperty != '3'}"/>
+ <h:outputText value="#{myBean.stringProperty ne '3'}"/>
+ <h:outputText value="#{myBean.integerProperty != 3}"/>
+ <h:outputText value="#{myBean.integerProperty ne 3}"/>
+ <h:outputText value="#{myBean.booleanProperty != true}"/>
+ <h:outputText value="#{myBean.booleanProperty ne true}"/>
+ <h:outputText value="#{myBean.integerProperty != '4' }"/>
+ <h:outputText value="#{myBean.integerProperty ne '4' }"/>
+ <h:outputText value="#{myBean.bigDoubleProperty != 4.5}"/>
+ <h:outputText value="#{myBean.doubleProperty ne 67}"/>
+ <h:outputText value="#{myBean.bigIntegerProperty != 500}"/>
+ <h:outputText value="#{myBean.stringArrayProperty != '3'}"/>
+ <h:outputText value="#{myBean.stringArrayProperty ne myBean.listProperty}"/>
+ <h:outputText value="#{myBean.coins != 'dime'}" />
+ <h:outputText value="#{myBean.coins ne 'dime'}" />
+ <h:outputText value="#{myBean.colors != 'red'}"/>
+ <h:outputText value="#{myBean.colors ne 'red'}"/>
+ <h:outputText value="#{myBean.coins != myBean.stringProperty}"/>
+ <h:outputText value="#{myBean.coins ne myBean.stringProperty}"/>
+ <h:outputText value="#{myBean.rawEnum != 'red'}"/>
+ <h:outputText value="#{myBean.coinEnum ne myBean.coins}"/>
+
+ <!-- warnings -->
+ <h:outputText value="#{5 != 3}"/>
+ <h:outputText value="#{5 ne 3}"/>
+ <h:outputText value="#{true != false}"/>
+ <h:outputText value="#{true ne false}"/>
+ <h:outputText value="#{'4' != '34'}"/>
+ <h:outputText value="#{'4' ne '34'}"/>
+ <h:outputText value="#{'34' != '34'}"/>
+ <h:outputText value="#{'34' ne '34'}"/>
+ <h:outputText value="#{myBean.integerProperty != null}"/>
+ <h:outputText value="#{null ne myBean.integerProperty}"/>
+ <h:outputText value="#{5.4 != 4.3}"/>
+ <h:outputText value="#{true != true}"/>
+ <h:outputText value="#{myBean.coins != 'notAValue'}"/>
+ <h:outputText value="#{myBean.coins ne 'notAValue'}"/>
+ <h:outputText value="#{myBean.coins != 'notAValue' || myBean.coins != 'dime'}"/>
+ <h:outputText value="#{myBean.coins ne 'notAValue' || myBean.coins ne 'dime'}"/>
+ <h:outputText value="#{myBean.coins != myBean.colors}"/>
+
+ <!-- errors -->
+ <h:outputText value="#{5 != true}"/>
+ <h:outputText value="#{5 ne true}"/>
+ <h:outputText value="#{myBean.integerProperty != myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.integerProperty ne myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.stringArrayProperty != myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.booleanProperty ne myBean.stringArrayProperty}"/>
+ <h:outputText value="#{myBean.integerProperty != true }"/>
+ <h:outputText value="#{myBean.integerProperty ne true }"/>
+ <h:outputText value="#{false != myBean.integerProperty}"/>
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/logicalOR.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/logicalOR.jsp.data
new file mode 100644
index 000000000..4fccfcf7c
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/logicalOR.jsp.data
@@ -0,0 +1,54 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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="#{myBean.booleanProperty or myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.booleanProperty || myBean.booleanProperty}"/>
+ <h:outputText value="#{false || myBean.booleanProperty}"/>
+ <h:outputText value="#{false or myBean.booleanProperty}"/>
+ <h:outputText value="#{null || myBean.booleanProperty }"/>
+ <h:outputText value="#{null or myBean.booleanProperty }"/>
+ <h:outputText value="#{'notTrue' || myBean.booleanProperty}" }/>
+ <h:outputText value="#{myBean.booleanProperty || false}"/>
+ <h:outputText value="#{myBean.booleanProperty or false}"/>
+ <h:outputText value="#{myBean.booleanProperty || null }"/>
+ <h:outputText value="#{myBean.booleanProperty or null}"/>
+ <h:outputText value="#{myBean.booleanProperty || 'notTrue'}" }/>
+ <h:outputText value="#{myBean.booleanProperty or 'notTrue'}" }/>
+
+ <!-- warnings -->
+ <h:outputText value="#{'true' or myBean.booleanProperty}"}/>
+ <h:outputText value="#{'true' || myBean.booleanProperty}"}/>
+ <h:outputText value="#{myBean.booleanProperty or true }"/>
+ <h:outputText value="#{myBean.booleanProperty || true }"/>
+ <h:outputText value="#{myBean.booleanProperty || 'true'}"/>
+ <h:outputText value="#{false || true}"/>
+ <h:outputText value="#{null || true}"/>
+
+ <!-- errors -->
+ <h:outputText value="#{myBean.integerProperty || false}"/>
+ <h:outputText value="#{false || myBean.integerProperty}"/>
+ <h:outputText value="#{4 || false}/>
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/markerOffsets.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/markerOffsets.jsp.data
new file mode 100644
index 000000000..d4c5c2aa9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/markerOffsets.jsp.data
@@ -0,0 +1,63 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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>
+ <!-- warnings: checking also that correct offset/length is found for the warning-->
+ <h:outputText value="#{5 + 3}"/>
+ <h:outputText value="#{null / null}"/>
+ <h:outputText value="#{myBean.integerProperty == null"/>
+ <h:outputText value="#{false && myBean.booleanProperty"/>
+ <h:outputText value="#{myBean.booleanProperty && false"/>
+ <h:outputText value="#{!false}"/>
+ <h:outputText value="#{empty 5}"/>
+ <h:outputText value="#{-null}"/>
+ <h:outputText value="#{-myBean.stringProperty}"/>
+
+ <!-- warning where the offset/length don't match exactly the whole expr -->
+ <h:outputText value="#{myBean.integerProperty - (5 + 3)}"/>
+ <h:outputText value="#{myBean.booleanProperty && myBean.integerProperty + 5 == null}"/>
+
+ <!-- symbol resolution warnings -->
+ <h:outputText value="#{notABean.stringProperty}"/>
+ <h:outputText value="#{myBean.notAProperty}"/>
+ <h:outputText value="#{myBean.integerProperty + 5 + myBean.notAProperty}"/>
+
+ <-- syntax -->
+ <h:outputText value="#{myBean.integerProperty++}"/>
+ <h:outputText value="#{myBean.}"/>
+ <h:outputText value="#{ }"/>
+
+ <!-- errors: checking also that correct offset/length is found for the warning-->
+ <h:outputText value="#{myBean.integerProperty / 0}"/>
+ <h:outputText value="#{myBean.integerProperty + myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.integerProperty && myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.booleanProperty >= myBean.collectionProperty}"/>
+ <h:outputText value="#{5 + 'noNumberConversion'}"/>
+ <h:outputText value="#{-true}"/>
+ <h:outputText value="#{!5}"/>
+
+ <-- method bindings -->
+ <h:outputText value="#{myBean.doubleProperty + myBean.getIntegerProperty}"/>
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/methodBinding.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/methodBinding.jsp.data
new file mode 100644
index 000000000..e189cebb3
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/methodBinding.jsp.data
@@ -0,0 +1,71 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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:inputText validator="#{myBean.getStringProperty}"/>
+ <h:inputText validator="#{myBean.getIntegerProperty}"/>
+ <h:inputText validator="#{myBean.getBooleanProperty}"/>
+ <h:inputText validator="#{myBean.getDoubleProperty}"/>
+ <h:inputText validator="#{myBean.getMapProperty}"/>
+ <h:inputText validator="#{myBean.getStringArrayProperty}"/>
+ <h:inputText validator="#{myBean.getCollectionProperty}"/>
+ <h:inputText validator="#{myBean.getListProperty}"/>
+ <h:inputText validator="#{myBean.getComparableProperty}"/>
+ <h:inputText validator="#{myBean.getBigIntegerProperty}"/>
+ <h:inputText validator="#{myBean.getBigDoubleProperty}"/>
+ <h:inputText validator="#{myBean.recursiveCall}"/>
+ <h:inputText validator="#{myBean.getWritableStringProperty}"/>
+ <h:inputText validator="#{myBean.setWritableStringProperty}"/>
+ <h:inputText validator="#{myBean.validate}"/>
+ <h:inputText validator="#{myBean.validate2}"/>
+ <h:inputText validator="#{myBean.getSelf}"/>
+ <h:inputText validator="#{myBean.isIsStyleBooleanProperty}"/>
+
+ <h:inputText validator="#{myBeanSubClass.getStringProperty}"/>
+ <h:inputText validator="#{myBeanSubClass.getIntegerProperty}"/>
+ <h:inputText validator="#{myBeanSubClass.getBooleanProperty}"/>
+ <h:inputText validator="#{myBeanSubClass.getDoubleProperty}"/>
+ <h:inputText validator="#{myBeanSubClass.getMapProperty}"/>
+ <h:inputText validator="#{myBeanSubClass.getStringArrayProperty}"/>
+ <h:inputText validator="#{myBeanSubClass.getCollectionProperty}"/>
+ <h:inputText validator="#{myBeanSubClass.getListProperty}"/>
+ <h:inputText validator="#{myBeanSubClass.getComparableProperty}"/>
+ <h:inputText validator="#{myBeanSubClass.getBigIntegerProperty}"/>
+ <h:inputText validator="#{myBeanSubClass.getBigDoubleProperty}"/>
+ <h:inputText validator="#{myBeanSubClass.recursiveCall}"/>
+ <h:inputText validator="#{myBeanSubClass.getWritableStringProperty}"/>
+ <h:inputText validator="#{myBeanSubClass.setWritableStringProperty}"/>
+ <h:inputText validator="#{myBeanSubClass.validate}"/>
+ <h:inputText validator="#{myBeanSubClass.validate2}"/>
+ <h:inputText validator="#{myBeanSubClass.getSelf}"/>
+ <h:inputText validator="#{myBeanSubClass.isIsStyleBooleanProperty}"/>
+ <h:inputText validator="#{myBeanSubClass.getSubClassStringProperty}"/>
+
+ <!-- warnings -->
+
+ <!-- errors -->
+ <h:inputText validator="#{-myBean.validate}"/>
+ <h:inputText value="#{myBean.getIntegerProperty + myBean.getDoubleProperty}"/>
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/perfTest1.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/perfTest1.jsp.data
new file mode 100644
index 000000000..069db0fee
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/perfTest1.jsp.data
@@ -0,0 +1,30 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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>
+ <h:outputText value="#{myBean.stringProperty}"/>
+
+ </f:view>
+ </body>
+</html>
+
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/preferenceTest1.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/preferenceTest1.jsp.data
new file mode 100644
index 000000000..0bb53655c
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/preferenceTest1.jsp.data
@@ -0,0 +1,44 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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>
+ <h:outputText value="#{5+3}"/>
+ <h:outputText value="#{null+null}"/>
+ <h:outputText value="#{5 + true}"/>
+ <h:outputText value="#{'a' + 'b'}"/>
+ <h:outputText value="#{5 / 0}"/>
+ <h:outputText value="#{}"/>
+ <h:outputText value="#{myBean.subClassStringProperty}"/>
+ <h:outputText value="#{myBean1}"/>
+ <h:outputText value="#{listBean[-1]}"/>
+ <h:outputText value="#{myBean.stringArrayProperty > myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.coins > myBean.colors}"/>
+ <h:outputText value="#{false && myBean.booleanProperty}"/>
+ <h:outputText value="#{myBean.booleanProperty && false}"/>
+ <h:outputText value="#{5 == true}"/>
+ <h:outputText value="#{!false}"/>
+ <h:outputText value="#{!5}"/>
+ <h:outputText value="#{myBean.doubleProperty + myBean.getIntegerProperty}"/>
+</f:view>
+</body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/propertiesOfMaps.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/propertiesOfMaps.jsp.data
new file mode 100644
index 000000000..fa06e8fbf
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/propertiesOfMaps.jsp.data
@@ -0,0 +1,42 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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 var="bundle" basename="beans.Bundle"/>
+ <h1>JSP Page</h1>
+ <!-- no errors -->
+ <h:outputText value="#{beanWithMapProperties.integerProperty}"/>
+ <h:outputText value="#{bundle.bundleProp1}"/>
+ <h:outputText value="#{bundle.x.y}"/>
+ <h:outputText value="#{beanWithMapProperties.treeMap.foo}"/>
+ <h:outputText value="#{beanWithMapProperties.treeMap.foo.x}"/>
+ <h:outputText value="#{beanWithMapProperties.mapProperty.foo}"/>
+ <h:outputText value="#{beanWithMapProperties.mapProperty.foo.x}"/>
+ <h:outputText value="#{mapBean.foo}"/>
+ <h:outputText value="#{mapBean.foo.x}"/>
+ <h:outputText value="#{mapBean.getIgnoredIntProperty}"/>
+
+ <h:outputText value="#{bundle.y}"/>
+ <h:outputText value="#{bundle.bundleProp1.z}"/>
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/resourceBundleResolution.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/resourceBundleResolution.jsp.data
new file mode 100644
index 000000000..fcb5a31b8
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/resourceBundleResolution.jsp.data
@@ -0,0 +1,54 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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">
+
+<%-- Note: this test is valid for JSF >=1.2 only. --%>
+<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="#{resBundleProp1.bundleProp2}"/>
+ <h:outputText value="#{noPackageBundle.bundleProp2}"/>
+ <h:outputText value="#{resBundleProp1.bundleProp1 && myBean.stringProperty}"/>
+ <h:outputText value="#{empty resBundleProp1}"/>
+ <h:outputText value="#{empty resBundleProp1.bundleProp2}"/>
+ <h:outputText value="#{resBundleProp1.bundleProp2 + 5}"/>
+ <h:outputText value="#{bundleProp2}"/>
+ <h:outputText value="#{resBundleProp1.x.y}"/>
+ <h:outputText value="#{noPackageBundle.x.y}"/>
+
+ <h:outputText value="#{resBundleProp2.name}"/>
+ <h:outputText value="#{resBundleProp2.movie}"/>
+
+ <!-- warnings -->
+ <h:outputText value="#{-resBundleProp1.bundleProp1}"/>
+ <h:outputText value="#{resBundleProp1.bundleProp3}"/>
+ <h:outputText value="#{msg}"/>
+ <h:outputText value="#{resBundleProp1.x}"/>
+ <h:outputText value="#{noPackageBundle.notAProperty}"/>
+
+ <h:outputText value="#{resBundleProp2.bundleProp2}"/>
+ <h:outputText value="#{resBundleProp2.notAPropAtAll}"/>
+
+ <!-- errors -->
+
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/syntaxCheck.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/syntaxCheck.jsp.data
new file mode 100644
index 000000000..8ebd2ecba
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/syntaxCheck.jsp.data
@@ -0,0 +1,35 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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 -->
+
+ <!-- warnings -->
+ <h:outputText value="#{ "/>
+ <h:outputText value="#{}"/>
+ <h:outputText value="#{ }"/>
+
+ <!-- errors -->
+ </f:view>
+ </body>
+</html>
+
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/test.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/test.jsp.data
new file mode 100644
index 000000000..363e08864
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/test.jsp.data
@@ -0,0 +1,35 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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="#{myBean.stringArrayProperty}"/>
+
+
+ <!-- warnings -->
+
+ <!-- errors -->
+
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/unaryMinus.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/unaryMinus.jsp.data
new file mode 100644
index 000000000..6ec68f5db
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/unaryMinus.jsp.data
@@ -0,0 +1,48 @@
+<%@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/jsp/jstl/core" prefix="c"%>
+<%@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="#{-myBean.integerProperty}"/>
+ <h:outputText value="#{-myBean.doubleProperty}"/>
+ <h:outputText value="#{-myBean.bigDoubleProperty}"/>
+ <h:outputText value="#{-myBean.bigIntegerProperty}"/>
+
+ <!-- warnings -->
+ <h:outputText value="#{-myBean.stringProperty}"/>
+ <h:outputText value="#{-5}"/>
+ <h:outputText value="#{-5.5}"/>
+ <h:outputText value="#{-'5'}"/>
+ <h:outputText value="#{-'5.5'}"/>
+ <h:outputText value="#{-null}"/>
+
+ <!-- errors -->
+ <h:outputText value="#{-false}"/>
+ <h:outputText value="#{-true}"/>
+ <h:outputText value="#{-myBean.booleanProperty}"/>
+ <h:outputText value="#{-myBean.collectionProperty}"/>
+ <h:outputText value="#{-myBean.mapProperty}"/>
+ <h:outputText value="#{-myBean.stringArrayProperty}"/>
+ <h:outputText value="#{-'notANumber'}"/>
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/variableNaming.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/variableNaming.jsp.data
new file mode 100644
index 000000000..caabe3f9c
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/variableNaming.jsp.data
@@ -0,0 +1,30 @@
+<%@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>
+ <f:loadBundle var="hiddenBean" basename="mybeans.Bundle"/>
+
+ <!-- no errors -->
+ <h:outputText value="#{hiddenBean.bundleProp2}"/>
+
+ <!-- warnings -->
+ <h:outputText value="#{hiddenBean.collectionProperty}"/>
+
+ <!-- errors -->
+
+ </f:view>
+ </body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/web/faces-config_1_1.xml.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/web/faces-config_1_1.xml.data
new file mode 100644
index 000000000..fd25069a0
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/web/faces-config_1_1.xml.data
@@ -0,0 +1,104 @@
+<?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>
+ session</managed-bean-scope>
+ <managed-property>
+ <property-name>
+ booleanProperty</property-name>
+ <property-class>
+ boolean</property-class>
+ <value>
+ </value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>
+ myBeanSubClass</managed-bean-name>
+ <managed-bean-class>
+ beans.MyBeanSubClass</managed-bean-class>
+ <managed-bean-scope>
+ request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>
+ mapBean</managed-bean-name>
+ <managed-bean-class>
+ beans.MapBean</managed-bean-class>
+ <managed-bean-scope>
+ application</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>
+ mapBean1</managed-bean-name>
+ <managed-bean-class>
+ beans.MapBean</managed-bean-class>
+ <managed-bean-scope>
+ session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>
+ hiddenBean</managed-bean-name>
+ <managed-bean-class>
+ beans.MyBean</managed-bean-class>
+ <managed-bean-scope>
+ request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>
+ myBean_none</managed-bean-name>
+ <managed-bean-class>
+ beans.MyBean</managed-bean-class>
+ <managed-bean-scope>
+ none</managed-bean-scope>
+ <managed-property>
+ <property-name>
+ booleanProperty</property-name>
+ <property-class>
+ boolean</property-class>
+ <value>
+ false</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>
+ myBeanSettable</managed-bean-name>
+ <managed-bean-class>
+ beans.MyBeanSettable</managed-bean-class>
+ <managed-bean-scope>
+ session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>
+ beanWithMapProperties</managed-bean-name>
+ <managed-bean-class>
+ beans.BeanWithMapProperties</managed-bean-class>
+ <managed-bean-scope>
+ request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>
+ beanWithListProperties</managed-bean-name>
+ <managed-bean-class>
+ beans.BeanWithListProperties</managed-bean-class>
+ <managed-bean-scope>
+ request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>
+ listBean</managed-bean-name>
+ <managed-bean-class>
+ beans.ListBean</managed-bean-class>
+ <managed-bean-scope>
+ request</managed-bean-scope>
+ </managed-bean>
+</faces-config>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/web/faces-config_1_2.xml.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/web/faces-config_1_2.xml.data
new file mode 100644
index 000000000..3c955c7f3
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/web/faces-config_1_2.xml.data
@@ -0,0 +1,118 @@
+<?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">
+ <application>
+ <resource-bundle>
+ <base-name>beans.Bundle</base-name>
+ <var>resBundleProp1</var>
+ </resource-bundle>
+ <resource-bundle>
+ <base-name>beans.Bundle2</base-name>
+ <var>resBundleProp2</var>
+ </resource-bundle>
+ <resource-bundle>
+ <base-name>beans.Bundle</base-name>
+ <var>noPackageBundle</var>
+ </resource-bundle>
+ </application>
+ <managed-bean>
+ <managed-bean-name>
+ myBean</managed-bean-name>
+ <managed-bean-class>
+ beans.MyBean</managed-bean-class>
+ <managed-bean-scope>
+ session</managed-bean-scope>
+ <managed-property>
+ <property-name>
+ booleanProperty</property-name>
+ <property-class>
+ boolean</property-class>
+ <value>
+ </value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>
+ myBeanSubClass</managed-bean-name>
+ <managed-bean-class>
+ beans.MyBeanSubClass</managed-bean-class>
+ <managed-bean-scope>
+ request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>
+ mapBean</managed-bean-name>
+ <managed-bean-class>
+ beans.MapBean</managed-bean-class>
+ <managed-bean-scope>
+ application</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>
+ mapBean1</managed-bean-name>
+ <managed-bean-class>
+ beans.MapBean</managed-bean-class>
+ <managed-bean-scope>
+ session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>
+ hiddenBean</managed-bean-name>
+ <managed-bean-class>
+ beans.MyBean</managed-bean-class>
+ <managed-bean-scope>
+ request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>
+ myBean_none</managed-bean-name>
+ <managed-bean-class>
+ beans.MyBean</managed-bean-class>
+ <managed-bean-scope>
+ none</managed-bean-scope>
+ <managed-property>
+ <property-name>
+ booleanProperty</property-name>
+ <property-class>
+ boolean</property-class>
+ <value>
+ false</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>
+ myBeanSettable</managed-bean-name>
+ <managed-bean-class>
+ beans.MyBeanSettable</managed-bean-class>
+ <managed-bean-scope>
+ session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>
+ beanWithMapProperties</managed-bean-name>
+ <managed-bean-class>
+ beans.BeanWithMapProperties</managed-bean-class>
+ <managed-bean-scope>
+ request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>
+ beanWithListProperties</managed-bean-name>
+ <managed-bean-class>
+ beans.BeanWithListProperties</managed-bean-class>
+ <managed-bean-scope>
+ request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>
+ listBean</managed-bean-name>
+ <managed-bean-class>
+ beans.ListBean</managed-bean-class>
+ <managed-bean-scope>
+ request</managed-bean-scope>
+ </managed-bean>
+</faces-config>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/.classpath b/jsf/tests/org.eclipse.jst.pagedesigner.tests/.classpath
new file mode 100644
index 000000000..472ee29b1
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/.project b/jsf/tests/org.eclipse.jst.pagedesigner.tests/.project
new file mode 100644
index 000000000..0283ddded
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/.project
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jst.pagedesigner.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>
+ <buildCommand>
+ <name>org.eclipse.hyades.test.tools.core.java.junit.builder</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.pagedesigner.tests/.settings/org.eclipse.jdt.core.prefs b/jsf/tests/org.eclipse.jst.pagedesigner.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..1ebe53ff6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,66 @@
+#Fri Apr 23 15:40:51 PDT 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.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.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.pagedesigner.tests/META-INF/MANIFEST.MF b/jsf/tests/org.eclipse.jst.pagedesigner.tests/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..de8e17e3f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,35 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name.0
+Bundle-SymbolicName: org.eclipse.jst.pagedesigner.tests;singleton:=true
+Bundle-Version: 1.5.100.qualifier
+Bundle-Vendor: %Bundle-Vendor.0
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Localization: plugin
+Require-Bundle: org.junit;bundle-version="3.8.1",
+ org.eclipse.jst.jsf.test.util;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.jst.jsf.core.tests;bundle-version="[1.0.0,2.0.0)",
+ 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.jst.jsf.common;bundle-version="[1.1.0,2.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.html.core;bundle-version="[1.1.0,1.3.0)",
+ org.eclipse.wst.xml.core;bundle-version="[1.1.0,1.2.0)",
+ org.eclipse.jface.text;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.jst.pagedesigner;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.emf.common;bundle-version="[2.2.0,3.0.0)",
+ org.eclipse.gef;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.ui.views.properties.tabbed;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.jst.jsf.common.ui;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.jst.pagedesigner.jsf.ui;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.ui.ide;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.wst.common.ui;bundle-version="[1.1.0,1.2.0)",
+ org.eclipse.emf.ecore;bundle-version="[2.7.0,3.0.0)",
+ org.eclipse.wst.common.project.facet.core;bundle-version="[1.4.0,1.5.0)"
+Export-Package: org.eclipse.jst.pagedesigner.tests;x-internal:=true
+Bundle-ClassPath: pagedesignertests.jar
+Bundle-Activator: org.eclipse.jst.pagedesigner.tests.PageDesignerTestsPlugin
+Bundle-ActivationPolicy: lazy
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/about.html b/jsf/tests/org.eclipse.jst.pagedesigner.tests/about.html
new file mode 100644
index 000000000..131bdcff7
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/about.html
@@ -0,0 +1,22 @@
+<!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>August 01, 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.pagedesigner.tests/build.properties b/jsf/tests/org.eclipse.jst.pagedesigner.tests/build.properties
new file mode 100644
index 000000000..4307e3d3f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/build.properties
@@ -0,0 +1,23 @@
+###############################################################################
+# 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/,\
+ pagedesignertests.jar,\
+ plugin.properties,\
+ about.html,\
+ testdata/,\
+ test.xml,\
+ plugin.xml,\
+ metadata/
+source.pagedesignertests.jar = src/
+output.pagedesignertests.jar = bin/
+jars.compile.order = pagedesignertests.jar
+javacSource=1.5
+javacTarget=1.5
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/launch/AllPageDesignerTests_Part1.launch b/jsf/tests/org.eclipse.jst.pagedesigner.tests/launch/AllPageDesignerTests_Part1.launch
new file mode 100644
index 000000000..5fa3a2455
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/launch/AllPageDesignerTests_Part1.launch
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/AllTests_Part1.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.jst.pagedesigner.tests.AllTests_Part1"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jst.pagedesigner.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx512m -XX:MaxPermSize=512M -DjsfRuntimeJarsDirectoryV1.1=C:/Users/cbateman/dev/myfaces-core-1.1.10-bin/lib"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/metadata/checkmodeop_dti.xml b/jsf/tests/org.eclipse.jst.pagedesigner.tests/metadata/checkmodeop_dti.xml
new file mode 100644
index 000000000..606f4242b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/metadata/checkmodeop_dti.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<md:metadatamodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:md="http://org.eclipse.jst.jsf.common.metadata/metadata.ecore"
+ xmlns:dti="http://org.eclipse.jsf.pagedesigner/dtinfo.ecore"
+ id="org.eclipse.jst.pagedesigner.tests.testCheckModeOperation"
+ type="tagFile">
+
+ <entity id="testTagOne" type="tag">
+ <trait id="dt-info">
+ <value xsi:type="dti:DTInfo">
+ <tag-convert-info>
+ <operation id="org.eclipse.jst.pagedesigner.CheckModeOperation">
+ <parameter value="design"/>
+ <operation id="org.eclipse.jst.pagedesigner.CreateElementOperation">
+ <parameter value="div"/>
+ </operation>
+ <operation id="org.eclipse.jst.pagedesigner.CopyChildrenOperation"/>
+ </operation>
+ </tag-convert-info>
+ <tag-decorate-info id="vpd-decorate-preview"
+ nonVisual="true"
+ />
+ </value>
+ </trait>
+ </entity>
+
+ <entity id="testTagTwo" type="tag">
+ <trait id="dt-info">
+ <value xsi:type="dti:DTInfo">
+ <tag-convert-info>
+ <operation id="org.eclipse.jst.pagedesigner.CreateElementOperation">
+ <parameter value="div"/>
+ </operation>
+ <operation id="org.eclipse.jst.pagedesigner.CheckModeOperation">
+ <parameter value="design"/>
+ <operation id="org.eclipse.jst.pagedesigner.CopyAttributeOperation">
+ <parameter value="requiredAttr1"/>
+ </operation>
+ <operation id="org.eclipse.jst.pagedesigner.RenameAttributeOperation">
+ <parameter value="requiredAttr1"/>
+ <parameter value="id"/>
+ </operation>
+ </operation>
+ <operation id="org.eclipse.jst.pagedesigner.CheckModeOperation">
+ <parameter value="preview"/>
+ <operation id="org.eclipse.jst.pagedesigner.CopyAttributeOperation">
+ <parameter value="requiredAttr2"/>
+ </operation>
+ <operation id="org.eclipse.jst.pagedesigner.RenameAttributeOperation">
+ <parameter value="requiredAttr2"/>
+ <parameter value="id"/>
+ </operation>
+ </operation>
+ </tag-convert-info>
+ </value>
+ </trait>
+ </entity>
+
+</md:metadatamodel>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/metadata/test-metadata.xml b/jsf/tests/org.eclipse.jst.pagedesigner.tests/metadata/test-metadata.xml
new file mode 100644
index 000000000..82b132eda
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/metadata/test-metadata.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<md:metadatamodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:md="http://org.eclipse.jst.jsf.common.metadata/metadata.ecore"
+ xmlns:pi="http://org.eclipse.jsf.pagedesigner/paletteInfos.ecore"
+ id="org.eclipse.jst.pagedesigner.tests.tagCreatorFactory1"
+ type="tagFile">
+
+ <trait id="is-jsf-component-library">
+ <value>true</value>
+ </trait>
+
+ <entity id="tagWithMetadata" type="tag">
+ <trait id="tag-create">
+ <value xsi:type="pi:TagCreationInfo">
+ <attribute id="requiredAttr1" value="foobar"/>
+ <attribute id="notRequiredAttr1" value="someOtherFooBar"/>
+ <template><![CDATA[
+ <outputText value="CommandLink"
+ _uri_="http://java.sun.com/jsf/html" />
+ ]]></template>
+ </value>
+
+ </trait>
+ </entity>
+
+ <entity id="tagWithRequiredAttr2" type="tag">
+ <trait id="tag-create">
+ <value xsi:type="pi:TagCreationInfo">
+ <attribute id="requiredAttr1" value="foobar"/>
+ </value>
+ </trait>
+ </entity>
+</md:metadatamodel> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/plugin.properties b/jsf/tests/org.eclipse.jst.pagedesigner.tests/plugin.properties
new file mode 100644
index 000000000..3c83f592a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/plugin.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# 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=JSF Tools - Web Page Editor Tests
+Bundle-Vendor.0=Eclipse Web Tools Platform
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/plugin.xml b/jsf/tests/org.eclipse.jst.pagedesigner.tests/plugin.xml
new file mode 100644
index 000000000..adcc045bb
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/plugin.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension
+ point="org.eclipse.jst.jsf.common.standardMetaDataFiles">
+ <standardMetaDataFile
+ location="/metadata/checkmodeop_dti.xml"
+ uri="org.eclipse.jst.pagedesigner.tests.testCheckModeOperation">
+ </standardMetaDataFile>
+ <standardMetaDataFile
+ location="/metadata/test-metadata.xml"
+ uri="org.eclipse.jst.pagedesigner.tests.tagCreatorFactory1">
+ </standardMetaDataFile>
+ <standardMetaDataFile
+ location="/testdata/propertypages/test-metadata.xml"
+ uri="org.eclipse.jst.pagedesigner.tests.propertypages">
+ </standardMetaDataFile>
+ </extension>
+ <extension
+ point="org.eclipse.jst.pagedesigner.pageDesignerExtension">
+ <elementEditFactory
+ class="org.eclipse.jst.pagedesigner.tests.tagcreatorPlugin.TestCreationFactory"></elementEditFactory>
+ <elementEditFactory
+ class="org.eclipse.jst.pagedesigner.tests.tagcreatorPlugin.UserCustomizedElementEditFactory">
+ </elementEditFactory>
+ </extension>
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertySections">
+ <propertySections
+ contributorId="org.eclipse.jst.pagedesigner.tabPropertyContributor">
+ <propertySection
+ class="org.eclipse.jst.pagedesigner.tests.tabbed.properties.sections.FakePropertySection"
+ id="section.fake"
+ tab="sss">
+ </propertySection>
+ <propertySection
+ class="org.eclipse.jst.pagedesigner.tests.tabbed.properties.sections.FakePropertySectionUsingDialogField"
+ id="section.fake.dialogfield"
+ tab="sss">
+ </propertySection>
+ </propertySections>
+ </extension>
+
+</plugin>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/pom.xml b/jsf/tests/org.eclipse.jst.pagedesigner.tests/pom.xml
new file mode 100644
index 000000000..2a9c43421
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/pom.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012, 2013 Eclipse Foundation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Distribution License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/org/documents/edl-v10.php
+
+ Contributors:
+ Thanh Ha (Eclipse Foundation) - initial implementation
+ Ian Trimble (Oracle) - initial tests configuration
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.webtools.jsf</groupId>
+ <artifactId>org.eclipse.webtools.jsf.tests</artifactId>
+ <version>3.6.0-SNAPSHOT</version>
+ <relativePath>../../../</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.webtools.jsf</groupId>
+ <artifactId>org.eclipse.jst.pagedesigner.tests</artifactId>
+ <version>1.5.100-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ <useUIHarness>true</useUIHarness>
+ <includes>
+ <include>org/eclipse/jst/pagedesigner/tests/AllTests_Part1.java</include>
+ <include>org/eclipse/jst/pagedesigner/tests/AllTests_Part2.java</include>
+ </includes>
+ <dependencies>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.jst.j2ee.ejb</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ </dependencies>
+ <argLine>-DjsfRuntimeJarsDirectoryV1.1=${project.basedir}/../jsfRuntimeJarsDirectory/V1.1 -DjsfRuntimeJarsDirectoryV1.2=${project.basedir}/../jsfRuntimeJarsDirectory/V1.2 -DjsfRuntimeJarsDirectoryV2.0=${project.basedir}/../jsfRuntimeJarsDirectory/V2.0</argLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/AllTests_Part1.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/AllTests_Part1.java
new file mode 100644
index 000000000..02e0977d6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/AllTests_Part1.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * 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.pagedesigner.tests;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
+import org.eclipse.jst.pagedesigner.tests.tabbed.properties.sections.BasicTabbedPropertyPageTests;
+import org.eclipse.jst.pagedesigner.tests.tagcreator.TestDefaultTagCreatorForJSFCore;
+import org.eclipse.jst.pagedesigner.tests.tagcreator.TestDefaultTagCreatorForJSFHTML;
+import org.eclipse.jst.pagedesigner.tests.tagcreator.TestDefaultTagCreatorHTML;
+import org.eclipse.jst.pagedesigner.tests.tagcreator.TestDefaultTagCreatorJSP;
+
+/**
+ * All tests suite for Web Page Editor. Part 1
+ *
+ * Split into multiple suites since combined they eventually grind to a halt
+ *
+ * @author Ian Trimble - Oracle
+ *
+ */
+public class AllTests_Part1
+{
+ /**
+ * @return the test suite
+ */
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("Tests for org.eclipse.jst.pagedesigner - Part 1");
+ // $JUnit-BEGIN$
+
+ // tests requiring jsfRuntimeJarsDirectoryV1.1
+
+ addTestRequiringJSFRuntime(suite, Test_DTManager.class, JSFVersion.V1_1);
+
+ addTestRequiringJSFRuntime(suite, Test_TransformOperations.class,
+ JSFVersion.V1_1);
+ addTestRequiringJSFRuntime(suite,
+ TestDefaultTagCreatorForJSFCore.class, JSFVersion.V1_1);
+ addTestRequiringJSFRuntime(suite,
+ TestDefaultTagCreatorForJSFHTML.class, JSFVersion.V1_1);
+ addTestRequiringJSFRuntime(suite, TestDefaultTagCreatorHTML.class,
+ JSFVersion.V1_1);
+ addTestRequiringJSFRuntime(suite, TestDefaultTagCreatorJSP.class,
+ JSFVersion.V1_1);
+
+ // C.B: 2008/01/18 temporary comment out: see
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=215849
+ // addTestRequiringJSFRuntime(suite, TestTagCreationFactory.class,
+ // JSFVersion.V1_1);
+
+ // Tabbed Property Tests - do not require JSF Runtime
+ suite.addTestSuite(BasicTabbedPropertyPageTests.class);
+ // $JUnit-END$
+ return suite;
+ }
+
+ private static void addTestRequiringJSFRuntime(TestSuite suite,
+ Class<? extends TestCase> testClass, JSFVersion jsfVersion)
+ {
+ if (JSFCoreUtilHelper.isJSFRuntimeJarsDirectoryValid(jsfVersion))
+ {
+ suite.addTestSuite(testClass);
+ }
+ else
+ {
+ System.err.println(JSFCoreUtilHelper
+ .getTestRequiresJSFRuntimeMessage(testClass, jsfVersion));
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/AllTests_Part2.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/AllTests_Part2.java
new file mode 100644
index 000000000..1bc8ce536
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/AllTests_Part2.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * 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.pagedesigner.tests;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
+import org.eclipse.jst.pagedesigner.tests.tagcreator.TestItemCreationToolForJSFCore;
+import org.eclipse.jst.pagedesigner.tests.tagcreator.TestItemCreationToolForJSFHTML;
+import org.eclipse.jst.pagedesigner.tests.tagcreator.TestItemCreationToolHTML;
+import org.eclipse.jst.pagedesigner.tests.tagcreator.TestItemCreationToolJSP;
+import org.eclipse.jst.pagedesigner.tests.tagcreator.TestOverrideableCreationData;
+import org.eclipse.jst.pagedesigner.tests.tagcreator.TestUserCustomizedTagCreatorForJSFHTML_AttributeCustomization;
+import org.eclipse.jst.pagedesigner.tests.tagcreator.TestUserCustomizedTagCreatorForJSFHTML_ChildCustomization;
+import org.eclipse.jst.pagedesigner.tests.tagcreator.TestUserCustomizedTagCreatorForJSFHTML_GeneralCustomization;
+import org.eclipse.jst.pagedesigner.tests.tagcreator.TestUserCustomizedTagCreatorForJSFHTML_ParentCustomization;
+
+/**
+ * All tests suite for Web Page Editor. Part 2
+ *
+ * Split into multiple suites since combined they eventually grind to a halt
+ *
+ * @author Ian Trimble - Oracle
+ *
+ */
+public class AllTests_Part2
+{
+ /**
+ * @return the test suite
+ */
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("Tests for org.eclipse.jst.pagedesigner - Part 2");
+ // $JUnit-BEGIN$
+
+ // Add UserCustomizedTagCreator tests
+ addTestRequiringJSFRuntime(suite, TestUserCustomizedTagCreatorForJSFHTML_AttributeCustomization.class, JSFVersion.V1_1);
+ addTestRequiringJSFRuntime(suite, TestUserCustomizedTagCreatorForJSFHTML_ChildCustomization.class, JSFVersion.V1_1);
+ addTestRequiringJSFRuntime(suite, TestUserCustomizedTagCreatorForJSFHTML_ParentCustomization.class, JSFVersion.V1_1);
+ addTestRequiringJSFRuntime(suite, TestUserCustomizedTagCreatorForJSFHTML_GeneralCustomization.class, JSFVersion.V1_1);
+ addTestRequiringJSFRuntime(suite, TestOverrideableCreationData.class, JSFVersion.V1_1);
+
+ // TODO: could merge the item creation and default tag creators into a
+ // common testsuite
+ addTestRequiringJSFRuntime(suite, TestItemCreationToolForJSFCore.class,
+ JSFVersion.V1_1);
+ addTestRequiringJSFRuntime(suite, TestItemCreationToolForJSFHTML.class,
+ JSFVersion.V1_1);
+ addTestRequiringJSFRuntime(suite, TestItemCreationToolHTML.class,
+ JSFVersion.V1_1);
+ addTestRequiringJSFRuntime(suite, TestItemCreationToolJSP.class,
+ JSFVersion.V1_1);
+
+ // $JUnit-END$
+ return suite;
+ }
+
+ private static void addTestRequiringJSFRuntime(TestSuite suite,
+ Class<? extends TestCase> testClass, JSFVersion jsfVersion)
+ {
+ if (JSFCoreUtilHelper.isJSFRuntimeJarsDirectoryValid(jsfVersion))
+ {
+ suite.addTestSuite(testClass);
+ }
+ else
+ {
+ System.err.println(JSFCoreUtilHelper
+ .getTestRequiresJSFRuntimeMessage(testClass, jsfVersion));
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/PageDesignerTestsPlugin.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/PageDesignerTestsPlugin.java
new file mode 100644
index 000000000..2c385d03a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/PageDesignerTestsPlugin.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * 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:
+ * Ian Trimble - Oracle: initial API and implementation
+ *
+ ********************************************************************************/
+
+package org.eclipse.jst.pagedesigner.tests;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class PageDesignerTestsPlugin extends AbstractUIPlugin {
+
+ /**
+ * The plug-in ID
+ */
+ public static final String PLUGIN_ID = "org.eclipse.jst.pagedesigner.tests";
+
+ // The shared instance
+ private static PageDesignerTestsPlugin plugin;
+
+ /**
+ * The constructor
+ */
+ public PageDesignerTestsPlugin() {
+ 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 PageDesignerTestsPlugin getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/Test_DTManager.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/Test_DTManager.java
new file mode 100644
index 000000000..b20f021f9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/Test_DTManager.java
@@ -0,0 +1,248 @@
+/*******************************************************************************
+ * 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.pagedesigner.tests;
+
+import java.util.List;
+
+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.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.IJSFCoreConstants;
+import org.eclipse.jst.jsf.core.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.JSFTestUtil;
+import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
+import org.eclipse.jst.jsp.core.internal.domdocument.DOMModelForJSP;
+import org.eclipse.jst.pagedesigner.converter.IConverterFactory;
+import org.eclipse.jst.pagedesigner.converter.ITagConverter;
+import org.eclipse.jst.pagedesigner.dtmanager.DTManager;
+import org.eclipse.jst.pagedesigner.dtmanager.IDTInfo;
+import org.eclipse.jst.pagedesigner.dtmanager.dtinfo.TagConvertInfo;
+import org.eclipse.jst.pagedesigner.dtmanager.dtinfo.TagDecorateInfo;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Text;
+
+/**
+ * DTManager tests.
+ *
+ * @author Ian Trimble - Oracle
+ */
+public class Test_DTManager extends TestCase {
+
+ private WebProjectTestEnvironment webProjectTestEnv;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ JSFTestUtil.setValidationEnabled(false);
+
+ webProjectTestEnv = new WebProjectTestEnvironment("Test_DTManager_" + getName());
+ webProjectTestEnv.createProject(false);
+ assertNotNull(webProjectTestEnv);
+ assertNotNull(webProjectTestEnv.getTestProject());
+ assertTrue(webProjectTestEnv.getTestProject().isAccessible());
+
+ JSFFacetedTestEnvironment jsfFacetedTestEnv = new JSFFacetedTestEnvironment(webProjectTestEnv);
+ jsfFacetedTestEnv.initialize(IJSFCoreConstants.FACET_VERSION_1_1);
+
+ webProjectTestEnv.loadResourceInWebRoot(
+ PageDesignerTestsPlugin.getDefault().getBundle(),
+ "/testdata/Test_DTManager.jsp.data",
+ "/Test_DTManager.jsp");
+
+ assertTrue(JSFCoreUtilHelper.addJSFRuntimeJarsToClasspath(JSFVersion.V1_1, jsfFacetedTestEnv));
+ }
+
+ /**
+ * Sanity check.
+ */
+ public void testSanity() {
+ ContextWrapper wrapper = null;
+ try {
+ wrapper = getDocumentContext("/WebContent/Test_DTManager.jsp", 477);
+ IStructuredDocumentContext context = wrapper.getContext();
+ IDOMContextResolver resolver =
+ IStructuredDocumentContextResolverFactory.INSTANCE.
+ getDOMContextResolver(context);
+ Node node = resolver.getNode();
+ assertTrue(node instanceof Element);
+ assertTrue(node.getPrefix().equals("h"));
+ assertTrue(node.getLocalName().equals("outputText"));
+ } catch(Exception ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ } finally {
+ if (wrapper != null) {
+ wrapper.dispose();
+ }
+ }
+ }
+
+ /**
+ * Test "getTagConverter(...)" method.
+ */
+ public void testGetTagConverter() {
+ ContextWrapper wrapper = null;
+ try {
+ wrapper = getDocumentContext("/WebContent/Test_DTManager.jsp", 477);
+ IStructuredDocumentContext context = wrapper.getContext();
+ IDOMContextResolver resolver =
+ IStructuredDocumentContextResolverFactory.INSTANCE.
+ getDOMContextResolver(context);
+
+ //get Element
+ Node node = resolver.getNode();
+ assertTrue(node instanceof Element);
+ assertTrue(node.getPrefix().equals("h"));
+ assertTrue(node.getLocalName().equals("outputText"));
+ Element element = (Element)node;
+
+ //get IDOMDocument
+ IStructuredModel model = wrapper.getModel();
+ assertTrue(model instanceof IDOMModel);
+ IDOMDocument document = ((IDOMModel)model).getDocument();
+ assertNotNull(document);
+
+ //get ITagConverter instance
+ ITagConverter tagConverter = DTManager.getInstance().getTagConverter(
+ element,
+ IConverterFactory.MODE_DESIGNER,
+ document);
+ assertNotNull(tagConverter);
+
+ //invoke ITagConverter instance
+ tagConverter.convertRefresh(null);
+
+ //test result element to ensure operations were discovered and invoked
+ Element resultElement = tagConverter.getResultElement();
+ assertNotNull(resultElement);
+ assertTrue(resultElement.getLocalName().equals("span"));
+ assertNull(resultElement.getAttributeNode("value"));
+ NodeList childNodes = resultElement.getChildNodes();
+ assertTrue(childNodes.getLength() == 1);
+ Node childNode = childNodes.item(0);
+ assertTrue(childNode instanceof Text);
+ assertTrue(((Text)childNode).getData().equals("valueValue"));
+ assertNull(resultElement.getAttributeNode("styleClass"));
+ assertNotNull(resultElement.getAttributeNode("class"));
+ assertTrue(resultElement.getAttribute("class").equals("classValue"));
+ assertNotNull(resultElement.getAttributeNode("attr1"));
+ assertTrue(resultElement.getAttribute("attr1").equals("attr1Value"));
+ } catch(Exception ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ } finally {
+ if (wrapper != null) {
+ wrapper.dispose();
+ }
+ }
+ }
+
+ /**
+ * Test "getDTInfo(...)" method.
+ */
+ public void testGetDTInfo() {
+ ContextWrapper wrapper = null;
+ try {
+ wrapper = getDocumentContext("/WebContent/Test_DTManager.jsp", 477);
+ IStructuredDocumentContext context = wrapper.getContext();
+ IDOMContextResolver resolver =
+ IStructuredDocumentContextResolverFactory.INSTANCE.
+ getDOMContextResolver(context);
+
+ //get Element
+ Node node = resolver.getNode();
+ assertTrue(node instanceof Element);
+ assertTrue(node.getPrefix().equals("h"));
+ assertTrue(node.getLocalName().equals("outputText"));
+ Element element = (Element)node;
+
+ //get IDTInfo instance
+ IDTInfo dtInfo = DTManager.getInstance().getDTInfo(element);
+ assertNotNull(dtInfo);
+
+ //test IDTInfo instance
+ TagConvertInfo tcInfo = dtInfo.getTagConvertInfo();
+ List<?> operations = tcInfo.getOperations();
+ assertNotNull(operations);
+ assertEquals(4, operations.size());
+ List<?> tdInfos = dtInfo.getTagDecorateInfos();
+ assertEquals(2, tdInfos.size());
+ TagDecorateInfo tdInfoDesign = dtInfo.getTagDecorateInfo("vpd-decorate-design");
+ assertNotNull(tdInfoDesign);
+ assertTrue(tdInfoDesign.isNeedBorderDecorator());
+ assertTrue(tdInfoDesign.isMultiLevel());
+ assertTrue(tdInfoDesign.isWidget());
+ assertTrue(tdInfoDesign.isSetNonVisualChildElements());
+ TagDecorateInfo tdInfoPreview = dtInfo.getTagDecorateInfo("vpd-decorate-preview");
+ assertNotNull(tdInfoPreview);
+ assertTrue(tdInfoPreview.isResolveChildText());
+ } catch(Exception ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ } finally {
+ if (wrapper != null) {
+ wrapper.dispose();
+ }
+ }
+
+ }
+
+ private ContextWrapper getDocumentContext(String path, int offset) throws Exception {
+ IProject project = webProjectTestEnv.getTestProject();
+ IFile jspFile = project.getFile(new Path(path));
+ assertTrue(jspFile.exists());
+ final IModelManager modelManager =
+ StructuredModelManager.getModelManager();
+ IStructuredModel model = null;
+ model = modelManager.getModelForRead(jspFile);
+ assertTrue(model instanceof DOMModelForJSP);
+ final IStructuredDocumentContext context =
+ IStructuredDocumentContextFactory.INSTANCE.getContext(
+ model.getStructuredDocument(),
+ offset);
+ return new ContextWrapper(context, model);
+ }
+
+ private static class ContextWrapper {
+ private final IStructuredDocumentContext context;
+ private final IStructuredModel model;
+ ContextWrapper(final IStructuredDocumentContext context, final IStructuredModel model) {
+ super();
+ this.context = context;
+ this.model = model;
+ }
+ IStructuredDocumentContext getContext() {
+ return context;
+ }
+ IStructuredModel getModel() {
+ return model;
+ }
+ void dispose() {
+ model.releaseFromRead();
+ }
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/Test_TransformOperations.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/Test_TransformOperations.java
new file mode 100644
index 000000000..8b08e251b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/Test_TransformOperations.java
@@ -0,0 +1,731 @@
+/*******************************************************************************
+ * 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.pagedesigner.tests;
+
+import java.util.List;
+
+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.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.IJSFCoreConstants;
+import org.eclipse.jst.jsf.core.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.JSFTestUtil;
+import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
+import org.eclipse.jst.jsp.core.internal.domdocument.DOMModelForJSP;
+import org.eclipse.jst.pagedesigner.converter.IConverterFactory;
+import org.eclipse.jst.pagedesigner.converter.ITagConverter;
+import org.eclipse.jst.pagedesigner.dtmanager.DTManager;
+import org.eclipse.jst.pagedesigner.dtmanager.converter.ITransformOperation;
+import org.eclipse.jst.pagedesigner.dtmanager.converter.operations.TransformOperationFactory;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Text;
+
+/**
+ * DTManager tests.
+ *
+ * @author Ian Trimble - Oracle
+ */
+public class Test_TransformOperations extends TestCase {
+
+ private static final String OUTPUT_PREFIX = "[Test_TransformOperations]";
+
+ private WebProjectTestEnvironment webProjectTestEnv;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ JSFTestUtil.setValidationEnabled(false);
+
+ webProjectTestEnv = new WebProjectTestEnvironment("Test_TransformOperations_" + getName());
+ webProjectTestEnv.createProject(false);
+ assertNotNull(webProjectTestEnv);
+ assertNotNull(webProjectTestEnv.getTestProject());
+ assertTrue(webProjectTestEnv.getTestProject().isAccessible());
+
+ JSFFacetedTestEnvironment jsfFacetedTestEnv = new JSFFacetedTestEnvironment(webProjectTestEnv);
+ jsfFacetedTestEnv.initialize(IJSFCoreConstants.FACET_VERSION_1_1);
+
+ webProjectTestEnv.loadResourceInWebRoot(
+ PageDesignerTestsPlugin.getDefault().getBundle(),
+ "/testdata/Test_TransformOperations.jsp.data",
+ "/Test_TransformOperations.jsp");
+
+ assertTrue(JSFCoreUtilHelper.addJSFRuntimeJarsToClasspath(JSFVersion.V1_1, jsfFacetedTestEnv));
+ }
+
+ /**
+ * Sanity check.
+ */
+ public void testSanity() {
+ ContextWrapper wrapper = null;
+ try {
+ wrapper = getDocumentContext("/WebContent/Test_TransformOperations.jsp", 477);
+ IStructuredDocumentContext context = wrapper.getContext();
+ IDOMContextResolver resolver =
+ IStructuredDocumentContextResolverFactory.INSTANCE.
+ getDOMContextResolver(context);
+ Node node = resolver.getNode();
+ assertTrue(node instanceof Element);
+ assertEquals("h", node.getPrefix());
+ assertEquals("selectManyListbox", node.getLocalName());
+ } catch(Exception ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ } finally {
+ if (wrapper != null) {
+ wrapper.dispose();
+ }
+ }
+ }
+
+ /**
+ * Test "AppendChildElementOperation".
+ */
+ public void testAppendChildElementOperation() {
+ try {
+ //get and test result element
+ Element resultElement = getResultElement(477, "h", "selectManyListbox");
+ assertNotNull(resultElement);
+ assertEquals("select", resultElement.getLocalName());
+
+ //check first child node exists and is correct node
+ Node firstChildNode = resultElement.getFirstChild();
+ assertTrue(firstChildNode instanceof Element);
+ Element firstChildElement = (Element)firstChildNode;
+ assertEquals("option", firstChildElement.getLocalName());
+
+ } catch(Exception ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ }
+ }
+
+ /**
+ * Test "AppendChildTextFromXPathOperation".
+ */
+ public void testAppendChildTextFromXPathOperation() {
+ try {
+ //get and test result element
+ Element resultElement = getResultElement(477, "h", "selectManyListbox");
+ assertNotNull(resultElement);
+ assertEquals("select", resultElement.getLocalName());
+
+ //check first child node exists and is correct node
+ Node firstChildNode = resultElement.getFirstChild();
+ assertTrue(firstChildNode instanceof Element);
+ Element firstChildElement = (Element)firstChildNode;
+ assertEquals("option", firstChildElement.getLocalName());
+
+ //check grandchild Text exists and has correct value
+ Node firstGrandChildNode = firstChildElement.getFirstChild();
+ assertTrue(firstGrandChildNode instanceof Text);
+ Text firstGrandChildText = (Text)firstGrandChildNode;
+ assertEquals("selectItem One", firstGrandChildText.getData());
+
+ } catch(Exception ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ }
+ }
+
+ /**
+ * Test "AppendChildTextOperation".
+ */
+ public void testAppendChildTextOperation() {
+ try {
+ //get and test result element
+ Element resultElement = getResultElement(477, "h", "selectManyListbox");
+ assertNotNull(resultElement);
+ assertEquals("select", resultElement.getLocalName());
+
+ //check second child node exists and is correct node
+ NodeList childNodes = resultElement.getChildNodes();
+ assertTrue(childNodes.getLength() > 1);
+ Node secondChildNode = childNodes.item(1);
+ assertTrue(secondChildNode instanceof Element);
+ Element secondChildElement = (Element)secondChildNode;
+ assertEquals("option", secondChildElement.getLocalName());
+
+ //check grandchild Text exists and has correct value
+ Node firstGrandChildNode = secondChildElement.getFirstChild();
+ assertTrue(firstGrandChildNode instanceof Text);
+ Text firstGrandChildText = (Text)firstGrandChildNode;
+ assertEquals("selectItem", firstGrandChildText.getData());
+
+ } catch(Exception ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ }
+ }
+
+ /**
+ * Test "CheckModeOperation".
+ */
+ public void testCheckModeOperation() {
+ try {
+ webProjectTestEnv.loadResourceInWebRoot(
+ PageDesignerTestsPlugin.getDefault().getBundle()
+ , "/testdata/checkmodeop/checkModeOp.tld.data"
+ , "/META-INF/checkModeOp.tld");
+
+ webProjectTestEnv.loadResourceInWebRoot(
+ PageDesignerTestsPlugin.getDefault().getBundle()
+ ,"/testdata/checkmodeop/testCheckModeOperation.jsp.data"
+ ,"/testCheckModeOperation.jsp");
+
+ ContextWrapper wrapper = null;
+
+ // First converter is simple use of CheckModeOperation
+ // containing child operations.
+ // Exercises both design and preview mode, but there should
+ // only be conversion for design view, based on the design
+ // time info trait in the meta-data for the tag in this test.
+ try {
+ wrapper =
+ getDocumentContext("/WebContent/testCheckModeOperation.jsp", 365);
+
+ String prefix = "cmo";
+ String localName = "testTagOne";
+ ITagConverter tagConverter =
+ getTagConverter(wrapper, prefix, localName, IConverterFactory.MODE_DESIGNER);
+ assertNotNull(tagConverter);
+
+ // invoke ITagConverter instance
+ tagConverter.convertRefresh(null);
+
+ // get and test result element
+ Element resultElement = tagConverter.getResultElement();
+ assertNotNull(resultElement);
+ assertEquals("div", resultElement.getLocalName());
+
+ // Ensure correct child element was copied to child node list.
+ // First child is text node, look at second child.
+ List<?> childNodes = tagConverter.getChildModeList();
+ assertTrue(childNodes.size() > 1);
+ Node secondChildNode = (Node)childNodes.get(1);
+ assertTrue(secondChildNode instanceof Element);
+ Element secondChildElement = (Element)secondChildNode;
+ assertEquals("span", secondChildElement.getLocalName());
+ assertEquals("t1ChildSpan", secondChildElement.getAttribute("id"));
+
+ // now try in preview mode
+ tagConverter =
+ getTagConverter(wrapper, prefix, localName, IConverterFactory.MODE_PREVIEW);
+ assertNotNull(tagConverter);
+
+ // invoke ITagConverter instance
+ tagConverter.convertRefresh(null);
+
+ // get and test result element
+ resultElement = tagConverter.getResultElement();
+ assertNull(resultElement);
+ } finally {
+ if (wrapper != null) {
+ wrapper.dispose();
+ }
+ }
+
+ // Second tag converter has the CheckModeOperation
+ // as a sibling operation for additional transforms.
+ // Exercises both design and preview mode.
+ try {
+ wrapper =
+ getDocumentContext("/WebContent/testCheckModeOperation.jsp", 531);
+
+ String prefix = "cmo";
+ String localName = "testTagTwo";
+
+ // test conversion for design mode
+ ITagConverter tagConverter =
+ getTagConverter(wrapper, prefix, localName, IConverterFactory.MODE_DESIGNER);
+ assertNotNull(tagConverter);
+
+ // invoke ITagConverter instance
+ tagConverter.convertRefresh(null);
+
+ // get and test result element
+ Element resultElement = tagConverter.getResultElement();
+ assertNotNull(resultElement);
+ assertEquals("div", resultElement.getLocalName());
+ assertEquals("designId", resultElement.getAttribute("id"));
+
+ // now try in preview mode
+ tagConverter =
+ getTagConverter(wrapper, prefix, localName, IConverterFactory.MODE_PREVIEW);
+ assertNotNull(tagConverter);
+
+ // invoke ITagConverter instance
+ tagConverter.convertRefresh(null);
+
+ // get and test result element
+ resultElement = tagConverter.getResultElement();
+ assertNotNull(resultElement);
+ assertEquals("div", resultElement.getLocalName());
+ assertEquals("previewId", resultElement.getAttribute("id"));
+ } finally {
+ if (wrapper != null) {
+ wrapper.dispose();
+ }
+ }
+ } catch(Exception ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ }
+ }
+
+
+ /**
+ * Test "ConvertAttributeToTextOperation".
+ */
+ public void testConvertAttributeToTextOperation() {
+ try {
+ //get and test result element
+ Element resultElement = getResultElement(620, "h", "commandLink");
+ assertNotNull(resultElement);
+ assertEquals("a", resultElement.getLocalName());
+
+ //check first child Text exists and has correct value
+ Node firstChildNode = resultElement.getFirstChild();
+ assertTrue(firstChildNode instanceof Text);
+ Text firstChildText = (Text)firstChildNode;
+ assertEquals("commandLink value", firstChildText.getData());
+
+ } catch(Exception ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ }
+ }
+
+ /**
+ * Test "CopyAllAttributesOperation".
+ */
+ public void testCopyAllAttributesOperation() {
+ try {
+ //get and test result element
+ Element resultElement = getResultElement(620, "h", "commandLink");
+ assertNotNull(resultElement);
+ assertEquals("a", resultElement.getLocalName());
+
+ //check attributes exist and have correct values
+ String attr1Value = resultElement.getAttribute("attr1");
+ assertEquals("attr1_value", attr1Value);
+ String attr2Value = resultElement.getAttribute("attr2");
+ assertEquals("attr2_value", attr2Value);
+
+ } catch(Exception ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ }
+ }
+
+ /**
+ * Test "CopyAttributeOperation".
+ */
+ public void testCopyAttributeOperation() {
+ try {
+ //get and test result element
+ Element resultElement = getResultElement(477, "h", "selectManyListbox");
+ assertNotNull(resultElement);
+ assertEquals("select", resultElement.getLocalName());
+
+ //check first child node exists and is correct node
+ Node firstChildNode = resultElement.getFirstChild();
+ assertTrue(firstChildNode instanceof Element);
+ Element firstChildElement = (Element)firstChildNode;
+ assertEquals("option", firstChildElement.getLocalName());
+
+ //check first child node has correct attribute with correct value
+ String valueAttrValue = firstChildElement.getAttribute("value");
+ assertEquals("selectItem_1", valueAttrValue);
+
+ } catch(Exception ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ }
+ }
+
+ /**
+ * Test "CopyChildrenOperation".
+ */
+ public void testCopyChildrenOperation() {
+ ContextWrapper wrapper = null;
+ try {
+ wrapper = getDocumentContext("/WebContent/Test_TransformOperations.jsp", 620);
+ ITagConverter tagConverter =
+ getTagConverter(wrapper, "h", "commandLink", IConverterFactory.MODE_DESIGNER);
+ assertNotNull(tagConverter);
+
+ //invoke ITagConverter instance
+ tagConverter.convertRefresh(null);
+
+ //test tag converter to ensure correct child element was copied to child node list
+ List<?> childNodes = tagConverter.getChildModeList();
+ assertTrue(childNodes.size() > 1);
+ Node secondChildNode = (Node)childNodes.get(1);
+ assertTrue(secondChildNode instanceof Element);
+ Element secondChildElement = (Element)secondChildNode;
+ assertEquals("f", secondChildElement.getPrefix());
+ assertEquals("actionListener", secondChildElement.getLocalName());
+
+ } catch(Exception ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ } finally {
+ if (wrapper != null) {
+ wrapper.dispose();
+ }
+ }
+ }
+
+ /**
+ * Test "CreateAttributeFromXPathOperation".
+ */
+ public void testCreateAttributeFromXPathOperation() {
+ try {
+ //get and test result element
+ Element resultElement = getResultElement(477, "h", "selectManyListbox");
+ assertNotNull(resultElement);
+ assertEquals("select", resultElement.getLocalName());
+
+ //check size attribute has been calculated and set
+ String sizeAttrValue = resultElement.getAttribute("size");
+ assertEquals("2", sizeAttrValue);
+
+ } catch(Exception ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ }
+ }
+
+ /**
+ * Test "CreateAttributeOperation".
+ */
+ public void testCreateAttributeOperation() {
+ try {
+ //get and test result element
+ Element resultElement = getResultElement(477, "h", "selectManyListbox");
+ assertNotNull(resultElement);
+ assertEquals("select", resultElement.getLocalName());
+
+ //check multiple attribute has been set
+ String multipleAttrValue = resultElement.getAttribute("multiple");
+ assertEquals("multiple", multipleAttrValue);
+
+ } catch(Exception ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ }
+ }
+
+ /**
+ * Test "CreateElementOperation".
+ */
+ public void testCreateElementOperation() {
+ try {
+ //get and test result element
+ Element resultElement = getResultElement(477, "h", "selectManyListbox");
+ assertNotNull(resultElement);
+ assertEquals("select", resultElement.getLocalName());
+
+ } catch(Exception ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ }
+ }
+
+ /**
+ * Test "IfNotOperation".
+ */
+ public void testIfNotOperation() {
+ try {
+ //get and test result element
+ Element resultElement = getResultElement(477, "h", "selectManyListbox");
+ assertNotNull(resultElement);
+ assertEquals("select", resultElement.getLocalName());
+
+ //check size attribute has been calculated and set (only occurs if the IfNotOperation is successful)
+ String sizeAttrValue = resultElement.getAttribute("size");
+ assertEquals("2", sizeAttrValue);
+
+ } catch(Exception ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ }
+ }
+
+ /**
+ * Test "IfOperation".
+ */
+ public void testIfOperation() {
+ try {
+ //get and test result element
+ Element resultElement = getResultElement(477, "h", "selectManyListbox");
+ assertNotNull(resultElement);
+ assertEquals("select", resultElement.getLocalName());
+
+ //check first child node exists and is correct node
+ Node firstChildNode = resultElement.getFirstChild();
+ assertTrue(firstChildNode instanceof Element);
+ Element firstChildElement = (Element)firstChildNode;
+ assertEquals("option", firstChildElement.getLocalName());
+
+ //check grandchild Text exists and has correct value (only occurs if the IfOperation is successful)
+ Node firstGrandChildNode = firstChildElement.getFirstChild();
+ assertTrue(firstGrandChildNode instanceof Text);
+ Text firstGrandChildText = (Text)firstGrandChildNode;
+ assertEquals("selectItem One", firstGrandChildText.getData());
+
+ } catch(Exception ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ }
+ }
+
+ /**
+ * Test "IterateOverElementsOperation".
+ */
+ public void testIterateOverElementsOperation() {
+ try {
+ //get and test result element
+ Element resultElement = getResultElement(477, "h", "selectManyListbox");
+ assertNotNull(resultElement);
+ assertEquals("select", resultElement.getLocalName());
+
+ //check two child nodes exist and are correct nodes
+ NodeList childNodes = resultElement.getChildNodes();
+ assertEquals(2, childNodes.getLength());
+ for (int i = 0; i < childNodes.getLength(); i++) {
+ Node childNode = childNodes.item(i);
+ assertTrue(childNode instanceof Element);
+ Element childElement = (Element)childNode;
+ assertEquals("option", childElement.getLocalName());
+ }
+
+ } catch(Exception ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ }
+ }
+
+ /**
+ * Test "MakeParentElementCurrentOperation".
+ */
+ public void testMakeParentElementCurrentOperation() {
+ try {
+ //get and test result element
+ Element resultElement = getResultElement(477, "h", "selectManyListbox");
+ assertNotNull(resultElement);
+ assertEquals("select", resultElement.getLocalName());
+
+ //check two child nodes exist and are correct nodes (only occurs if the MakeParentElementCurrentOperation is successful)
+ NodeList childNodes = resultElement.getChildNodes();
+ assertEquals(2, childNodes.getLength());
+ for (int i = 0; i < childNodes.getLength(); i++) {
+ Node childNode = childNodes.item(i);
+ assertTrue(childNode instanceof Element);
+ Element childElement = (Element)childNode;
+ assertEquals("option", childElement.getLocalName());
+ }
+
+ } catch(Exception ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ }
+ }
+
+ /**
+ * Test "RemoveAttributeOperation".
+ */
+ public void testRemoveAttributeOperation() {
+ try {
+ //get and test result element
+ Element resultElement = getResultElement(477, "h", "selectManyListbox");
+ assertNotNull(resultElement);
+ assertEquals("select", resultElement.getLocalName());
+
+ //check multiple attribute has been set
+ String multipleAttrValue = resultElement.getAttribute("multiple");
+ assertEquals("multiple", multipleAttrValue);
+
+ //remove multiple attribute and assert it no longer exists
+ ITransformOperation removeAttrOp =
+ TransformOperationFactory.getInstance().getTransformOperation(
+ TransformOperationFactory.OP_RemoveAttributeOperation,
+ new String[]{"multiple"});
+ removeAttrOp.transform(null, resultElement);
+ Node multipleAttrNode = resultElement.getAttributeNode("multiple");
+ assertNull(multipleAttrNode);
+
+ } catch(Exception ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ }
+ }
+
+ /**
+ * Test "RenameAttributeOperation".
+ */
+ public void testRenameAttributeOperation() {
+ try {
+ //get and test result element
+ Element resultElement = getResultElement(477, "h", "selectManyListbox");
+ assertNotNull(resultElement);
+ assertEquals("select", resultElement.getLocalName());
+
+ //check first child node exists and is correct node
+ Node firstChildNode = resultElement.getFirstChild();
+ assertTrue(firstChildNode instanceof Element);
+ Element firstChildElement = (Element)firstChildNode;
+ assertEquals("option", firstChildElement.getLocalName());
+
+ //check first child node has correct attribute with correct value
+ String valueAttrValue = firstChildElement.getAttribute("value");
+ assertEquals("selectItem_1", valueAttrValue);
+
+ } catch(Exception ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ }
+ }
+
+ private Element getResultElement(int docOffset, String prefix, String localName) throws Exception {
+ Element resultElement = null;
+ ContextWrapper wrapper = null;
+ try {
+ wrapper = getDocumentContext("/WebContent/Test_TransformOperations.jsp", docOffset);
+ ITagConverter tagConverter =
+ getTagConverter(wrapper, prefix, localName, IConverterFactory.MODE_DESIGNER);
+
+ if (tagConverter != null) {
+ //invoke ITagConverter instance
+ tagConverter.convertRefresh(null);
+
+ //get result element
+ resultElement = tagConverter.getResultElement();
+ } else {
+ System.out.printf("%s getTagConverter(...) returned null for %s:%s at document offset %d\n", OUTPUT_PREFIX, prefix, localName, docOffset);
+ }
+ } finally {
+ if (wrapper != null) {
+ wrapper.dispose();
+ }
+ }
+ return resultElement;
+ }
+
+ private ITagConverter getTagConverter(ContextWrapper wrapper, String prefix,
+ String localName, int mode) throws Exception {
+ ITagConverter tagConverter = null;
+ IStructuredDocumentContext context = wrapper.getContext();
+ IDOMContextResolver resolver =
+ IStructuredDocumentContextResolverFactory.INSTANCE.
+ getDOMContextResolver(context);
+
+ //get Element
+ Node node = resolver.getNode();
+ if (node instanceof Element
+ && node.getPrefix().equals(prefix)
+ && node.getLocalName().equals(localName)) {
+
+ Element element = (Element)node;
+
+ //get IDOMDocument
+ IStructuredModel model = wrapper.getModel();
+ if (model instanceof IDOMModel) {
+ IDOMDocument document = ((IDOMModel)model).getDocument();
+ if (document != null) {
+
+ //get ITagConverter instance
+ tagConverter = DTManager.getInstance().getTagConverter(
+ element,
+ mode,
+ document);
+ } else {
+ System.out.printf("%s model.getDocument() returned null for %s:%s\n", OUTPUT_PREFIX, prefix, localName);
+ }
+ } else {
+ System.out.printf("%s wrapper.getModel() returned unexpected result for %s:%s\n", OUTPUT_PREFIX, prefix, localName);
+ }
+ } else {
+ if (node instanceof Element) {
+ if (node.getPrefix().equals(prefix)) {
+ if (!node.getLocalName().equals(localName)) {
+ System.out.printf("%s resolver.getNode().getLocalName() is incorrect for %s:%s\n", OUTPUT_PREFIX, prefix, localName);
+ }
+ } else {
+ System.out.printf("%s resolver.getNode().getPrefix() is incorrect for %s:%s\n", OUTPUT_PREFIX, prefix, localName);
+ }
+ } else {
+ if (node != null) {
+ if (node instanceof Text) {
+ System.out.printf("%s resolver.getNode() returned Text (\"%s\") instead of Element for %s:%s\n", OUTPUT_PREFIX, ((Text)node).getNodeValue(), prefix, localName);
+ } else {
+ System.out.printf("%s resolver.getNode() returned %s (when Element was expected) for %s:%s\n", OUTPUT_PREFIX, node.getClass().getName(), prefix, localName);
+ }
+ } else {
+ System.out.printf("%s resolver.getNode() returned null for %s:%s\n", OUTPUT_PREFIX, prefix, localName);
+ }
+ }
+ }
+
+ return tagConverter;
+ }
+
+ private ContextWrapper getDocumentContext(String path, int offset) throws Exception {
+ IProject project = webProjectTestEnv.getTestProject();
+ IFile jspFile = project.getFile(new Path(path));
+ assertTrue(jspFile.exists());
+ final IModelManager modelManager =
+ StructuredModelManager.getModelManager();
+ IStructuredModel model = null;
+ model = modelManager.getModelForRead(jspFile);
+ assertTrue(model instanceof DOMModelForJSP);
+ final IStructuredDocumentContext context =
+ IStructuredDocumentContextFactory.INSTANCE.getContext(
+ model.getStructuredDocument(),
+ offset);
+ return new ContextWrapper(context, model);
+ }
+
+ private static class ContextWrapper {
+ private final IStructuredDocumentContext context;
+ private final IStructuredModel model;
+ ContextWrapper(final IStructuredDocumentContext context, final IStructuredModel model) {
+ super();
+ this.context = context;
+ this.model = model;
+ }
+ IStructuredDocumentContext getContext() {
+ return context;
+ }
+ IStructuredModel getModel() {
+ return model;
+ }
+ void dispose() {
+ model.releaseFromRead();
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/Utils.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/Utils.java
new file mode 100644
index 000000000..40656f0ba
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/Utils.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * 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.pagedesigner.tests;
+
+
+/**
+ * Web Page Editor test utilities.
+ *
+ * @author Ian Trimble - Oracle
+ */
+public class Utils
+{
+ // prior logic moved to JSFCoreUtilHelper
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tabbed/properties/sections/BaseTestCase.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tabbed/properties/sections/BaseTestCase.java
new file mode 100644
index 000000000..bf70f8712
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tabbed/properties/sections/BaseTestCase.java
@@ -0,0 +1,248 @@
+/*******************************************************************************
+ * 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.pagedesigner.tests.tabbed.properties.sections;
+
+import java.io.IOException;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+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.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.JSFTestUtil;
+import org.eclipse.jst.jsf.test.util.WebProjectTestEnvironment;
+import org.eclipse.jst.jsp.core.internal.domdocument.DOMModelForJSP;
+import org.eclipse.jst.pagedesigner.editors.HTMLEditor;
+import org.eclipse.jst.pagedesigner.properties.WPETabbedPropertySheetPage;
+import org.eclipse.jst.pagedesigner.tests.PageDesignerTestsPlugin;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.views.properties.IPropertySheetPage;
+import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor;
+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.Node;
+
+public class BaseTestCase extends TestCase {
+ private static final String HTML_EDITOR_ID = "org.eclipse.jst.pagedesigner.PageDesignerEditor";
+ protected WebProjectTestEnvironment _webProjectTestEnv;
+ protected WebProjectTestEnvironment _webProjectTestEnv2;
+
+ @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());
+
+ _webProjectTestEnv.loadResourceInWebRoot(PageDesignerTestsPlugin.getDefault().getBundle()
+ , "/testdata/propertypages/testPropPages.tld.data"
+ , "/META-INF/testPropPages.tld");
+
+ final JSFFacetedTestEnvironment jsfFacetedTestEnv = new JSFFacetedTestEnvironment(
+ _webProjectTestEnv);
+ jsfFacetedTestEnv.initialize(IJSFCoreConstants.FACET_VERSION_1_1);
+
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(JSFCoreUtilHelper.createSimpleRegistryFactory());
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(null);
+ super.tearDown();
+ }
+
+ protected IFile getJSPFile(String srcFileName, String destFileName) throws IOException, CoreException {
+ return getJSPFile(srcFileName, destFileName, _webProjectTestEnv);
+ }
+
+ private IFile getJSPFile(String srcFileName, String destFileName, WebProjectTestEnvironment webProjectTestEnv) throws IOException, CoreException {
+ return (IFile)webProjectTestEnv.loadResourceInWebRoot(
+ PageDesignerTestsPlugin.getDefault().getBundle(),
+ srcFileName, destFileName);
+
+ }
+ protected IFile getJSPFileFromSecondProject(String srcFileName, String destFileName) throws IOException, CoreException {
+
+
+ _webProjectTestEnv2 = new WebProjectTestEnvironment(
+ getClass().getName()+"_" + getName()+"_2");
+ _webProjectTestEnv2.createProject(false);
+ assertNotNull(_webProjectTestEnv2);
+ assertNotNull(_webProjectTestEnv2.getTestProject());
+ assertTrue(_webProjectTestEnv2.getTestProject().isAccessible());
+
+ _webProjectTestEnv2.loadResourceInWebRoot(PageDesignerTestsPlugin.getDefault().getBundle()
+ , "/testdata/propertypages/testPropPages.tld.data"
+ , "/META-INF/testPropPages.tld");
+
+
+ return getJSPFile(srcFileName, destFileName, _webProjectTestEnv2);
+ }
+
+ private ContextWrapper getDocumentContext(IFile jspFile, int offset) throws Exception {
+ assertTrue(jspFile.exists());
+ final IModelManager modelManager =
+ StructuredModelManager.getModelManager();
+ IStructuredModel model = null;
+ model = modelManager.getModelForRead(jspFile);
+ assertTrue(model instanceof DOMModelForJSP);
+ final IStructuredDocumentContext context =
+ IStructuredDocumentContextFactory.INSTANCE.getContext(
+ model.getStructuredDocument(),
+ offset);
+ return new ContextWrapper(context, model);
+ }
+
+ protected IStructuredSelection getSelection(Node node){
+ return new StructuredSelection(node);
+ }
+
+ protected ITabbedPropertySheetPageContributor getTabbedPropertyCont() {
+ return new ITabbedPropertySheetPageContributor(){
+
+ public String getContributorId() {
+ return HTMLEditor.TABBED_PROPERTIES_CONTRIBUTOR_ID;
+ }
+ };
+ }
+
+ protected WPETabbedPropertySheetPage getWPETabbedPropertySheetPage(HTMLEditor ed){
+ return (WPETabbedPropertySheetPage)ed.getAdapter(IPropertySheetPage.class);
+// return new MockWPETabbedPropertySheet(getTabbedPropertyCont(), ed);
+ }
+
+ protected HTMLEditor openHTMLEditor(IFile file) {
+ IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ assertNotNull(workbenchWindow);
+ IWorkbenchPage workbenchPage = workbenchWindow.getActivePage();
+ try {
+ IEditorInput input = new FileEditorInput(file);
+ IEditorPart editor = workbenchPage.openEditor(input, HTML_EDITOR_ID);
+ assertTrue("An error condition has occurred probably due to an out of an memory exception.", editor instanceof HTMLEditor);
+ return (HTMLEditor)editor;
+ } catch (PartInitException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ protected IEditorPart openXSDEditor(IFile file) {
+ IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ assertNotNull(workbenchWindow);
+ IWorkbenchPage workbenchPage = workbenchWindow.getActivePage();
+ try {
+ IEditorInput input = new FileEditorInput(file);
+ return workbenchPage.openEditor(input, "org.eclipse.wst.xsd.ui.internal.editor.InternalXSDMultiPageEditor");
+ } catch (PartInitException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ protected IViewPart showPropertiesView() {
+ IWorkbenchPage workbenchPage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ IViewPart view = null;
+ try {
+ view = workbenchPage.showView(IPageLayout.ID_PROP_SHEET);
+ } catch (PartInitException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return view;
+
+ }
+
+ protected Node getNode(IFile file, int offset) throws Exception {
+ ContextWrapper wrapper = null;
+ Node node = null;
+ try {
+ wrapper = getDocumentContext(file, offset);
+ assertNotNull(wrapper);
+ IStructuredDocumentContext context = wrapper.getContext();
+ IDOMContextResolver resolver =
+ IStructuredDocumentContextResolverFactory.INSTANCE.
+ getDOMContextResolver(context);
+ node = resolver.getNode();
+ } finally {
+ if (wrapper != null)
+ wrapper.dispose();
+ }
+ return node;
+ }
+
+ protected void closeEditor(final IEditorPart ed) {
+ IWorkbenchPage page = ed.getEditorSite().getPage();
+ page.closeEditor(ed, false);
+ }
+
+ public static class ContextWrapper
+ {
+ private final IStructuredDocumentContext context;
+ private final IStructuredModel model;
+
+ public ContextWrapper(final IStructuredDocumentContext context,
+ final IStructuredModel model) {
+ super();
+ this.context = context;
+ this.model = model;
+ }
+
+ public IStructuredDocumentContext getContext() {
+ return context;
+ }
+
+ public IStructuredModel getModel() {
+ return model;
+ }
+
+
+ void dispose()
+ {
+ model.releaseFromRead();
+ }
+ }
+
+// private class LifecycleListener implements ITestTracker {
+//
+// public void fireEvent(Event event, long seqId, String eventLabel) {
+//
+//
+// }
+//
+// }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tabbed/properties/sections/BasicTabbedPropertyPageTests.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tabbed/properties/sections/BasicTabbedPropertyPageTests.java
new file mode 100644
index 000000000..574a85d3c
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tabbed/properties/sections/BasicTabbedPropertyPageTests.java
@@ -0,0 +1,317 @@
+/*******************************************************************************
+ * 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.pagedesigner.tests.tabbed.properties.sections;
+
+
+import java.io.IOException;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jst.jsf.common.ui.internal.dialogfield.DialogField;
+import org.eclipse.jst.pagedesigner.editors.HTMLEditor;
+import org.eclipse.jst.pagedesigner.editors.properties.IPropertyPageDescriptor;
+import org.eclipse.jst.pagedesigner.properties.internal.AttributeGroupSection;
+import org.eclipse.jst.pagedesigner.properties.internal.NullQuickEditTabSection;
+import org.eclipse.jst.pagedesigner.properties.internal.QuickEditTabManager;
+import org.eclipse.jst.pagedesigner.properties.internal.QuickEditTabSectionsDescriptor;
+import org.eclipse.jst.pagedesigner.ui.dialogfields.DialogFieldWrapper;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.views.properties.tabbed.ISection;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+public class BasicTabbedPropertyPageTests extends BaseTestCase {
+ public void testSanity() {
+ HTMLEditor ed = null;
+ try {
+
+ final IFile file = getJSPFile("/testdata/propertypages/testPropertyPage.jsp.data", "/testPropertyPage.jsp");
+ assertNotNull(file);
+
+ IViewPart view = showPropertiesView();
+ assertNotNull(view);
+ ed = openHTMLEditor(file);
+ assertNotNull(ed);
+
+ Node node = getNode(file, 425);
+ assertTrue(node instanceof Element);
+ assertEquals("tagWithQuickEditMD", node.getLocalName());
+
+ ISelection sel = getSelection(node);
+ view.getViewSite().getSelectionProvider().setSelection(sel);
+ ISelection selection = view.getViewSite().getSelectionProvider().getSelection();
+ assertEquals(sel, selection);
+
+ } catch(Exception ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ } finally {
+ if (ed != null)
+ closeEditor(ed);
+ }
+ }
+
+
+ /**
+ * A little white-box testing covering basic sanity of the framework
+ * including sanity check of ITagAttributeCellEditorFactory
+ */
+ public void testQuickEditTabManager() {
+ IFile file = null;
+ QuickEditTabManager mgr = null;
+ HTMLEditor ed = null;
+ try {
+ file = getJSPFile("/testdata/propertypages/testPropertyPage.jsp.data", "/testPropertyPage.jsp");
+ assertNotNull(file);
+ ed = openHTMLEditor(file);
+ assertNotNull(ed);
+ showPropertiesView();
+ mgr = getWPETabbedPropertySheetPage(ed).getTabManager();
+ assertNotNull(mgr);
+
+ //Node with QuickEdit MD
+ Node node1 = getNode(file, 425);
+ ISelection selection = getSelection(node1);
+ mgr.selectionChanged(ed, selection);
+ QuickEditTabSectionsDescriptor tsg1 = mgr.getCurrentTabGroupDescriptor();
+ assertNotNull("QuickEditTabSectionsDescriptor was null for Qtag with QE MD", tsg1);
+
+ List<ISection> sections = tsg1.getSections();
+ assertEquals("Expected 3 sections for tag qith QE MD", 3, sections.size());
+ //check for expected sections
+ //section 1 is a section group with 3 attributes
+ ISection sec = sections.get(0);
+ assertTrue("section was not AttributeGroupSection", sec instanceof AttributeGroupSection);
+ //check expected DialogFields
+ DialogField[] fields = ((AttributeGroupSection)sec).getAttributeGroup().getDialogFields();
+ assertEquals("Expecting 4 dialog fields for the 4 attributes", 4, fields.length);
+
+ //check dialog fields - sanity check of tag attribute cell editor factory
+ //aBoolean
+ DialogField fld = fields[0];
+ assertTrue("IPropertyPageDescriptor not located for tagWithQuickEditMD", fld.getAttachedData("KEY_ATTR") instanceof IPropertyPageDescriptor);
+ IPropertyPageDescriptor ppd = (IPropertyPageDescriptor)fld.getAttachedData("KEY_ATTR");
+ assertEquals("aBoolean", ppd.getAttributeName());
+ assertTrue("aBoolean fld should be a DialogFieldWrapper", fld instanceof DialogFieldWrapper);
+ assertTrue("aBoolean should be a MDEnabledComboDialogField", ((DialogFieldWrapper)fld).getWrappedDialogField().getClass().getName().equals("org.eclipse.jst.pagedesigner.properties.dialogfields.MDEnabledComboDialogField"));
+
+ //aStyle
+ fld = fields[1];
+ assertEquals("aStyle", ((IPropertyPageDescriptor)fld.getAttachedData("KEY_ATTR")).getAttributeName());
+ assertTrue("aStyle should be a StyleButtonDialogField", ((DialogFieldWrapper)fld).getWrappedDialogField().getClass().getName().equals("org.eclipse.jst.pagedesigner.ui.dialogfields.StyleButtonDialogField"));
+
+ //aStringPropWithMd
+ fld = fields[2];
+ assertEquals("aStringPropWithMd", ((IPropertyPageDescriptor)fld.getAttachedData("KEY_ATTR")).getAttributeName());
+ assertTrue("aStringPropWithMd should be a MDEnabledComboDialogField", ((DialogFieldWrapper)fld).getWrappedDialogField().getClass().getName().equals("org.eclipse.jst.pagedesigner.properties.dialogfields.MDEnabledComboDialogField"));
+
+ //aStringPropNoMd
+ fld = fields[3];
+ assertEquals("aStringPropNoMd", ((IPropertyPageDescriptor)fld.getAttachedData("KEY_ATTR")).getAttributeName());
+ assertTrue("aStringPropNoMd should be a StringDialogField", ((DialogFieldWrapper)fld).getWrappedDialogField().getClass().getName().equals("org.eclipse.jst.jsf.common.ui.internal.dialogfield.StringDialogField"));
+
+ ///
+
+ //2nd section in tabSectionDesc
+ sec = sections.get(1);
+ assertTrue("section was not FakePropertySection", sec instanceof FakePropertySection);
+ //
+ sec = sections.get(2);
+ assertTrue("section was not FakePropertySectionUsingDialogField", sec instanceof FakePropertySectionUsingDialogField);
+
+ //Node without QuickEdit MD
+ Node node2 = getNode(file, 475);
+ selection = getSelection(node2);
+ mgr.selectionChanged(ed, selection);
+ QuickEditTabSectionsDescriptor tsg2 = mgr.getCurrentTabGroupDescriptor();
+ assertNotNull("QuickEditTabSectionsDescriptor was null", tsg2);
+
+ sections = tsg2.getSections();
+ assertEquals("Expected single section", 1, sections.size());
+ //check for expected sections
+ sec = sections.get(0);
+ assertTrue("section was not NullQuickEditTabSection", sec instanceof NullQuickEditTabSection);
+
+ //set back to QuikEditMD node... should be same descriptor
+ selection = getSelection(node1);
+ mgr.selectionChanged(ed, selection);
+ assertSame("Desc w/MD not same", tsg1, mgr.getCurrentTabGroupDescriptor());
+
+ //null desc
+ selection = getSelection(node2);
+ mgr.selectionChanged(ed, selection);
+ assertSame("Desc wo/MD not same", tsg2, mgr.getCurrentTabGroupDescriptor());
+
+ //test tag with bad QE MD
+ Node node3 = getNode(file, 530);
+ selection = getSelection(node3);
+ mgr.selectionChanged(ed, selection);
+ QuickEditTabSectionsDescriptor tsg3 = mgr.getCurrentTabGroupDescriptor();
+ assertNotNull("QuickEditTabSectionsDescriptor was null for Qtag with bad QE MD", tsg3);
+
+ sections = tsg3.getSections();
+ assertEquals("Expected 2 sections for tag with bad QE MD", 2, sections.size());//missing section is skipped
+ //check for expected sections
+ //section 1 is a section group with 2 attributes. One bad attr was skipped
+ sec = sections.get(0);
+ assertTrue("section was not AttributeGroupSection", sec instanceof AttributeGroupSection);
+ //
+ sec = sections.get(1);
+ assertTrue("section was not FakePropertySectionUsingDialogField", sec instanceof FakePropertySectionUsingDialogField);
+
+ } catch (IOException ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ } catch (CoreException ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ } finally {
+ mgr = null;
+ if (ed != null)
+ closeEditor(ed);
+
+ }
+ }
+
+ public void testMultipleJSPs(){
+ QuickEditTabManager mgr1 = null;
+ QuickEditTabManager mgr2 = null;
+ HTMLEditor ed1 = null;
+ HTMLEditor ed2 = null;
+ try {
+ IFile file = getJSPFile("/testdata/propertypages/testPropertyPage.jsp.data", "/testPropertyPage.jsp");
+ assertNotNull(file);
+ ed1 = openHTMLEditor(file);
+ assertNotNull(ed1);
+ showPropertiesView();
+ mgr1 = getWPETabbedPropertySheetPage(ed1).getTabManager();
+ assertNotNull(mgr1);
+
+ //Node with QuickEdit MD
+ Node node1 = getNode(file, 425);
+ ISelection selection = getSelection(node1);
+ mgr1.selectionChanged(ed1, selection);
+ QuickEditTabSectionsDescriptor tsg1 = mgr1.getCurrentTabGroupDescriptor();
+ assertNotNull(tsg1);
+
+ //open 2nd page
+ file = getJSPFile("/testdata/propertypages/testPropertyPage.jsp.data", "/testPropertyPage2.jsp");
+ assertNotNull(file);
+ ed2 = openHTMLEditor(file);
+ assertNotNull(ed2);
+ showPropertiesView();
+ mgr2 = getWPETabbedPropertySheetPage(ed2).getTabManager();
+ assertNotNull(mgr2);
+
+ //Manager instances should be the same for different WPE instances within same project
+ assertSame("Manager instances should be the same for different WPE instances within same project", mgr1.getQuickEditTabSectionsManager(), mgr2.getQuickEditTabSectionsManager());
+
+ Node node2 = getNode(file, 425);
+ selection = getSelection(node2);
+ mgr2.selectionChanged(ed2, selection);
+ QuickEditTabSectionsDescriptor tsg2= mgr2.getCurrentTabGroupDescriptor();
+ assertSame("section descriptor for tag on different pages should be the same", tsg1, tsg2);
+
+
+ } catch (IOException ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ } catch (CoreException ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ } finally {
+ mgr1 = null;
+ mgr2 = null;
+ if (ed1 != null) {
+ closeEditor(ed1);
+ ed1 = null;
+ }
+ if (ed2 != null){
+ //should cause disposal of QuickEditTabManager and SectionManager
+ closeEditor(ed2);
+ ed2 = null;
+ }
+ }
+ }
+
+ public void testMultiProject() {
+ QuickEditTabManager mgr1 = null;
+ QuickEditTabManager mgr2 = null;
+ HTMLEditor ed1 = null;
+ HTMLEditor ed2 = null;
+ try {
+ IFile file = getJSPFile("/testdata/propertypages/testPropertyPage.jsp.data", "/testPropertyPage.jsp");
+ assertNotNull(file);
+ ed1 = openHTMLEditor(file);
+ assertNotNull(ed1);
+ showPropertiesView();
+ mgr1 = getWPETabbedPropertySheetPage(ed1).getTabManager();
+ assertNotNull(mgr1);
+
+ //Node with QuickEdit MD
+ Node node1 = getNode(file, 425);
+ ISelection selection = getSelection(node1);
+ mgr1.selectionChanged(ed1, selection);
+ QuickEditTabSectionsDescriptor tsg1 = mgr1.getCurrentTabGroupDescriptor();
+ assertNotNull(tsg1);
+
+ //open 2nd page from second project
+ file = getJSPFileFromSecondProject("/testdata/propertypages/testPropertyPage.jsp.data", "/testPropertyPage2.jsp");
+ assertNotNull(file);
+ ed2 = openHTMLEditor(file);
+ assertNotNull(ed2);
+ showPropertiesView();
+ mgr2 = getWPETabbedPropertySheetPage(ed2).getTabManager();
+ assertNotNull(mgr2);
+
+ //Manager instances should be the DIFFERENT for different WPE instances within DIFFERENT projects
+ assertNotSame("Should have different QuickEditMgrInstances for different projects", mgr1.getQuickEditTabSectionsManager(), mgr2.getQuickEditTabSectionsManager());
+
+ Node node2 = getNode(file, 425);
+ selection = getSelection(node2);
+ mgr2.selectionChanged(ed2, selection);
+ QuickEditTabSectionsDescriptor tsg2= mgr2.getCurrentTabGroupDescriptor();
+ assertNotSame("section descriptor for tag on different pages from different projects should be different", tsg1, tsg2);
+
+ } catch (IOException ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ } catch (CoreException ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ fail(ex.getLocalizedMessage());
+ } finally {
+ mgr1 = null;
+ mgr2 = null;
+ if (ed1 != null) {
+ //should cause disposal of QuickEditTabManager and SectionManager
+ closeEditor(ed1);
+ ed1 = null;
+ }
+ if (ed2 != null){
+ //should cause disposal of QuickEditTabManager and SectionManager
+ closeEditor(ed2);
+ ed2 = null;
+ }
+ }
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tabbed/properties/sections/FakePropertySection.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tabbed/properties/sections/FakePropertySection.java
new file mode 100644
index 000000000..1321ed119
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tabbed/properties/sections/FakePropertySection.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * 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.pagedesigner.tests.tabbed.properties.sections;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jst.pagedesigner.properties.DesignerPropertyTool;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+
+/**
+ * Fake section for testing.... remove
+ * Binds to "type" attribute if present on an element
+ *
+ */
+public class FakePropertySection extends AbstractPropertySection {
+
+ private Text txt;
+ private Attr typeAttr;
+ /**
+ * Constructor
+ */
+ public FakePropertySection() {
+ // TODO Auto-generated constructor stub
+ }
+
+ @Override
+ public void createControls(final Composite parent,
+ TabbedPropertySheetPage tabbedPropertySheetPage) {
+
+ super.createControls(parent, tabbedPropertySheetPage);
+ TabbedPropertySheetWidgetFactory factory = tabbedPropertySheetPage.getWidgetFactory();
+
+ Composite outer = factory.createComposite(parent);
+ GridLayout gl = new GridLayout();
+ gl.numColumns = 2;
+ gl.marginTop = 0;
+ gl.marginBottom = 0;
+ outer.setLayout(gl);
+ //
+ CLabel lbl = factory.createCLabel(outer, "TYPE:", SWT.NONE);
+ lbl.setLayoutData(new GridData());
+
+ txt = factory.createText(outer, "");
+ GridData gd = new GridData();
+ gd.verticalAlignment = SWT.TOP;
+ gd.grabExcessHorizontalSpace = true;
+ txt.setLayoutData(gd);
+
+ }
+
+ @Override
+ public void setInput(IWorkbenchPart part, ISelection selection) {
+ super.setInput(part, selection);
+ Element node = DesignerPropertyTool.getElement(part, selection);
+ if (node != null){
+ typeAttr = node.getAttributeNode("type");
+ if (typeAttr != null){
+ txt.setText(typeAttr.getValue());
+ txt.addKeyListener(new KeyListener(){
+
+ public void keyPressed(KeyEvent e) {
+ //
+ }
+
+ public void keyReleased(KeyEvent e) {
+ typeAttr.setValue(typeAttr.getValue()+ new String(new char[]{e.character}));
+ }
+
+ });
+ }
+ }
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tabbed/properties/sections/FakePropertySectionUsingDialogField.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tabbed/properties/sections/FakePropertySectionUsingDialogField.java
new file mode 100644
index 000000000..84ad38e8e
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tabbed/properties/sections/FakePropertySectionUsingDialogField.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * 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.pagedesigner.tests.tabbed.properties.sections;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jst.jsf.common.ui.internal.dialogfield.DialogField;
+import org.eclipse.jst.jsf.common.ui.internal.dialogfield.IDialogFieldApplyListener;
+import org.eclipse.jst.jsf.common.ui.internal.dialogfield.IDialogFieldChangeListener;
+import org.eclipse.jst.jsf.common.ui.internal.dialogfield.ISupportTextValue;
+import org.eclipse.jst.jsf.common.ui.internal.dialogfield.StringDialogField;
+import org.eclipse.jst.pagedesigner.jsf.ui.attributegroup.DialogFieldFactory;
+import org.eclipse.jst.pagedesigner.properties.BaseCustomSection;
+import org.eclipse.jst.pagedesigner.properties.DesignerPropertyTool;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
+import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+
+/**
+ * Fake section for testing.... remove
+ * Binds to "type" attribute if present on element
+ *
+ */
+public class FakePropertySectionUsingDialogField extends BaseCustomSection {
+//
+// private Text txt;
+ private Attr typeAttr;
+ private DialogField field;
+ private TabbedPropertySheetWidgetFactory factory;
+ private Composite outer;
+ /**
+ * Constructor
+ */
+ public FakePropertySectionUsingDialogField() {
+ // TODO Auto-generated constructor stub
+ }
+
+ @Override
+ public void createControls(final Composite parent,
+ TabbedPropertySheetPage tabbedPropertySheetPage) {
+
+ super.createControls(parent, tabbedPropertySheetPage);
+ factory = tabbedPropertySheetPage.getWidgetFactory();
+
+ outer = factory.createComposite(parent, SWT.NONE);
+ GridLayout gl = new GridLayout();
+ gl.numColumns = 3;
+ gl.marginTop = 0;
+ gl.marginBottom = 0;
+ outer.setLayout(gl);
+
+ field = new StringDialogField();
+ GridData gd = new GridData();
+ gd.grabExcessHorizontalSpace = true;
+ gd.horizontalSpan = 2;
+ field.doFillIntoGrid(factory, outer, 3);
+ ((StringDialogField)field).getTextControl(factory, outer).setLayoutData(gd);
+ field.setLabelText("TYPETESTDIALOGFIELD:");
+
+ }
+
+ @Override
+ public void setInput(IWorkbenchPart part, ISelection selection) {
+ super.setInput(part, selection);
+ Element node = DesignerPropertyTool.getElement(part, selection);
+ if (node != null){
+ typeAttr = node.getAttributeNode("type");
+ if (typeAttr != null){
+ DialogFieldFactory.setDialogFieldValue(field, typeAttr.getValue());
+ field.setDialogFieldApplyListener(new IDialogFieldApplyListener(){
+
+ public void dialogFieldApplied(DialogField field) {
+ typeAttr.setValue(((ISupportTextValue)field).getText());
+ }
+ });
+ field.setDialogFieldChangeListener(new IDialogFieldChangeListener(){
+
+ public void dialogFieldChanged(DialogField field) {
+ //
+ }
+ });
+
+ };
+ }
+ }
+
+ @Override
+ protected void notifyChanged(INodeNotifier notifier, int eventType,
+ Object changedFeature, Object oldValue, Object newValue, int pos) {
+ if (field != null && changedFeature.toString().equalsIgnoreCase("type") ){
+ ((ISupportTextValue)field).setTextWithoutUpdate((String)newValue);
+ }
+
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/BaseDefaultTagCreatorTestCase.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/BaseDefaultTagCreatorTestCase.java
new file mode 100644
index 000000000..11cfe3e6a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/BaseDefaultTagCreatorTestCase.java
@@ -0,0 +1,26 @@
+package org.eclipse.jst.pagedesigner.tests.tagcreator;
+
+import org.eclipse.jst.jsf.common.dom.TagIdentifier;
+import org.eclipse.jst.pagedesigner.itemcreation.ITagCreator;
+import org.eclipse.jst.pagedesigner.itemcreation.internal.TagCreationFactory;
+import org.eclipse.jst.pagedesigner.tests.tagcreator.base.BaseTagCreatorTestCase;
+
+/**
+ * Base test case for tag creation using DefaultTagCreator
+ *
+ * @author Debajit Adhikary
+ */
+public class BaseDefaultTagCreatorTestCase extends BaseTagCreatorTestCase {
+
+ public BaseDefaultTagCreatorTestCase(String defaultPrefix, String compareDataSubDir)
+ {
+ super(defaultPrefix, compareDataSubDir);
+ }
+
+ @Override
+ protected ITagCreator getTagCreator(TagIdentifier tagId)
+ {
+ return TagCreationFactory.getInstance().createTagCreator(tagId);
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/BaseUserCustomizedTagCreatorTestCase.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/BaseUserCustomizedTagCreatorTestCase.java
new file mode 100644
index 000000000..72c19602c
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/BaseUserCustomizedTagCreatorTestCase.java
@@ -0,0 +1,102 @@
+package org.eclipse.jst.pagedesigner.tests.tagcreator;
+
+import org.eclipse.jst.jsf.common.dom.TagIdentifier;
+import org.eclipse.jst.pagedesigner.editors.palette.ITagDropSourceData;
+import org.eclipse.jst.pagedesigner.editors.palette.TagToolCreationAdapter;
+import org.eclipse.jst.pagedesigner.editors.palette.TagToolPaletteEntry;
+import org.eclipse.jst.pagedesigner.editors.palette.impl.PaletteItemManager;
+import org.eclipse.jst.pagedesigner.editors.palette.impl.TaglibPaletteDrawer;
+import org.eclipse.jst.pagedesigner.itemcreation.ITagCreator;
+import org.eclipse.jst.pagedesigner.itemcreation.internal.UserCustomizedTagCreator;
+import org.eclipse.jst.pagedesigner.tests.tagcreator.base.BaseTagCreatorTestCase;
+import org.eclipse.jst.pagedesigner.tests.tagcreatorPlugin.UserCustomizedElementEditFactory;
+
+/**
+ * Base test case for a UserCustomizedTagCreator.
+ *
+ * @author Debajit Adhikary
+ *
+ */
+public class BaseUserCustomizedTagCreatorTestCase extends BaseTagCreatorTestCase
+{
+ /** Label for mock category to be added to the JSF tools palette (for testing only) */
+ private static final String CATEGORY_LABEL = "Category label (for testing only)";
+
+ /** Label for mock tag to be added to the JSF tools palette (for testing only) */
+ private static final String TAG_LABEL = "User Customized Tag";
+
+ /** Label for description for mock tag added to the JSF tools palette (for testing only) */
+ private static final String TAG_DESCRIPTION_SHORT = "User Customized Tag (for testing only)";
+
+
+ public BaseUserCustomizedTagCreatorTestCase()
+ {
+ super("h", "jsf");
+ }
+
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+
+ @Override
+ protected void initializePaletteItemManager(PaletteItemManager pim) {
+
+ // Setup mock (user-customized) tags.
+ // In the current implementation, this requires setting up a tool palette
+ // category, and adding the tag(s) to the tool palette. Only then can the
+ // tag be inserted.
+
+ final TaglibPaletteDrawer category = pim
+ .findOrCreateCategory(UserCustomizedElementEditFactory.TAGCREATOR_URI_1, CATEGORY_LABEL);
+ assertNotNull(category);
+ addItemsToCategory(category);
+
+ }
+
+
+ private void addItemsToCategory(TaglibPaletteDrawer category) {
+ if (category.getChildren().size() == 0) {
+ addTagToPaletteCategory(UserCustomizedElementEditFactory.TAG1, category);
+ addTagToPaletteCategory(UserCustomizedElementEditFactory.TAG2, category);
+ addTagToPaletteCategory(UserCustomizedElementEditFactory.TAG3, category);
+ addTagToPaletteCategory(UserCustomizedElementEditFactory.TAG4, category);
+ addTagToPaletteCategory(UserCustomizedElementEditFactory.TAG5, category);
+ addTagToPaletteCategory(UserCustomizedElementEditFactory.TAG6, category);
+ addTagToPaletteCategory(UserCustomizedElementEditFactory.TAG7, category);
+ addTagToPaletteCategory(UserCustomizedElementEditFactory.TAG8, category);
+ addTagToPaletteCategory(UserCustomizedElementEditFactory.TAG9, category);
+ }
+ }
+
+ @Override
+ protected ITagCreator getTagCreator(TagIdentifier tagId)
+ {
+ return new UserCustomizedTagCreator();
+ }
+
+
+ /**
+ * Adds a tag to a section in the tool palette.
+ *
+ * @param tagId
+ * TagIdentifier of tag to add
+ * @param category
+ * Category in the tool palette
+ *
+ */
+ @SuppressWarnings("unchecked")
+ private final void addTagToPaletteCategory(final TagIdentifier tagId,
+ final TaglibPaletteDrawer category)
+ {
+ final ITagDropSourceData tagDropSourceData = new TagToolCreationAdapter(
+ tagId.getUri(), tagId.getTagName(),
+ category.getDefaultPrefix(), tagId.getTagName());
+ final TagToolPaletteEntry paletteItem = new TagToolPaletteEntry(
+ tagDropSourceData, TAG_LABEL, TAG_DESCRIPTION_SHORT, null, null);
+ category.getChildren().add(paletteItem);
+ paletteItem.setParent(category);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorForJSFCore.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorForJSFCore.java
new file mode 100644
index 000000000..fe32cf19a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorForJSFCore.java
@@ -0,0 +1,165 @@
+/*******************************************************************************
+ * 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.pagedesigner.tests.tagcreator;
+
+import org.eclipse.jst.jsf.core.internal.tld.IJSFConstants;
+
+public class TestDefaultTagCreatorForJSFCore extends BaseDefaultTagCreatorTestCase
+{
+ public TestDefaultTagCreatorForJSFCore()
+ {
+ super("f", "jsf");
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ }
+
+ public void testCreateActionListener() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_ACTIONLISTENER, "jsp", "jsp", 358, false, null);
+ }
+
+ public void testCreateAttribute() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_ATTRIBUTE, "jsp", "jsp", 358, false, null);
+ }
+
+ public void testCreateConvertDateTime() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_CONVERTDATETIME, "jsp", "jsp", 358,false, null);
+ }
+ public void testCreateConvertNumber() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_CONVERTNUMBER, "jsp", "jsp", 358,false, null);
+ }
+
+ /**
+ * @throws Exception
+ */
+ public void testCreateConverter() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_CONVERTER, "jsp", "jsp", 358,false, null);
+ }
+
+ /**
+ * @throws Exception
+ */
+ public void testCreateFacet() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_FACET, "jsp", "jsp", 358,false, null);
+ }
+
+ /**
+ * @throws Exception
+ */
+ public void testCreateLoadBundle() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_LOADBUNDLE, "jsp", "jsp", 358,false, null);
+ }
+
+ /**
+ * @throws Exception
+ */
+ public void testCreateParam() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_PARAM, "jsp", "jsp", 358,true, null);
+ }
+
+ /**
+ * @throws Exception
+ */
+ public void testCreateSelectItem() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTITEM, "jsp", "jsp", 358,false, null);
+ }
+
+ /**
+ * @throws Exception
+ */
+ public void testCreateSelectItems() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTITEMS, "jsp", "jsp", 358,false, null);
+ }
+
+ /**
+ * @throws Exception
+ */
+ public void testCreateSubview() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SUBVIEW, "jsp", "jsp", 358,false, null);
+ }
+
+ /**
+ * @throws Exception
+ */
+ public void testCreateValidateDoubleRange() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_VALIDATEDOUBLERANGE, "jsp", "jsp", 358,true, null);
+ }
+
+ /**
+ * @throws Exception
+ */
+ public void testCreateValidateLength() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_VALIDATELENGTH, "jsp", "jsp", 358,true, null);
+ }
+
+ /**
+ * @throws Exception
+ */
+ public void testCreateValidateLongRange() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_VALIDATELONGRANGE, "jsp", "jsp", 358,true, null);
+ }
+
+ /**
+ * @throws Exception
+ */
+ public void testCreateValidator() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_VALIDATOR, "jsp", "jsp", 358,false, null);
+ }
+
+ /**
+ * @throws Exception
+ */
+ public void testCreateValueChangeListener() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_VALUECHANGELISTENER, "jsp", "jsp", 358,false, null);
+ }
+
+ /**
+ * @throws Exception
+ */
+ public void testCreateVerbatim() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_VERBATIM, "jsp", "jsp", 358,false, null);
+ }
+
+ /**
+ * @throws Exception
+ */
+ public void testCreateView() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_VIEW, "jsp", "jsp", 358,false, null);
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorForJSFHTML.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorForJSFHTML.java
new file mode 100644
index 000000000..07fba469a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorForJSFHTML.java
@@ -0,0 +1,159 @@
+/*******************************************************************************
+ * 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.pagedesigner.tests.tagcreator;
+
+import org.eclipse.jst.jsf.core.internal.tld.IJSFConstants;
+import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
+
+public class TestDefaultTagCreatorForJSFHTML extends BaseDefaultTagCreatorTestCase
+{
+ public TestDefaultTagCreatorForJSFHTML()
+ {
+ super("h", "jsf");
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ }
+
+ public void testCreateButton() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jsp", "jsp", 358,false, null);
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jspx", "jspx", 495,false, null);
+
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(JSFCoreUtilHelper.createSimpleRegistryFactory());
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "xhtml", "xhtml", 350,false, null);
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(null);
+ }
+
+ public void testCreateCommandLink() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDLINK, "jsp", "jsp", 358,false, null);
+ }
+
+ public void testCreatePanelGrid() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_PANEL_GRID, "jsp", "jsp", 358,false, null);
+ }
+
+ public void testCreateDataTable() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_DATA_TABLE, "jsp", "jsp", 358,false, null);
+ }
+
+ public void testCreateForm() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_FORM, "jsp", "jsp", 358,false, null);
+ }
+
+ public void testCreateGraphicImage() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_GRAPHICIMAGE, "jsp", "jsp", 358,false, null);
+ }
+
+ public void testCreateInputHidden() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_INPUTHIDDEN, "jsp", "jsp", 358,false, null);
+ }
+
+ public void testCreateMessage() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_MESSAGE, "jsp", "jsp", 358,false, null);
+ }
+
+ public void testCreateMessages() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_MESSAGES, "jsp", "jsp", 358,false, null);
+ }
+
+ public void testCreateOutputFormat() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_OUTPUTFORMAT, "jsp", "jsp", 358,true, null);
+ }
+
+ public void testCreateOutputLabel() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_OUTPUTLABEL, "jsp", "jsp", 358,false, null);
+ }
+
+ public void testCreateOutputText() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_OUTPUTTEXT, "jsp", "jsp", 358,false, null);
+ }
+
+ public void testCreatePanelGroup() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_PANEL_GROUP, "jsp", "jsp", 358,false, null);
+ }
+
+ public void testCreateInputSecret() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_INPUTSECRET, "jsp", "jsp", 358,false, null);
+ }
+
+ public void testCreateSelectBooleanCheckbox() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTBOOLEANCHECKBOX, "jsp", "jsp", 358,false, null);
+ }
+
+ public void testCreateSelectManyCheckbox() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTMANYCHECKBOX, "jsp", "jsp", 358,false, null);
+ }
+
+ public void testCreateSelectManyListbox() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTMANYLISTBOX, "jsp", "jsp", 358,false, null);
+ }
+
+ public void testCreateSelectManyMenu() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTMANYMENU, "jsp", "jsp", 358,false, null);
+ }
+
+ public void testCreateSelectOneListbox() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTONELISTBOX, "jsp", "jsp", 358,false, null);
+ }
+
+ public void testCreateSelectOneMenu() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTONEMENU, "jsp", "jsp", 358,false, null);
+ }
+
+ public void testCreateSelectOneRadio() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTONERADIO, "jsp", "jsp", 358,false, null);
+ }
+
+ public void testCreateInputText() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_INPUTTEXT, "jsp", "jsp", 358,false, null);
+ }
+
+ public void testCreateInputTextArea() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_INPUTTEXTAREA, "jsp", "jsp", 358,false, null);
+ }
+
+ public void testCreateOutputLink() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_OUTPUTLINK, "jsp", "jsp", 358,false, null);
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorHTML.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorHTML.java
new file mode 100644
index 000000000..223e74cad
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorHTML.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * 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.pagedesigner.tests.tagcreator;
+
+import org.eclipse.jst.jsf.core.internal.tld.TagIdentifierFactory;
+import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
+import org.eclipse.wst.xml.core.internal.provisional.contentmodel.CMDocType;
+
+/**
+ * Some basic tests to cover HTML tags
+ * @author cbateman
+ *
+ */
+public class TestDefaultTagCreatorHTML extends BaseDefaultTagCreatorTestCase
+{
+ public TestDefaultTagCreatorHTML()
+ {
+ super("", "html");
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ }
+
+ public void testCreateButton() throws Exception
+ {
+ doCreateTest(TagIdentifierFactory.createJSPTagWrapper(CMDocType.HTML_DOC_TYPE, "INPUT.BUTTON"), "html", "html", 358,false, null);
+
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(JSFCoreUtilHelper.createSimpleRegistryFactory());
+ doCreateTest(TagIdentifierFactory.createJSPTagWrapper(CMDocType.HTML_DOC_TYPE, "INPUT.BUTTON"), "xhtml", "xhtml", 350,false, null);
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(null);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorJSP.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorJSP.java
new file mode 100644
index 000000000..60313edd2
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestDefaultTagCreatorJSP.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * 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.pagedesigner.tests.tagcreator;
+
+import org.eclipse.jst.jsf.core.internal.tld.TagIdentifierFactory;
+
+public class TestDefaultTagCreatorJSP extends BaseDefaultTagCreatorTestCase
+{
+ public TestDefaultTagCreatorJSP()
+ {
+ super("jsp", "jsp");
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ }
+
+ public void testIncludeDirective() throws Exception
+ {
+ doCreateTest(TagIdentifierFactory.createJSPTagWrapper("jsp11", "jsp:directive.include"), "jsp", "jsp", 349,false, null);
+ doCreateTest(TagIdentifierFactory.createJSPTagWrapper("jsp11", "jsp:directive.include"), "jspx", "jspx", 492,false, null);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestItemCreationToolForJSFCore.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestItemCreationToolForJSFCore.java
new file mode 100644
index 000000000..ce165ea00
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestItemCreationToolForJSFCore.java
@@ -0,0 +1,166 @@
+/*******************************************************************************
+ * 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.pagedesigner.tests.tagcreator;
+
+import org.eclipse.jst.jsf.core.internal.tld.IJSFConstants;
+import org.eclipse.jst.pagedesigner.tests.tagcreator.base.BaseItemCreationToolTestCase;
+
+public class TestItemCreationToolForJSFCore extends BaseItemCreationToolTestCase
+{
+ public TestItemCreationToolForJSFCore()
+ {
+ super("jsf");
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ }
+
+ public void testCreateActionListener() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_ACTIONLISTENER, "jsp", "jsp", 358,false);
+ }
+
+ public void testCreateAttribute() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_ATTRIBUTE, "jsp", "jsp", 358,false);
+ }
+
+ public void testCreateConvertDateTime() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_CONVERTDATETIME, "jsp", "jsp", 358,false);
+ }
+ public void testCreateConvertNumber() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_CONVERTNUMBER, "jsp", "jsp", 358,false);
+ }
+
+ /**
+ * @throws Exception
+ */
+ public void testCreateConverter() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_CONVERTER, "jsp", "jsp", 358,false);
+ }
+
+ /**
+ * @throws Exception
+ */
+ public void testCreateFacet() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_FACET, "jsp", "jsp", 358,false);
+ }
+
+ /**
+ * @throws Exception
+ */
+ public void testCreateLoadBundle() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_LOADBUNDLE, "jsp", "jsp", 358,false);
+ }
+
+ /**
+ * @throws Exception
+ */
+ public void testCreateParam() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_PARAM, "jsp", "jsp", 358,true);
+ }
+
+ /**
+ * @throws Exception
+ */
+ public void testCreateSelectItem() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTITEM, "jsp", "jsp", 358,false);
+ }
+
+ /**
+ * @throws Exception
+ */
+ public void testCreateSelectItems() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTITEMS, "jsp", "jsp", 358,false);
+ }
+
+ /**
+ * @throws Exception
+ */
+ public void testCreateSubview() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SUBVIEW, "jsp", "jsp", 358,false);
+ }
+
+ /**
+ * @throws Exception
+ */
+ public void testCreateValidateDoubleRange() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_VALIDATEDOUBLERANGE, "jsp", "jsp", 358,true);
+ }
+
+ /**
+ * @throws Exception
+ */
+ public void testCreateValidateLength() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_VALIDATELENGTH, "jsp", "jsp", 358,true);
+ }
+
+ /**
+ * @throws Exception
+ */
+ public void testCreateValidateLongRange() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_VALIDATELONGRANGE, "jsp", "jsp", 358,true);
+ }
+
+ /**
+ * @throws Exception
+ */
+ public void testCreateValidator() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_VALIDATOR, "jsp", "jsp", 358,false);
+ }
+
+ /**
+ * @throws Exception
+ */
+ public void testCreateValueChangeListener() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_VALUECHANGELISTENER, "jsp", "jsp", 358,false);
+ }
+
+ /**
+ * @throws Exception
+ */
+ public void testCreateVerbatim() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_VERBATIM, "jsp", "jsp", 358,false);
+ }
+
+ /**
+ * @throws Exception
+ */
+ public void testCreateView() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_VIEW, "jsp", "jsp", 358,false);
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestItemCreationToolForJSFHTML.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestItemCreationToolForJSFHTML.java
new file mode 100644
index 000000000..277737f52
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestItemCreationToolForJSFHTML.java
@@ -0,0 +1,156 @@
+/*******************************************************************************
+ * 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.pagedesigner.tests.tagcreator;
+
+import org.eclipse.jst.jsf.core.internal.tld.IJSFConstants;
+import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
+import org.eclipse.jst.pagedesigner.tests.tagcreator.base.BaseItemCreationToolTestCase;
+
+public class TestItemCreationToolForJSFHTML extends BaseItemCreationToolTestCase
+{
+ public TestItemCreationToolForJSFHTML()
+ {
+ super("jsf");
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ }
+
+ public void testCreateButton() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jsp", "jsp", 358,false);
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jspx", "jspx", 495,false);
+
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(JSFCoreUtilHelper.createSimpleRegistryFactory());
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "xhtml", "xhtml", 350,false);
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(null);
+ }
+
+ public void testCreateCommandLink() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDLINK, "jsp", "jsp", 358,false);
+ }
+
+ public void testCreatePanelGrid() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_PANEL_GRID, "jsp", "jsp", 358,false);
+ }
+
+ public void testCreateDataTable() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_DATA_TABLE, "jsp", "jsp", 358,false);
+ }
+
+ public void testCreateForm() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_FORM, "jsp", "jsp", 358,false);
+ }
+
+ public void testCreateGraphicImage() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_GRAPHICIMAGE, "jsp", "jsp", 358,false);
+ }
+
+ public void testCreateInputHidden() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_INPUTHIDDEN, "jsp", "jsp", 358,false);
+ }
+
+ public void testCreateMessage() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_MESSAGE, "jsp", "jsp", 358,false);
+ }
+
+ public void testCreateMessages() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_MESSAGES, "jsp", "jsp", 358,false);
+ }
+
+ public void testCreateOutputFormat() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_OUTPUTFORMAT, "jsp", "jsp", 358,true);
+ }
+
+ public void testCreateOutputLabel() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_OUTPUTLABEL, "jsp", "jsp", 358,false);
+ }
+
+ public void testCreateOutputText() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_OUTPUTTEXT, "jsp", "jsp", 358,false);
+ }
+
+ public void testCreatePanelGroup() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_PANEL_GROUP, "jsp", "jsp", 358,false);
+ }
+
+ public void testCreateInputSecret() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_INPUTSECRET, "jsp", "jsp", 358,false);
+ }
+
+ public void testCreateSelectBooleanCheckbox() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTBOOLEANCHECKBOX, "jsp", "jsp", 358,false);
+ }
+
+ public void testCreateSelectManyCheckbox() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTMANYCHECKBOX, "jsp", "jsp", 358,false);
+ }
+
+ public void testCreateSelectManyListbox() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTMANYLISTBOX, "jsp", "jsp", 358,false);
+ }
+
+ public void testCreateSelectManyMenu() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTMANYMENU, "jsp", "jsp", 358,false);
+ }
+
+ public void testCreateSelectOneListbox() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTONELISTBOX, "jsp", "jsp", 358,false);
+ }
+
+ public void testCreateSelectOneMenu() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTONEMENU, "jsp", "jsp", 358,false);
+ }
+
+ public void testCreateSelectOneRadio() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_SELECTONERADIO, "jsp", "jsp", 358,false);
+ }
+
+ public void testCreateInputText() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_INPUTTEXT, "jsp", "jsp", 358,false);
+ }
+
+ public void testCreateInputTextArea() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_INPUTTEXTAREA, "jsp", "jsp", 358,false);
+ }
+
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestItemCreationToolHTML.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestItemCreationToolHTML.java
new file mode 100644
index 000000000..7a7bc29f4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestItemCreationToolHTML.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * 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.pagedesigner.tests.tagcreator;
+
+import org.eclipse.jst.jsf.core.internal.tld.TagIdentifierFactory;
+import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
+import org.eclipse.jst.pagedesigner.tests.tagcreator.base.BaseItemCreationToolTestCase;
+import org.eclipse.wst.xml.core.internal.provisional.contentmodel.CMDocType;
+
+/**
+ * Some basic tests to cover HTML tags
+ * @author cbateman
+ *
+ */
+public class TestItemCreationToolHTML extends BaseItemCreationToolTestCase
+{
+ public TestItemCreationToolHTML()
+ {
+ super("html");
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ }
+
+ public void testCreateButton() throws Exception
+ {
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(JSFCoreUtilHelper.createSimpleRegistryFactory());
+ doCreateTest(TagIdentifierFactory.createJSPTagWrapper(CMDocType.HTML_DOC_TYPE, "INPUT.BUTTON"), "html", "html", 358,false);
+ doCreateTest(TagIdentifierFactory.createJSPTagWrapper(CMDocType.HTML_DOC_TYPE, "INPUT.BUTTON"), "xhtml", "xhtml", 350,false);
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(null);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestItemCreationToolJSP.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestItemCreationToolJSP.java
new file mode 100644
index 000000000..0155c73d4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestItemCreationToolJSP.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * 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.pagedesigner.tests.tagcreator;
+
+import org.eclipse.jst.jsf.core.internal.tld.TagIdentifierFactory;
+import org.eclipse.jst.pagedesigner.tests.tagcreator.base.BaseItemCreationToolTestCase;
+
+public class TestItemCreationToolJSP extends BaseItemCreationToolTestCase
+{
+ public TestItemCreationToolJSP()
+ {
+ super("jsp");
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ }
+
+ public void testIncludeDirective() throws Exception
+ {
+ doCreateTest(TagIdentifierFactory.createJSPTagWrapper("jsp11", "jsp:directive.include"), "jsp", "jsp", 349,false);
+ doCreateTest(TagIdentifierFactory.createJSPTagWrapper("jsp11", "jsp:directive.include"), "jspx", "jspx", 492,false);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestOverrideableCreationData.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestOverrideableCreationData.java
new file mode 100644
index 000000000..85375a5c5
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestOverrideableCreationData.java
@@ -0,0 +1,217 @@
+package org.eclipse.jst.pagedesigner.tests.tagcreator;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jst.jsf.common.dom.TagIdentifier;
+import org.eclipse.jst.jsf.core.internal.tld.IJSFConstants;
+import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
+import org.eclipse.jst.pagedesigner.itemcreation.CreationData;
+import org.eclipse.jst.pagedesigner.itemcreation.ITagCreator;
+import org.eclipse.jst.pagedesigner.itemcreation.ITagDropOverrider;
+import org.eclipse.jst.pagedesigner.itemcreation.customizer.CustomizationDataImpl;
+import org.eclipse.jst.pagedesigner.itemcreation.customizer.ICustomizationData;
+import org.eclipse.jst.pagedesigner.itemcreation.customizer.IWritableCustomizationData;
+import org.eclipse.jst.pagedesigner.tests.PageDesignerTestsPlugin;
+import org.eclipse.wst.xml.core.internal.document.ElementImpl;
+import org.w3c.dom.Element;
+
+public class TestOverrideableCreationData extends
+ BaseUserCustomizedTagCreatorTestCase {
+
+ private final String OVERRIDDEN_TAGNAME = "fooTag";
+ private final String OVERRIDDEN_TAGURI = "http://com.foo.bar/fooey";
+ private final String OVERRIDDEN_DEFAULT_PREFIX = "fooey";
+
+ private boolean DO_TAGNAME_OVERRIDE = true;
+ private boolean DO_TAGURI_OVERRIDE = true;
+ private boolean DO_DEFAULT_PREFIX_OVERRIDE = true;
+
+ public void testOverriddenCreationData() throws Exception {
+ Verification v = new Verification(OVERRIDDEN_TAGNAME,
+ OVERRIDDEN_TAGURI, OVERRIDDEN_DEFAULT_PREFIX,
+ OVERRIDDEN_TAGNAME, OVERRIDDEN_DEFAULT_PREFIX);
+
+ reset();
+
+ doCreateTestOverridden(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON,
+ "jsp", "jsp", 358, false, getCustomizationData(), v);
+ doCreateTestOverridden(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON,
+ "jspx", "jspx", 495, false, getCustomizationData(), v);
+
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(JSFCoreUtilHelper.createSimpleRegistryFactory());
+ doCreateTestOverridden(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON,
+ "xhtml", "xhtml", 350, false, getCustomizationData(), v);
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(null);
+
+ }
+
+ public void testNullTagNameOverride() throws Exception {
+ reset();
+ DO_TAGNAME_OVERRIDE = false;
+
+ Verification v = new Verification(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON.getTagName(),
+ OVERRIDDEN_TAGURI, OVERRIDDEN_DEFAULT_PREFIX,
+ IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON.getTagName(), OVERRIDDEN_DEFAULT_PREFIX);
+ doCreateTestOverridden(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON,
+ "jsp", "jsp", 358, false, getCustomizationData(), v);
+
+ }
+
+ public void testNullTagUriOverride() throws Exception {
+ reset();
+ DO_TAGURI_OVERRIDE = false;
+
+ Verification v = new Verification(OVERRIDDEN_TAGNAME,
+ IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON.getUri(), OVERRIDDEN_DEFAULT_PREFIX,
+ OVERRIDDEN_TAGNAME, "h");//<-- changes are required to JSPUtil.getPrefix() before the DefPrefixOverride is picked up in all cases when URI is not overridden
+
+ doCreateTestOverridden(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON,
+ "jspx", "jspx", 495, false, getCustomizationData(), v);
+
+ }
+
+ public void testNullDefaultPrefixOverride() throws Exception {
+ reset();
+ DO_DEFAULT_PREFIX_OVERRIDE = false;
+
+ Verification v = new Verification(OVERRIDDEN_TAGNAME,
+ OVERRIDDEN_TAGURI, "h",
+ OVERRIDDEN_TAGNAME, "h");
+
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(JSFCoreUtilHelper.createSimpleRegistryFactory());
+ doCreateTestOverridden(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON,
+ "xhtml", "xhtml", 350, false, getCustomizationData(), v);
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(null);
+ }
+
+ private void reset() {
+ DO_TAGNAME_OVERRIDE = true;
+ DO_TAGURI_OVERRIDE = true;
+ DO_DEFAULT_PREFIX_OVERRIDE = true;
+ }
+
+
+
+ private void doCreateTestOverridden(final TagIdentifier tagId,
+ final String inExt, final String outExt, int offset,
+ boolean forceResultTagEmpty, ICustomizationData customizationData,
+ Verification v) throws Exception {
+ final String uri = tagId.getUri();
+ final String tagName = tagId.getTagName();
+
+ IFile file = (IFile) _webProjectTestEnv.loadResourceInWebRoot(
+ PageDesignerTestsPlugin.getDefault().getBundle(),
+ "/testdata/tagcreator/tagCreator." + inExt + ".data",
+ "/tagCreator_" + tagName + "." + inExt);
+
+ setTagIdentifier(tagId);
+
+ ITagCreator tagCreator = getTagCreator(getTagIdentifier());
+
+ CreationData creationData = getCreationData(uri, tagName,
+ _defaultPrefix, file, offset, customizationData);
+ Element element = tagCreator.createTag(creationData);
+
+ // this is a hack that is required because we do a literal comparison
+ // between the modified source file and test data file on a character
+ // by character basis. However, the MyFaces and RI (and possibly other)
+ // impls cause the tags to be generated differently (MyFaces with no
+ // end tag because body-content = empty and RI with an end tag because
+ // body-content = JSP), so if the caller sets forceResultTagEmpty, we
+ // force
+ // the tag to have no end tag. This should not invalidate the test as
+ // long as
+ // the caller doesn't set forceResultTagEmpty on a tag that may have
+ // children.
+ // the tag name and attributes should be cloned.
+ if (forceResultTagEmpty && element instanceof ElementImpl) {
+ forceTagEmpty((ElementImpl) element);
+ }
+
+// System.out.println(element.toString());
+
+ v.verify(creationData, element);
+
+ }
+
+ protected ICustomizationData getCustomizationData() {
+
+ // Setup tag
+ IWritableCustomizationData data = new CustomizationDataImpl(
+ getTagIdentifier()) {
+
+ @SuppressWarnings("rawtypes")
+ @Override
+ public Object getAdapter(Class adapter) {
+ if (ITagDropOverrider.class == adapter) {
+ return getCustomizationAdapter();
+ }
+ return super.getAdapter(adapter);
+ }
+
+ };
+ data.addAttribute("attr1", "value1");
+
+ return data;
+ }
+
+ private ITagDropOverrider getCustomizationAdapter() {
+ return new ITagDropOverrider() {
+
+ public String getTagNameOverride() {
+ if (DO_TAGNAME_OVERRIDE)
+ return OVERRIDDEN_TAGNAME;
+ return null;
+ }
+
+ public String getUriOverride() {
+ if (DO_TAGURI_OVERRIDE)
+ return OVERRIDDEN_TAGURI;
+ return null;
+ }
+
+ public String getDefaultPrefixOverride() {
+ if (DO_DEFAULT_PREFIX_OVERRIDE)
+ return OVERRIDDEN_DEFAULT_PREFIX;
+ return null;
+ }
+ };
+ }
+
+ private class Verification {
+
+ private String _expectedTagName;
+ private String _expectedTagUri;
+ private String _expectedDefaultPrefix;
+ private String _expectedElementLocalName;
+ private String _expectedElementPrefix;
+
+ /**
+ * @param expectedTagName
+ * @param expectedTagUri
+ * @param expectedDefaultPrefix
+ * @param expectedElementLocalName
+ * @param expectedElementPrefix
+ */
+ public Verification(final String expectedTagName,
+ final String expectedTagUri,
+ final String expectedDefaultPrefix,
+ final String expectedElementLocalName,
+ final String expectedElementPrefix) {
+ _expectedTagName = expectedTagName;
+ _expectedTagUri = expectedTagUri;
+ _expectedDefaultPrefix = expectedDefaultPrefix;
+ _expectedElementLocalName = expectedElementLocalName;
+ _expectedElementPrefix = expectedElementPrefix;
+ }
+
+ public void verify(CreationData creationData, Element element)
+ throws Exception {
+ assertEquals(_expectedTagName, creationData.getTagName());
+ assertEquals(_expectedTagUri, creationData.getUri());
+ assertEquals(_expectedDefaultPrefix, creationData
+ .getDefaultPrefix());
+ assertEquals(_expectedElementLocalName, element.getLocalName());
+ assertEquals(_expectedElementPrefix, element.getPrefix());
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestTagCreationFactory.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestTagCreationFactory.java
new file mode 100644
index 000000000..c95eb4cc1
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestTagCreationFactory.java
@@ -0,0 +1,256 @@
+/*******************************************************************************
+ * 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.pagedesigner.tests.tagcreator;
+
+import java.io.ByteArrayOutputStream;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.jsf.common.dom.TagIdentifier;
+import org.eclipse.jst.jsf.core.internal.tld.IJSFConstants;
+import org.eclipse.jst.jsf.core.internal.tld.TagIdentifierFactory;
+import org.eclipse.jst.jsf.test.util.JSFTestUtil;
+import org.eclipse.jst.pagedesigner.itemcreation.CreationData;
+import org.eclipse.jst.pagedesigner.itemcreation.ITagCreator;
+import org.eclipse.jst.pagedesigner.itemcreation.internal.TagCreationFactory;
+import org.eclipse.jst.pagedesigner.tests.PageDesignerTestsPlugin;
+import org.eclipse.jst.pagedesigner.tests.tagcreator.base.BaseTestClass;
+import org.eclipse.jst.pagedesigner.tests.tagcreator.base.MockCreateItemCommand;
+import org.eclipse.jst.pagedesigner.tests.tagcreator.base.MockItemCreationTool;
+import org.eclipse.jst.pagedesigner.tests.tagcreatorPlugin.TestCreationFactory;
+import org.eclipse.jst.pagedesigner.utils.CommandUtil;
+import org.w3c.dom.Element;
+
+/**
+ * @author cbateman
+ *
+ */
+public class TestTagCreationFactory extends BaseTestClass
+{
+ public TestTagCreationFactory() {
+ super("jsf");
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ _webProjectTestEnv.loadResourceInWebRoot
+ (PageDesignerTestsPlugin.getDefault().getBundle()
+ , "/testdata/tagcreator/testCreator.tld.data"
+ , "/META-INF/testCreator.tld");
+ // make sure the manager picks up the new TLD.
+ _manager.reset();
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ }
+
+ public void testEnsureRequiredAttributes() throws Exception
+ {
+ IFile jspFile = (IFile) _webProjectTestEnv.loadResourceInWebRoot(
+ PageDesignerTestsPlugin.getDefault().getBundle()
+ ,"/testdata/tagcreator/testTagCreation.jsp.data"
+ ,"/testEnsureRequiredAttributes.jsp");
+
+ CreationData creationData =
+ getCreationData(TestCreationFactory.TAGCREATOR_URI_1
+ , "tagWithRequiredAttr", "test", jspFile, 501, null);
+ Element element = CommandUtil.executeInsertion(creationData.getTagCreationProvider()
+ , creationData.getModel()
+ , creationData.getDomPosition()
+ , creationData.getDropCustomizationData());
+
+ assertNotNull(element);
+ final TagIdentifier tagId = TagIdentifierFactory.createDocumentTagWrapper(element);
+ assertEquals("test:tagWithRequiredAttr", element.getNodeName());
+ // the framework will not force a value on this attribute
+ assertNull(element.getAttribute(TestCreationFactory.REQUIRED_ATTR_1));
+
+ // the framework will leave attr2 alone because the advisor is setting it
+ assertEquals(TestCreationFactory.getDefaultAttributeValue
+ (tagId, TestCreationFactory.REQUIRED_ATTR_2)
+ , element.getAttribute(TestCreationFactory.REQUIRED_ATTR_2));
+
+ // test manually calling the ensure method for
+ jspFile = (IFile) _webProjectTestEnv.loadResourceInWebRoot(
+ PageDesignerTestsPlugin.getDefault().getBundle()
+ ,"/testdata/tagcreator/testTagCreation.jsp.data"
+ ,"/testEnsureRequiredAttributes2.jsp");
+ creationData =
+ getCreationData(TestCreationFactory.TAGCREATOR_URI_1
+ , "tagWithRequiredAttr2", "test", jspFile, 501, null);
+ element = CommandUtil.executeInsertion(creationData.getTagCreationProvider()
+ , creationData.getModel()
+ , creationData.getDomPosition()
+ , creationData.getDropCustomizationData());
+
+ // on this tag, the first required attr is set by metadata
+ assertEquals("foobar", element.getAttribute(TestCreationFactory.REQUIRED_ATTR_1));
+ // the second one is not set by meta-data, but is required and ensure is called
+ // by the custom advisor, so it should be set to empty
+ assertEquals("", element.getAttribute(TestCreationFactory.REQUIRED_ATTR_2));
+
+ // the optional attribute is not set by meta-data and since it's not required,
+ // the ensure method should not touch it either.
+ assertNull(element.getAttribute("notRequiredAttr1"));
+ }
+
+ public void testTagCreationMetadata() throws Exception
+ {
+ final IFile jspFile = (IFile) _webProjectTestEnv.loadResourceInWebRoot(
+ PageDesignerTestsPlugin.getDefault().getBundle()
+ ,"/testdata/tagcreator/testTagCreation.jsp.data"
+ ,"/testTagCreationMetadata.jsp");
+
+ final CreationData creationData =
+ getCreationData(TestCreationFactory.TAGCREATOR_URI_1
+ , "tagWithMetadata", "test", jspFile, 501, null);
+ final Element element = CommandUtil.executeInsertion(
+ creationData.getTagCreationProvider()
+ , creationData.getModel()
+ , creationData.getDomPosition()
+ , creationData.getDropCustomizationData());
+
+ assertNotNull(element);
+ // ensure that the meta-data value for this required attribute
+ // is set.
+ assertEquals("foobar", element.getAttribute("requiredAttr1"));
+ // we have not provided meta-data for this attribute but it is required
+ // by default, the framework won't enforce so should be null
+ assertNull(element.getAttribute("requiredAttr2"));
+ // we have provided meta-data for this non-required attribute,
+ // so ensure it's set
+ assertEquals("someOtherFooBar", element.getAttribute("notRequiredAttr1"));
+ // we have not provided m-d for this optional one, so since it's optional
+ // it should be null.
+ assertNull(element.getAttribute("notRequiredAttr2"));
+
+ // check the child template was applied
+ assertEquals(1, element.getChildNodes().getLength());
+ // TODO: we should find the default prefix for outputText, but
+ // we only check those taglibs already referenced in the document.
+ assertEquals("p:outputText", element.getChildNodes().item(0).getNodeName());
+ }
+
+ /**
+ * Test the situation that is common with JSPX where the f:view must be more than
+ * 3 levels deep from the root (was causing duplicate view's to be added).
+ */
+ public void testBug197042() throws Exception
+ {
+ final IFile jspFile = (IFile) _webProjectTestEnv.loadResourceInWebRoot(
+ PageDesignerTestsPlugin.getDefault().getBundle()
+ ,"/testdata/tagcreator/tagCreator.jspx.data"
+ ,"/testTagCreationMetadata.jsp");
+
+ final String uri =
+ IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON.getUri();
+ final String tagName =
+ IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON.getTagName();
+ final CreationData creationData =
+ getCreationData(uri,tagName,"h", jspFile, 495, null);
+
+ final ITagCreator tagCreator = TagCreationFactory.getInstance()
+ .createTagCreator(creationData.getTagId());
+
+ final Element element = tagCreator.createTag(creationData);
+
+ System.out.println(element.toString());
+
+ final ByteArrayOutputStream resultStream = new ByteArrayOutputStream();
+ getDocumentContext(0, jspFile).getModel().save(resultStream);
+
+ final IPath expectedPath = JSFTestUtil.getAbsolutePath(
+ PageDesignerTestsPlugin.getDefault().getBundle(),
+ "/testdata/tagcreator/jsf/expectedResult_commandButton.jspx.data");
+ final String expected = getExpectedResult(expectedPath).trim();
+ final String result = resultStream.toString().trim();
+
+ assertEquals(expected, result);
+ }
+
+ public void testDropCustomizerThatCancels() throws Exception
+ {
+ final IFile jspFile = (IFile) _webProjectTestEnv.loadResourceInWebRoot(
+ PageDesignerTestsPlugin.getDefault().getBundle()
+ ,"/testdata/tagcreator/tagCreator.jsp.data"
+ ,"/testCustomizerCancel.jsp");
+
+ TestCreationFactory.setTestParametersForDropCustomer(Status.CANCEL_STATUS, null);
+
+ final MockItemCreationTool tool =
+ createMockItemCreationTool(jspFile, 358, TestCreationFactory.TAG_WITH_REQUIRED_ATTR, IStatus.CANCEL);
+
+ tool.customizeDropAndMaybeExecute(0);
+
+ assertExpectedResult(jspFile, "jsp");
+ }
+
+ public void testDropCustomizationDataAcquistion() throws Exception
+ {
+ final IFile jspFile = (IFile) _webProjectTestEnv.loadResourceInWebRoot(
+ PageDesignerTestsPlugin.getDefault().getBundle()
+ ,"/testdata/tagcreator/tagCreator.jsp.data"
+ ,"/testCustomizerCancel.jsp");
+
+ final IAdaptable adaptable = new IAdaptable()
+ {
+ @SuppressWarnings("rawtypes")
+ public Object getAdapter(final Class adapter) {
+ if (Map.class == adapter)
+ {
+ final HashMap<String, String> map = new HashMap<String, String>();
+ map.put("color", "red");
+ return map;
+ }
+ return null;
+ }
+ };
+
+ TestCreationFactory.setTestParametersForDropCustomer(Status.OK_STATUS, adaptable);
+
+ final MockItemCreationTool tool =
+ createMockItemCreationTool(jspFile, 358, TestCreationFactory.TAG_WITH_REQUIRED_ATTR, IStatus.CANCEL);
+
+ tool.customizeDropAndMaybeExecute(0);
+ final Object[] commands = tool.getDomain().getCommandStack().getCommands();
+ assertEquals(1, commands.length);
+ assertTrue(commands[0] instanceof MockCreateItemCommand);
+
+ final IAdaptable value = ((MockCreateItemCommand)commands[0]).getCustomizationDataTesting();
+ assertEquals(adaptable, value);
+ final Map<?, ?> map = (Map<?, ?>) value.getAdapter(Map.class);
+ assertNotNull(map);
+ assertEquals("red", map.get("color"));
+ }
+
+ private void assertExpectedResult(final IFile file, final String outExt) throws Exception
+ {
+ final ByteArrayOutputStream resultStream = new ByteArrayOutputStream();
+ getDocumentContext(0, file).getModel().save(resultStream);
+
+ final String expected =
+ getExpectedResult("/testdata/tagcreator/tagCreator."+outExt+".data").trim();
+ final String result = resultStream.toString("ISO-8859-1").trim();
+
+ assertEquals(expected, result);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_AttributeCustomization.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_AttributeCustomization.java
new file mode 100644
index 000000000..74521ff7b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_AttributeCustomization.java
@@ -0,0 +1,57 @@
+package org.eclipse.jst.pagedesigner.tests.tagcreator;
+
+import org.eclipse.jst.jsf.core.internal.tld.IJSFConstants;
+import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
+import org.eclipse.jst.pagedesigner.itemcreation.customizer.CustomizationDataImpl;
+import org.eclipse.jst.pagedesigner.itemcreation.customizer.ICustomizationData;
+import org.eclipse.jst.pagedesigner.itemcreation.customizer.IWritableCustomizationData;
+
+/**
+ * Test class to test attribute customization for a tag drop
+ *
+ * @author Debajit Adhikary
+ *
+ */
+public class TestUserCustomizedTagCreatorForJSFHTML_AttributeCustomization extends BaseUserCustomizedTagCreatorTestCase
+{
+ /**
+ * Path to directory where the test-data files are located. The XML
+ * generated from this test case is compared against this test data.
+ *
+ */
+ private static final String TESTDATA_FILES_PATH = "/testdata/UserCustomizedTagCreator/AttributeCustomization";
+
+
+ public void testAttributeInsertion() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jsp", "jsp", 358, false, getCustomizationData());
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jspx", "jspx", 495, false, getCustomizationData());
+
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(JSFCoreUtilHelper.createSimpleRegistryFactory());
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "xhtml", "xhtml", 350, false, getCustomizationData());
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(null);
+ }
+
+
+
+ protected ICustomizationData getCustomizationData()
+ {
+ // Setup tag
+ IWritableCustomizationData data = new CustomizationDataImpl(getTagIdentifier());
+ data.addAttribute("attr1", "value1");
+
+ return data;
+ }
+
+
+ @Override
+ protected final String getExpectedResult(final String tagName, final String outExt) throws Exception
+ {
+ final String ext = outExt == null ? "" : "." + outExt;
+ final String fileName = "expectedResult_"
+ + tagName.replaceAll(":", "_") + ext + ".data";
+ final String pathStr = TESTDATA_FILES_PATH + "/" + _compareDataSubDir
+ + "/" + fileName;
+ return getExpectedResult(pathStr);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_ChildCustomization.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_ChildCustomization.java
new file mode 100644
index 000000000..707d7d9db
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_ChildCustomization.java
@@ -0,0 +1,111 @@
+package org.eclipse.jst.pagedesigner.tests.tagcreator;
+
+import org.eclipse.jst.jsf.core.internal.tld.IJSFConstants;
+import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
+import org.eclipse.jst.pagedesigner.itemcreation.customizer.CustomizationDataImpl;
+import org.eclipse.jst.pagedesigner.itemcreation.customizer.ICustomizationData;
+import org.eclipse.jst.pagedesigner.itemcreation.customizer.IWritableCustomizationData;
+import org.eclipse.jst.pagedesigner.tests.tagcreatorPlugin.UserCustomizedElementEditFactory;
+
+/**
+ * Test class for child tag customization.
+ *
+ * @author Debajit Adhikary
+ *
+ */
+public class TestUserCustomizedTagCreatorForJSFHTML_ChildCustomization extends BaseUserCustomizedTagCreatorTestCase
+{
+ /**
+ * Path to directory where the test-data files are located. The XML
+ * generated from this test case is compared against this test data.
+ *
+ */
+ private static final String TESTDATA_FILES_PATH = "/testdata/UserCustomizedTagCreator/ChildCustomization";
+
+
+ public void testChildTagInsertion() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jsp", "jsp", 358, false, getCustomizationData());
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jspx", "jspx", 495, false, getCustomizationData());
+
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(JSFCoreUtilHelper.createSimpleRegistryFactory());
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "xhtml", "xhtml", 350, false, getCustomizationData());
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(null);
+ }
+
+
+ protected ICustomizationData getCustomizationData()
+ {
+ // Setup tag
+ IWritableCustomizationData tagDropped = new CustomizationDataImpl(getTagIdentifier());
+ tagDropped.addAttribute("attr1", "value1");
+
+ /*
+
+ Add child tags
+ We will create the tag hierarchy:
+
+ f:view
+ |
+ +----TagDropped (attr1=value1)
+ |
+ +----TAG1
+ | |
+ | +----TAG1
+ |
+ +----TAG2 (tag2Attr1=tag2Attr1Value)
+ | |
+ | +----TAG7
+ | |
+ | +----TAG6
+ |
+ |
+ +----TAG3
+ |
+ +----TAG8
+ |
+ +----TAG9
+
+ */
+
+
+ IWritableCustomizationData tag11 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG1);
+ IWritableCustomizationData tag12 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG1);
+ tag11.addChildData(tag12);
+ tagDropped.addChildData(tag11);
+
+ IWritableCustomizationData tag7 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG7);
+ IWritableCustomizationData tag6 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG6);
+ IWritableCustomizationData tag2 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG2);
+ tag2.addAttribute("tag2Attr1", "tag2Attr1Value");
+ tag2.addChildData(tag7);
+ tag2.addChildData(tag6);
+ tagDropped.addChildData(tag2);
+
+ IWritableCustomizationData tag3 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG3);
+ IWritableCustomizationData tag8 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG8);
+ IWritableCustomizationData tag9 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG9);
+ tag8.addChildData(tag9);
+ tag3.addChildData(tag8);
+ tagDropped.addChildData(tag3);
+
+ // Setup parent <f:view>. (This will not use the UserCustomizedTagCreator but
+ // will use its own tag creator)
+ IWritableCustomizationData view = new CustomizationDataImpl(IJSFConstants.TAG_IDENTIFIER_VIEW);
+ tagDropped.addParentData(view);
+
+ return tagDropped;
+ }
+
+
+ @Override
+ protected final String getExpectedResult(final String tagName, final String outExt) throws Exception
+ {
+ final String ext = outExt == null ? "" : "." + outExt;
+ final String fileName = "expectedResult_"
+ + tagName.replaceAll(":", "_") + ext + ".data";
+ final String pathStr = TESTDATA_FILES_PATH + "/" + _compareDataSubDir
+ + "/" + fileName;
+ return getExpectedResult(pathStr);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_GeneralCustomization.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_GeneralCustomization.java
new file mode 100644
index 000000000..f32815609
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_GeneralCustomization.java
@@ -0,0 +1,165 @@
+package org.eclipse.jst.pagedesigner.tests.tagcreator;
+
+import org.eclipse.jst.jsf.core.internal.tld.IJSFConstants;
+import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
+import org.eclipse.jst.pagedesigner.itemcreation.customizer.CustomizationDataImpl;
+import org.eclipse.jst.pagedesigner.itemcreation.customizer.ICustomizationData;
+import org.eclipse.jst.pagedesigner.itemcreation.customizer.IWritableCustomizationData;
+import org.eclipse.jst.pagedesigner.tests.tagcreatorPlugin.UserCustomizedElementEditFactory;
+
+/**
+ * Test class for tag drop customization for parent tags, child tags, and
+ * attributes.
+ *
+ * @author Debajit Adhikary
+ *
+ */
+public class TestUserCustomizedTagCreatorForJSFHTML_GeneralCustomization extends BaseUserCustomizedTagCreatorTestCase
+{
+ /**
+ * Path to directory where the test-data files are located. The "XML"
+ * generated from this test case is compared against this test data.
+ *
+ */
+ private static final String TESTDATA_FILES_PATH = "/testdata/UserCustomizedTagCreator/GeneralCustomization";
+
+
+ public void testGeneralCustomization() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jsp", "jsp", 358, false, getCustomizationData());
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jspx", "jspx", 495, false, getCustomizationData());
+
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(JSFCoreUtilHelper.createSimpleRegistryFactory());
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "xhtml", "xhtml", 350, false, getCustomizationData());
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(null);
+ }
+
+
+ protected ICustomizationData getCustomizationData()
+ {
+ IWritableCustomizationData tagDropped = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG1);
+ tagDropped.addAttribute("attr1", "value1");
+
+
+ //---------------------------------------------------------------------
+ // Add parent tags.
+ // We will create the hierarchy:
+ // f:view > TAG1 > TAG1 > TAG2 > TAG2 > TAG2 > TAG2 > TAG2 > TAG2 > TAG2 > TAG3 > TAG3 > TagDropped
+ //---------------------------------------------------------------------
+
+ // Setup parent <f:view>. (This will not use the UserCustomizedTagCreator but
+ // will use its own tag creator)
+ IWritableCustomizationData view = new CustomizationDataImpl(IJSFConstants.TAG_IDENTIFIER_VIEW);
+ tagDropped.addParentData(view);
+
+ IWritableCustomizationData tag11 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG1);
+ tagDropped.addParentData(tag11);
+
+ IWritableCustomizationData tag12 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG1);
+ tagDropped.addParentData(tag12);
+
+ IWritableCustomizationData tag21 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG2);
+ tag21.addAttribute("tag21Attr1", "tag21Attr1Value");
+ tagDropped.addParentData(tag21);
+
+ IWritableCustomizationData tag22 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG2);
+ tag22.addAttribute("tag22Attr1", "tag22Attr1Value");
+ tagDropped.addParentData(tag22);
+
+ IWritableCustomizationData tag23 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG2);
+ tagDropped.addParentData(tag23);
+
+ IWritableCustomizationData tag24 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG2);
+ tagDropped.addParentData(tag24);
+
+ IWritableCustomizationData tag25 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG2);
+ tagDropped.addParentData(tag25);
+
+ IWritableCustomizationData tag26 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG2);
+ tagDropped.addParentData(tag26);
+
+ IWritableCustomizationData tag27 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG2);
+ tagDropped.addParentData(tag27);
+
+ IWritableCustomizationData tag31 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG3);
+ tagDropped.addParentData(tag31);
+
+ IWritableCustomizationData tag32 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG3);
+ tagDropped.addParentData(tag32);
+
+
+ /*
+
+ Add child tags.
+ We will create the child hierarchy:
+
+ tagDropped
+ |
+ +----tag8
+ |
+ +----tag8
+ |
+ +----tag8
+ |
+ +----tag9
+ |
+ +----tag9
+ |
+ +----tag7
+ |
+ +----tag8
+ |
+ +----tag7
+ |
+ +----tag6
+ |
+ +----tag6
+
+ */
+
+ IWritableCustomizationData tag81 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG8);
+ tagDropped.addChildData(tag81);
+
+ IWritableCustomizationData tag82 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG8);
+ tagDropped.addChildData(tag82);
+
+ IWritableCustomizationData tag83 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG8);
+ tagDropped.addChildData(tag83);
+
+ IWritableCustomizationData tag91 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG9);
+ tag91.addAttribute("tag91Attr1", "tag91Attr1Value");
+ tagDropped.addChildData(tag91);
+
+ IWritableCustomizationData tag92 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG9);
+ tagDropped.addChildData(tag92);
+
+ IWritableCustomizationData tag71 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG7);
+ IWritableCustomizationData tag84 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG8);
+ tag84.addAttribute("attr1", "value1");
+ IWritableCustomizationData tag73 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG7);
+
+ IWritableCustomizationData tag61 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG6);
+ tag73.addChildData(tag61);
+
+ IWritableCustomizationData tag62 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG6);
+ tag73.addChildData(tag62);
+
+ tag84.addChildData(tag73);
+ tag71.addChildData(tag84);
+ tagDropped.addChildData(tag71);
+
+ return tagDropped;
+ }
+
+
+ @Override
+ protected final String getExpectedResult(final String tagName, final String outExt) throws Exception
+ {
+ final String ext = outExt == null ? "" : "." + outExt;
+ final String fileName = "expectedResult_"
+ + tagName.replaceAll(":", "_") + ext + ".data";
+ final String pathStr = TESTDATA_FILES_PATH + "/" + _compareDataSubDir
+ + "/" + fileName;
+ return getExpectedResult(pathStr);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_ParentCustomization.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_ParentCustomization.java
new file mode 100644
index 000000000..2abb8a55b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/TestUserCustomizedTagCreatorForJSFHTML_ParentCustomization.java
@@ -0,0 +1,82 @@
+package org.eclipse.jst.pagedesigner.tests.tagcreator;
+
+import org.eclipse.jst.jsf.core.internal.tld.IJSFConstants;
+import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
+import org.eclipse.jst.pagedesigner.itemcreation.customizer.CustomizationDataImpl;
+import org.eclipse.jst.pagedesigner.itemcreation.customizer.ICustomizationData;
+import org.eclipse.jst.pagedesigner.itemcreation.customizer.IWritableCustomizationData;
+import org.eclipse.jst.pagedesigner.tests.tagcreatorPlugin.UserCustomizedElementEditFactory;
+
+/**
+ * Test class for parent tag customization
+ *
+ * @author Debajit Adhikary
+ *
+ */
+public class TestUserCustomizedTagCreatorForJSFHTML_ParentCustomization extends BaseUserCustomizedTagCreatorTestCase
+{
+ /**
+ * Path to directory where the test-data files are located. The XML generated from this
+ * test case is compared against this test data.
+ *
+ */
+ private static final String TESTDATA_FILES_PATH = "/testdata/UserCustomizedTagCreator/ParentCustomization";
+
+
+ public void testParentTagInsertion() throws Exception
+ {
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jsp", "jsp", 358, false, getCustomizationData());
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "jspx", "jspx", 495, false, getCustomizationData());
+
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(JSFCoreUtilHelper.createSimpleRegistryFactory());
+ doCreateTest(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, "xhtml", "xhtml", 350, false, getCustomizationData());
+ JSFCoreUtilHelper.injectTestTagRegistryFactoryProvider(null);
+ }
+
+ protected ICustomizationData getCustomizationData()
+ {
+ // Setup tag
+ IWritableCustomizationData data = new CustomizationDataImpl(getTagIdentifier());
+ data.addAttribute("attr1", "value1");
+
+ //--------------------------------------------
+ // Add parent tags ((outermost parent first)
+ //
+ // We will create the tag hierarchy:
+ // f:view > TAG1 > TAG2 > TAG3 > TagDropped
+ //--------------------------------------------
+
+ // Setup <f:view>. (This will not use the UserCustomizedTagCreator but
+ // will use its own tag creator)
+ IWritableCustomizationData view = new CustomizationDataImpl(IJSFConstants.TAG_IDENTIFIER_VIEW);
+ data.addParentData(view);
+
+ // Setup greatgrandparent
+ IWritableCustomizationData grandParent = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG1);
+ grandParent.addAttribute("grandParentAttr1", "grandParentValue1");
+ data.addParentData(grandParent);
+
+ // Setup grandparent
+ IWritableCustomizationData parent = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG2);
+ parent.addAttribute("parentAttr1", "parentValue1");
+ data.addParentData(parent);
+
+ // Setup parent
+ IWritableCustomizationData parent2 = new CustomizationDataImpl(UserCustomizedElementEditFactory.TAG3);
+ data.addParentData(parent2);
+
+ return data;
+ }
+
+
+ @Override
+ protected final String getExpectedResult(final String tagName, final String outExt) throws Exception
+ {
+ final String ext = outExt == null ? "" : "." + outExt;
+ final String fileName = "expectedResult_"
+ + tagName.replaceAll(":", "_") + ext + ".data";
+ final String pathStr = TESTDATA_FILES_PATH + "/" + _compareDataSubDir
+ + "/" + fileName;
+ return getExpectedResult(pathStr);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/BaseItemCreationToolTestCase.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/BaseItemCreationToolTestCase.java
new file mode 100644
index 000000000..0a211f54b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/BaseItemCreationToolTestCase.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * 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.pagedesigner.tests.tagcreator.base;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jst.jsf.common.dom.TagIdentifier;
+import org.eclipse.jst.pagedesigner.tests.PageDesignerTestsPlugin;
+import org.eclipse.wst.xml.core.internal.document.ElementImpl;
+import org.w3c.dom.Element;
+
+public class BaseItemCreationToolTestCase extends BaseTestClass
+{
+
+ public BaseItemCreationToolTestCase(final String compareDataSubDir) {
+ super(compareDataSubDir);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ /**
+ * @param tagId
+ * @param inExt
+ * @param outExt
+ * @param offset
+ * @param forceResultTagEmpty this is a workaround flag due to the fact that some
+ * TLD body definitions differ between RI and MyFaces, causing some tags to be
+ * generated as <tag></tag> in RI and <tag/> in MyFaces. NEVER SET TO TRUE ON A TAG ID
+ * whose instances may have child elements.
+
+ * @throws Exception
+ */
+ protected final void doCreateTest(final TagIdentifier tagId, final String inExt, final String outExt, int offset, boolean forceResultTagEmpty) throws Exception
+ {
+ final String tagName = tagId.getTagName();
+
+ final IFile file = (IFile) _webProjectTestEnv.loadResourceInWebRoot(
+ PageDesignerTestsPlugin.getDefault().getBundle(),
+ "/testdata/tagcreator/tagCreator."+inExt+".data", "/tagCreator_"+tagName+"."+inExt);
+
+ MockItemCreationTool tool = createMockItemCreationTool(file, offset, tagId);
+
+ tool.customizeDropAndMaybeExecute(0);
+
+ // this is a hack that is required because we do a literal comparison
+ // between the modified source file and test data file on a character
+ // by character basis. However, the MyFaces and RI (and possibly other)
+ // impls cause the tags to be generated differently (MyFaces with no
+ // end tag because body-content = empty and RI with an end tag because
+ // body-content = JSP), so if the caller sets forceResultTagEmpty, we force
+ // the tag to have no end tag. This should not invalidate the test as long as
+ // the caller doesn't set forceResultTagEmpty on a tag that may have children.
+ // the tag name and attributes should be cloned.
+ if (forceResultTagEmpty)
+ {
+ Element element = ((MockCreateItemCommand)tool.getExecutedCommand()).getResult();
+
+ if (element instanceof ElementImpl)
+ {
+ forceTagEmpty((ElementImpl) element);
+ }
+ }
+ assertExpectedResult(file, tagName, outExt);
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/BaseTagCreatorTestCase.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/BaseTagCreatorTestCase.java
new file mode 100644
index 000000000..7619b6fe6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/BaseTagCreatorTestCase.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * 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.pagedesigner.tests.tagcreator.base;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jst.jsf.common.dom.TagIdentifier;
+import org.eclipse.jst.pagedesigner.itemcreation.ITagCreator;
+import org.eclipse.jst.pagedesigner.itemcreation.customizer.ICustomizationData;
+import org.eclipse.jst.pagedesigner.tests.PageDesignerTestsPlugin;
+import org.eclipse.wst.xml.core.internal.document.ElementImpl;
+import org.w3c.dom.Element;
+
+public abstract class BaseTagCreatorTestCase extends BaseTestClass
+{
+// private Map<String, TaglibPaletteDrawer> _drawers = new HashMap<String, TaglibPaletteDrawer>();
+ protected final String _defaultPrefix;
+ protected TagIdentifier tagIdentifier;
+
+ public BaseTagCreatorTestCase(final String defaultPrefix, final String compareDataSubDir)
+ {
+ super(compareDataSubDir);
+ this._defaultPrefix = defaultPrefix;
+ }
+
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+
+ public final TagIdentifier getTagIdentifier()
+ {
+ return tagIdentifier;
+ }
+
+
+ public final void setTagIdentifier(TagIdentifier tagIdentifier)
+ {
+ this.tagIdentifier = tagIdentifier;
+ }
+
+
+ /**
+ * @param tagId
+ * @param inExt
+ * @param outExt
+ * @param offset
+ * @param forceResultTagEmpty this is a workaround flag due to the fact that some
+ * TLD body definitions differ between RI and MyFaces, causing some tags to be
+ * generated as <tag></tag> in RI and <tag/> in MyFaces. NEVER SET TO TRUE ON A TAG ID
+ * whose instances may have child elements.
+ * @param customizationData TODO
+ * @throws Exception
+ */
+ protected final void doCreateTest(final TagIdentifier tagId, final String inExt, final String outExt, int offset, boolean forceResultTagEmpty, ICustomizationData customizationData) throws Exception
+ {
+ final String uri = tagId.getUri();
+ final String tagName = tagId.getTagName();
+
+ IFile file = (IFile) _webProjectTestEnv.loadResourceInWebRoot(
+ PageDesignerTestsPlugin.getDefault().getBundle(),
+ "/testdata/tagcreator/tagCreator."+inExt+".data", "/tagCreator_"+tagName+"."+inExt);
+
+ setTagIdentifier(tagId);
+
+ ITagCreator tagCreator = getTagCreator(getTagIdentifier());
+
+ Element element = tagCreator.createTag(getCreationData(uri, tagName,
+ _defaultPrefix, file, offset, customizationData));
+
+ // this is a hack that is required because we do a literal comparison
+ // between the modified source file and test data file on a character
+ // by character basis. However, the MyFaces and RI (and possibly other)
+ // impls cause the tags to be generated differently (MyFaces with no
+ // end tag because body-content = empty and RI with an end tag because
+ // body-content = JSP), so if the caller sets forceResultTagEmpty, we force
+ // the tag to have no end tag. This should not invalidate the test as long as
+ // the caller doesn't set forceResultTagEmpty on a tag that may have children.
+ // the tag name and attributes should be cloned.
+ if (forceResultTagEmpty &&
+ element instanceof ElementImpl)
+ {
+ forceTagEmpty((ElementImpl) element);
+ }
+
+ System.out.println(element.toString());
+
+ assertExpectedResult(file, tagName, outExt);
+
+ }
+
+
+ protected abstract ITagCreator getTagCreator(TagIdentifier tagId);
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/BaseTestClass.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/BaseTestClass.java
new file mode 100644
index 000000000..2e9a0c21b
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/BaseTestClass.java
@@ -0,0 +1,382 @@
+/*******************************************************************************
+ * 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.pagedesigner.tests.tagcreator.base;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.WorkspaceJob;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.gef.EditDomain;
+import org.eclipse.jst.jsf.common.dom.TagIdentifier;
+import org.eclipse.jst.jsf.common.internal.policy.OrderedListProvider;
+import org.eclipse.jst.jsf.common.internal.policy.OrderedListProvider.OrderableObject;
+import org.eclipse.jst.jsf.common.metadata.query.ITaglibDomainMetaDataModelContext;
+import org.eclipse.jst.jsf.common.metadata.query.TaglibDomainMetaDataQueryHelper;
+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.IJSFCoreConstants;
+import org.eclipse.jst.jsf.core.JSFVersion;
+import org.eclipse.jst.jsf.core.internal.JSFCorePlugin;
+import org.eclipse.jst.jsf.core.tests.util.JSFCoreUtilHelper;
+import org.eclipse.jst.jsf.core.tests.util.JSFFacetedTestEnvironment;
+import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.registry.TLDRegistryPreferences;
+import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.registry.TLDRegistryPreferences.StrategyIdentifier;
+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.jst.pagedesigner.dom.DOMPosition;
+import org.eclipse.jst.pagedesigner.editors.palette.TagToolPaletteEntry;
+import org.eclipse.jst.pagedesigner.editors.palette.impl.PaletteItemManager;
+import org.eclipse.jst.pagedesigner.editors.palette.impl.TaglibPaletteDrawer;
+import org.eclipse.jst.pagedesigner.itemcreation.CreationData;
+import org.eclipse.jst.pagedesigner.itemcreation.customizer.ICustomizationData;
+import org.eclipse.jst.pagedesigner.tests.PageDesignerTestsPlugin;
+import org.eclipse.jst.pagedesigner.utils.CommandUtil;
+import org.eclipse.wst.html.core.internal.document.DOMStyleModelImpl;
+import org.eclipse.wst.html.core.internal.format.HTMLFormatProcessorImpl;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.xml.core.internal.document.ElementImpl;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
+import org.w3c.dom.Node;
+
+/**
+ *
+ * 3/9/2010 - Now attempts to close the project on tearDown. Needs to be made more robust.
+ *
+ */
+public class BaseTestClass extends TestCase
+{
+ protected WebProjectTestEnvironment _webProjectTestEnv;
+ protected PaletteItemManager _manager;
+ protected final String _compareDataSubDir;
+
+ public BaseTestClass(final String compareDataSubDir)
+ {
+ _compareDataSubDir = compareDataSubDir;
+ }
+
+ @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());
+
+ final JSFFacetedTestEnvironment jsfFacetedTestEnv = new JSFFacetedTestEnvironment(
+ _webProjectTestEnv);
+ jsfFacetedTestEnv.initialize(IJSFCoreConstants.FACET_VERSION_1_1);
+
+ assertTrue(JSFCoreUtilHelper.addJSFRuntimeJarsToClasspath(
+ JSFVersion.V1_1, jsfFacetedTestEnv));
+
+ disableTagIntrospectingStrategy();
+
+ }
+
+ private void disableTagIntrospectingStrategy() {
+ final TLDRegistryPreferences prefs = new TLDRegistryPreferences(JSFCorePlugin.getDefault().getPreferenceStore());
+ prefs.load();
+ final OrderedListProvider provider = prefs.getOrderedListProvider();
+ for (final OrderableObject resolver : provider.getOrderedObjects()) {
+ if (resolver.getObject() instanceof StrategyIdentifier) {
+ StrategyIdentifier strategy = (StrategyIdentifier)resolver.getObject();
+// System.out.println(strategy.getId());
+ if (strategy.getId().equals("org.eclipse.jst.jsf.designtime.TagIntrospectingStrategy")) {
+ resolver.setEnabled(false);
+ break;
+ }
+ }
+ }
+ prefs.commit(JSFCorePlugin.getDefault().getPreferenceStore());
+ }
+
+ protected PaletteItemManager getPaletteItemManager(final IFile file) {
+ PaletteItemManager pim = PaletteItemManager.getInstance(PaletteItemManager.createPaletteContext(file));
+ initializePaletteItemManager(pim);
+ return pim;
+ }
+
+ protected void initializePaletteItemManager(PaletteItemManager pim) {
+ //do nothing
+ }
+
+ protected void tearDown() throws Exception {
+ PaletteItemManager.clearPaletteItemManager();
+ Job[] jobs = Job.getJobManager().find(null);
+ for (final Job j : jobs) {
+ if (j.getClass().getName().equals("org.eclipse.jst.jsp.core.internal.java.search.JSPIndexManager$ProcessFilesJob"))
+ j.cancel();
+// System.out.println(j);
+ }
+ Job closeJob = new WorkspaceJob("close test project") {
+
+ @Override
+ public IStatus runInWorkspace(IProgressMonitor monitor)
+ throws CoreException {
+ _webProjectTestEnv.getTestProject().close(monitor);
+ return Status.OK_STATUS;
+ }
+ };
+ closeJob.schedule();
+ closeJob.join();
+
+ }
+
+ protected CreationData getCreationData(final String uri,
+ final String tagName, final String defaultPrefix, final IFile file,
+ final int offset, final ICustomizationData customizationData) throws Exception
+ {
+ final TagToolPaletteEntry entry = createNonNullPaletteEntry(uri,
+ tagName, file);
+
+ final ContextWrapper context = getDocumentContext(offset, file);
+ final IDOMContextResolver resolver = IStructuredDocumentContextResolverFactory.INSTANCE
+ .getDOMContextResolver(context.getContext());
+ // we want to simulate a drop inside the the body after the text node
+ final Node node = resolver.getNode();
+ assertEquals(Node.TEXT_NODE, node.getNodeType());
+
+ final DOMPosition domPosition = new DOMPosition(node, 0);
+ final IDOMModel model =(IDOMModel) context.getModel();
+ final ITaglibDomainMetaDataModelContext modelContext = CommandUtil.getMetadataContext(uri, model);
+ return new CreationData(entry.getTemplate(), model,
+ domPosition, modelContext, customizationData);
+ }
+
+ private TagToolPaletteEntry createPaletteEntry(final String uri,
+ final String tagName, final IFile file)
+ {
+ final TaglibPaletteDrawer drawer = getPaletteItemManager(file)
+ .getTaglibPalletteDrawer(uri);
+ assertNotNull(String.format("Uri: %s, tagName: %s", uri, tagName),
+ drawer);
+ TagToolPaletteEntry entry = drawer.getTagPaletteEntryByTagName(tagName);
+
+ // covers case for HTML where the id is what's important because
+ // the tag name is over loaded (i.e. input).
+ if (entry == null)
+ {
+ entry = drawer.getTagPaletteEntryById(tagName);
+ }
+
+ return entry;
+ }
+
+ private TagToolPaletteEntry createNonNullPaletteEntry(final String uri,
+ final String tagName, IFile file)
+ {
+ final TagToolPaletteEntry entry = createPaletteEntry(uri, tagName, file);
+ assertNotNull(entry);
+ return entry;
+ }
+
+ protected ContextWrapper getDocumentContext(final int offset,
+ final IFile jspFile) throws Exception
+ {
+
+ assertTrue(jspFile.exists());
+ final IModelManager modelManager = StructuredModelManager
+ .getModelManager();
+ IStructuredModel model = null;
+ model = modelManager.getModelForRead(jspFile);
+ // jsp, jspx or xhtml
+ assertTrue(model instanceof DOMModelForJSP
+ || model instanceof DOMStyleModelImpl);
+ 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();
+ this.context = context;
+ this.model = model;
+ }
+
+ public IStructuredDocumentContext getContext()
+ {
+ return context;
+ }
+
+ public IStructuredModel getModel()
+ {
+ return model;
+ }
+
+ void dispose()
+ {
+ model.releaseFromRead();
+ }
+ }
+
+ protected String getExpectedResult(final IPath path) throws IOException
+ {
+ return JSFTestUtil.loadFromFile(path.toFile()).toString();
+ }
+
+ protected String getExpectedResult(final String tagName,
+ final String outExt) throws Exception
+ {
+ final String ext = outExt == null ? "" : "." + outExt;
+ final String fileName = "expectedResult_"
+ + tagName.replaceAll(":", "_") + ext + ".data";
+ final String pathStr = "/testdata/tagcreator/" + _compareDataSubDir
+ + "/" + fileName;
+ return getExpectedResult(pathStr);
+ }
+
+ protected final String getExpectedResult(final String pathStr)
+ throws Exception
+ {
+ final IPath expectedPath = JSFTestUtil.getAbsolutePath(
+ PageDesignerTestsPlugin.getDefault().getBundle(), pathStr);
+ return getExpectedResult(expectedPath);
+ }
+
+ protected final void assertExpectedResult(final IFile file,
+ final String tagName, final String outExt) throws Exception
+ {
+ final String expected = getExpectedString(file, tagName, outExt);
+ final String result = getResultString(file);
+
+ assertEquals(expected, result);
+ }
+
+ private String getResultString(final IFile file) throws Exception
+ {
+ final ByteArrayOutputStream resultStream = new ByteArrayOutputStream();
+ new HTMLFormatProcessorImpl()
+ .formatDocument(getDocumentContext(0, file).getModel()
+ .getStructuredDocument());
+ getDocumentContext(0, file).getModel().save(resultStream);
+ return resultStream.toString("ISO-8859-1").trim();
+ }
+
+ private final String getExpectedString(final IFile file, String tagName,
+ String outExt) throws Exception
+ {
+ final String expectedUnformatted = getExpectedResult(tagName, outExt)
+ .trim();
+
+ final IPath path = file.getProjectRelativePath().removeLastSegments(1)
+ .append("/expected/");
+ final IFolder folder = file.getProject().getFolder(path);
+
+ if (!folder.exists())
+ {
+ folder.create(true, true, null);
+ }
+
+ assertTrue(folder.isAccessible());
+
+ // need to format
+ final IFile tempFile = file.getProject().getFile(
+ path.append(file.getName()));
+ assertFalse(tempFile.exists());
+ tempFile.create(
+ new ByteArrayInputStream(expectedUnformatted.getBytes()), true,
+ null);
+
+ assertTrue(tempFile.isAccessible());
+ final IModelManager modelManager = StructuredModelManager
+ .getModelManager();
+ IStructuredModel model = null;
+ model = modelManager.getModelForRead(tempFile);
+ new HTMLFormatProcessorImpl().formatDocument(model
+ .getStructuredDocument());
+ final ByteArrayOutputStream expectedStream = new ByteArrayOutputStream();
+ model.save(expectedStream);
+ return expectedStream.toString("ISO-8859-1").trim();
+ }
+
+ protected MockItemCreationTool createMockItemCreationTool(final IFile file,
+ final int offset, final TagIdentifier tagId) throws Exception
+ {
+ return createMockItemCreationTool(file, offset, tagId, IStatus.OK);
+ }
+
+ protected MockItemCreationTool createMockItemCreationTool(final IFile file,
+ final int offset, final TagIdentifier tagId,
+ final int expectedResult) throws Exception
+ {
+
+ final TagToolPaletteEntry toolEntry = createNonNullPaletteEntry(tagId
+ .getUri(), tagId.getTagName(), file);
+ final MockItemCreationTool tool = new MockItemCreationTool(toolEntry.getTemplate());
+
+ final ContextWrapper wrapper = getDocumentContext(offset, file);
+ final IDOMContextResolver resolver = IStructuredDocumentContextResolverFactory.INSTANCE
+ .getDOMContextResolver(wrapper.getContext());
+ final IStructuredModel model = wrapper.getModel();
+
+ final DOMPosition domPosition = new DOMPosition(resolver.getNode(), 0);
+
+ final MockCreateItemCommand command = new MockCreateItemCommand(
+ "Test Command", (IDOMModel) model, domPosition, toolEntry.getTemplate());
+
+ tool.setEditDomain(new EditDomain());
+ tool.setCurrentCommand(command);
+
+ return tool;
+ }
+
+ protected final void forceTagEmpty(final ElementImpl element)
+ {
+ for (int i = 0; i < element.getChildNodes().getLength(); i++)
+ {
+ final Node node = element.getChildNodes().item(i);
+
+ if (node instanceof ElementImpl)
+ {
+ forceTagEmpty((ElementImpl) node);
+ }
+ }
+
+ // if element has no children, force it to an empty tag
+ if (element.getChildNodes().getLength() == 0)
+ {
+ (element).setEmptyTag(true);
+ (element).removeChildNodes();
+ final Node copy = (element).cloneNode(false);
+ element.getParentNode().replaceChild(copy, element);
+ }
+ }
+
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/MockCreateItemCommand.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/MockCreateItemCommand.java
new file mode 100644
index 000000000..03523803f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/MockCreateItemCommand.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * 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.pagedesigner.tests.tagcreator.base;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jst.pagedesigner.commands.CreateItemCommand;
+import org.eclipse.jst.pagedesigner.dom.IDOMPosition;
+import org.eclipse.jst.pagedesigner.editors.palette.ITagDropSourceData;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+public class MockCreateItemCommand extends CreateItemCommand
+{
+ public MockCreateItemCommand(String label, IDOMModel model,
+ IDOMPosition position, ITagDropSourceData tagDropSourceData) {
+ super(label, model, position, tagDropSourceData);
+ }
+
+ @Override
+ public void formatNode(Node node)
+ {
+ // override to NOOP: we don't want to format the node
+ }
+
+ public IAdaptable getCustomizationDataTesting()
+ {
+ return super.getCustomizationData();
+ }
+
+ @Override
+ public Element getResult() {
+ // just make super.getResult() accessible to the test
+ return super.getResult();
+ }
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/MockItemCreationTool.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/MockItemCreationTool.java
new file mode 100644
index 000000000..fb95fe1cd
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreator/base/MockItemCreationTool.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * 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.pagedesigner.tests.tagcreator.base;
+
+import org.eclipse.gef.EditDomain;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.jst.pagedesigner.commands.CreateItemCommand;
+import org.eclipse.jst.pagedesigner.editors.palette.ITagDropSourceData;
+import org.eclipse.jst.pagedesigner.itemcreation.ItemCreationTool;
+
+public class MockItemCreationTool extends ItemCreationTool
+{
+ private Command _cached = null;
+
+ public MockItemCreationTool(ITagDropSourceData tagDropSourceData) {
+ super(tagDropSourceData);
+ }
+
+ @Override
+ public void customizeDropAndMaybeExecute(int button) {
+ super.customizeDropAndMaybeExecute(button);
+ }
+
+ @Override
+ protected void setCurrentCommand(Command c) {
+ super.setCurrentCommand(c);
+ }
+
+ @Override
+ public EditDomain getDomain() {
+ return super.getDomain();
+ }
+
+ public CreateItemCommand getExecutedCommand()
+ {
+ return (CreateItemCommand) _cached;
+ }
+
+ @Override
+ protected void executeCurrentCommand() {
+ // trap the current command because executeCurrentCommand
+ // will null it after execution
+ _cached = getCurrentCommand();
+ super.executeCurrentCommand();
+ }
+
+} \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreatorPlugin/TestCreationFactory.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreatorPlugin/TestCreationFactory.java
new file mode 100644
index 000000000..5f445b470
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreatorPlugin/TestCreationFactory.java
@@ -0,0 +1,186 @@
+/*******************************************************************************
+ * 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.pagedesigner.tests.tagcreatorPlugin;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jst.jsf.common.dom.TagIdentifier;
+import org.eclipse.jst.jsf.core.internal.tld.TagIdentifierFactory;
+import org.eclipse.jst.pagedesigner.elementedit.AbstractElementEdit;
+import org.eclipse.jst.pagedesigner.elementedit.AbstractElementEditFactory;
+import org.eclipse.jst.pagedesigner.elementedit.IElementEdit;
+import org.eclipse.jst.pagedesigner.itemcreation.AbstractTagCreator;
+import org.eclipse.jst.pagedesigner.itemcreation.CreationData;
+import org.eclipse.jst.pagedesigner.itemcreation.DefaultTagCreationAdvisor;
+import org.eclipse.jst.pagedesigner.itemcreation.ITagCreationAdvisor;
+import org.eclipse.jst.pagedesigner.itemcreation.ITagCreator;
+import org.eclipse.jst.pagedesigner.itemcreation.command.ElementCustomizationCommand;
+import org.eclipse.jst.pagedesigner.itemcreation.customizer.AbstractDropCustomizer;
+import org.eclipse.jst.pagedesigner.itemcreation.customizer.IDropCustomizer;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
+import org.w3c.dom.Element;
+
+/**
+ * Factory for testing purposes
+ *
+ * @author cbateman
+ *
+ */
+public class TestCreationFactory extends AbstractElementEditFactory
+{
+ public final static String TAGCREATOR_URI_1 =
+ "org.eclipse.jst.pagedesigner.tests.tagCreatorFactory1";
+
+ public final static TagIdentifier TAG_WITH_REQUIRED_ATTR =
+ TagIdentifierFactory.createJSPTagWrapper
+ (TAGCREATOR_URI_1, "tagWithRequiredAttr");
+
+ protected static final TagIdentifier TAG_WITH_UNSET_REQUIRED_ATTR =
+ TagIdentifierFactory.createJSPTagWrapper
+ (TAGCREATOR_URI_1, "tagWithRequiredAttr2");
+
+ public final static String REQUIRED_ATTR_1 = "requiredAttr1";
+ public final static String REQUIRED_ATTR_2 = "requiredAttr2";
+
+ public TestCreationFactory()
+ {
+ super(TAGCREATOR_URI_1);
+ }
+
+ @Override
+ public IElementEdit createElementEdit(TagIdentifier tag)
+ {
+ return new AbstractElementEdit()
+ {
+ @Override
+ public ITagCreator getTagCreator(TagIdentifier tagId)
+ {
+ return doCreateTagCreator();
+ }
+
+ @Override
+ public IDropCustomizer getDropCustomizer(TagIdentifier tagId) {
+ return new MyDropCustomizer();
+ }
+
+
+ };
+ }
+
+ public ITagCreator doCreateTagCreator() {
+ return new MyTagCreator();
+ }
+
+ private static class MyTagCreator extends AbstractTagCreator
+ {
+ @Override
+ protected ITagCreationAdvisor doSelectCreationAdvisor(
+ CreationData creationData) {
+ return new MyTagCreationAdvisor(creationData);
+ }
+ }
+
+ private static class MyTagCreationAdvisor extends DefaultTagCreationAdvisor
+ {
+ public MyTagCreationAdvisor(CreationData creationData)
+ {
+ super(creationData);
+ }
+
+ @Override
+ protected ElementCustomizationCommand getElementCustomizationCommand(
+ IDOMModel model, Element tagElement)
+ {
+ return new ElementCustomizationCommand(model, tagElement, _creationData)
+ {
+ @Override
+ protected void applyAttributeCustomization()
+ {
+ super.applyAttributeCustomization();
+
+ final TagIdentifier tagId =
+ TagIdentifierFactory.createJSPTagWrapper
+ (_creationData.getUri(), _creationData.getTagName());
+
+ if (tagId.equals(TAG_WITH_REQUIRED_ATTR))
+ {
+ _element.setAttribute(REQUIRED_ATTR_2
+ , getDefaultAttributeValue(tagId, REQUIRED_ATTR_2));
+ }
+
+ if (tagId.equals(TAG_WITH_UNSET_REQUIRED_ATTR))
+ {
+ ensureRequiredAttrs(_element, _creationData);
+ }
+ }
+ };
+ }
+ }
+
+ public static String getDefaultAttributeValue(TagIdentifier tagId, String attributeName)
+ {
+ if (TAG_WITH_REQUIRED_ATTR.equals(tagId))
+ {
+ if (REQUIRED_ATTR_1.equals(attributeName))
+ {
+ return null;
+ }
+ else if (REQUIRED_ATTR_2.equals(attributeName))
+ {
+ return "foo";
+ }
+ }
+
+ // if case not covered, return null
+ return null;
+ }
+
+
+ // used by MyDropCustomizer so external JUnits can set the expected status
+ // and adaptable values
+ private static IStatus STATUS;
+ private static IAdaptable ADAPTABLE;
+
+ /**
+ * @param status
+ * @param adaptable
+ */
+ public static synchronized void setTestParametersForDropCustomer(IStatus status, IAdaptable adaptable)
+ {
+ STATUS = status;
+ ADAPTABLE = adaptable;
+ }
+
+ private static synchronized IStatus getTestStatus()
+ {
+ return STATUS;
+ }
+
+ private static synchronized IAdaptable getTestAdaptable()
+ {
+ return ADAPTABLE;
+ }
+
+ private static class MyDropCustomizer extends AbstractDropCustomizer
+ {
+ @Override
+ public IAdaptable getDropCustomizationData() {
+ return getTestAdaptable();
+ }
+
+ @Override
+ public IStatus runCustomizer()
+ {
+ return getTestStatus();
+ }
+
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreatorPlugin/UserCustomizedElementEditFactory.java b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreatorPlugin/UserCustomizedElementEditFactory.java
new file mode 100644
index 000000000..479428af5
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/src/org/eclipse/jst/pagedesigner/tests/tagcreatorPlugin/UserCustomizedElementEditFactory.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * 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.pagedesigner.tests.tagcreatorPlugin;
+
+import org.eclipse.jst.jsf.common.dom.TagIdentifier;
+import org.eclipse.jst.jsf.core.internal.tld.TagIdentifierFactory;
+import org.eclipse.jst.pagedesigner.elementedit.AbstractElementEdit;
+import org.eclipse.jst.pagedesigner.elementedit.AbstractElementEditFactory;
+import org.eclipse.jst.pagedesigner.elementedit.IElementEdit;
+import org.eclipse.jst.pagedesigner.itemcreation.ITagCreator;
+import org.eclipse.jst.pagedesigner.itemcreation.customizer.IDropCustomizer;
+import org.eclipse.jst.pagedesigner.itemcreation.internal.UserCustomizedTagCreator;
+
+/**
+ * ElementEdit factory for testing tag drop customization
+ *
+ * @author Debajit Adhikary
+ *
+ */
+public class UserCustomizedElementEditFactory extends AbstractElementEditFactory
+{
+ public static final String TAGCREATOR_URI_1 = "http://com.foo/test";
+
+ public static final TagIdentifier TAG1 = TagIdentifierFactory.createJSPTagWrapper(TAGCREATOR_URI_1, "tag1");
+ public static final TagIdentifier TAG2 = TagIdentifierFactory.createJSPTagWrapper(TAGCREATOR_URI_1, "tag2");
+ public static final TagIdentifier TAG3 = TagIdentifierFactory.createJSPTagWrapper(TAGCREATOR_URI_1, "tag3");
+ public static final TagIdentifier TAG4 = TagIdentifierFactory.createJSPTagWrapper(TAGCREATOR_URI_1, "tag4");
+ public static final TagIdentifier TAG5 = TagIdentifierFactory.createJSPTagWrapper(TAGCREATOR_URI_1, "tag5");
+ public static final TagIdentifier TAG6 = TagIdentifierFactory.createJSPTagWrapper(TAGCREATOR_URI_1, "tag6");
+ public static final TagIdentifier TAG7 = TagIdentifierFactory.createJSPTagWrapper(TAGCREATOR_URI_1, "tag7");
+ public static final TagIdentifier TAG8 = TagIdentifierFactory.createJSPTagWrapper(TAGCREATOR_URI_1, "tag8");
+ public static final TagIdentifier TAG9 = TagIdentifierFactory.createJSPTagWrapper(TAGCREATOR_URI_1, "tag9");
+
+
+ public UserCustomizedElementEditFactory()
+ {
+ super(TAGCREATOR_URI_1);
+ }
+
+
+ @Override
+ public IElementEdit createElementEdit(TagIdentifier tag)
+ {
+ return new AbstractElementEdit()
+ {
+ @Override
+ public ITagCreator getTagCreator(TagIdentifier tagId)
+ {
+ return doCreateTagCreator();
+ }
+
+ @Override
+ public IDropCustomizer getDropCustomizer(TagIdentifier tagId) {
+ throw new UnsupportedOperationException("Not implemented");
+ }
+ };
+ }
+
+
+ public ITagCreator doCreateTagCreator()
+ {
+ return new UserCustomizedTagCreator();
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/test.xml b/jsf/tests/org.eclipse.jst.pagedesigner.tests/test.xml
new file mode 100644
index 000000000..b086b9add
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/test.xml
@@ -0,0 +1,62 @@
+<?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.pagedesigner.tests"/>
+ <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml"/>
+ <property name="extraVMargs" value="-DjsfRuntimeJarsDirectoryV1.1=${testDir}/${jsf1.1Dir}"/>
+ <echo message="extraVMargs ${extraVMargs}" />
+ <!-- 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.pagedesigner.tests.*xml"/>
+ </delete>
+ </target>
+
+ <!-- This target defines the tests that need to be run. -->
+ <target name="suite_pt1">
+ <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.pagedesigner.tests.AllTests_Part1" />
+ <property name="plugin-path" value="${eclipse-home}/plugins/${plugin-name}"/>
+ <property name="extraVMargs" value="${extraVMargs}"/>
+ </ant>
+ </target>
+
+ <target name="suite_pt2">
+ <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.pagedesigner.tests.AllTests_Part2" />
+ <property name="plugin-path" value="${eclipse-home}/plugins/${plugin-name}"/>
+ <property name="extraVMargs" value="${extraVMargs}"/>
+ </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_pt1, suite_pt2, cleanup">
+ <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="includes" value="org.eclipse.jst.pagedesigner.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.pagedesigner.tests/testdata/Test_DTManager.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/Test_DTManager.jsp.data
new file mode 100644
index 000000000..272db0f40
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/Test_DTManager.jsp.data
@@ -0,0 +1,17 @@
+<%@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>Test_DTManager</title>
+</head>
+<body>
+<f:view>
+ <h:form>
+ <h:outputText value="valueValue" styleClass="classValue" attr1="attr1Value"/>
+ </h:form>
+</f:view>
+</body>
+</html> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/Test_TransformOperations.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/Test_TransformOperations.jsp.data
new file mode 100644
index 000000000..19466bff7
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/Test_TransformOperations.jsp.data
@@ -0,0 +1,23 @@
+<%@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>Test_DTManager</title>
+</head>
+<body>
+<f:view>
+ <h:form>
+ <h:selectManyListbox>
+ <f:selectItem itemLabel="selectItem One" itemValue="selectItem_1"/>
+ <f:selectItem/>
+ </h:selectManyListbox>
+ <h:commandLink value="commandLink value" attr1="attr1_value" attr2="attr2_value">
+ <f:actionListener/>
+ </h:commandLink>
+ </h:form>
+</f:view>
+</body>
+</html> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/AttributeCustomization/jsf/expectedResult_commandButton.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/AttributeCustomization/jsf/expectedResult_commandButton.jsp.data
new file mode 100644
index 000000000..347c072d1
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/AttributeCustomization/jsf/expectedResult_commandButton.jsp.data
@@ -0,0 +1,13 @@
+<%@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>
+
+<h:commandButton attr1="value1"></h:commandButton>
+</body>
+</html> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/AttributeCustomization/jsf/expectedResult_commandButton.jspx.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/AttributeCustomization/jsf/expectedResult_commandButton.jspx.data
new file mode 100644
index 000000000..de22c7ae3
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/AttributeCustomization/jsf/expectedResult_commandButton.jspx.data
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"> <jsp:directive.page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" />
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+ <title>Insert title here</title>
+ </head>
+ <body>
+ <h:commandButton attr1="value1"></h:commandButton>
+
+</body>
+</html>
+</jsp:root>
+
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/AttributeCustomization/jsf/expectedResult_commandButton.xhtml.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/AttributeCustomization/jsf/expectedResult_commandButton.xhtml.data
new file mode 100644
index 000000000..c42356d1a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/AttributeCustomization/jsf/expectedResult_commandButton.xhtml.data
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Insert title here</title>
+</head>
+<body>
+<h:commandButton attr1="value1"></h:commandButton>
+
+</body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/ChildCustomization/jsf/expectedResult_commandButton.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/ChildCustomization/jsf/expectedResult_commandButton.jsp.data
new file mode 100644
index 000000000..fdee6fa56
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/ChildCustomization/jsf/expectedResult_commandButton.jsp.data
@@ -0,0 +1,30 @@
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
+ uri="http://java.sun.com/jsf/core" prefix="f"%><%@taglib
+ uri="http://com.foo/test" prefix="p"%><%@ 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:commandButton attr1="value1">
+ <p:tag1>
+ <p:tag1></p:tag1>
+ </p:tag1>
+ <p:tag2 tag2Attr1="tag2Attr1Value">
+ <p:tag7></p:tag7>
+ <p:tag6></p:tag6>
+ </p:tag2>
+ <p:tag3>
+ <p:tag8>
+ <p:tag9></p:tag9>
+ </p:tag8>
+ </p:tag3>
+ </h:commandButton>
+</f:view>
+</body>
+</html> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/ChildCustomization/jsf/expectedResult_commandButton.jspx.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/ChildCustomization/jsf/expectedResult_commandButton.jspx.data
new file mode 100644
index 000000000..fa4823d43
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/ChildCustomization/jsf/expectedResult_commandButton.jspx.data
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://com.foo/test"> <jsp:directive.page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" />
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+ <title>Insert title here</title>
+ </head>
+ <body>
+ <f:view>
+ <h:commandButton attr1="value1">
+ <p:tag1>
+ <p:tag1></p:tag1>
+ </p:tag1>
+ <p:tag2 tag2Attr1="tag2Attr1Value">
+ <p:tag7></p:tag7>
+ <p:tag6></p:tag6>
+ </p:tag2>
+ <p:tag3>
+ <p:tag8>
+ <p:tag9></p:tag9>
+ </p:tag8>
+ </p:tag3>
+ </h:commandButton>
+ </f:view>
+
+</body>
+</html>
+</jsp:root>
+
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/ChildCustomization/jsf/expectedResult_commandButton.xhtml.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/ChildCustomization/jsf/expectedResult_commandButton.xhtml.data
new file mode 100644
index 000000000..0e6df2517
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/ChildCustomization/jsf/expectedResult_commandButton.xhtml.data
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:p="http://com.foo/test">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Insert title here</title>
+</head>
+<body>
+<f:view>
+ <h:commandButton attr1="value1">
+ <p:tag1>
+ <p:tag1></p:tag1>
+ </p:tag1>
+ <p:tag2 tag2Attr1="tag2Attr1Value">
+ <p:tag7></p:tag7>
+ <p:tag6></p:tag6>
+ </p:tag2>
+ <p:tag3>
+ <p:tag8>
+ <p:tag9></p:tag9>
+ </p:tag8>
+ </p:tag3>
+ </h:commandButton>
+</f:view>
+
+</body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/GeneralCustomization/jsf/expectedResult_commandButton.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/GeneralCustomization/jsf/expectedResult_commandButton.jsp.data
new file mode 100644
index 000000000..12abdca4f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/GeneralCustomization/jsf/expectedResult_commandButton.jsp.data
@@ -0,0 +1,53 @@
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
+ uri="http://java.sun.com/jsf/core" prefix="f"%><%@taglib
+ uri="http://com.foo/test" prefix="p"%><%@ 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>
+ <p:tag1>
+ <p:tag1>
+ <p:tag2 tag21Attr1="tag21Attr1Value">
+ <p:tag2 tag22Attr1="tag22Attr1Value">
+ <p:tag2>
+ <p:tag2>
+ <p:tag2>
+ <p:tag2>
+ <p:tag2>
+ <p:tag3>
+ <p:tag3>
+ <h:commandButton attr1="value1">
+ <p:tag8></p:tag8>
+ <p:tag8></p:tag8>
+ <p:tag8></p:tag8>
+ <p:tag9 tag91Attr1="tag91Attr1Value"></p:tag9>
+ <p:tag9></p:tag9>
+ <p:tag7>
+ <p:tag8 attr1="value1">
+ <p:tag7>
+ <p:tag6></p:tag6>
+ <p:tag6></p:tag6>
+ </p:tag7>
+ </p:tag8>
+ </p:tag7>
+ </h:commandButton>
+ </p:tag3>
+ </p:tag3>
+ </p:tag2>
+ </p:tag2>
+ </p:tag2>
+ </p:tag2>
+ </p:tag2>
+ </p:tag2>
+ </p:tag2>
+ </p:tag1>
+ </p:tag1>
+</f:view>
+</body>
+</html> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/GeneralCustomization/jsf/expectedResult_commandButton.jspx.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/GeneralCustomization/jsf/expectedResult_commandButton.jspx.data
new file mode 100644
index 000000000..97ef775f9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/GeneralCustomization/jsf/expectedResult_commandButton.jspx.data
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://com.foo/test">
+ <jsp:directive.page language="java"
+ contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" />
+ <html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+ <title>Insert title here</title>
+ </head>
+ <body>
+ <f:view>
+ <p:tag1>
+ <p:tag1>
+ <p:tag2 tag21Attr1="tag21Attr1Value">
+ <p:tag2 tag22Attr1="tag22Attr1Value">
+ <p:tag2>
+ <p:tag2>
+ <p:tag2>
+ <p:tag2>
+ <p:tag2>
+ <p:tag3>
+ <p:tag3>
+ <h:commandButton attr1="value1">
+ <p:tag8></p:tag8>
+ <p:tag8></p:tag8>
+ <p:tag8></p:tag8>
+ <p:tag9 tag91Attr1="tag91Attr1Value"></p:tag9>
+ <p:tag9></p:tag9>
+ <p:tag7>
+ <p:tag8 attr1="value1">
+ <p:tag7>
+ <p:tag6></p:tag6>
+ <p:tag6></p:tag6>
+ </p:tag7>
+ </p:tag8>
+ </p:tag7>
+ </h:commandButton>
+ </p:tag3>
+ </p:tag3>
+ </p:tag2>
+ </p:tag2>
+ </p:tag2>
+ </p:tag2>
+ </p:tag2>
+ </p:tag2>
+ </p:tag2>
+ </p:tag1>
+ </p:tag1>
+ </f:view>
+
+ </body>
+ </html>
+</jsp:root> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/GeneralCustomization/jsf/expectedResult_commandButton.xhtml.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/GeneralCustomization/jsf/expectedResult_commandButton.xhtml.data
new file mode 100644
index 000000000..5626d4727
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/GeneralCustomization/jsf/expectedResult_commandButton.xhtml.data
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://com.foo/test">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Insert title here</title>
+</head>
+<body>
+<f:view>
+ <p:tag1>
+ <p:tag1>
+ <p:tag2 tag21Attr1="tag21Attr1Value">
+ <p:tag2 tag22Attr1="tag22Attr1Value">
+ <p:tag2>
+ <p:tag2>
+ <p:tag2>
+ <p:tag2>
+ <p:tag2>
+ <p:tag3>
+ <p:tag3>
+ <h:commandButton attr1="value1">
+ <p:tag8></p:tag8>
+ <p:tag8></p:tag8>
+ <p:tag8></p:tag8>
+ <p:tag9 tag91Attr1="tag91Attr1Value"></p:tag9>
+ <p:tag9></p:tag9>
+ <p:tag7>
+ <p:tag8 attr1="value1">
+ <p:tag7>
+ <p:tag6></p:tag6>
+ <p:tag6></p:tag6>
+ </p:tag7>
+ </p:tag8>
+ </p:tag7>
+ </h:commandButton>
+ </p:tag3>
+ </p:tag3>
+ </p:tag2>
+ </p:tag2>
+ </p:tag2>
+ </p:tag2>
+ </p:tag2>
+ </p:tag2>
+ </p:tag2>
+ </p:tag1>
+ </p:tag1>
+</f:view>
+
+</body>
+</html> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/ParentCustomization/jsf/expectedResult_commandButton.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/ParentCustomization/jsf/expectedResult_commandButton.jsp.data
new file mode 100644
index 000000000..2aae898e3
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/ParentCustomization/jsf/expectedResult_commandButton.jsp.data
@@ -0,0 +1,23 @@
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
+ uri="http://java.sun.com/jsf/core" prefix="f"%><%@taglib
+ uri="http://com.foo/test" prefix="p"%><%@ 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>
+ <p:tag1 grandParentAttr1="grandParentValue1">
+ <p:tag2 parentAttr1="parentValue1">
+ <p:tag3>
+ <h:commandButton attr1="value1"></h:commandButton>
+ </p:tag3>
+ </p:tag2>
+ </p:tag1>
+</f:view>
+</body>
+</html> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/ParentCustomization/jsf/expectedResult_commandButton.jspx.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/ParentCustomization/jsf/expectedResult_commandButton.jspx.data
new file mode 100644
index 000000000..91afb062c
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/ParentCustomization/jsf/expectedResult_commandButton.jspx.data
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://com.foo/test"> <jsp:directive.page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" />
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+ <title>Insert title here</title>
+ </head>
+ <body>
+ <f:view>
+ <p:tag1 grandParentAttr1="grandParentValue1">
+ <p:tag2 parentAttr1="parentValue1">
+ <p:tag3>
+ <h:commandButton attr1="value1"></h:commandButton>
+ </p:tag3>
+ </p:tag2>
+ </p:tag1>
+ </f:view>
+
+</body>
+</html>
+</jsp:root>
+
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/ParentCustomization/jsf/expectedResult_commandButton.xhtml.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/ParentCustomization/jsf/expectedResult_commandButton.xhtml.data
new file mode 100644
index 000000000..de44fbfce
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/UserCustomizedTagCreator/ParentCustomization/jsf/expectedResult_commandButton.xhtml.data
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:p="http://com.foo/test">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Insert title here</title>
+</head>
+<body>
+<f:view>
+ <p:tag1 grandParentAttr1="grandParentValue1">
+ <p:tag2 parentAttr1="parentValue1">
+ <p:tag3>
+ <h:commandButton attr1="value1"></h:commandButton>
+ </p:tag3>
+ </p:tag2>
+ </p:tag1>
+</f:view>
+
+</body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/checkmodeop/checkModeOp.tld.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/checkmodeop/checkModeOp.tld.data
new file mode 100644
index 000000000..178883ef4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/checkmodeop/checkModeOp.tld.data
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<!DOCTYPE taglib
+ PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
+ "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+
+
+<taglib>
+
+
+ <!-- ========== Tag Library Description Elements ========================= -->
+
+
+ <tlib-version>1.0</tlib-version>
+ <jsp-version>1.2</jsp-version>
+ <short-name>testCheckModeOperation</short-name>
+ <uri>org.eclipse.jst.pagedesigner.tests.testCheckModeOperation</uri>
+ <description>
+ A test tld used for verifying the CheckModeOperation.
+ </description>
+
+ <!-- ========== Tag Descriptions ========================================= -->
+
+
+ <tag>
+ <name>testTagOne</name>
+ <tag-class>com.foo.SomeClassOne</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ A simple test tag. This test includes design time metadata mapped to
+ this tag to exercise the CheckModeOperation.
+ </description>
+
+ <attribute>
+ <name>notRequiredAttr1</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ This attribute is optional.
+ </description>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>testTagTwo</name>
+ <tag-class>com.foo.SomeClassTwo</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ A simple test tag. This test includes design time metadata mapped to
+ this tag to exercise the CheckModeOperation.
+ </description>
+
+ <attribute>
+ <name>requiredAttr1</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ This attribute is required.
+ </description>
+ </attribute>
+
+ <attribute>
+ <name>requiredAttr2</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ This attribute is required.
+ </description>
+ </attribute>
+ </tag>
+
+</taglib>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/checkmodeop/testCheckModeOperation.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/checkmodeop/testCheckModeOperation.jsp.data
new file mode 100644
index 000000000..81b4da175
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/checkmodeop/testCheckModeOperation.jsp.data
@@ -0,0 +1,27 @@
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
+<%@taglib uri="org.eclipse.jst.pagedesigner.tests.testCheckModeOperation" prefix="cmo"%>
+
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <title>Test CheckModeOperation</title>
+</head>
+<body>
+ <div id="t1Div">
+ <cmo:testTagOne>
+ <span id="t1ChildSpan">
+ some text
+ </span>
+ </cmo:testTagOne>
+ </div>
+
+ <div id="t2Div">
+ <cmo:testTagTwo requiredAttr1="designId"
+ requiredAttr2="previewId">
+ <span id="t2ChildSpan">
+ some text
+ </span>
+ </cmo:testTagTwo>
+ </div>
+</body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/propertypages/tagProperty.xsd.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/propertypages/tagProperty.xsd.data
new file mode 100644
index 000000000..f0a70c9d5
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/propertypages/tagProperty.xsd.data
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema">
+ <element name="taglib">
+ <complexType>
+ <sequence>
+ <element ref="tag" maxOccurs="unbounded"></element>
+ <element ref="definition" minOccurs="0" maxOccurs="1"></element>
+ </sequence>
+ <attribute ref="uri" />
+ </complexType>
+ </element>
+
+ <element name="tag">
+ <complexType>
+ <sequence>
+ <element ref="category" minOccurs="0"
+ maxOccurs="unbounded">
+ </element>
+ <element ref="referedcategory" minOccurs="0"
+ maxOccurs="unbounded">
+ </element>
+ </sequence>
+ <attribute ref="name"></attribute>
+ </complexType>
+ </element>
+
+ <element name="category">
+ <complexType>
+ <sequence>
+ <element ref="attribute" minOccurs="0"
+ maxOccurs="unbounded">
+ </element>
+ <element ref="referedattribute" minOccurs="0"
+ maxOccurs="unbounded">
+ </element>
+ </sequence>
+ <attribute ref="name"></attribute>
+ <attribute ref="displaylabel"></attribute>
+ </complexType>
+ </element>
+
+ <element name="referedcategory">
+ <complexType>
+ <sequence>
+ <element ref="includeattrs" minOccurs="0"
+ maxOccurs="1">
+ </element>
+ <element ref="excludeattrs" minOccurs="0"
+ maxOccurs="1">
+ </element>
+ </sequence>
+ <attribute ref="ref"></attribute>
+ <attribute ref="displaylabel"></attribute>
+ </complexType>
+ </element>
+
+ <element name="definition">
+ <complexType>
+ <sequence>
+ <element ref="categories" minOccurs="0" maxOccurs="1"></element>
+ <element ref="attributes" minOccurs="0" maxOccurs="1"></element>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="attribute">
+ <complexType>
+ <sequence>
+ <element ref="option" minOccurs="0"
+ maxOccurs="unbounded">
+ </element>
+ </sequence>
+ <attribute ref="name"></attribute>
+ <attribute ref="displaylabel"></attribute>
+ <attribute ref="required"></attribute>
+ <attribute ref="type"></attribute>
+ <attribute ref="typeparam"></attribute>
+ </complexType>
+ </element>
+
+ <element name="referedattribute">
+ <complexType>
+ <attribute ref="ref"></attribute>
+ <attribute ref="overridename"></attribute>
+ <attribute ref="displaylabel"></attribute>
+ </complexType>
+ </element>
+
+ <element name="includeattrs">
+ <complexType>
+ <sequence>
+ <element ref="attribute" minOccurs="0"
+ maxOccurs="unbounded">
+ </element>
+ <element ref="referedattribute" minOccurs="0"
+ maxOccurs="unbounded">
+ </element>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="excludeattrs">
+ <complexType>
+ <attribute ref="refs"></attribute>
+ </complexType>
+ </element>
+
+ <element name="categories">
+ <complexType>
+ <sequence>
+ <element ref="category"></element>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="attributes">
+ <complexType>
+ <sequence>
+ <element ref="attribute"></element>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="option">
+ <complexType>
+ <attribute ref="key"></attribute>
+ <attribute ref="value"></attribute>
+ <attribute ref="default"></attribute>
+ </complexType>
+ </element>
+
+ <attribute name="name" type="string"></attribute>
+
+ <attribute name="displaylabel" type="string"></attribute>
+
+ <attribute name="ref" type="string"></attribute>
+
+ <attribute name="refs" type="string"></attribute>
+
+ <attribute name="uri" type="string"></attribute>
+
+ <attribute name="type" type="string"></attribute>
+
+ <attribute name="typeparam" type="string"></attribute>
+
+ <attribute name="key" type="string"></attribute>
+
+ <attribute name="value" type="string"></attribute>
+
+ <attribute name="overridename" type="string"></attribute>
+ <attribute name="default" type="string" fixed="default"></attribute>
+ <attribute name="required" type="string" fixed="required"></attribute>
+
+</schema> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/propertypages/test-metadata.xml b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/propertypages/test-metadata.xml
new file mode 100644
index 000000000..ca8a16ef4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/propertypages/test-metadata.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<md:metadatamodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:md="http://org.eclipse.jst.jsf.common.metadata/metadata.ecore"
+ xmlns:mdt="http://org.eclipse.jst.jsf.common.metadata/metadataTraitTypes.ecore"
+ xmlns:qe="http://org.eclipse.jsf.pagedesigner/QuickEditTabSections.ecore"
+ id="org.eclipse.jst.pagedesigner.tests.propertypages"
+ type="tagFile">
+
+ <entity id="tagWithQuickEditMD" type="tag">
+ <include-entity-group id="attrs"/>
+ <trait id="quick-edit-tab">
+ <value xsi:type="qe:QuickEditTabSections">
+ <section id="aBoolean"/>
+ <section id="aStyle"/>
+ <section id="aStringPropWithMd"/>
+ <section id="aStringPropNoMd"/>
+ <section id="section.fake" type="SECTION"/>
+ <section id="section.fake.dialogfield" type="SECTION"/>
+ </value>
+ </trait>
+
+ </entity>
+
+ <entity id="tagWithBadQuickEditMD" type="tag">
+ <include-entity-group id="attrs"/>
+ <trait id="quick-edit-tab">
+ <value xsi:type="qe:QuickEditTabSections">
+ <section id="aBoolean"/>
+ <section id="aBogusAttr"/>
+ <section id="aStringPropWithMd"/>
+ <section id="aStringPropNoMd"/>
+ <section id="section.missing" type="SECTION"/>
+ <section id="section.fake.dialogfield" type="SECTION"/>
+ </value>
+ </trait>
+
+ </entity>
+
+ <entityGroup id="attrs">
+ <entity id="aBoolean">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.BooleanType</value>
+ </trait>
+ </entity>
+ <entity id="aStyle">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.CSSStyleType</value>
+ </trait>
+ </entity>
+ <entity id="aStringPropWithMd">
+ <trait id="attribute-value-runtime-type">
+ <value>org.eclipse.jst.jsf.core.attributevalues.StringType</value>
+ </trait>
+ <trait id="valid-values">
+ <value xsi:type="mdt:ListOfValues">
+ <item>A</item>
+ <item>B</item>
+ <item>C</item>
+ </value>
+ </trait>
+ </entity>
+ </entityGroup>
+</md:metadatamodel> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/propertypages/testPropPages.tld.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/propertypages/testPropPages.tld.data
new file mode 100644
index 000000000..aa2b706e2
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/propertypages/testPropPages.tld.data
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<!DOCTYPE taglib
+ PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
+ "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+
+
+<taglib>
+
+
+ <!-- ========== Tag Library Description Elements ========================= -->
+
+
+ <tlib-version>1.0</tlib-version>
+ <jsp-version>1.2</jsp-version>
+ <short-name>test</short-name>
+ <uri>org.eclipse.jst.pagedesigner.tests.propertypages</uri>
+ <description>
+ A test tld used for verifying the tabbed properties for WPE
+ </description>
+
+ <!-- ========== Tag Descriptions ========================================= -->
+
+
+ <tag>
+ <name>tagWithQuickEditMD</name>
+ <tag-class>com.foo.SomeClass</tag-class>
+ <body-content>empty</body-content>
+ <description>
+ A tag that will have Quick Edit metadata
+ </description>
+
+ <attribute>
+ <name>aBoolean</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ This attribute is required.
+ </description>
+ </attribute>
+
+ <attribute>
+ <name>aStyle</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ This attribute is required.
+ </description>
+ </attribute>
+
+ <attribute>
+ <name>aStringPropWithMd</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ This attribute is optional.
+ </description>
+ </attribute>
+
+ <attribute>
+ <name>aStringPropNoMd</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ This attribute is optional.
+ </description>
+ </attribute>
+
+ </tag>
+
+ <tag>
+ <name>tagWithNoQuickEditMD</name>
+ <tag-class>com.foo.SomeClass</tag-class>
+ <body-content>empty</body-content>
+ <description>
+ A tag without QuickEditMD
+ </description>
+
+ <attribute>
+ <name>aBoolean</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ This attribute is required.
+ </description>
+ </attribute>
+
+ <attribute>
+ <name>aStyle</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ This attribute is required.
+ </description>
+ </attribute>
+
+ <attribute>
+ <name>aStringPropWithMd</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ This attribute is optional.
+ </description>
+ </attribute>
+
+ <attribute>
+ <name>aStringPropNoMd</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ This attribute is optional.
+ </description>
+ </attribute>
+
+ </tag>
+ <tag>
+ <name>tagWithBadQuickEditMD</name>
+ <tag-class>com.foo.SomeClass</tag-class>
+ <body-content>empty</body-content>
+ <description>
+ A tag without QuickEditMD
+ </description>
+
+ <attribute>
+ <name>aBoolean</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ This attribute is required.
+ </description>
+ </attribute>
+
+ <attribute>
+ <name>aStyle</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ This attribute is required.
+ </description>
+ </attribute>
+
+ <attribute>
+ <name>aStringPropWithMd</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ This attribute is optional.
+ </description>
+ </attribute>
+
+ <attribute>
+ <name>aStringPropNoMd</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ This attribute is optional.
+ </description>
+ </attribute>
+
+ </tag>
+</taglib>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/propertypages/testPropertyPage.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/propertypages/testPropertyPage.jsp.data
new file mode 100644
index 000000000..571f7725d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/propertypages/testPropertyPage.jsp.data
@@ -0,0 +1,15 @@
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
+ pageEncoding="ISO-8859-1"%>
+<%@taglib uri="org.eclipse.jst.pagedesigner.tests.propertypages" prefix="test"%>
+<!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>
+ <test:tagWithQuickEditMD aBoolean="" aStyle=""/>
+ <test:tagWithNoQuickEditMD aBoolean="" aStyle=""/>
+ <test:tagWithBadQuickEditMD aBoolean="" aStyle=""/>
+</body>
+</html> \ No newline at end of file
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/expectedResult_directive.include.jspx.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/expectedResult_directive.include.jspx.data
new file mode 100644
index 000000000..8952f0299
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/expectedResult_directive.include.jspx.data
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"> <jsp:directive.page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" />
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+ <title>Insert title here</title>
+ </head>
+ <body>
+<jsp:directive.include /></body>
+</html>
+</jsp:root>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/html/expectedResult_INPUT.BUTTON.html.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/html/expectedResult_INPUT.BUTTON.html.data
new file mode 100644
index 000000000..f28e19342
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/html/expectedResult_INPUT.BUTTON.html.data
@@ -0,0 +1,10 @@
+<!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>
+
+<form><input type="submit"></form></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/html/expectedResult_INPUT.BUTTON.xhtml.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/html/expectedResult_INPUT.BUTTON.xhtml.data
new file mode 100644
index 000000000..1df05075f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/html/expectedResult_INPUT.BUTTON.xhtml.data
@@ -0,0 +1,12 @@
+
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Insert title here</title>
+</head>
+<body><form><input type="submit" /></form>
+
+</body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_actionListener.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_actionListener.jsp.data
new file mode 100644
index 000000000..17716e66c
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_actionListener.jsp.data
@@ -0,0 +1,12 @@
+<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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><f:actionListener /></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_attribute.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_attribute.jsp.data
new file mode 100644
index 000000000..fc8cd6206
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_attribute.jsp.data
@@ -0,0 +1,15 @@
+<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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><f:attribute /></f:view></body>
+</html>
+
+
+
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_commandButton.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_commandButton.jsp.data
new file mode 100644
index 000000000..fd2b96bee
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_commandButton.jsp.data
@@ -0,0 +1,13 @@
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
+ uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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:commandButton></h:commandButton></h:form></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_commandButton.jspx.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_commandButton.jspx.data
new file mode 100644
index 000000000..787ca5b72
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_commandButton.jspx.data
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"> <jsp:directive.page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" />
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <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:commandButton></h:commandButton></h:form></f:view></body>
+</html>
+</jsp:root>
+
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_commandButton.xhtml.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_commandButton.xhtml.data
new file mode 100644
index 000000000..25324c3e0
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_commandButton.xhtml.data
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Insert title here</title>
+</head>
+<body>
+<h:form>
+ <h:commandButton></h:commandButton>
+</h:form>
+
+</body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_commandLink.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_commandLink.jsp.data
new file mode 100644
index 000000000..dbbbcb98f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_commandLink.jsp.data
@@ -0,0 +1,13 @@
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
+ uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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:commandLink><h:outputText value="CommandLink"></h:outputText></h:commandLink></h:form></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_convertDateTime.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_convertDateTime.jsp.data
new file mode 100644
index 000000000..48aa68622
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_convertDateTime.jsp.data
@@ -0,0 +1,12 @@
+<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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><f:convertDateTime /></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_convertNumber.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_convertNumber.jsp.data
new file mode 100644
index 000000000..545728c88
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_convertNumber.jsp.data
@@ -0,0 +1,12 @@
+<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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><f:convertNumber /></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_converter.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_converter.jsp.data
new file mode 100644
index 000000000..efc3b0393
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_converter.jsp.data
@@ -0,0 +1,12 @@
+<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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><f:converter /></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_dataTable.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_dataTable.jsp.data
new file mode 100644
index 000000000..492458b47
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_dataTable.jsp.data
@@ -0,0 +1,21 @@
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
+ uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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:dataTable border="1"><h:column id="column1">
+ <f:facet name="header">
+ <h:outputText value="column1"></h:outputText>
+ </f:facet>
+ </h:column><h:column id="column2">
+ <f:facet name="header">
+ <h:outputText value="column2"></h:outputText>
+ </f:facet>
+ </h:column></h:dataTable></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_facet.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_facet.jsp.data
new file mode 100644
index 000000000..116d790a5
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_facet.jsp.data
@@ -0,0 +1,12 @@
+<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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><f:facet></f:facet></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_form.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_form.jsp.data
new file mode 100644
index 000000000..1b0bccf61
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_form.jsp.data
@@ -0,0 +1,14 @@
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
+ uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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:form></f:view></body>
+</html>
+
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_graphicImage.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_graphicImage.jsp.data
new file mode 100644
index 000000000..565c2dd1a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_graphicImage.jsp.data
@@ -0,0 +1,13 @@
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
+ uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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:graphicImage></h:graphicImage></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_inputHidden.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_inputHidden.jsp.data
new file mode 100644
index 000000000..9e4b26140
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_inputHidden.jsp.data
@@ -0,0 +1,13 @@
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
+ uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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:inputHidden></h:inputHidden></h:form></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_inputSecret.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_inputSecret.jsp.data
new file mode 100644
index 000000000..efacde3ff
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_inputSecret.jsp.data
@@ -0,0 +1,13 @@
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
+ uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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:inputSecret></h:inputSecret></h:form></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_inputText.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_inputText.jsp.data
new file mode 100644
index 000000000..fb557a142
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_inputText.jsp.data
@@ -0,0 +1,13 @@
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
+ uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_inputTextarea.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_inputTextarea.jsp.data
new file mode 100644
index 000000000..57025a8ab
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_inputTextarea.jsp.data
@@ -0,0 +1,13 @@
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
+ uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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:inputTextarea></h:inputTextarea></h:form></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_loadBundle.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_loadBundle.jsp.data
new file mode 100644
index 000000000..2aa61ea28
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_loadBundle.jsp.data
@@ -0,0 +1,12 @@
+<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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><f:loadBundle /></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_message.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_message.jsp.data
new file mode 100644
index 000000000..e1d880262
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_message.jsp.data
@@ -0,0 +1,13 @@
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
+ uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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:message></h:message></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_messages.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_messages.jsp.data
new file mode 100644
index 000000000..7cea09095
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_messages.jsp.data
@@ -0,0 +1,13 @@
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
+ uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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:messages></h:messages></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_outputFormat.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_outputFormat.jsp.data
new file mode 100644
index 000000000..87a1fc2b1
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_outputFormat.jsp.data
@@ -0,0 +1,13 @@
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
+ uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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:outputFormat value="outputFormat"><f:param value="" /></h:outputFormat></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_outputLabel.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_outputLabel.jsp.data
new file mode 100644
index 000000000..3cd8129c4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_outputLabel.jsp.data
@@ -0,0 +1,13 @@
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
+ uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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:outputLabel value="outputLabel"></h:outputLabel></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_outputLink.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_outputLink.jsp.data
new file mode 100644
index 000000000..3ffcb7fac
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_outputLink.jsp.data
@@ -0,0 +1,13 @@
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
+ uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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:outputLink value="somePage.jsf"><h:outputText value="outputLink"></h:outputText></h:outputLink></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_outputText.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_outputText.jsp.data
new file mode 100644
index 000000000..6c0a2676e
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_outputText.jsp.data
@@ -0,0 +1,13 @@
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
+ uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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:outputText value="outputText"></h:outputText></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_panelGrid.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_panelGrid.jsp.data
new file mode 100644
index 000000000..22ea57215
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_panelGrid.jsp.data
@@ -0,0 +1,13 @@
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
+ uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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:panelGrid border="1" columns="2"><h:outputText value="item1"></h:outputText><h:outputText value="item2"></h:outputText><h:outputText value="item3"></h:outputText><h:outputText value="item4"></h:outputText></h:panelGrid></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_panelGroup.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_panelGroup.jsp.data
new file mode 100644
index 000000000..e38e71413
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_panelGroup.jsp.data
@@ -0,0 +1,13 @@
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
+ uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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:panelGroup></h:panelGroup></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_param.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_param.jsp.data
new file mode 100644
index 000000000..1841db827
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_param.jsp.data
@@ -0,0 +1,12 @@
+<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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><f:param /></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectBooleanCheckbox.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectBooleanCheckbox.jsp.data
new file mode 100644
index 000000000..1cbd44064
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectBooleanCheckbox.jsp.data
@@ -0,0 +1,13 @@
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
+ uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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:selectBooleanCheckbox></h:selectBooleanCheckbox></h:form></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectItem.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectItem.jsp.data
new file mode 100644
index 000000000..bbae9e806
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectItem.jsp.data
@@ -0,0 +1,12 @@
+<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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><f:selectItem /></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectItems.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectItems.jsp.data
new file mode 100644
index 000000000..57e465fa6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectItems.jsp.data
@@ -0,0 +1,12 @@
+<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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><f:selectItems /></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectManyCheckbox.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectManyCheckbox.jsp.data
new file mode 100644
index 000000000..2b58eb84d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectManyCheckbox.jsp.data
@@ -0,0 +1,13 @@
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
+ uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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:selectManyCheckbox></h:selectManyCheckbox></h:form></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectManyListbox.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectManyListbox.jsp.data
new file mode 100644
index 000000000..d08b3ace1
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectManyListbox.jsp.data
@@ -0,0 +1,13 @@
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
+ uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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:selectManyListbox></h:selectManyListbox></h:form></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectManyMenu.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectManyMenu.jsp.data
new file mode 100644
index 000000000..abe9546e9
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectManyMenu.jsp.data
@@ -0,0 +1,13 @@
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
+ uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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:selectManyMenu></h:selectManyMenu></h:form></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectOneListbox.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectOneListbox.jsp.data
new file mode 100644
index 000000000..fbaeb7f70
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectOneListbox.jsp.data
@@ -0,0 +1,13 @@
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
+ uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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:selectOneListbox></h:selectOneListbox></h:form></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectOneMenu.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectOneMenu.jsp.data
new file mode 100644
index 000000000..4dd620067
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectOneMenu.jsp.data
@@ -0,0 +1,13 @@
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
+ uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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:selectOneMenu></h:selectOneMenu></h:form></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectOneRadio.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectOneRadio.jsp.data
new file mode 100644
index 000000000..d687c5ec0
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_selectOneRadio.jsp.data
@@ -0,0 +1,13 @@
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
+ uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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:selectOneRadio></h:selectOneRadio></h:form></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_subview.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_subview.jsp.data
new file mode 100644
index 000000000..39f349f50
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_subview.jsp.data
@@ -0,0 +1,12 @@
+<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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><f:subview></f:subview></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_validateDoubleRange.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_validateDoubleRange.jsp.data
new file mode 100644
index 000000000..7f05e9b0d
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_validateDoubleRange.jsp.data
@@ -0,0 +1,12 @@
+<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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><f:validateDoubleRange /></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_validateLength.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_validateLength.jsp.data
new file mode 100644
index 000000000..432cdc625
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_validateLength.jsp.data
@@ -0,0 +1,12 @@
+<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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><f:validateLength /></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_validateLongRange.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_validateLongRange.jsp.data
new file mode 100644
index 000000000..def1a41bd
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_validateLongRange.jsp.data
@@ -0,0 +1,12 @@
+<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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><f:validateLongRange /></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_validator.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_validator.jsp.data
new file mode 100644
index 000000000..8d68cc596
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_validator.jsp.data
@@ -0,0 +1,12 @@
+<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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><f:validator /></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_valueChangeListener.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_valueChangeListener.jsp.data
new file mode 100644
index 000000000..0c2bc223a
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_valueChangeListener.jsp.data
@@ -0,0 +1,12 @@
+<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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><f:valueChangeListener /></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_verbatim.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_verbatim.jsp.data
new file mode 100644
index 000000000..ae2a5437e
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_verbatim.jsp.data
@@ -0,0 +1,12 @@
+<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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><f:verbatim></f:verbatim></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_view.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_view.jsp.data
new file mode 100644
index 000000000..ee2b049c5
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsf/expectedResult_view.jsp.data
@@ -0,0 +1,12 @@
+<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%><%@ 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></f:view></body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsp/expectedResult_jsp_directive.include.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsp/expectedResult_jsp_directive.include.jsp.data
new file mode 100644
index 000000000..564b439a5
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsp/expectedResult_jsp_directive.include.jsp.data
@@ -0,0 +1,12 @@
+<%@ 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><jsp:directive.include />
+
+</body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsp/expectedResult_jsp_directive.include.jspx.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsp/expectedResult_jsp_directive.include.jspx.data
new file mode 100644
index 000000000..6687be7c1
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/jsp/expectedResult_jsp_directive.include.jspx.data
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"> <jsp:directive.page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" />
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+ <title>Insert title here</title>
+ </head>
+ <body><jsp:directive.include />
+
+ </body>
+</html>
+</jsp:root>
+
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/tagCreator.html.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/tagCreator.html.data
new file mode 100644
index 000000000..88e76d57f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/tagCreator.html.data
@@ -0,0 +1,10 @@
+<!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>
+
+</body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/tagCreator.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/tagCreator.jsp.data
new file mode 100644
index 000000000..f74e8c293
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/tagCreator.jsp.data
@@ -0,0 +1,12 @@
+<%@ 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>
+
+</body>
+</html>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/tagCreator.jspx.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/tagCreator.jspx.data
new file mode 100644
index 000000000..37a3057cf
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/tagCreator.jspx.data
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"> <jsp:directive.page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" />
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+ <title>Insert title here</title>
+ </head>
+ <body>
+
+ </body>
+</html>
+</jsp:root>
+
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/tagCreator.xhtml.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/tagCreator.xhtml.data
new file mode 100644
index 000000000..10bdd6fa4
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/tagCreator.xhtml.data
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Insert title here</title>
+</head>
+<body>
+
+</body>
+</html>
+
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/testCreator.tld.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/testCreator.tld.data
new file mode 100644
index 000000000..e36c23236
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/testCreator.tld.data
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<!DOCTYPE taglib
+ PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
+ "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+
+
+<taglib>
+
+
+ <!-- ========== Tag Library Description Elements ========================= -->
+
+
+ <tlib-version>1.0</tlib-version>
+ <jsp-version>1.2</jsp-version>
+ <short-name>test</short-name>
+ <uri>org.eclipse.jst.pagedesigner.tests.tagCreatorFactory1</uri>
+ <description>
+ A test tld used for verifying the tagCreationFactories extension point.
+ </description>
+
+ <!-- ========== Tag Descriptions ========================================= -->
+
+
+ <tag>
+ <name>tagWithRequiredAttr</name>
+ <tag-class>com.foo.SomeClass</tag-class>
+ <body-content>empty</body-content>
+ <description>
+ A tag with a required attribute used to test ensureRequiredAttributes
+ </description>
+
+ <attribute>
+ <name>requiredAttr1</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ This attribute is required.
+ </description>
+ </attribute>
+
+ <attribute>
+ <name>requiredAttr2</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ This attribute is required.
+ </description>
+ </attribute>
+
+ <attribute>
+ <name>notRequiredAttr1</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ This attribute is optional.
+ </description>
+ </attribute>
+
+ </tag>
+
+ <tag>
+ <name>tagWithRequiredAttr2</name>
+ <tag-class>com.foo.SomeClass</tag-class>
+ <body-content>empty</body-content>
+ <description>
+ A tag with a required attribute used to test ensureRequiredAttributes
+ </description>
+
+ <attribute>
+ <name>requiredAttr1</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ This attribute is required.
+ </description>
+ </attribute>
+
+ <attribute>
+ <name>requiredAttr2</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ This attribute is required.
+ </description>
+ </attribute>
+
+ <attribute>
+ <name>notRequiredAttr1</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ This attribute is optional.
+ </description>
+ </attribute>
+
+ </tag>
+
+ <tag>
+ <name>tagWithMetadata</name>
+ <tag-class>com.foo.SomeOtherClass</tag-class>
+ <body-content>empty</body-content>
+ <description>
+ A tag with tag attribute and element meta-data
+ </description>
+
+ <attribute>
+ <name>requiredAttr1</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ This attribute is required.
+ </description>
+ </attribute>
+
+ <attribute>
+ <name>requiredAttr2</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ This attribute is also required.
+ </description>
+ </attribute>
+
+ <attribute>
+ <name>notRequiredAttr1</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ This attribute is optional.
+ </description>
+ </attribute>
+ <attribute>
+ <name>notRequiredAttr2</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ This attribute is also optional.
+ </description>
+ </attribute>
+ </tag>
+</taglib>
diff --git a/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/testTagCreation.jsp.data b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/testTagCreation.jsp.data
new file mode 100644
index 000000000..f0b873bc3
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.pagedesigner.tests/testdata/tagcreator/testTagCreation.jsp.data
@@ -0,0 +1,16 @@
+<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%><%@taglib uri="org.eclipse.jst.pagedesigner.tests.tagCreatorFactory1" prefix="test"<%@ 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>
+
+</f:view>
+
+</body>
+</html>

Back to the top