Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal')
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/FaceletCorePlugin.java136
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/FaceletCoreTraceOptions.java88
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/AttributeCMAdapter.java99
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/CompositeTagInfo.java107
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/DocumentElementCMAdapter.java109
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/DocumentNamespaceCMAdapter.java161
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/ElementCMAdapter.java147
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/ExternalTagInfo.java96
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/FaceletDocumentFactory.java177
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/FaceletTagInfo.java36
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/MetadataTagInfo.java56
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/NamespaceCMAdapter.java232
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/TagInfo.java28
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/AddTagMDFactory.java56
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/AddTagMDPackage.java339
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/AttributeData.java112
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/AttributeUsage.java287
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/ElementData.java75
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/impl/AddTagMDFactoryImpl.java187
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/impl/AddTagMDPackageImpl.java352
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/impl/AttributeDataImpl.java294
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/impl/ElementDataImpl.java239
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/provider/AddTagMDItemProviderAdapterFactory.java246
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/provider/AttributeDataItemProvider.java258
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/provider/ElementDataItemProvider.java228
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/provider/IResourceProvider.java31
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/util/AddTagMDAdapterFactory.java156
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/util/AddTagMDSwitch.java168
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/attributevalues/TemplateWebPathType.java179
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/AbstractExternalMetadataStrategy.java53
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/FaceletExternalMetadataStrategy.java138
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/IExternalMetadataStrategy.java57
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/InternalNamedNodeMap.java96
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/JSPExternalMetadataStrategy.java88
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/MDExternalMetadataStrategy.java416
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/Messages.java59
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/TagInfoStrategyComposite.java79
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/messages.properties14
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/ChangeActionType.java31
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletChangeDelegate.java160
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletFacet.java96
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletFacetChangeDataModelProvider.java108
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletFacetDefaultVersionProvider.java34
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletFacetInstallDataModelProvider.java39
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletFacetUninstallModelProvider.java49
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletInstallDelegate.java234
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletUninstallDelegate.java236
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletUninstallModel.java39
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FacetChangeModel.java95
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FacetInstallModel.java29
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/Messages.java42
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/WebAppConfigurator.java394
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/messages.properties2
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/metadata/FaceletNamespaceMetaDataLocator.java173
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/metadata/FaceletNamespaceMetaDataTranslator.java23
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/ELProxyContributor.java53
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/FaceletMetaResolvingStrategy.java205
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/FaceletRegistryManager.java130
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/FaceletTagRegistry.java374
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/FaceletTagResolvingStrategy.java167
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/IFaceletTagResolvingStrategy.java63
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/LibraryOperation.java51
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/LibraryOperationFactory.java122
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/Messages.java46
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/MetadataAttributeAdvisor.java85
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/ServletBeanProxyContributor.java58
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/messages.properties3
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/AbstractFaceletTaglibLocator.java84
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/AbstractProjectTaglibDescriptorFactory.java16
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/CompositeComponentTaglibLocator.java207
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/ContextParamSpecifiedFaceletTaglibLocator.java267
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/DefaultStandardTaglibLocator.java130
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/ExtensionBasedTagDescriptorFactoryProviderStrategy.java69
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/FaceletTagIndex.java232
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/FaceletTagRecord.java78
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/IFaceletTagRecord.java267
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/IFaceletTaglibLocator.java21
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/ILibraryChangeHandler.java37
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/IProjectTaglibDescriptor.java45
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/IProjectTaglibDescriptorFactory.java22
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/JSFResourceBasedTagRecord.java421
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/JarFileFaceletTaglibLocator.java308
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/LibraryClassBasedTagRecord.java538
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/Listener.java112
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/Messages.java31
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/ProjectTaglibDescriptor.java200
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/TagModelLoader.java239
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/TagModelParser.java461
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/TagRecordFactory.java154
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/TaglibFileTracker.java60
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/TaglibResourceManager.java99
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/WebappConfiguration.java400
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/XMLBasedTagRecord.java105
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/XMLBasedTagRecord_Facelet10.java101
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/Description.java42
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/DisplayName.java44
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/DocumentRoot.java114
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglib.java304
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibCanonicalName.java95
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibExtension.java82
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibFactory.java254
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibFunction.java120
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibPackage.java4018
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibTag.java323
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibTagAttribute.java303
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibTagBehavior.java109
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibTagBehaviorExtension.java82
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibTagComponent.java137
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibTagComponentExtension.java82
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibTagConverter.java109
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibTagConverterExtension.java82
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibTagExtension.java82
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibTagValidator.java109
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibTagValidatorExtension.java82
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibVersion.java212
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FullyQualifiedClass.java36
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/GenericBoolean.java33
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/GenericBooleanBase.java287
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/Icon.java215
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/IdentifiableLangStringValue.java84
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/IdentifiableStringValue.java96
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/JavaIdentifier.java33
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/Path.java41
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/UserVisibleTaglibObject.java150
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/DescriptionImpl.java45
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/DisplayNameImpl.java45
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/DocumentRootImpl.java307
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/FaceletTaglibCanonicalNameImpl.java234
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/FaceletTaglibExtensionImpl.java237
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/FaceletTaglibFactoryImpl.java629
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/FaceletTaglibFunctionImpl.java347
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/FaceletTaglibImpl.java694
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/FaceletTaglibPackageImpl.java2653
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/FaceletTaglibTagAttributeImpl.java671
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/FaceletTaglibTagBehaviorExtensionImpl.java237
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/FaceletTaglibTagBehaviorImpl.java317
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/FaceletTaglibTagComponentExtensionImpl.java237
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/FaceletTaglibTagComponentImpl.java391
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/FaceletTaglibTagConverterExtensionImpl.java237
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/FaceletTaglibTagConverterImpl.java317
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/FaceletTaglibTagExtensionImpl.java237
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/FaceletTaglibTagImpl.java800
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/FaceletTaglibTagValidatorExtensionImpl.java237
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/FaceletTaglibTagValidatorImpl.java317
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/FullyQualifiedClassImpl.java45
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/GenericBooleanImpl.java45
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/IconImpl.java399
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/IdentifiableLangStringValueImpl.java177
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/IdentifiableStringValueImpl.java234
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/JavaIdentifierImpl.java45
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/PathImpl.java45
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/UserVisibleTaglibObjectImpl.java284
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/impl/Util.java86
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibAdapterFactory.java659
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibResourceFactoryImpl.java56
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibResourceImpl.java68
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibSwitch.java762
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibValidator.java698
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/util/FaceletTaglibXMLProcessor.java55
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/ComponentTagDefn.java81
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/ConverterTagDefn.java54
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/FaceletLibraryClassTagLib.java54
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/FaceletTaglibDefn.java24
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/FaceletTaglibFactory.java128
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/FaceletTaglibPackage.java944
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/FaceletTaglib_1_0Factory.java128
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/FaceletTaglib_1_0Package.java944
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/FaceletXMLDefnTaglib.java89
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/FunctionDefn.java109
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/HandlerTagDefn.java54
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/SourceTagDefn.java54
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/TagDefn.java55
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/ValidatorTagDefn.java54
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/impl/ComponentTagDefnImpl.java233
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/impl/ConverterTagDefnImpl.java177
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/impl/FaceletLibraryClassTagLibImpl.java177
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/impl/FaceletTaglibDefnImpl.java46
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/impl/FaceletTaglibFactoryImpl.java228
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/impl/FaceletTaglibPackageImpl.java557
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/impl/FaceletTaglib_1_0FactoryImpl.java228
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/impl/FaceletTaglib_1_0PackageImpl.java550
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/impl/FaceletXMLDefnTaglibImpl.java256
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/impl/FunctionDefnImpl.java290
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/impl/HandlerTagDefnImpl.java177
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/impl/SourceTagDefnImpl.java177
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/impl/TagDefnImpl.java178
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/impl/ValidatorTagDefnImpl.java177
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/util/FaceletTaglibAdapterFactory.java323
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/util/FaceletTaglibSwitch.java371
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/util/FaceletTaglib_1_0AdapterFactory.java323
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib_1_0/util/FaceletTaglib_1_0Switch.java371
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/messages.properties2
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/tagmodel/AttributeHandlerMapAdapter.java191
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/tagmodel/ComponentTag.java76
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/tagmodel/ConverterTag.java62
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/tagmodel/FaceletAttribute.java59
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/tagmodel/FaceletNamespace.java214
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/tagmodel/FaceletTag.java96
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/tagmodel/HandlerTag.java56
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/tagmodel/IFaceletTagConstants.java149
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/tagmodel/Messages.java42
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/tagmodel/NoArchetypeFaceletTag.java31
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/tagmodel/SourceTag.java40
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/tagmodel/ValidatorTag.java53
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/tagmodel/messages.properties2
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/util/TagMetadataLoader.java162
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/util/ViewUtil.java262
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/validation/TaglibValidator.java183
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/view/DTFaceletViewHandler.java149
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/view/FaceletUIViewRoot.java26
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/view/FaceletViewDefnAdapter.java257
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/view/ViewDefnAdapterFactory.java56
212 files changed, 0 insertions, 43910 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/FaceletCorePlugin.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/FaceletCorePlugin.java
deleted file mode 100644
index 278fdd1d8..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/FaceletCorePlugin.java
+++ /dev/null
@@ -1,136 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.common.EMFPlugin;
-import org.eclipse.emf.common.util.ResourceLocator;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class FaceletCorePlugin extends EMFPlugin
-{
-
- /**
- * Keep track of the singleton.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final FaceletCorePlugin INSTANCE = new FaceletCorePlugin();
-
- /**
- * The plug-in ID
- */
- public static final String PLUGIN_ID = "org.eclipse.jst.jsf.facelet.core"; //$NON-NLS-1$
-
- // The shared instance
- private static Implementation plugin;
-
- /**
- * Create the instance.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public FaceletCorePlugin()
- {
- super
- (new ResourceLocator []
- {
- });
- }
-
- /**
- * Returns the singleton instance of the Eclipse plugin.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the singleton instance.
- * @generated
- */
- @Override
- public ResourceLocator getPluginResourceLocator()
- {
- return plugin;
- }
-
- /**
- * Returns the singleton instance of the Eclipse plugin.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the singleton instance.
- * @generated
- */
- public static Implementation getPlugin()
- {
- return plugin;
- }
-
- /**
- * The actual implementation of the Eclipse <b>Plugin</b>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static class Implementation extends EclipsePlugin
- {
- private BundleContext context = null;
- /**
- * Creates an instance.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Implementation()
- {
- super();
-
- // Remember the static instance.
- //
- plugin = this;
- }
-
- @Override
- public void start(BundleContext bundleContext) throws Exception
- {
- super.start(bundleContext);
- this.context = bundleContext;
- }
-
- /**
- * @return the bundle context.
- */
- public BundleContext getBundleContext()
- {
- return this.context;
- }
- }
-
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Implementation getDefault()
- {
- if (plugin == null)
- {
- return new Implementation();
- }
- return plugin;
- }
-
- /**
- * @param logMessage
- * @param exception
- */
- public static void log(final String logMessage, final Throwable exception)
- {
- final IStatus status = new Status(IStatus.ERROR, PLUGIN_ID,
- logMessage, exception);
- getDefault().getLog().log(status);
- }
-
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/FaceletCoreTraceOptions.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/FaceletCoreTraceOptions.java
deleted file mode 100644
index 70250cc40..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/FaceletCoreTraceOptions.java
+++ /dev/null
@@ -1,88 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal;
-
-import org.eclipse.osgi.framework.debug.FrameworkDebugOptions;
-import org.eclipse.osgi.service.debug.DebugOptions;
-
-/**
- * Defines that standard runtime trace options for debugging. See .options file
- * for definitions.
- *
- * @author cbateman
- *
- */
-public final class FaceletCoreTraceOptions
-{
- /**
- * True if debug tracing is enabled. Other tracing cannot be enabled unless
- * this is enabled.
- */
- public static final boolean ENABLED;
-
- /**
- * True if the registry manager tracing is enabled
- */
- public static final boolean TRACE_REGISTRYMANAGER;
-
- /**
- * True if the facet installer is being traced.
- */
- public static final boolean TRACE_FACETINSTALLDELEGATE;
- /**
- * True if the facet uninstaller is being traced
- */
- public static final boolean TRACE_FACETUNINSTALLDELEGATE;
- /**
- * True if the base facet change delegate is being traced
- */
- public static final boolean TRACE_FACETCHANGEDELEGATE;
-
- private static final String KEY_DEBUG_ENABLED = "/debug"; //$NON-NLS-1$
-// private static final String KEY_VIEW_TAGREGISTRY = "/jsptagregistry";
-// private static final String KEY_VIEW_JSPTAGREGISTRY_CHANGES =
-// KEY_VIEW_TAGREGISTRY + "/changes";
- private static final String KEY_VIEW_REGISTRYMANAGER = "/registrymanager"; //$NON-NLS-1$
- private static final String KEY_FACETINSTALLDELEGATE = "/facetinstalldelegate"; //$NON-NLS-1$
- private static final String KEY_FACETUNINSTALLDELEGATE = "facetuninstalldelegate"; //$NON-NLS-1$
- private static final String KEY_FACETCHANGEDELEGATE = "facetchangedelegate"; //$NON-NLS-1$
-
- static
- {
- final DebugOptions debugOptions = FrameworkDebugOptions.getDefault();
-
- ENABLED = debugOptions != null
- && debugOptions.getBooleanOption(FaceletCorePlugin.PLUGIN_ID
- + KEY_DEBUG_ENABLED, false);
-
- if (ENABLED && debugOptions != null)
- {
- TRACE_REGISTRYMANAGER = debugOptions.getBooleanOption(
- FaceletCorePlugin.PLUGIN_ID + KEY_VIEW_REGISTRYMANAGER, false);
- TRACE_FACETINSTALLDELEGATE = debugOptions.getBooleanOption(
- FaceletCorePlugin.PLUGIN_ID + KEY_FACETINSTALLDELEGATE, false);
- TRACE_FACETUNINSTALLDELEGATE = debugOptions.getBooleanOption(
- FaceletCorePlugin.PLUGIN_ID + KEY_FACETUNINSTALLDELEGATE, false);
- TRACE_FACETCHANGEDELEGATE = debugOptions.getBooleanOption(
- FaceletCorePlugin.PLUGIN_ID + KEY_FACETCHANGEDELEGATE, false);
- }
- else
- {
- TRACE_REGISTRYMANAGER = false;
- TRACE_FACETINSTALLDELEGATE = false;
- TRACE_FACETUNINSTALLDELEGATE = false;
- TRACE_FACETCHANGEDELEGATE = false;
- }
- }
-
- /**
- * @param message
- */
- public static void log(final String message)
- {
- System.out.println(message);
- }
-
- private FaceletCoreTraceOptions()
- {
- // no instantiation
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/AttributeCMAdapter.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/AttributeCMAdapter.java
deleted file mode 100644
index c7b37664c..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/AttributeCMAdapter.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.cm;
-
-import java.util.Enumeration;
-
-import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ITagAttribute;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.CMDataTypeImpl;
-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;
-
-/**
- * Adapts Facelet attribute date to the CM model.
- *
- * @author cbateman
- *
- */
-public class AttributeCMAdapter implements CMAttributeDeclaration
-{
- private static final String DESCRIPTION = "description"; //$NON-NLS-1$
- private final int _usage;
- private final String _name;
- private String _description;
-
- /**
- * @param name
- * @param usage
- */
- public AttributeCMAdapter(final String name, final int usage)
- {
- _name = name;
- _usage = usage;
- }
-
- /**
- * @param tagAttr
- */
- public AttributeCMAdapter(final ITagAttribute tagAttr)
- {
- this(tagAttr.getName(), tagAttr.isRequired() ? REQUIRED : OPTIONAL);
- _description = tagAttr.getDescription();
- }
-
- public String getAttrName()
- {
- return _name;
- }
-
- public CMDataType getAttrType()
- {
- return new CMDataTypeImpl(CMDataType.CDATA);
- }
-
- public String getDefaultValue()
- {
- return null;
- }
-
- public Enumeration<?> getEnumAttr()
- {
- return null;
- }
-
- public int getUsage()
- {
- return _usage;
- }
-
- public String getNodeName()
- {
- return _name;
- }
-
- public int getNodeType()
- {
- return CMNode.ATTRIBUTE_DECLARATION;
- }
-
- public Object getProperty(String propertyName)
- {
- if (DESCRIPTION.equals(propertyName))
- {
- return _description;
- }
- return null;
- }
-
- /**
- * @param description
- */
- public void setDescription(final String description)
- {
- _description = description;
- }
-
- public boolean supports(String propertyName)
- {
- return false;
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/CompositeTagInfo.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/CompositeTagInfo.java
deleted file mode 100644
index ee81c1dea..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/CompositeTagInfo.java
+++ /dev/null
@@ -1,107 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.cm;
-
-import org.eclipse.jst.jsf.common.dom.TagIdentifier;
-import org.eclipse.jst.jsf.core.internal.tld.TagIdentifierFactory;
-import org.eclipse.jst.jsf.facelet.core.internal.FaceletCorePlugin;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.strategy.TagInfoStrategyComposite;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * A tag info that composes a number of other tag infos selected from a
- * TagInfoStrategyComposite.
- *
- * @author cbateman
- *
- */
-public abstract class CompositeTagInfo extends TagInfo
-{
- private final TagInfoStrategyComposite _compositeStrategy;
- private final String _uri;
-
- /**
- * @param uri
- * @param compositeStrategy
- */
- protected CompositeTagInfo(final String uri, final TagInfoStrategyComposite compositeStrategy)
- {
- _uri = uri;
- _compositeStrategy = compositeStrategy;
- }
- @Override
- public Object getTagProperty(String tagName, String key)
- {
- final TagIdentifier tagId = TagIdentifierFactory.createJSPTagWrapper(
- _uri, tagName);
- _compositeStrategy.resetIterator();
-
- for (TagInfo tagInfo = getNextExternalInfo(tagId); tagInfo != _compositeStrategy
- .getNoResult(); tagInfo = getNextExternalInfo(tagId))
- {
- try
- {
- if (tagInfo != _compositeStrategy.getNoResult())
- {
- final Object value = tagInfo.getTagProperty(tagName, key);
-
- if (value != null)
- {
- return value;
- }
- }
-
- // fall-through
- }
- catch (final Exception e)
- {
- FaceletCorePlugin.log("During meta-data strategy", e); //$NON-NLS-1$
- }
- }
-
- return null;
-
- }
-
- /**
- * @param tagName
- * @return a named node map of known attributes for the tag, or null if not
- * found
- */
- @Override
- public CMNamedNodeMap getAttributes(String tagName)
- {
- final TagIdentifier tagId = TagIdentifierFactory.createJSPTagWrapper(
- _uri, tagName);
- _compositeStrategy.resetIterator();
-
- for (TagInfo tagInfo = getNextExternalInfo(tagId); tagInfo != _compositeStrategy
- .getNoResult(); tagInfo = getNextExternalInfo(tagId))
- {
- try
- {
- if (tagInfo != _compositeStrategy.getNoResult())
- {
- final CMNamedNodeMap nodeMap = tagInfo
- .getAttributes(tagName);
-
- if (nodeMap != null)
- {
- return nodeMap;
- }
- }
-
- // fall-through
- }
- catch (final Exception e)
- {
- FaceletCorePlugin.log("During meta-data strategy", e); //$NON-NLS-1$
- }
- }
-
- return null;
- }
-
- private TagInfo getNextExternalInfo(final TagIdentifier input)
- {
- return _compositeStrategy.perform(input);
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/DocumentElementCMAdapter.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/DocumentElementCMAdapter.java
deleted file mode 100644
index a20c5f1ef..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/DocumentElementCMAdapter.java
+++ /dev/null
@@ -1,109 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.cm;
-
-import java.util.Iterator;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMContent;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-class DocumentElementCMAdapter implements CMNamedNodeMap,
- CMElementDeclaration
-{
- private final String _prefix;
- private final ElementCMAdapter _adapter;
-
- public DocumentElementCMAdapter(final ElementCMAdapter adapter, final String prefix)
- {
- _prefix = prefix;
- _adapter = adapter;
- }
-
- public int getLength()
- {
- return _adapter.getLength();
- }
-
- public CMNode getNamedItem(String name)
- {
- return _adapter.getNamedItem(name);
- }
-
- public CMNode item(int index)
- {
- return _adapter.item(index);
- }
-
- @SuppressWarnings("unchecked")
- public Iterator iterator()
- {
- return _adapter.iterator();
- }
-
- public CMNamedNodeMap getAttributes()
- {
- return _adapter.getAttributes();
- }
-
- public CMContent getContent()
- {
- return _adapter.getContent();
- }
-
- public int getContentType()
- {
- return _adapter.getContentType();
- }
-
- public CMDataType getDataType()
- {
- return _adapter.getDataType();
- }
-
- public String getElementName()
- {
- return getPrefixedName(_adapter.getElementName());
- }
-
- public CMNamedNodeMap getLocalElements()
- {
- return _adapter.getLocalElements();
- }
-
- public int getMaxOccur()
- {
- return _adapter.getMaxOccur();
- }
-
- public int getMinOccur()
- {
- return _adapter.getMinOccur();
- }
-
- public String getNodeName()
- {
- return getPrefixedName(_adapter.getNodeName());
- }
-
- private String getPrefixedName(final String name)
- {
- return _prefix + ":"+name; //$NON-NLS-1$
- }
-
- public int getNodeType()
- {
- return _adapter.getNodeType();
- }
-
- public Object getProperty(String propertyName)
- {
- return _adapter.getProperty(propertyName);
- }
-
- public boolean supports(String propertyName)
- {
- return _adapter.supports(propertyName);
- }
-
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/DocumentNamespaceCMAdapter.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/DocumentNamespaceCMAdapter.java
deleted file mode 100644
index bae83f7a7..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/DocumentNamespaceCMAdapter.java
+++ /dev/null
@@ -1,161 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.cm;
-
-import java.util.Iterator;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-/**
- * A namespace a specific to a document, where it's tag name prefix is known.
- *
- */
-class DocumentNamespaceCMAdapter implements CMNamedNodeMap, CMDocument
-{
- private final String _prefix;
- private final NamespaceCMAdapter _adapter;
-
- public DocumentNamespaceCMAdapter(final NamespaceCMAdapter adapter, final String prefix)
- {
- _prefix = prefix;
- _adapter = adapter;
- }
-
- public int getLength()
- {
- return _adapter.getLength();
- }
-
- public CMNode getNamedItem(String name)
- {
- CMNode node = _adapter.getNamedItem(name);
-
- if (node != null)
- {
- node = new DocumentElementCMAdapter((ElementCMAdapter) node,_prefix);
- }
- return node;
- }
-
- public CMNode item(int index)
- {
- CMNode item = _adapter.item(index);
-
- if (item != null)
- {
- item = new DocumentElementCMAdapter((ElementCMAdapter) item,_prefix);
- }
- return item;
- }
-
- public Iterator<?> iterator()
- {
- return new WrappingIterator(_adapter.iterator());
- }
-
- private class WrappingIterator implements Iterator<CMNode>
- {
- private Iterator<?> _it;
-
- public WrappingIterator(final Iterator<?> it)
- {
- _it = it;
- }
- public boolean hasNext()
- {
- return _it.hasNext();
- }
-
- public CMNode next()
- {
- CMNode node = (CMNode) _it.next();
- node = getNamedItem(node.getNodeName());
- return node;
- }
-
- public void remove()
- {
- throw new UnsupportedOperationException(""); //$NON-NLS-1$
- }
- }
-
- public CMNamedNodeMap getElements()
- {
- return this;
- }
-
- public CMNamedNodeMap getEntities()
- {
- //not changing entities
- return _adapter.getEntities();
- }
-
- public CMNamespace getNamespace()
- {
- return new CMNamespaceImpl(_adapter.getNamespace(), _prefix);
- }
-
- public String getNodeName()
- {
- // not changing node name
- return _adapter.getNodeName();
- }
-
- public int getNodeType()
- {
- return _adapter.getNodeType();
- }
-
- public Object getProperty(String propertyName)
- {
- return _adapter.getProperty(propertyName);
- }
-
- public boolean supports(String propertyName)
- {
- return _adapter.supports(propertyName);
- }
-
- private static class CMNamespaceImpl implements CMNamespace
- {
- private final CMNamespace _proxy;
- private final String _prefix;
-
- CMNamespaceImpl(CMNamespace proxy, final String prefix)
- {
- _proxy = proxy;
- _prefix = prefix;
- }
-
- public String getPrefix()
- {
- return _prefix;
- }
-
- public String getURI()
- {
- return _proxy.getURI();
- }
-
- public String getNodeName()
- {
- return _proxy.getNodeName();
- }
-
- public int getNodeType()
- {
- return _proxy.getNodeType();
- }
-
- public Object getProperty(String propertyName)
- {
- return _proxy.getProperty(propertyName);
- }
-
- public boolean supports(String propertyName)
- {
- return _proxy.supports(propertyName);
- }
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/ElementCMAdapter.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/ElementCMAdapter.java
deleted file mode 100644
index b38e43150..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/ElementCMAdapter.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/**
- *
- */
-package org.eclipse.jst.jsf.facelet.core.internal.cm;
-
-import java.util.Iterator;
-
-import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ITagElement;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.CMDataTypeImpl;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMContent;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-class ElementCMAdapter implements CMElementDeclaration, CMNamedNodeMap
-{
- private final ITagElement _tagElement;
- private final TagInfo _tLDTagInfo;
-
- ElementCMAdapter(final ITagElement tagElement, final TagInfo tldTagInfo)
- {
- _tagElement = tagElement;
- _tLDTagInfo = tldTagInfo;
- }
-
- public CMNamedNodeMap getAttributes()
- {
- return this;
- }
-
- public CMContent getContent()
- {
- return null;
- }
-
- public int getContentType()
- {
- return ELEMENT;
- }
-
- public CMDataType getDataType()
- {
- return new CMDataTypeImpl(CMDataType.CDATA);
- }
-
- public String getElementName()
- {
- return _tagElement.getName();
- }
-
- public CMNamedNodeMap getLocalElements()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public int getMaxOccur()
- {
- // unbounded
- return -1;
- }
-
- public int getMinOccur()
- {
- // optional
- return 0;
- }
-
- public String getNodeName()
- {
- return _tagElement.getName();
- }
-
- public int getNodeType()
- {
- return CMNode.ELEMENT_DECLARATION;
- }
-
- public Object getProperty(final String propertyName)
- {
- return _tLDTagInfo.getTagProperty(_tagElement.getName(), propertyName);
- }
-
- public boolean supports(final String propertyName)
- {
- return false;
- }
-
- @Override
- public boolean equals(final Object obj)
- {
- if (obj instanceof ElementCMAdapter)
- {
- return ((ElementCMAdapter) obj)._tagElement.equals(_tagElement);
- }
-
- return false;
- }
-
- @Override
- public int hashCode()
- {
- return _tagElement.hashCode();
- }
-
- public int getLength()
- {
- final CMNamedNodeMap map = _tLDTagInfo.getAttributes(_tagElement.getName());
-
- if (map != null)
- {
- return map.getLength();
- }
-
- return 0;
- }
-
- public CMNode getNamedItem(final String name)
- {
- final CMNamedNodeMap map = _tLDTagInfo.getAttributes(_tagElement.getName());
-
- if (map != null)
- {
- return map.getNamedItem(name);
- }
- return null;
- }
-
- public CMNode item(final int index)
- {
- final CMNamedNodeMap map = _tLDTagInfo.getAttributes(_tagElement.getName());
-
- if (map != null)
- {
- return map.item(index);
- }
- return null;
- }
-
- public Iterator<?> iterator()
- {
- final CMNamedNodeMap map = _tLDTagInfo.getAttributes(_tagElement.getName());
- return map.iterator();
- }
-
-} \ No newline at end of file
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/ExternalTagInfo.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/ExternalTagInfo.java
deleted file mode 100644
index f17eed387..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/ExternalTagInfo.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.cm;
-
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-/**
- * Represents information about Facelets brought from external sources such as
- * the JSP tag library.
- *
- * @author cbateman
- *
- */
-public abstract class ExternalTagInfo extends TagInfo
-{
- /**
- * Single instance of the null external tag info
- */
- public static TagInfo NULL_INSTANCE = new NullExternalTagInfo();
-
- @Override
- public abstract CMNamedNodeMap getAttributes(final String tagName);
-
- @Override
- public abstract Object getTagProperty(final String tagName, final String key);
-
- /**
- * @author cbateman
- *
- */
- public static class NullExternalTagInfo extends ExternalTagInfo
- {
- private NullExternalTagInfo()
- {
- // no external instantitation
- }
-
- @Override
- public CMNamedNodeMap getAttributes(final String tagName)
- {
- return new NullCMNamedNodeMap();
- }
-
- @Override
- public Object getTagProperty(final String tagName, final String key)
- {
- // no data so always null
- return null;
- }
-
- private static class NullCMNamedNodeMap implements CMNamedNodeMap
- {
- public int getLength()
- {
- return 0;
- }
-
- public CMNode getNamedItem(final String name)
- {
- return null;
- }
-
- public CMNode item(final int index)
- {
- return null;
- }
-
- public Iterator iterator()
- {
- return new NullIterator();
- }
- }
-
- private static class NullIterator implements Iterator
- {
- public boolean hasNext()
- {
- return false;
- }
-
- public Object next()
- {
- throw new NoSuchElementException();
- }
-
- public void remove()
- {
- throw new UnsupportedOperationException(
- "can not remove regions via iterator"); //$NON-NLS-1$
- }
- }
- }
-
-} \ No newline at end of file
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/FaceletDocumentFactory.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/FaceletDocumentFactory.java
deleted file mode 100644
index 0c806f8a4..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/FaceletDocumentFactory.java
+++ /dev/null
@@ -1,177 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.cm;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.Namespace;
-import org.eclipse.jst.jsf.core.JSFVersion;
-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.facelet.core.internal.registry.FaceletRegistryManager.MyRegistryFactory;
-import org.eclipse.jst.jsf.facelet.core.internal.util.ViewUtil;
-import org.eclipse.jst.jsf.facelet.core.internal.util.ViewUtil.PrefixEntry;
-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.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.w3c.dom.Element;
-
-/**
- * Creates CMDocument framework adaptation for Facelet features.
- *
- * NOTE: this class currently caches state and is NOT THREADSAFE. Share
- * instances of this class between unowned classes at your own risk.
- *
- * @author cbateman
- *
- */
-public class FaceletDocumentFactory
-{
- private final IProject _project;
- private final Map<String, NamespaceCMAdapter> _cmDocuments;
- private final Map<String, TagInfo> _externalTagInfo;
-
- /**
- * @param project
- */
- public FaceletDocumentFactory(final IProject project)
- {
- _project = project;
- _cmDocuments = new HashMap<String, NamespaceCMAdapter>(8);
- _externalTagInfo = new HashMap<String, TagInfo>(8);
- }
-
- /**
- * @param uri
- * @param prefix
- * @return the CMDocument for the uri where prefix is used as its namespace
- * short-form (usually in the context of an XML document instance).
- */
- public CMDocument createCMDocumentForContext(final String uri,
- final String prefix)
- {
- final NamespaceCMAdapter cmDoc = getOrCreateCMDocument(_project, uri);
-
- if (cmDoc != null)
- {
- return new DocumentNamespaceCMAdapter(cmDoc, prefix);
- }
- return null;
- }
-
- /**
- * @param element
- * @return the CM model data for element or null if none.
- */
- public CMElementDeclaration createCMElementDeclaration(final Element element)
- {
- final String prefix = element.getPrefix();
- final Map<String, PrefixEntry> namespaces = ViewUtil
- .getDocumentNamespaces(element.getOwnerDocument());
- final PrefixEntry prefixEntry = namespaces.get(prefix);
-
- if (prefixEntry != null)
- {
- final CMDocument cmDoc = createCMDocumentForContext(prefixEntry
- .getUri(), prefixEntry.getPrefix());
-
- if (cmDoc != null)
- {
- return (CMElementDeclaration) cmDoc.getElements().getNamedItem(
- element.getLocalName());
- }
- }
-
- return null;
- }
-
- /**
- * @param ns
- * @return the externa tag info the namespace. May return a previously
- * cached value. If there is no cached value, then creates it.
- */
- public TagInfo getOrCreateExtraTagInfo(final String ns)
- {
- TagInfo tagInfo = _externalTagInfo.get(ns);
-
- if (tagInfo == null)
- {
- tagInfo = createExternalTagInfo(ns);
- _externalTagInfo.put(ns, tagInfo);
- }
- return tagInfo;
- }
-
- /**
- * @return a new external tag info for this namespace
- */
- private TagInfo createExternalTagInfo(final String uri)
- {
- final JSFVersion jsfVersion = JSFVersion.valueOfProject(_project);
- TagInfo tldTagInfo = null;
- if (jsfVersion != null)
- {
- if (jsfVersion.compareTo(JSFVersion.V2_0) >= 0)
- {
- tldTagInfo = new FaceletTagInfo(_project, uri);
- } else
- {
- final ITaglibRecord[] tldrecs = TaglibIndex
- .getAvailableTaglibRecords(_project.getFullPath());
- FIND_TLDRECORD: for (final ITaglibRecord rec : tldrecs)
- {
- final String matchUri = rec.getDescriptor().getURI();
- if (uri.equals(matchUri))
- {
- final CMDocumentFactoryTLD factory = new CMDocumentFactoryTLD();
- tldTagInfo = new MetadataTagInfo(_project,
- (TLDDocument) factory.createCMDocument(rec));
- break FIND_TLDRECORD;
- }
- }
-
- if (tldTagInfo == null)
- {
- tldTagInfo = new MetadataTagInfo(_project, uri);
- }
- }
- }
- return tldTagInfo;
- }
-
- private NamespaceCMAdapter getOrCreateCMDocument(final IProject project,
- final String uri)
- {
- NamespaceCMAdapter adapter = _cmDocuments.get(uri);
-
- if (adapter == null)
- {
- final MyRegistryFactory factory = new MyRegistryFactory();
-
- ITagRegistry registry;
- try
- {
- registry = factory.createTagRegistry(project);
- if (registry != null)
- {
- final Namespace ns = registry.getTagLibrary(uri);
-
- if (ns != null)
- {
- adapter = new NamespaceCMAdapter(ns, project);
- _cmDocuments.put(uri, adapter);
- }
- }
- }
- catch (final TagRegistryFactoryException e)
- {
- // fall-through
- }
- }
- return adapter;
- }
-
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/FaceletTagInfo.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/FaceletTagInfo.java
deleted file mode 100644
index a9ab0fafb..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/FaceletTagInfo.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.cm;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.strategy.FaceletExternalMetadataStrategy;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.strategy.IExternalMetadataStrategy;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.strategy.MDExternalMetadataStrategy;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.strategy.TagInfoStrategyComposite;
-
-/*package*/class FaceletTagInfo extends CompositeTagInfo
-{
- public FaceletTagInfo(final IProject project, final String uri)
- {
- super(uri, createStrategy(project));
- }
-
- private static TagInfoStrategyComposite createStrategy(
- final IProject project)
- {
- final IExternalMetadataStrategy mdStrategy = MDExternalMetadataStrategy
- .create(project);
- final IExternalMetadataStrategy faceletStrategy = new FaceletExternalMetadataStrategy(
- project);
- final List<String> ids = new ArrayList<String>();
- ids.add(FaceletExternalMetadataStrategy.STRATEGY_ID);
- ids.add(MDExternalMetadataStrategy.STRATEGY_ID);
-
- final TagInfoStrategyComposite strategyComposite = new TagInfoStrategyComposite(
- ids);
- strategyComposite.addStrategy(faceletStrategy);
- strategyComposite.addStrategy(mdStrategy);
- return strategyComposite;
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/MetadataTagInfo.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/MetadataTagInfo.java
deleted file mode 100644
index f8b670355..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/MetadataTagInfo.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.cm;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.strategy.IExternalMetadataStrategy;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.strategy.JSPExternalMetadataStrategy;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.strategy.MDExternalMetadataStrategy;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.strategy.TagInfoStrategyComposite;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDDocument;
-
-/**
- * An external tag info that checks first the meta-data repository and second in
- * the provided TLDDocument for data.
- *
- * @author cbateman
- *
- */
-/* package */class MetadataTagInfo extends CompositeTagInfo
-{
- private MetadataTagInfo(final IProject project, final TLDDocument doc,
- final String uri)
- {
- super(uri, createStrategy(project,doc));
- }
-
- public MetadataTagInfo(final IProject project, final String uri)
- {
- this(project, null, uri);
- }
-
- /**
- * @param project
- * @param doc
- */
- public MetadataTagInfo(final IProject project, final TLDDocument doc)
- {
- this(project, doc, doc.getUri());
- }
-
- private static TagInfoStrategyComposite createStrategy(final IProject project, final TLDDocument doc)
- {
- IExternalMetadataStrategy mdStrategy = MDExternalMetadataStrategy.create(project);
- JSPExternalMetadataStrategy jspStrategy = new JSPExternalMetadataStrategy(doc);
-
- final List<String> ids = new ArrayList<String>();
- ids.add(MDExternalMetadataStrategy.STRATEGY_ID);
- ids.add(JSPExternalMetadataStrategy.STRATEGY_ID);
-
- TagInfoStrategyComposite strategyComposite = new TagInfoStrategyComposite(ids);
- strategyComposite.addStrategy(mdStrategy);
- strategyComposite.addStrategy(jspStrategy);
- return strategyComposite;
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/NamespaceCMAdapter.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/NamespaceCMAdapter.java
deleted file mode 100644
index 0732f1954..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/NamespaceCMAdapter.java
+++ /dev/null
@@ -1,232 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.cm;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.jsf.common.internal.managedobject.IManagedObject;
-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.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-/*package*/class NamespaceCMAdapter implements CMNamedNodeMap, CMDocument, IManagedObject
-{
- private final Namespace _ns;
- private final Map<String, ElementCMAdapter> _elements;
- private final FaceletDocumentFactory _factory;
- private final AtomicBoolean _isDisposed = new AtomicBoolean(false);
-
- public NamespaceCMAdapter(final Namespace ns, final IProject project)
- {
- _ns = ns;
- _elements = new HashMap<String, ElementCMAdapter>();
- _factory = new FaceletDocumentFactory(project);
- }
-
- public int getLength()
- {
- if (_ns.hasViewElements())
- {
- return _ns.getViewElements().size();
- }
- return 0;
- }
-
- public CMNode getNamedItem(final String name)
- {
- String localname = name;
-
- if (name != null && name.indexOf(':') > -1)
- {
- String[] splitName = name.split(":"); //$NON-NLS-1$
-
- if (splitName.length == 2)
- {
- localname = splitName[1];
- }
- }
- ElementCMAdapter element = _elements.get(localname);
-
- if (element == null)
- {
- final ITagElement tagElement = _ns.getViewElement(localname);
- if (tagElement != null)
- {
- TagInfo tagInfo = _factory.getOrCreateExtraTagInfo(_ns.getNSUri());
- element = new ElementCMAdapter(tagElement, tagInfo);
- _elements.put(localname, element);
- }
- }
- return element;
- }
-
- // TODO: optimize
- public CMNode item(int index)
- {
- if (_ns.hasViewElements() && index >= 0
- && index < _ns.getViewElements().size())
- {
- final Iterator<?> it = iterator();
- for (int i = 0; it.hasNext(); i++)
- {
- final ITagElement tagElement = (ITagElement) it.next();
- if (i == index)
- {
- ElementCMAdapter element = _elements.get(tagElement.getName());
-
- if (element == null)
- {
- element = new ElementCMAdapter(tagElement, _factory.getOrCreateExtraTagInfo(_ns.getNSUri()));
- _elements.put(tagElement.getName(), element);
- return element;
- }
- }
- }
- }
- return null;
- }
-
- public Iterator<?> iterator()
- {
- return new WrappingIterator(_ns.getViewElements());
- }
-
- private class WrappingIterator implements Iterator<CMNode>
- {
- @SuppressWarnings("unchecked")
- final Iterator _viewElementIterator;
- @SuppressWarnings("unchecked")
- public WrappingIterator(final Collection viewElements)
- {
- _viewElementIterator = viewElements.iterator();
- }
-
- public boolean hasNext()
- {
- return _viewElementIterator.hasNext();
- }
-
- public CMNode next()
- {
- ITagElement nextElement = (ITagElement) _viewElementIterator.next();
- CMNode node = getNamedItem(nextElement.getName());
- return node;
- }
-
- public void remove()
- {
- throw new UnsupportedOperationException(""); //$NON-NLS-1$
- }
-
- }
- public CMNamedNodeMap getElements()
- {
- return this;
- }
-
- public CMNamedNodeMap getEntities()
- {
- // no entities
- return null;
- }
-
- public CMNamespace getNamespace()
- {
- return new CMNamespaceImpl(_ns.getNSUri());
- }
-
- public String getNodeName()
- {
- return getNamespace().getURI();
- }
-
- public int getNodeType()
- {
- return CMNode.DOCUMENT;
- }
-
- public Object getProperty(String propertyName)
- {
- // none supported for now
- return null;
- }
-
- public boolean supports(String propertyName)
- {
- // support none for now
- return false;
- }
-
- private static class CMNamespaceImpl implements CMNamespace
- {
- private final String _uri;
-
- CMNamespaceImpl(final String uri)
- {
- _uri = uri;
- }
-
- public String getPrefix()
- {
- return null;
- }
-
- public String getURI()
- {
- return _uri;
- }
-
- public String getNodeName()
- {
- return getURI();
- }
-
- public int getNodeType()
- {
- return CMNode.NAME_SPACE;
- }
-
- public Object getProperty(String propertyName)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean supports(String propertyName)
- {
- // TODO Auto-generated method stub
- return false;
- }
- }
- public void dispose()
- {
- if (_isDisposed.compareAndSet(false, true))
- {
- _elements.clear();
- }
- }
-
- public void checkpoint()
- {
- // TODO: ??
-
- }
-
- public void destroy()
- {
- // TODO: ??
-
- }
-
- public boolean isDisposed()
- {
- return _isDisposed.get();
- }
-
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/TagInfo.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/TagInfo.java
deleted file mode 100644
index dd801ee87..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/TagInfo.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.cm;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * Generic adapter needed to provide CM required metadata for a CMNode from
- * different sources.
- *
- * @author cbateman
- *
- */
-public abstract class TagInfo
-{
- /**
- * @param tagName
- * @param key
- * @return the tag property in the CM model for tagName at key or null if
- * not found.
- */
- public abstract Object getTagProperty(final String tagName, final String key);
-
- /**
- * @param tagName
- * @return the node map of attributes for the tag called tagName
- */
- public abstract CMNamedNodeMap getAttributes(final String tagName);
-
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/AddTagMDFactory.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/AddTagMDFactory.java
deleted file mode 100644
index aac6e1294..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/AddTagMDFactory.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: AddTagMDFactory.java,v 1.1 2010/03/08 18:49:41 cbateman Exp $
- */
-package org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd;
-
-import org.eclipse.emf.ecore.EFactory;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Factory</b> for the model.
- * It provides a create method for each non-abstract class of the model.
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AddTagMDPackage
- * @generated
- */
-public interface AddTagMDFactory extends EFactory
-{
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- AddTagMDFactory eINSTANCE = org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.impl.AddTagMDFactoryImpl.init();
-
- /**
- * Returns a new object of class '<em>Element Data</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Element Data</em>'.
- * @generated
- */
- ElementData createElementData();
-
- /**
- * Returns a new object of class '<em>Attribute Data</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Attribute Data</em>'.
- * @generated
- */
- AttributeData createAttributeData();
-
- /**
- * Returns the package supported by this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the package supported by this factory.
- * @generated
- */
- AddTagMDPackage getAddTagMDPackage();
-
-} //AddTagMDFactory
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/AddTagMDPackage.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/AddTagMDPackage.java
deleted file mode 100644
index deaa28449..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/AddTagMDPackage.java
+++ /dev/null
@@ -1,339 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: AddTagMDPackage.java,v 1.1 2010/03/08 18:49:41 cbateman Exp $
- */
-package org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Package</b> for the model.
- * It contains accessors for the meta objects to represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AddTagMDFactory
- * @model kind="package"
- * @generated
- */
-public interface AddTagMDPackage extends EPackage
-{
- /**
- * The package name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNAME = "addtagmd"; //$NON-NLS-1$
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_URI = "http://org.eclipse.jst.jsf.facelet.core/additionalTagMetadata.ecore"; //$NON-NLS-1$
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_PREFIX = "addTagMD"; //$NON-NLS-1$
-
- /**
- * The singleton instance of the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- AddTagMDPackage eINSTANCE = org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.impl.AddTagMDPackageImpl.init();
-
- /**
- * The meta object id for the '{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.impl.ElementDataImpl <em>Element Data</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.impl.ElementDataImpl
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.impl.AddTagMDPackageImpl#getElementData()
- * @generated
- */
- int ELEMENT_DATA = 0;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ELEMENT_DATA__NAME = 0;
-
- /**
- * The feature id for the '<em><b>Attributes</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ELEMENT_DATA__ATTRIBUTES = 1;
-
- /**
- * The number of structural features of the '<em>Element Data</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ELEMENT_DATA_FEATURE_COUNT = 2;
-
- /**
- * The meta object id for the '{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.impl.AttributeDataImpl <em>Attribute Data</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.impl.AttributeDataImpl
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.impl.AddTagMDPackageImpl#getAttributeData()
- * @generated
- */
- int ATTRIBUTE_DATA = 1;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ATTRIBUTE_DATA__NAME = 0;
-
- /**
- * The feature id for the '<em><b>Usage</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ATTRIBUTE_DATA__USAGE = 1;
-
- /**
- * The feature id for the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ATTRIBUTE_DATA__DESCRIPTION = 2;
-
- /**
- * The number of structural features of the '<em>Attribute Data</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ATTRIBUTE_DATA_FEATURE_COUNT = 3;
-
- /**
- * The meta object id for the '{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeUsage <em>Attribute Usage</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeUsage
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.impl.AddTagMDPackageImpl#getAttributeUsage()
- * @generated
- */
- int ATTRIBUTE_USAGE = 2;
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.ElementData <em>Element Data</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Element Data</em>'.
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.ElementData
- * @generated
- */
- EClass getElementData();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.ElementData#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.ElementData#getName()
- * @see #getElementData()
- * @generated
- */
- EAttribute getElementData_Name();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.ElementData#getAttributes <em>Attributes</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Attributes</em>'.
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.ElementData#getAttributes()
- * @see #getElementData()
- * @generated
- */
- EReference getElementData_Attributes();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeData <em>Attribute Data</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Attribute Data</em>'.
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeData
- * @generated
- */
- EClass getAttributeData();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeData#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeData#getName()
- * @see #getAttributeData()
- * @generated
- */
- EAttribute getAttributeData_Name();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeData#getUsage <em>Usage</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Usage</em>'.
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeData#getUsage()
- * @see #getAttributeData()
- * @generated
- */
- EAttribute getAttributeData_Usage();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeData#getDescription <em>Description</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Description</em>'.
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeData#getDescription()
- * @see #getAttributeData()
- * @generated
- */
- EAttribute getAttributeData_Description();
-
- /**
- * Returns the meta object for enum '{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeUsage <em>Attribute Usage</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for enum '<em>Attribute Usage</em>'.
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeUsage
- * @generated
- */
- EEnum getAttributeUsage();
-
- /**
- * Returns the factory that creates the instances of the model.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the factory that creates the instances of the model.
- * @generated
- */
- AddTagMDFactory getAddTagMDFactory();
-
- /**
- * <!-- begin-user-doc -->
- * Defines literals for the meta objects that represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("hiding")
- interface Literals
- {
- /**
- * The meta object literal for the '{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.impl.ElementDataImpl <em>Element Data</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.impl.ElementDataImpl
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.impl.AddTagMDPackageImpl#getElementData()
- * @generated
- */
- EClass ELEMENT_DATA = eINSTANCE.getElementData();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute ELEMENT_DATA__NAME = eINSTANCE.getElementData_Name();
-
- /**
- * The meta object literal for the '<em><b>Attributes</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference ELEMENT_DATA__ATTRIBUTES = eINSTANCE.getElementData_Attributes();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.impl.AttributeDataImpl <em>Attribute Data</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.impl.AttributeDataImpl
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.impl.AddTagMDPackageImpl#getAttributeData()
- * @generated
- */
- EClass ATTRIBUTE_DATA = eINSTANCE.getAttributeData();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute ATTRIBUTE_DATA__NAME = eINSTANCE.getAttributeData_Name();
-
- /**
- * The meta object literal for the '<em><b>Usage</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute ATTRIBUTE_DATA__USAGE = eINSTANCE.getAttributeData_Usage();
-
- /**
- * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute ATTRIBUTE_DATA__DESCRIPTION = eINSTANCE.getAttributeData_Description();
-
- /**
- * The meta object literal for the '{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeUsage <em>Attribute Usage</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeUsage
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.impl.AddTagMDPackageImpl#getAttributeUsage()
- * @generated
- */
- EEnum ATTRIBUTE_USAGE = eINSTANCE.getAttributeUsage();
-
- }
-
-} //AddTagMDPackage
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/AttributeData.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/AttributeData.java
deleted file mode 100644
index 1ffa6351a..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/AttributeData.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: AttributeData.java,v 1.1 2010/03/08 18:49:41 cbateman Exp $
- */
-package org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Attribute Data</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeData#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeData#getUsage <em>Usage</em>}</li>
- * <li>{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeData#getDescription <em>Description</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AddTagMDPackage#getAttributeData()
- * @model
- * @generated
- */
-public interface AttributeData extends EObject
-{
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AddTagMDPackage#getAttributeData_Name()
- * @model extendedMetaData="kind='element' name='name'"
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeData#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- void setName(String value);
-
- /**
- * Returns the value of the '<em><b>Usage</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeUsage}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Usage</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Usage</em>' attribute.
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeUsage
- * @see #setUsage(AttributeUsage)
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AddTagMDPackage#getAttributeData_Usage()
- * @model extendedMetaData="kind='element' name='usage'"
- * @generated
- */
- AttributeUsage getUsage();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeData#getUsage <em>Usage</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Usage</em>' attribute.
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeUsage
- * @see #getUsage()
- * @generated
- */
- void setUsage(AttributeUsage value);
-
- /**
- * Returns the value of the '<em><b>Description</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Description</em>' attribute.
- * @see #setDescription(String)
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AddTagMDPackage#getAttributeData_Description()
- * @model extendedMetaData="kind='element' name='description'"
- * @generated
- */
- String getDescription();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeData#getDescription <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
- * @see #getDescription()
- * @generated
- */
- void setDescription(String value);
-
-} // AttributeData
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/AttributeUsage.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/AttributeUsage.java
deleted file mode 100644
index f8bee810f..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/AttributeUsage.java
+++ /dev/null
@@ -1,287 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: AttributeUsage.java,v 1.1 2010/03/08 18:49:41 cbateman Exp $
- */
-package org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.emf.common.util.Enumerator;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the literals of the enumeration '<em><b>Attribute Usage</b></em>',
- * and utility methods for working with them.
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AddTagMDPackage#getAttributeUsage()
- * @model
- * @generated
- */
-public enum AttributeUsage implements Enumerator
-{
- /**
- * The '<em><b>OPTIONAL</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #OPTIONAL_VALUE
- * @generated
- * @ordered
- */
- OPTIONAL(0, "OPTIONAL", "OPTIONAL"), //$NON-NLS-1$ //$NON-NLS-2$
-
- /**
- * The '<em><b>REQUIRED</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #REQUIRED_VALUE
- * @generated
- * @ordered
- */
- REQUIRED(1, "REQUIRED", "REQUIRED"), //$NON-NLS-1$ //$NON-NLS-2$
-
- /**
- * The '<em><b>FIXED</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #FIXED_VALUE
- * @generated
- * @ordered
- */
- FIXED(2, "FIXED", "FIXED"), //$NON-NLS-1$ //$NON-NLS-2$
-
- /**
- * The '<em><b>PROHIBITED</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #PROHIBITED_VALUE
- * @generated
- * @ordered
- */
- PROHIBITED(3, "PROHIBITED", "PROHIBITED"); //$NON-NLS-1$ //$NON-NLS-2$
-
- /**
- * The '<em><b>OPTIONAL</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>OPTIONAL</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #OPTIONAL
- * @model
- * @generated
- * @ordered
- */
- public static final int OPTIONAL_VALUE = 0;
-
- /**
- * The '<em><b>REQUIRED</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>REQUIRED</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #REQUIRED
- * @model
- * @generated
- * @ordered
- */
- public static final int REQUIRED_VALUE = 1;
-
- /**
- * The '<em><b>FIXED</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>FIXED</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #FIXED
- * @model
- * @generated
- * @ordered
- */
- public static final int FIXED_VALUE = 2;
-
- /**
- * The '<em><b>PROHIBITED</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>PROHIBITED</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #PROHIBITED
- * @model
- * @generated
- * @ordered
- */
- public static final int PROHIBITED_VALUE = 3;
-
- /**
- * An array of all the '<em><b>Attribute Usage</b></em>' enumerators.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static final AttributeUsage[] VALUES_ARRAY =
- new AttributeUsage[]
- {
- OPTIONAL,
- REQUIRED,
- FIXED,
- PROHIBITED,
- };
-
- /**
- * A public read-only list of all the '<em><b>Attribute Usage</b></em>' enumerators.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final List<AttributeUsage> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
-
- /**
- * Returns the '<em><b>Attribute Usage</b></em>' literal with the specified literal value.
- * <!-- begin-user-doc -->
- * @param literal
- * @return the attribute usage
- * <!-- end-user-doc -->
- * @generated
- */
- public static AttributeUsage get(String literal)
- {
- for (int i = 0; i < VALUES_ARRAY.length; ++i)
- {
- AttributeUsage result = VALUES_ARRAY[i];
- if (result.toString().equals(literal))
- {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Attribute Usage</b></em>' literal with the specified name.
- * <!-- begin-user-doc -->
- * @param name
- * @return the attribute usage
- * <!-- end-user-doc -->
- * @generated
- */
- public static AttributeUsage getByName(String name)
- {
- for (int i = 0; i < VALUES_ARRAY.length; ++i)
- {
- AttributeUsage result = VALUES_ARRAY[i];
- if (result.getName().equals(name))
- {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Attribute Usage</b></em>' literal with the specified integer value.
- * <!-- begin-user-doc -->
- * @param value
- * @return the attribute usage
- * <!-- end-user-doc -->
- * @generated
- */
- public static AttributeUsage get(int value)
- {
- switch (value)
- {
- case OPTIONAL_VALUE: return OPTIONAL;
- case REQUIRED_VALUE: return REQUIRED;
- case FIXED_VALUE: return FIXED;
- case PROHIBITED_VALUE: return PROHIBITED;
- }
- return null;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final int value;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final String name;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private final String literal;
-
- /**
- * Only this class can construct instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private AttributeUsage(int value, String name, String literal)
- {
- this.value = value;
- this.name = name;
- this.literal = literal;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int getValue()
- {
- return value;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getLiteral()
- {
- return literal;
- }
-
- /**
- * Returns the literal value of the enumerator, which is its string representation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- return literal;
- }
-
-} //AttributeUsage
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/ElementData.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/ElementData.java
deleted file mode 100644
index 2e0d68f70..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/ElementData.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: ElementData.java,v 1.1 2010/03/08 18:49:41 cbateman Exp $
- */
-package org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Element Data</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.ElementData#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.ElementData#getAttributes <em>Attributes</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AddTagMDPackage#getElementData()
- * @model
- * @generated
- */
-public interface ElementData extends EObject
-{
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AddTagMDPackage#getElementData_Name()
- * @model extendedMetaData="kind='element' name='name'"
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.ElementData#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- void setName(String value);
-
- /**
- * Returns the value of the '<em><b>Attributes</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeData}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Attributes</em>' reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Attributes</em>' containment reference list.
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AddTagMDPackage#getElementData_Attributes()
- * @model containment="true"
- * extendedMetaData="kind='element' name='attribute'"
- * @generated
- */
- EList<AttributeData> getAttributes();
-
-} // ElementData
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/impl/AddTagMDFactoryImpl.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/impl/AddTagMDFactoryImpl.java
deleted file mode 100644
index 44fc5553c..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/impl/AddTagMDFactoryImpl.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: AddTagMDFactoryImpl.java,v 1.1 2010/03/08 18:49:41 cbateman Exp $
- */
-package org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.impl;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-
-import org.eclipse.emf.ecore.impl.EFactoryImpl;
-
-import org.eclipse.emf.ecore.plugin.EcorePlugin;
-
-import org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.*;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Factory</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class AddTagMDFactoryImpl extends EFactoryImpl implements AddTagMDFactory
-{
- /**
- * Creates the default factory implementation.
- * <!-- begin-user-doc -->
- * @return the factory
- * <!-- end-user-doc -->
- * @generated
- */
- public static AddTagMDFactory init()
- {
- try
- {
- AddTagMDFactory theAddTagMDFactory = (AddTagMDFactory)EPackage.Registry.INSTANCE.getEFactory("http://org.eclipse.jst.jsf.facelet.core/additionalTagMetadata.ecore"); //$NON-NLS-1$
- if (theAddTagMDFactory != null)
- {
- return theAddTagMDFactory;
- }
- }
- catch (Exception exception)
- {
- EcorePlugin.INSTANCE.log(exception);
- }
- return new AddTagMDFactoryImpl();
- }
-
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public AddTagMDFactoryImpl()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EObject create(EClass eClass)
- {
- switch (eClass.getClassifierID())
- {
- case AddTagMDPackage.ELEMENT_DATA: return createElementData();
- case AddTagMDPackage.ATTRIBUTE_DATA: return createAttributeData();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object createFromString(EDataType eDataType, String initialValue)
- {
- switch (eDataType.getClassifierID())
- {
- case AddTagMDPackage.ATTRIBUTE_USAGE:
- return createAttributeUsageFromString(eDataType, initialValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String convertToString(EDataType eDataType, Object instanceValue)
- {
- switch (eDataType.getClassifierID())
- {
- case AddTagMDPackage.ATTRIBUTE_USAGE:
- return convertAttributeUsageToString(eDataType, instanceValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ElementData createElementData()
- {
- ElementDataImpl elementData = new ElementDataImpl();
- return elementData;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public AttributeData createAttributeData()
- {
- AttributeDataImpl attributeData = new AttributeDataImpl();
- return attributeData;
- }
-
- /**
- * <!-- begin-user-doc -->
- * @param eDataType
- * @param initialValue
- * @return the attribute usage
- * <!-- end-user-doc -->
- * @generated
- */
- public AttributeUsage createAttributeUsageFromString(EDataType eDataType, String initialValue)
- {
- AttributeUsage result = AttributeUsage.get(initialValue);
- if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * @param eDataType
- * @param instanceValue
- * @return the usage string
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertAttributeUsageToString(EDataType eDataType, Object instanceValue)
- {
- return instanceValue == null ? null : instanceValue.toString();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public AddTagMDPackage getAddTagMDPackage()
- {
- return (AddTagMDPackage)getEPackage();
- }
-
- /**
- * <!-- begin-user-doc -->
- * @return the package
- * <!-- end-user-doc -->
- * @deprecated
- * @generated
- */
- @Deprecated
- public static AddTagMDPackage getPackage()
- {
- return AddTagMDPackage.eINSTANCE;
- }
-
-} //AddTagMDFactoryImpl
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/impl/AddTagMDPackageImpl.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/impl/AddTagMDPackageImpl.java
deleted file mode 100644
index 743afa086..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/impl/AddTagMDPackageImpl.java
+++ /dev/null
@@ -1,352 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: AddTagMDPackageImpl.java,v 1.1 2010/03/08 18:49:41 cbateman Exp $
- */
-package org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.impl;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-
-import org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AddTagMDFactory;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AddTagMDPackage;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeData;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeUsage;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.ElementData;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Package</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class AddTagMDPackageImpl extends EPackageImpl implements AddTagMDPackage
-{
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass elementDataEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass attributeDataEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EEnum attributeUsageEEnum = null;
-
- /**
- * Creates an instance of the model <b>Package</b>, registered with
- * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
- * package URI value.
- * <p>Note: the correct way to create the package is via the static
- * factory method {@link #init init()}, which also performs
- * initialization of the package, or returns the registered package,
- * if one already exists.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.ecore.EPackage.Registry
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AddTagMDPackage#eNS_URI
- * @see #init()
- * @generated
- */
- private AddTagMDPackageImpl()
- {
- super(eNS_URI, AddTagMDFactory.eINSTANCE);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static boolean isInited = false;
-
- /**
- * Creates, registers, and initializes the <b>Package</b> for this
- * model, and for any others upon which it depends. Simple
- * dependencies are satisfied by calling this method on all
- * dependent packages before doing anything else. This method drives
- * initialization for interdependent packages directly, in parallel
- * with this package, itself.
- * <p>Of this package and its interdependencies, all packages which
- * have not yet been registered by their URI values are first created
- * and registered. The packages are then initialized in two steps:
- * meta-model objects for all of the packages are created before any
- * are initialized, since one package's meta-model objects may refer to
- * those of another.
- * <p>Invocation of this method will not affect any packages that have
- * already been initialized.
- * <!-- begin-user-doc -->
- * @return the package
- * <!-- end-user-doc -->
- * @see #eNS_URI
- * @see #createPackageContents()
- * @see #initializePackageContents()
- * @generated
- */
- public static AddTagMDPackage init()
- {
- if (isInited) return (AddTagMDPackage)EPackage.Registry.INSTANCE.getEPackage(AddTagMDPackage.eNS_URI);
-
- // Obtain or create and register package
- AddTagMDPackageImpl theAddTagMDPackage = (AddTagMDPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof AddTagMDPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new AddTagMDPackageImpl());
-
- isInited = true;
-
- // Create package meta-data objects
- theAddTagMDPackage.createPackageContents();
-
- // Initialize created meta-data
- theAddTagMDPackage.initializePackageContents();
-
- // Mark meta-data to indicate it can't be changed
- theAddTagMDPackage.freeze();
-
- return theAddTagMDPackage;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getElementData()
- {
- return elementDataEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getElementData_Name()
- {
- return (EAttribute)elementDataEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getElementData_Attributes()
- {
- return (EReference)elementDataEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getAttributeData()
- {
- return attributeDataEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getAttributeData_Name()
- {
- return (EAttribute)attributeDataEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getAttributeData_Usage()
- {
- return (EAttribute)attributeDataEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getAttributeData_Description()
- {
- return (EAttribute)attributeDataEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EEnum getAttributeUsage()
- {
- return attributeUsageEEnum;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public AddTagMDFactory getAddTagMDFactory()
- {
- return (AddTagMDFactory)getEFactoryInstance();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isCreated = false;
-
- /**
- * Creates the meta-model objects for the package. This method is
- * guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void createPackageContents()
- {
- if (isCreated) return;
- isCreated = true;
-
- // Create classes and their features
- elementDataEClass = createEClass(ELEMENT_DATA);
- createEAttribute(elementDataEClass, ELEMENT_DATA__NAME);
- createEReference(elementDataEClass, ELEMENT_DATA__ATTRIBUTES);
-
- attributeDataEClass = createEClass(ATTRIBUTE_DATA);
- createEAttribute(attributeDataEClass, ATTRIBUTE_DATA__NAME);
- createEAttribute(attributeDataEClass, ATTRIBUTE_DATA__USAGE);
- createEAttribute(attributeDataEClass, ATTRIBUTE_DATA__DESCRIPTION);
-
- // Create enums
- attributeUsageEEnum = createEEnum(ATTRIBUTE_USAGE);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isInitialized = false;
-
- /**
- * Complete the initialization of the package and its meta-model. This
- * method is guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void initializePackageContents()
- {
- if (isInitialized) return;
- isInitialized = true;
-
- // Initialize package
- setName(eNAME);
- setNsPrefix(eNS_PREFIX);
- setNsURI(eNS_URI);
-
- // Create type parameters
-
- // Set bounds for type parameters
-
- // Add supertypes to classes
-
- // Initialize classes and features; add operations and parameters
- initEClass(elementDataEClass, ElementData.class, "ElementData", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEAttribute(getElementData_Name(), ecorePackage.getEString(), "name", null, 0, 1, ElementData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(getElementData_Attributes(), this.getAttributeData(), null, "attributes", null, 0, -1, ElementData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(attributeDataEClass, AttributeData.class, "AttributeData", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEAttribute(getAttributeData_Name(), ecorePackage.getEString(), "name", null, 0, 1, AttributeData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEAttribute(getAttributeData_Usage(), this.getAttributeUsage(), "usage", null, 0, 1, AttributeData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEAttribute(getAttributeData_Description(), ecorePackage.getEString(), "description", null, 0, 1, AttributeData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- // Initialize enums and add enum literals
- initEEnum(attributeUsageEEnum, AttributeUsage.class, "AttributeUsage"); //$NON-NLS-1$
- addEEnumLiteral(attributeUsageEEnum, AttributeUsage.OPTIONAL);
- addEEnumLiteral(attributeUsageEEnum, AttributeUsage.REQUIRED);
- addEEnumLiteral(attributeUsageEEnum, AttributeUsage.FIXED);
- addEEnumLiteral(attributeUsageEEnum, AttributeUsage.PROHIBITED);
-
- // Create resource
- createResource(eNS_URI);
-
- // Create annotations
- // http:///org/eclipse/emf/ecore/util/ExtendedMetaData
- createExtendedMetaDataAnnotations();
- }
-
- /**
- * Initializes the annotations for <b>http:///org/eclipse/emf/ecore/util/ExtendedMetaData</b>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void createExtendedMetaDataAnnotations()
- {
- String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; //$NON-NLS-1$
- addAnnotation
- (getElementData_Name(),
- source,
- new String[]
- {
- "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$
- "name", "name" //$NON-NLS-1$ //$NON-NLS-2$
- });
- addAnnotation
- (getElementData_Attributes(),
- source,
- new String[]
- {
- "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$
- "name", "attribute" //$NON-NLS-1$ //$NON-NLS-2$
- });
- addAnnotation
- (getAttributeData_Name(),
- source,
- new String[]
- {
- "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$
- "name", "name" //$NON-NLS-1$ //$NON-NLS-2$
- });
- addAnnotation
- (getAttributeData_Usage(),
- source,
- new String[]
- {
- "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$
- "name", "usage" //$NON-NLS-1$ //$NON-NLS-2$
- });
- addAnnotation
- (getAttributeData_Description(),
- source,
- new String[]
- {
- "kind", "element", //$NON-NLS-1$ //$NON-NLS-2$
- "name", "description" //$NON-NLS-1$ //$NON-NLS-2$
- });
- }
-
-} //AddTagMDPackageImpl
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/impl/AttributeDataImpl.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/impl/AttributeDataImpl.java
deleted file mode 100644
index 6e47d33bb..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/impl/AttributeDataImpl.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: AttributeDataImpl.java,v 1.1 2010/03/08 18:49:41 cbateman Exp $
- */
-package org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.ecore.EClass;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-
-import org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AddTagMDPackage;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeData;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeUsage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Attribute Data</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.impl.AttributeDataImpl#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.impl.AttributeDataImpl#getUsage <em>Usage</em>}</li>
- * <li>{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.impl.AttributeDataImpl#getDescription <em>Description</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class AttributeDataImpl extends EObjectImpl implements AttributeData
-{
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * The default value of the '{@link #getUsage() <em>Usage</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getUsage()
- * @generated
- * @ordered
- */
- protected static final AttributeUsage USAGE_EDEFAULT = AttributeUsage.OPTIONAL;
-
- /**
- * The cached value of the '{@link #getUsage() <em>Usage</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getUsage()
- * @generated
- * @ordered
- */
- protected AttributeUsage usage = USAGE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected static final String DESCRIPTION_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected String description = DESCRIPTION_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected AttributeDataImpl()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return AddTagMDPackage.Literals.ATTRIBUTE_DATA;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setName(String newName)
- {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, AddTagMDPackage.ATTRIBUTE_DATA__NAME, oldName, name));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public AttributeUsage getUsage()
- {
- return usage;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setUsage(AttributeUsage newUsage)
- {
- AttributeUsage oldUsage = usage;
- usage = newUsage == null ? USAGE_EDEFAULT : newUsage;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, AddTagMDPackage.ATTRIBUTE_DATA__USAGE, oldUsage, usage));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getDescription()
- {
- return description;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setDescription(String newDescription)
- {
- String oldDescription = description;
- description = newDescription;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, AddTagMDPackage.ATTRIBUTE_DATA__DESCRIPTION, oldDescription, description));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case AddTagMDPackage.ATTRIBUTE_DATA__NAME:
- return getName();
- case AddTagMDPackage.ATTRIBUTE_DATA__USAGE:
- return getUsage();
- case AddTagMDPackage.ATTRIBUTE_DATA__DESCRIPTION:
- return getDescription();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case AddTagMDPackage.ATTRIBUTE_DATA__NAME:
- setName((String)newValue);
- return;
- case AddTagMDPackage.ATTRIBUTE_DATA__USAGE:
- setUsage((AttributeUsage)newValue);
- return;
- case AddTagMDPackage.ATTRIBUTE_DATA__DESCRIPTION:
- setDescription((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case AddTagMDPackage.ATTRIBUTE_DATA__NAME:
- setName(NAME_EDEFAULT);
- return;
- case AddTagMDPackage.ATTRIBUTE_DATA__USAGE:
- setUsage(USAGE_EDEFAULT);
- return;
- case AddTagMDPackage.ATTRIBUTE_DATA__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case AddTagMDPackage.ATTRIBUTE_DATA__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case AddTagMDPackage.ATTRIBUTE_DATA__USAGE:
- return usage != USAGE_EDEFAULT;
- case AddTagMDPackage.ATTRIBUTE_DATA__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: "); //$NON-NLS-1$
- result.append(name);
- result.append(", usage: "); //$NON-NLS-1$
- result.append(usage);
- result.append(", description: "); //$NON-NLS-1$
- result.append(description);
- result.append(')');
- return result.toString();
- }
-
-} //AttributeDataImpl
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/impl/ElementDataImpl.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/impl/ElementDataImpl.java
deleted file mode 100644
index 4860f62d2..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/impl/ElementDataImpl.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: ElementDataImpl.java,v 1.1 2010/03/08 18:49:41 cbateman Exp $
- */
-package org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AddTagMDPackage;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeData;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.ElementData;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Element Data</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.impl.ElementDataImpl#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.impl.ElementDataImpl#getAttributes <em>Attributes</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class ElementDataImpl extends EObjectImpl implements ElementData
-{
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getAttributes() <em>Attributes</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAttributes()
- * @generated
- * @ordered
- */
- protected EList<AttributeData> attributes;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ElementDataImpl()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return AddTagMDPackage.Literals.ELEMENT_DATA;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setName(String newName)
- {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, AddTagMDPackage.ELEMENT_DATA__NAME, oldName, name));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<AttributeData> getAttributes()
- {
- if (attributes == null)
- {
- attributes = new EObjectContainmentEList<AttributeData>(AttributeData.class, this, AddTagMDPackage.ELEMENT_DATA__ATTRIBUTES);
- }
- return attributes;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
- {
- switch (featureID)
- {
- case AddTagMDPackage.ELEMENT_DATA__ATTRIBUTES:
- return ((InternalEList<?>)getAttributes()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case AddTagMDPackage.ELEMENT_DATA__NAME:
- return getName();
- case AddTagMDPackage.ELEMENT_DATA__ATTRIBUTES:
- return getAttributes();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case AddTagMDPackage.ELEMENT_DATA__NAME:
- setName((String)newValue);
- return;
- case AddTagMDPackage.ELEMENT_DATA__ATTRIBUTES:
- getAttributes().clear();
- getAttributes().addAll((Collection<? extends AttributeData>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case AddTagMDPackage.ELEMENT_DATA__NAME:
- setName(NAME_EDEFAULT);
- return;
- case AddTagMDPackage.ELEMENT_DATA__ATTRIBUTES:
- getAttributes().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case AddTagMDPackage.ELEMENT_DATA__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case AddTagMDPackage.ELEMENT_DATA__ATTRIBUTES:
- return attributes != null && !attributes.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: "); //$NON-NLS-1$
- result.append(name);
- result.append(')');
- return result.toString();
- }
-
-} //ElementDataImpl
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/provider/AddTagMDItemProviderAdapterFactory.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/provider/AddTagMDItemProviderAdapterFactory.java
deleted file mode 100644
index 4d23f22ea..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/provider/AddTagMDItemProviderAdapterFactory.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: AddTagMDItemProviderAdapterFactory.java,v 1.1 2010/03/08 18:49:40 cbateman Exp $
- */
-package org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.provider;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-
-import org.eclipse.emf.edit.provider.ChangeNotifier;
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.emf.edit.provider.IChangeNotifier;
-import org.eclipse.emf.edit.provider.IDisposable;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.INotifyChangedListener;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-
-import org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.util.AddTagMDAdapterFactory;
-
-/**
- * This is the factory that is used to provide the interfaces needed to support Viewers.
- * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
- * The adapters also support Eclipse property sheets.
- * Note that most of the adapters are shared among multiple instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class AddTagMDItemProviderAdapterFactory extends AddTagMDAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable
-{
- /**
- * This keeps track of the root adapter factory that delegates to this adapter factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ComposedAdapterFactory parentAdapterFactory;
-
- /**
- * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected IChangeNotifier changeNotifier = new ChangeNotifier();
-
- /**
- * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected Collection<Object> supportedTypes = new ArrayList<Object>();
-
- /**
- * This constructs an instance.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public AddTagMDItemProviderAdapterFactory()
- {
- supportedTypes.add(IEditingDomainItemProvider.class);
- supportedTypes.add(IStructuredItemContentProvider.class);
- supportedTypes.add(ITreeItemContentProvider.class);
- supportedTypes.add(IItemLabelProvider.class);
- supportedTypes.add(IItemPropertySource.class);
- supportedTypes.add(IResourceProvider.class);
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.ElementData} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ElementDataItemProvider elementDataItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.ElementData}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createElementDataAdapter()
- {
- if (elementDataItemProvider == null)
- {
- elementDataItemProvider = new ElementDataItemProvider(this);
- }
-
- return elementDataItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeData} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected AttributeDataItemProvider attributeDataItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeData}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createAttributeDataAdapter()
- {
- if (attributeDataItemProvider == null)
- {
- attributeDataItemProvider = new AttributeDataItemProvider(this);
- }
-
- return attributeDataItemProvider;
- }
-
- /**
- * This returns the root adapter factory that contains this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ComposeableAdapterFactory getRootAdapterFactory()
- {
- return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
- }
-
- /**
- * This sets the composed adapter factory that contains this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)
- {
- this.parentAdapterFactory = parentAdapterFactory;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean isFactoryForType(Object type)
- {
- return supportedTypes.contains(type) || super.isFactoryForType(type);
- }
-
- /**
- * This implementation substitutes the factory itself as the key for the adapter.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter adapt(Notifier notifier, Object type)
- {
- return super.adapt(notifier, this);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object adapt(Object object, Object type)
- {
- if (isFactoryForType(type))
- {
- Object adapter = super.adapt(object, type);
- if (!(type instanceof Class) || (((Class<?>)type).isInstance(adapter)))
- {
- return adapter;
- }
- }
-
- return null;
- }
-
- /**
- * This adds a listener.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void addListener(INotifyChangedListener notifyChangedListener)
- {
- changeNotifier.addListener(notifyChangedListener);
- }
-
- /**
- * This removes a listener.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void removeListener(INotifyChangedListener notifyChangedListener)
- {
- changeNotifier.removeListener(notifyChangedListener);
- }
-
- /**
- * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void fireNotifyChanged(Notification notification)
- {
- changeNotifier.fireNotifyChanged(notification);
-
- if (parentAdapterFactory != null)
- {
- parentAdapterFactory.fireNotifyChanged(notification);
- }
- }
-
- /**
- * This disposes all of the item providers created by this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void dispose()
- {
- if (elementDataItemProvider != null) elementDataItemProvider.dispose();
- if (attributeDataItemProvider != null) attributeDataItemProvider.dispose();
- }
-
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/provider/AttributeDataItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/provider/AttributeDataItemProvider.java
deleted file mode 100644
index 1bc1152a7..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/provider/AttributeDataItemProvider.java
+++ /dev/null
@@ -1,258 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: AttributeDataItemProvider.java,v 1.1 2010/03/08 18:49:40 cbateman Exp $
- */
-package org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.provider;
-
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.common.util.ResourceLocator;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ItemProviderAdapter;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-
-import org.eclipse.jst.jsf.common.metadata.Trait;
-import org.eclipse.jst.jsf.common.metadata.internal.TraitValueHelper;
-import org.eclipse.jst.jsf.facelet.core.internal.FaceletCorePlugin;
-
-import org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AddTagMDPackage;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeData;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeData} object.
- * <!-- begin-user-doc -->
- * @extends IResourceProvider
- * <!-- end-user-doc -->
- * @generated
- */
-public class AttributeDataItemProvider
- extends ItemProviderAdapter
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource,
- IResourceProvider
-{
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * @param adapterFactory
- * <!-- end-user-doc -->
- * @generated
- */
- public AttributeDataItemProvider(AdapterFactory adapterFactory)
- {
- super(adapterFactory);
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
- {
- if (itemPropertyDescriptors == null)
- {
- super.getPropertyDescriptors(object);
-
- addNamePropertyDescriptor(object);
- addUsagePropertyDescriptor(object);
- addDescriptionPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Name feature.
- * <!-- begin-user-doc -->
- * @param object
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addNamePropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_AttributeData_name_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_AttributeData_name_feature", "_UI_AttributeData_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- AddTagMDPackage.Literals.ATTRIBUTE_DATA__NAME,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Usage feature.
- * <!-- begin-user-doc -->
- * @param object
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addUsagePropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_AttributeData_usage_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_AttributeData_usage_feature", "_UI_AttributeData_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- AddTagMDPackage.Literals.ATTRIBUTE_DATA__USAGE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Description feature.
- * <!-- begin-user-doc -->
- * @param object
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addDescriptionPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_AttributeData_description_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_AttributeData_description_feature", "_UI_AttributeData_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- AddTagMDPackage.Literals.ATTRIBUTE_DATA__DESCRIPTION,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This returns AttributeData.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object)
- {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/AttributeData")); //$NON-NLS-1$
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object)
- {
- String label = ((AttributeData)object).getName();
- return label == null || label.length() == 0 ?
- getString("_UI_AttributeData_type") : //$NON-NLS-1$
- getString("_UI_AttributeData_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void notifyChanged(Notification notification)
- {
- updateChildren(notification);
-
- switch (notification.getFeatureID(AttributeData.class))
- {
- case AddTagMDPackage.ATTRIBUTE_DATA__NAME:
- case AddTagMDPackage.ATTRIBUTE_DATA__USAGE:
- case AddTagMDPackage.ATTRIBUTE_DATA__DESCRIPTION:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- }
- super.notifyChanged(notification);
- }
-
- /**
- * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
- * that can be created under this object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
- {
- super.collectNewChildDescriptors(newChildDescriptors, object);
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator()
- {
- return FaceletCorePlugin.INSTANCE;
- }
-
- public String getTranslatedString(EObject object, EStructuralFeature feature)
- {
- Object value = object.eGet(feature);
-
- if (value != null)
- {
- EObject testObject = object;
-
- while (! (testObject instanceof Trait)
- && testObject != null)
- {
- testObject = testObject.eContainer();
- }
-
- if (testObject instanceof Trait)
- {
- Trait trait = (Trait) testObject;
- value = TraitValueHelper.getNLSValue(trait, value.toString());
- }
- return value.toString();
- }
-
- return object.toString();
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/provider/ElementDataItemProvider.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/provider/ElementDataItemProvider.java
deleted file mode 100644
index 9aeae53ea..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/provider/ElementDataItemProvider.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: ElementDataItemProvider.java,v 1.1 2010/03/08 18:49:40 cbateman Exp $
- */
-package org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.provider;
-
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ItemProviderAdapter;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-import org.eclipse.jst.jsf.common.metadata.Trait;
-import org.eclipse.jst.jsf.common.metadata.internal.TraitValueHelper;
-import org.eclipse.jst.jsf.facelet.core.internal.FaceletCorePlugin;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AddTagMDPackage;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.ElementData;
-
-/**
- * This is the item provider adapter for a {@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.ElementData} object.
- * <!-- begin-user-doc -->
- * @extends IResourceProvider
- * <!-- end-user-doc -->
- * @generated
- */
-public class ElementDataItemProvider
- extends ItemProviderAdapter
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource,
- IResourceProvider
-{
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * @param adapterFactory
- * <!-- end-user-doc -->
- * @generated
- */
- public ElementDataItemProvider(AdapterFactory adapterFactory)
- {
- super(adapterFactory);
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
- {
- if (itemPropertyDescriptors == null)
- {
- super.getPropertyDescriptors(object);
-
- addNamePropertyDescriptor(object);
- addAttributesPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Name feature.
- * <!-- begin-user-doc -->
- * @param object
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addNamePropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ElementData_name_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ElementData_name_feature", "_UI_ElementData_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- AddTagMDPackage.Literals.ELEMENT_DATA__NAME,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Attributes feature.
- * <!-- begin-user-doc -->
- * @param object
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addAttributesPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ElementData_attributes_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ElementData_attributes_feature", "_UI_ElementData_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- AddTagMDPackage.Literals.ELEMENT_DATA__ATTRIBUTES,
- true,
- false,
- true,
- null,
- null,
- null));
- }
-
- /**
- * This returns ElementData.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object)
- {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/ElementData")); //$NON-NLS-1$
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object)
- {
- String label = ((ElementData)object).getName();
- return label == null || label.length() == 0 ?
- getString("_UI_ElementData_type") : //$NON-NLS-1$
- getString("_UI_ElementData_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void notifyChanged(Notification notification)
- {
- updateChildren(notification);
-
- switch (notification.getFeatureID(ElementData.class))
- {
- case AddTagMDPackage.ELEMENT_DATA__NAME:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- }
- super.notifyChanged(notification);
- }
-
- /**
- * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
- * that can be created under this object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
- {
- super.collectNewChildDescriptors(newChildDescriptors, object);
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator()
- {
- return FaceletCorePlugin.INSTANCE;
- }
-
- public String getTranslatedString(EObject object, EStructuralFeature feature)
- {
- Object value = object.eGet(feature);
-
- if (value != null)
- {
- EObject testObject = object;
-
- while (! (testObject instanceof Trait)
- && testObject != null)
- {
- testObject = testObject.eContainer();
- }
-
- if (testObject instanceof Trait)
- {
- Trait trait = (Trait) testObject;
- value = TraitValueHelper.getNLSValue(trait, value.toString());
- }
- return value.toString();
- }
-
- return object.toString();
- }
-
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/provider/IResourceProvider.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/provider/IResourceProvider.java
deleted file mode 100644
index d441f590c..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/provider/IResourceProvider.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.provider;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-/**
- * A translated string provider.
- *
- * @author cbateman
- *
- */
-public interface IResourceProvider
-{
- /**
- * @param object
- * @param feature
- * @return the string value of object.eGet(feature)
- */
- String getTranslatedString(final EObject object,
- final EStructuralFeature feature);
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/util/AddTagMDAdapterFactory.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/util/AddTagMDAdapterFactory.java
deleted file mode 100644
index 0ec5f7206..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/util/AddTagMDAdapterFactory.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: AddTagMDAdapterFactory.java,v 1.1 2010/03/08 18:49:42 cbateman Exp $
- */
-package org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.util;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notifier;
-
-import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
-
-import org.eclipse.emf.ecore.EObject;
-
-import org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.*;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Adapter Factory</b> for the model.
- * It provides an adapter <code>createXXX</code> method for each class of the model.
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AddTagMDPackage
- * @generated
- */
-public class AddTagMDAdapterFactory extends AdapterFactoryImpl
-{
- /**
- * The cached model package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static AddTagMDPackage modelPackage;
-
- /**
- * Creates an instance of the adapter factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public AddTagMDAdapterFactory()
- {
- if (modelPackage == null)
- {
- modelPackage = AddTagMDPackage.eINSTANCE;
- }
- }
-
- /**
- * Returns whether this factory is applicable for the type of the object.
- * <!-- begin-user-doc -->
- * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
- * <!-- end-user-doc -->
- * @return whether this factory is applicable for the type of the object.
- * @generated
- */
- @Override
- public boolean isFactoryForType(Object object)
- {
- if (object == modelPackage)
- {
- return true;
- }
- if (object instanceof EObject)
- {
- return ((EObject)object).eClass().getEPackage() == modelPackage;
- }
- return false;
- }
-
- /**
- * The switch that delegates to the <code>createXXX</code> methods.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected AddTagMDSwitch<Adapter> modelSwitch =
- new AddTagMDSwitch<Adapter>()
- {
- @Override
- public Adapter caseElementData(ElementData object)
- {
- return createElementDataAdapter();
- }
- @Override
- public Adapter caseAttributeData(AttributeData object)
- {
- return createAttributeDataAdapter();
- }
- @Override
- public Adapter defaultCase(EObject object)
- {
- return createEObjectAdapter();
- }
- };
-
- /**
- * Creates an adapter for the <code>target</code>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param target the object to adapt.
- * @return the adapter for the <code>target</code>.
- * @generated
- */
- @Override
- public Adapter createAdapter(Notifier target)
- {
- return modelSwitch.doSwitch((EObject)target);
- }
-
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.ElementData <em>Element Data</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.ElementData
- * @generated
- */
- public Adapter createElementDataAdapter()
- {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeData <em>Attribute Data</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeData
- * @generated
- */
- public Adapter createAttributeDataAdapter()
- {
- return null;
- }
-
- /**
- * Creates a new adapter for the default case.
- * <!-- begin-user-doc -->
- * This default implementation returns null.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @generated
- */
- public Adapter createEObjectAdapter()
- {
- return null;
- }
-
-} //AddTagMDAdapterFactory
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/util/AddTagMDSwitch.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/util/AddTagMDSwitch.java
deleted file mode 100644
index e15cffd81..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/addtagmd/util/AddTagMDSwitch.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: AddTagMDSwitch.java,v 1.1 2010/03/08 18:49:42 cbateman Exp $
- */
-package org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.util;
-
-import java.util.List;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-
-import org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.*;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Switch</b> for the model's inheritance hierarchy.
- * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
- * to invoke the <code>caseXXX</code> method for each class of the model,
- * starting with the actual class of the object
- * and proceeding up the inheritance hierarchy
- * until a non-null result is returned,
- * which is the result of the switch.
- * @param <T>
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AddTagMDPackage
- * @generated
- */
-public class AddTagMDSwitch<T>
-{
- /**
- * The cached model package
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static AddTagMDPackage modelPackage;
-
- /**
- * Creates an instance of the switch.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public AddTagMDSwitch()
- {
- if (modelPackage == null)
- {
- modelPackage = AddTagMDPackage.eINSTANCE;
- }
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * @param theEObject
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- public T doSwitch(EObject theEObject)
- {
- return doSwitch(theEObject.eClass(), theEObject);
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * @param theEClass
- * @param theEObject
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- protected T doSwitch(EClass theEClass, EObject theEObject)
- {
- if (theEClass.eContainer() == modelPackage)
- {
- return doSwitch(theEClass.getClassifierID(), theEObject);
- }
- List<EClass> eSuperTypes = theEClass.getESuperTypes();
- return
- eSuperTypes.isEmpty() ?
- defaultCase(theEObject) :
- doSwitch(eSuperTypes.get(0), theEObject);
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * @param classifierID
- * @param theEObject
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- protected T doSwitch(int classifierID, EObject theEObject)
- {
- switch (classifierID)
- {
- case AddTagMDPackage.ELEMENT_DATA:
- {
- ElementData elementData = (ElementData)theEObject;
- T result = caseElementData(elementData);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case AddTagMDPackage.ATTRIBUTE_DATA:
- {
- AttributeData attributeData = (AttributeData)theEObject;
- T result = caseAttributeData(attributeData);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- default: return defaultCase(theEObject);
- }
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Element Data</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Element Data</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseElementData(ElementData object)
- {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Attribute Data</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Attribute Data</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseAttributeData(AttributeData object)
- {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch, but this is the last case anyway.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject)
- * @generated
- */
- public T defaultCase(EObject object)
- {
- return null;
- }
-
-} //AddTagMDSwitch
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/attributevalues/TemplateWebPathType.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/attributevalues/TemplateWebPathType.java
deleted file mode 100644
index 572d7d55d..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/attributevalues/TemplateWebPathType.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.cm.attributevalues;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-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.facelet.core.internal.FaceletCorePlugin;
-import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues;
-import org.eclipse.jst.jsf.metadataprocessors.features.PossibleValue;
-import org.eclipse.jst.jsf.taglibprocessing.attributevalues.WebPathType;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.resources.IVirtualContainer;
-import org.eclipse.wst.common.componentcore.resources.IVirtualResource;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Node;
-
-/**
- * Web-path attribute value type that adds possible values support
- *
- * @author cbateman
- *
- */
-public class TemplateWebPathType extends WebPathType implements IPossibleValues
-{
-
- public List getPossibleValues()
- {
- final IStructuredDocumentContext context = getStructuredDocumentContext();
- final IDOMContextResolver resolver = IStructuredDocumentContextResolverFactory.INSTANCE
- .getDOMContextResolver(context);
- if (resolver != null)
- {
- final Node node = resolver.getNode();
- if (node instanceof Attr)
- {
- return createPossibleValues((Attr) node);
- }
- }
- return Collections.EMPTY_LIST;
- }
-
- private List createPossibleValues(final Attr node)
- {
- String currentPathString = node.getNodeValue();
-
- final List possibleValues = new ArrayList();
-
- if (currentPathString == null || "".equals(currentPathString.trim())) //$NON-NLS-1$
- {
- currentPathString = "/"; //$NON-NLS-1$
- }
-
- final IPath currentPath = new Path(currentPathString);
-
- final IVirtualContainer webRoot = getWebRoot();
-
- final IVirtualResource deepestElement = findDeepestCommonElement(
- currentPath, webRoot);
-
- if (deepestElement == null)
- {
- // empty
- return possibleValues;
- }
-
- final IResource[] allResources = deepestElement
- .getUnderlyingResources();
- for (final IResource res : allResources)
- {
- if (res instanceof IContainer)
- {
- try
- {
- for (final IResource child : ((IContainer) res).members())
- {
- if (child.exists())
- {
- IPath childPath = child.getProjectRelativePath();
- int numLeadingSegments = webRoot
- .getProjectRelativePath()
- .matchingFirstSegments(childPath);
- childPath = childPath
- .removeFirstSegments(numLeadingSegments);
- String pathName = null;
- if (currentPath.isAbsolute())
- {
- pathName = childPath.makeAbsolute()
- .toString();
- }
- else
- {
- pathName = childPath.makeRelative().toString();
- }
-
- final PossibleValue pv = new PossibleValue(
- pathName, pathName);
- possibleValues.add(pv);
- }
- }
- }
- catch (final CoreException ce)
- {
- FaceletCorePlugin.log("While trying possible values", ce); //$NON-NLS-1$
- }
- }
- }
- return possibleValues;
- }
-
- private IVirtualResource findDeepestCommonElement(
- final IPath currentPath, final IVirtualContainer webRoot)
- {
- final String[] segments = currentPath.segments();
- IVirtualResource deepestElement = null;
- if (segments != null)
- {
- IPath longestSubPath = new Path(""); //$NON-NLS-1$
- for (final String segment : segments)
- {
- longestSubPath = longestSubPath.append(segment);
- deepestElement = webRoot.findMember(longestSubPath);
- if (deepestElement == null)
- {
- longestSubPath = longestSubPath.removeLastSegments(1);
- break;
- }
- }
-
- deepestElement = webRoot.findMember(longestSubPath);
- if (deepestElement == null)
- {
- deepestElement = webRoot;
- }
- else
- {
- int avoidInfiniteLoopCount = 0;
- while(avoidInfiniteLoopCount < 1000 && // we timeout in cause of circular chains.
- deepestElement != null &&
- ! (deepestElement.getUnderlyingResource() instanceof IContainer))
- {
- deepestElement = deepestElement.getParent();
- }
-
- if (avoidInfiniteLoopCount == 1000)
- {
- throw new IllegalStateException();
- }
- }
- }
- return deepestElement;
- }
-
- private IVirtualContainer getWebRoot()
-
- {
- final IVirtualContainer webRoot = ComponentCore.createComponent(
- getProject()).getRootFolder();
-
- return webRoot;
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/AbstractExternalMetadataStrategy.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/AbstractExternalMetadataStrategy.java
deleted file mode 100644
index 3a46644f9..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/AbstractExternalMetadataStrategy.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.cm.strategy;
-
-import org.eclipse.jst.jsf.common.dom.TagIdentifier;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.ExternalTagInfo;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.TagInfo;
-
-/**
- * Super class of all external meta-data strategy.
- *
- * @author cbateman
- *
- */
-/* package */abstract class AbstractExternalMetadataStrategy implements
-IExternalMetadataStrategy
-{
- private final String _displayName;
- private final String _id;
-
- protected AbstractExternalMetadataStrategy(final String id,
- final String displayName)
- {
- _id = id;
- _displayName = displayName;
- }
-
- public final TagInfo getNoResult()
- {
- // this value must be "==" comparable
- return ExternalTagInfo.NULL_INSTANCE;
- }
-
- public abstract TagInfo perform(TagIdentifier input) throws Exception;
-
- public final String getDisplayName()
- {
- return _displayName;
- }
-
- public String getId()
- {
- return _id;
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/FaceletExternalMetadataStrategy.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/FaceletExternalMetadataStrategy.java
deleted file mode 100644
index 149c34112..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/FaceletExternalMetadataStrategy.java
+++ /dev/null
@@ -1,138 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.cm.strategy;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.jsf.common.dom.TagIdentifier;
-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.designtime.internal.view.model.ITagRegistry;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.AttributeCMAdapter;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.TagInfo;
-import org.eclipse.jst.jsf.facelet.core.internal.util.ViewUtil;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-/**
- * The
- * @author cbateman
- *
- */
-public class FaceletExternalMetadataStrategy extends
- AbstractExternalMetadataStrategy
-{
- /**
- * The unique identifier for the strategy.
- */
- public final static String STRATEGY_ID = "org.eclipse.jst.jsf.facelet.core.internal.cm.strategy.FaceletExternalMetadataStrategy"; //$NON-NLS-1$
- private final IProject _project;
-
- /**
- * @param project
- */
- public FaceletExternalMetadataStrategy(final IProject project)
- {
- super(STRATEGY_ID, Messages.FaceletExternalMetadataStrategy_0);
- _project = project;
- }
-
- @Override
- public TagInfo perform(TagIdentifier input) throws Exception
- {
- final ITagRegistry tagRegistry = ViewUtil.getTagRegistry(_project);
-
- if (tagRegistry != null)
- {
- Namespace tagLibrary = tagRegistry.getTagLibrary(input.getUri());
- if (tagLibrary != null)
- {
- return new FaceletInternalInfo(tagLibrary);
- }
- }
- return getNoResult();
- }
-
- private static class FaceletInternalInfo extends TagInfo
- {
- private final Namespace _namespace;
-
- public FaceletInternalInfo(final Namespace namespace)
- {
- _namespace = namespace;
- }
-
- @Override
- public Object getTagProperty(String tagName, String key)
- {
- if ("description".equals(key)) //$NON-NLS-1$
- {
- // TODO:
- }
- return null;
- }
-
- @Override
- public CMNamedNodeMap getAttributes(String tagName)
- {
- ITagElement viewElement = _namespace.getViewElement(tagName);
- if (viewElement != null)
- {
- return new MyNodeNameMap(viewElement);
- }
- return null;
- }
-
- private static class MyNodeNameMap implements CMNamedNodeMap
- {
- private final ITagElement _tagElement;
- private final ArrayList<CMNode> _attrs;
-
- public MyNodeNameMap(final ITagElement tagElement)
- {
- super();
- _tagElement = tagElement;
- _attrs = new ArrayList<CMNode>();
- for (final Map.Entry<String, ? extends ITagAttribute> entry : _tagElement.getAttributes().entrySet())
- {
- final ITagAttribute attr = entry.getValue();
- _attrs.add(new AttributeCMAdapter(attr));
- }
- }
-
- public int getLength()
- {
- return _attrs.size();
- }
-
- public CMNode getNamedItem(String name)
- {
- if (name == null)
- {
- return null;
- }
- for (final CMNode cmNode : _attrs)
- {
- if (name.equals(cmNode.getNodeName()))
- {
- return cmNode;
- }
- }
- return null;
- }
-
- public CMNode item(int index)
- {
- return _attrs.get(index);
- }
-
- public Iterator iterator()
- {
- return Collections.unmodifiableList(_attrs).iterator();
- }
- }
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/IExternalMetadataStrategy.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/IExternalMetadataStrategy.java
deleted file mode 100644
index 320e824ab..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/IExternalMetadataStrategy.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.cm.strategy;
-
-import org.eclipse.jst.jsf.common.dom.TagIdentifier;
-import org.eclipse.jst.jsf.common.internal.strategy.IIdentifiableStrategy;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.ExternalTagInfo;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.TagInfo;
-
-/**
- * A strategy whose algorithm loads the tag CM data for a tag.
- *
- * @author cbateman
- *
- */
-public interface IExternalMetadataStrategy extends
- IIdentifiableStrategy<TagIdentifier, TagInfo, String>
-{
-
- /**
- * A null strategy that returns no result for all queries
- * @author cbateman
- *
- */
- static class NullExternalMetadataStrategy implements IExternalMetadataStrategy
- {
-
- public TagInfo getNoResult()
- {
- return ExternalTagInfo.NULL_INSTANCE;
- }
-
- public TagInfo perform(TagIdentifier input) throws Exception
- {
- return getNoResult();
- }
-
- public String getDisplayName()
- {
- return "NULL instance; you shouldn't see this label!"; //$NON-NLS-1$
- }
-
- public String getId()
- {
- return "NULL Strategy"; //$NON-NLS-1$
- }
-
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/InternalNamedNodeMap.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/InternalNamedNodeMap.java
deleted file mode 100644
index f92b8c7ec..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/InternalNamedNodeMap.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.cm.strategy;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-/*package*/ class InternalNamedNodeMap implements CMNamedNodeMap
-{
- private final List<CMNode> _nodes = new ArrayList<CMNode>();
-
- /**
- * Add a node to the map. This is not on the CMNamedNodeMap and is used
- * to populate the map.
- *
- * @param node
- */
- public void add(final CMNode node)
- {
- _nodes.add(node);
- }
-
- public int getLength()
- {
- return _nodes.size();
- }
-
- public CMNode getNamedItem(final String name)
- {
- for (final CMNode foundNode : _nodes)
- {
- if (name.equals(foundNode.getNodeName()))
- {
- return foundNode;
- }
- }
- return null;
- }
-
- public CMNode item(final int index)
- {
- if (index < _nodes.size())
- {
- return _nodes.get(index);
- }
- return null;
- }
-
- public Iterator<?> iterator()
- {
- return Collections.unmodifiableList(_nodes).iterator();
- }
-
- /**
- * A null instance object for InternalNamedNodeMap
- *
- */
- public static class NullInternalNamedNodeMap extends InternalNamedNodeMap
- {
-
- @Override
- public void add(final CMNode node)
- {
- // do nothing
- }
-
- @Override
- public int getLength()
- {
- // always empty
- return 0;
- }
-
- @Override
- public CMNode getNamedItem(final String name)
- {
- return null;
- }
-
- @Override
- public CMNode item(final int index)
- {
- return null;
- }
-
- @Override
- public Iterator<?> iterator()
- {
- return Collections.EMPTY_LIST.iterator();
- }
-
- }
-} \ No newline at end of file
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/JSPExternalMetadataStrategy.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/JSPExternalMetadataStrategy.java
deleted file mode 100644
index e704e03ac..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/JSPExternalMetadataStrategy.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.cm.strategy;
-
-import org.eclipse.jst.jsf.common.dom.TagIdentifier;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.ExternalTagInfo;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.TagInfo;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * A metadata strategy that uses JSP TLD metadata.
- *
- * @author cbateman
- *
- */
-public class JSPExternalMetadataStrategy extends
- AbstractExternalMetadataStrategy
-{
- private final TLDDocument _doc;
- /**
- * The unique identifier for the strategy.
- */
- public final static String STRATEGY_ID = "org.eclipse.jst.jsf.facelet.core.internal.cm.strategy.JSPExternalMetadataStrategy"; //$NON-NLS-1$
-
- /**
- * @param doc
- */
- public JSPExternalMetadataStrategy(final TLDDocument doc)
- {
- super(STRATEGY_ID, Messages.JSPExternalMetadataStrategy_DisplayName);
- _doc = doc;
- }
-
- @Override
- public TagInfo perform(final TagIdentifier input) throws Exception
- {
- if (_doc != null)
- {
- return new TLDMetadataExternalInfo(_doc);
- }
- return getNoResult();
- }
-
- private static class TLDMetadataExternalInfo extends ExternalTagInfo
- {
- private final TLDDocument _doc;
-
- public TLDMetadataExternalInfo(final TLDDocument doc)
- {
- _doc = doc;
- }
-
- @Override
- public CMNamedNodeMap getAttributes(final String tagName)
- {
- final CMElementDeclaration element = (CMElementDeclaration) _doc
- .getElements().getNamedItem(tagName);
-
- if (element != null)
- {
- return element.getAttributes();
- }
- return null;
- }
-
- @Override
- public Object getTagProperty(final String tagName, final String key)
- {
- final CMElementDeclaration element = (CMElementDeclaration) _doc
- .getElements().getNamedItem(tagName);
- if (element != null)
- {
- return element.getProperty(key);
- }
- return null;
- }
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/MDExternalMetadataStrategy.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/MDExternalMetadataStrategy.java
deleted file mode 100644
index b7b2b21db..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/MDExternalMetadataStrategy.java
+++ /dev/null
@@ -1,416 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.cm.strategy;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.jface.util.SafeRunnable;
-import org.eclipse.jst.jsf.common.dom.TagIdentifier;
-import org.eclipse.jst.jsf.common.internal.managedobject.IManagedObject;
-import org.eclipse.jst.jsf.common.internal.managedobject.ObjectManager.ManagedObjectException;
-import org.eclipse.jst.jsf.common.internal.resource.ResourceSingletonObjectManager;
-import org.eclipse.jst.jsf.facelet.core.internal.FaceletCorePlugin;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.AttributeCMAdapter;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.ExternalTagInfo;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.TagInfo;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AddTagMDPackage;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeData;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.AttributeUsage;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.ElementData;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.addtagmd.provider.IResourceProvider;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.strategy.InternalNamedNodeMap.NullInternalNamedNodeMap;
-import org.eclipse.jst.jsf.facelet.core.internal.util.TagMetadataLoader;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-
-/**
- * An external meta-data strategy that uses the JSF meta-data framework.
- *
- * @author cbateman
- *
- */
-public class MDExternalMetadataStrategy extends
- AbstractExternalMetadataStrategy implements IManagedObject
-{
- private static MySingletonManager MANAGER = new MySingletonManager();
-
- /**
- * @param project
- * @return the instance of the strategy for project or
- */
- public static IExternalMetadataStrategy create(final IProject project)
- {
- try
- {
- return MANAGER.getInstance(project);
- }
- catch (final ManagedObjectException e)
- {
- FaceletCorePlugin.log(
- "Getting managed instance of tag metadata strategy", e); //$NON-NLS-1$
- }
- return new NullExternalMetadataStrategy();
- }
-
- /**
- * The unique identifier for the strategy.
- */
- public final static String STRATEGY_ID = "org.eclipse.jst.jsf.facelet.core.internal.cm.strategy.MDExternalMetadataStrategy"; //$NON-NLS-1$
-
- // private static final String VAR = "var"; //$NON-NLS-1$
- // private static final String VALUE = "value"; //$NON-NLS-1$
- // private static final String SRC = "src"; //$NON-NLS-1$
- // private static final String NAME = "name"; //$NON-NLS-1$
- // private static final String HOTKEY = "hotkey"; //$NON-NLS-1$
- // private static final String TEMPLATE = "template"; //$NON-NLS-1$
- // private static final String BINDING = "binding"; //$NON-NLS-1$
- // private static final String ID = "id"; //$NON-NLS-1$
-
- private final IProject _project;
- private final TagMetadataLoader _tagMetadataLoader;
- private final Map<String, MDExternalTagInfo> _cached;
- private final AtomicBoolean _isDisposed = new AtomicBoolean(
- false);
-
- /**
- * Default constructor
- *
- * @param project
- */
- private MDExternalMetadataStrategy(final IProject project)
- {
- super(STRATEGY_ID, Messages.MDExternalMetadataStrategy_DisplayName);
- _project = project;
- _tagMetadataLoader = new TagMetadataLoader(_project);
- _cached = new HashMap<String, MDExternalTagInfo>();
- }
-
- public void checkpoint()
- {
- // do nothing
- }
-
- public void destroy()
- {
- // currently no persistent state, so just dispose
- }
-
- public void dispose()
- {
- if (_isDisposed.compareAndSet(false, true))
- {
- _cached.clear();
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.jsf.facelet.core.internal.cm.strategy.
- * AbstractExternalMetadataStrategy
- * #perform(org.eclipse.jst.jsf.common.dom.TagIdentifier)
- */
- @Override
- public TagInfo perform(final TagIdentifier input) throws Exception
- {
- MDExternalTagInfo tagInfo = _cached.get(input.getUri());
-
- if (tagInfo == null)
- {
- tagInfo = new MDExternalTagInfo(input.getUri(), _tagMetadataLoader);
- _cached.put(input.getUri(), tagInfo);
- }
- return tagInfo;
- }
-
- private static class MDExternalTagInfo extends ExternalTagInfo
- {
- private final String _uri;
- private final TagMetadataLoader _tagMetadataLoader;
- private final Map<String, InternalNamedNodeMap> _attributes;
-
- public MDExternalTagInfo(final String uri,
- final TagMetadataLoader tagMetadataLoader)
- {
- _uri = uri;
- _tagMetadataLoader = tagMetadataLoader;
- _attributes = new HashMap<String, InternalNamedNodeMap>();
- }
-
- @Override
- public CMNamedNodeMap getAttributes(final String tagName)
- {
- final InternalNamedNodeMap nodeMap = _attributes.get(tagName);
- final InternalNamedNodeMap[] innerClassNodeMap = new InternalNamedNodeMap[1];
- innerClassNodeMap[0] = nodeMap;
-
- if (nodeMap == null)
- {
- SafeRunnable.run(new ISafeRunnable()
- {
- public void run()
- {
- final ElementData data = _tagMetadataLoader
- .getElementData(_uri, tagName);
-
- if (data != null)
- {
- innerClassNodeMap[0] = new InternalNamedNodeMap();
-
- for (final AttributeData attribute : data
- .getAttributes())
- {
- innerClassNodeMap[0]
- .add(createAttribute(attribute));
- }
- _attributes.put(tagName, innerClassNodeMap[0]);
- }
- // no meta-data found for this tag, so mark as null
- // instance so future calls don't bother a re-lookup.
- else
- {
- _attributes.put(tagName,
- MDExternalMetadataStrategy.NULL_INSTANCE);
- }
- }
-
- public void handleException(final Throwable exception)
- {
- FaceletCorePlugin.log(
- "While loading attribute meta-data", exception); //$NON-NLS-1$
- }
- });
- }
-
- // don't return the null map instance
- if (innerClassNodeMap[0] == MDExternalMetadataStrategy.NULL_INSTANCE)
- {
- return null;
- }
- return innerClassNodeMap[0];
- }
-
- @Override
- public Object getTagProperty(final String tagName, final String key)
- {
- final Object[] value = new Object[1];
- value[0] = null;
-
- SafeRunnable.run(new ISafeRunnable()
- {
- public void run()
- {
- if ("description".equals(key)) //$NON-NLS-1$
- {
- value[0] = _tagMetadataLoader.getDescription(_uri,
- tagName);
- }
- }
-
- public void handleException(final Throwable exception)
- {
- FaceletCorePlugin.log(
- "While loading tag property meta-data", exception); //$NON-NLS-1$
- }
- });
- return value[0];
- }
- }
-
- private final static NullInternalNamedNodeMap NULL_INSTANCE = new NullInternalNamedNodeMap();
-
-
-
- // temporary: transfer out to metadata
- final static Map<String, InternalNamedNodeMap> _faceletData;
-
- static
- {
- // final String ID_DESCRIPTION =
- // Messages.MDExternalMetadataStrategy_ID_DESCRIPTION;
- // final String BINDING_DESCRIPTION =
- // Messages.MDExternalMetadataStrategy_BINDING_DESCRIPTION;
- // final String TEMPLATE_DESCRIPTION =
- // Messages.MDExternalMetadataStrategy_TEMPLATE_DESCRIPTION;
- // final String HOTKEY_DESCRIPTION =
- // Messages.MDExternalMetadataStrategy_HOTKEY_DESCRIPTION;
- // final String DEFINE_NAME_DESCRIPTION =
- // Messages.MDExternalMetadataStrategy_DEFINE_NAME_DESCRIPTION;
- // final String SRC_DESCRIPTION =
- // Messages.MDExternalMetadataStrategy_SRC_DESCRIPTION;
- // final String INSERT_NAME_DESCRIPTION =
- // Messages.MDExternalMetadataStrategy_INSERT_NAME_DESCRIPTION;
- // final String PARAM_NAME_DESCRIPTION =
- // Messages.MDExternalMetadataStrategy_PARAM_NAME_DESCRIPTION;
- // final String PARAM_VALUE_DESCRIPTION =
- // Messages.MDExternalMetadataStrategy_PARAM_VALUE_DESCRIPTION;
- // final String REPEAT_VAR_DESCRIPTION =
- // Messages.MDExternalMetadataStrategy_REPEAT_VAR_DESCRIPTION;
- // final String REPEAT_VALUE_DESCRIPTION =
- // Messages.MDExternalMetadataStrategy_REPEAT_VALUE_DESCRIPTION;
-
- final Map<String, InternalNamedNodeMap> map = new HashMap<String, InternalNamedNodeMap>();
- // component
- // InternalNamedNodeMap nodeMap = new InternalNamedNodeMap();
- // nodeMap.add(createAttribute(ID, CMAttributeDeclaration.OPTIONAL,
- // ID_DESCRIPTION));
- // nodeMap.add(createAttribute(BINDING, CMAttributeDeclaration.OPTIONAL,
- // BINDING_DESCRIPTION));
- // map.put(IFaceletTagConstants.TAG_COMPONENT, nodeMap);
- //
- // // composition
- // nodeMap = new InternalNamedNodeMap();
- // nodeMap.add(createAttribute(TEMPLATE,
- // CMAttributeDeclaration.OPTIONAL,
- // TEMPLATE_DESCRIPTION));
- // map.put(IFaceletTagConstants.TAG_COMPOSITION, nodeMap);
-
- // debug
- // nodeMap = new InternalNamedNodeMap();
- // nodeMap.add(createAttribute(HOTKEY, CMAttributeDeclaration.OPTIONAL,
- // HOTKEY_DESCRIPTION));
- // map.put(IFaceletTagConstants.TAG_DEBUG, nodeMap);
-
- // decorate
- // nodeMap = new InternalNamedNodeMap();
- // nodeMap.add(createAttribute(TEMPLATE,
- // CMAttributeDeclaration.REQUIRED,
- // TEMPLATE_DESCRIPTION));
- // map.put(IFaceletTagConstants.TAG_DECORATE, nodeMap);
-
- // define
- // nodeMap = new InternalNamedNodeMap();
- // nodeMap.add(createAttribute(NAME, CMAttributeDeclaration.REQUIRED,
- // DEFINE_NAME_DESCRIPTION));
- // map.put(IFaceletTagConstants.TAG_DEFINE, nodeMap);
-
- // fragment
- // nodeMap = new InternalNamedNodeMap();
- // nodeMap.add(createAttribute(ID, CMAttributeDeclaration.OPTIONAL,
- // ID_DESCRIPTION));
- // nodeMap.add(createAttribute(BINDING, CMAttributeDeclaration.OPTIONAL,
- // BINDING_DESCRIPTION));
- // map.put(IFaceletTagConstants.TAG_FRAGMENT, nodeMap);
-
- // include
- // nodeMap = new InternalNamedNodeMap();
- // nodeMap.add(createAttribute(SRC, CMAttributeDeclaration.REQUIRED,
- // SRC_DESCRIPTION));
- // map.put(IFaceletTagConstants.TAG_INCLUDE, nodeMap);
-
- // insert
- // nodeMap = new InternalNamedNodeMap();
- // nodeMap.add(createAttribute(NAME, CMAttributeDeclaration.OPTIONAL,
- // INSERT_NAME_DESCRIPTION));
- // map.put(IFaceletTagConstants.TAG_INSERT, nodeMap);
-
- // param
- // nodeMap = new InternalNamedNodeMap();
- // nodeMap.add(createAttribute(NAME, CMAttributeDeclaration.REQUIRED,
- // PARAM_NAME_DESCRIPTION));
- // nodeMap.add(createAttribute(VALUE, CMAttributeDeclaration.REQUIRED,
- // PARAM_VALUE_DESCRIPTION));
- // map.put(IFaceletTagConstants.TAG_PARAM, nodeMap);
-
- // remove
- // nodeMap = new InternalNamedNodeMap();
- // // no attributes
- // map.put(IFaceletTagConstants.TAG_PARAM, nodeMap);
-
- // repeat
- // nodeMap = new InternalNamedNodeMap();
- // nodeMap.add(createAttribute(VALUE, CMAttributeDeclaration.REQUIRED,
- // REPEAT_VALUE_DESCRIPTION));
- // nodeMap.add(createAttribute(VAR, CMAttributeDeclaration.REQUIRED,
- // REPEAT_VAR_DESCRIPTION));
- // map.put(IFaceletTagConstants.TAG_REPEAT, nodeMap);
-
- _faceletData = Collections.unmodifiableMap(map);
- }
-
- private static CMAttributeDeclaration createAttribute(
- final AttributeData attributeData)
- {
- final AttributeCMAdapter attribute = new AttributeCMAdapter(
- attributeData.getName(), convertUsageEnum(attributeData
- .getUsage()));
-
- final ComposedAdapterFactory factory = new ComposedAdapterFactory(
- ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
-
- final Object provider = factory.adapt(attributeData,
- IResourceProvider.class);
-
- // get the description from meta-data and feed through the provider
- // for possible translation
- String description = attributeData.getDescription();
-
- if (provider instanceof IResourceProvider)
- {
- final IResourceProvider resProvider = (IResourceProvider) provider;
- final String translated = resProvider.getTranslatedString(
- attributeData, AddTagMDPackage.eINSTANCE
- .getAttributeData_Description());
- description = translated != null ? translated : description;
- }
-
- attribute.setDescription(description);
- return attribute;
- }
-
- private static int convertUsageEnum(final AttributeUsage usage)
- {
- switch (usage)
- {
- case OPTIONAL:
- return CMAttributeDeclaration.OPTIONAL;
- case REQUIRED:
- return CMAttributeDeclaration.REQUIRED;
- case FIXED:
- return CMAttributeDeclaration.FIXED;
- case PROHIBITED:
- return CMAttributeDeclaration.PROHIBITED;
- default:
- return CMAttributeDeclaration.OPTIONAL;
- }
- }
-
- private static class MySingletonManager
- extends
- ResourceSingletonObjectManager<MDExternalMetadataStrategy, IProject>
- {
-
- protected MySingletonManager()
- {
- super(ResourcesPlugin.getWorkspace());
- }
-
- @Override
- protected MDExternalMetadataStrategy createNewInstance(
- final IProject resource)
- {
- return new MDExternalMetadataStrategy(resource);
- }
-
- }
-
- public boolean isDisposed()
- {
- return _isDisposed.get();
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/Messages.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/Messages.java
deleted file mode 100644
index 484f0cd47..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/Messages.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.cm.strategy;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- *
- * @author cbateman
- *
- */
-/*package*/ class Messages extends NLS
-{
- private static final String BUNDLE_NAME = "org.eclipse.jst.jsf.facelet.core.internal.cm.strategy.messages"; //$NON-NLS-1$
-
-
- public static String FaceletExternalMetadataStrategy_0;
-
-
- public static String JSPExternalMetadataStrategy_DisplayName;
-
-
- /**
- * Display name for MDExternalMetadataStrategy
- */
- public static String MDExternalMetadataStrategy_DisplayName;
-
- public static String MDExternalMetadataStrategy_BINDING_DESCRIPTION;
- public static String MDExternalMetadataStrategy_DEFINE_NAME_DESCRIPTION;
- public static String MDExternalMetadataStrategy_HOTKEY_DESCRIPTION;
- public static String MDExternalMetadataStrategy_ID_DESCRIPTION;
- public static String MDExternalMetadataStrategy_INSERT_NAME_DESCRIPTION;
- public static String MDExternalMetadataStrategy_PARAM_NAME_DESCRIPTION;
- public static String MDExternalMetadataStrategy_PARAM_VALUE_DESCRIPTION;
- public static String MDExternalMetadataStrategy_REPEAT_VALUE_DESCRIPTION;
- public static String MDExternalMetadataStrategy_REPEAT_VAR_DESCRIPTION;
- public static String MDExternalMetadataStrategy_SRC_DESCRIPTION;
- public static String MDExternalMetadataStrategy_TEMPLATE_DESCRIPTION;
-
-
- static
- {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages()
- {
- // no external instantiation
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/TagInfoStrategyComposite.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/TagInfoStrategyComposite.java
deleted file mode 100644
index b2f2a3d1c..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/TagInfoStrategyComposite.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.cm.strategy;
-
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.eclipse.jst.jsf.common.dom.TagIdentifier;
-import org.eclipse.jst.jsf.common.internal.policy.IdentifierOrderedIteratorPolicy;
-import org.eclipse.jst.jsf.common.internal.strategy.IteratorPolicyBasedStrategyComposite;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.ExternalTagInfo;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.TagInfo;
-
-/**
- * A composite of strategies for deriving external tag metadata.
- *
- * @author cbateman
- *
- */
-public class TagInfoStrategyComposite
- extends
- IteratorPolicyBasedStrategyComposite<TagIdentifier, TagInfo, TagInfo, String, IExternalMetadataStrategy>
-{
- private final Iterable<String> _policyOrder;
-
- /**
- * @param policyOrder
- */
- public TagInfoStrategyComposite(final Iterable<String> policyOrder)
- {
- super(new MyIteratorPolicy(policyOrder));
- _policyOrder = policyOrder;
- }
-
- @Override
- public TagInfo getNoResult()
- {
- return ExternalTagInfo.NULL_INSTANCE;
- }
-
- /**
- *
- */
- public void resetIterator()
- {
- setPolicy(new MyIteratorPolicy(_policyOrder));
- }
-
- private static class MyIteratorPolicy extends
- IdentifierOrderedIteratorPolicy<String>
- {
- private Iterator<String> _iterator;
-
- public MyIteratorPolicy(final Iterable<String> policyOrder)
- {
- super(policyOrder);
- setExcludeNonExplicitValues(true);
- }
-
- @Override
- public Iterator<String> getIterator(
- final Collection<String> forCollection)
- {
- if (_iterator == null)
- {
- _iterator = super.getIterator(forCollection);
- }
- return _iterator;
- }
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/messages.properties b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/messages.properties
deleted file mode 100644
index 8e410920c..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/cm/strategy/messages.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-FaceletExternalMetadataStrategy_0=Facelet metadata strategy
-JSPExternalMetadataStrategy_DisplayName=JSP TLD meta-data
-MDExternalMetadataStrategy_DisplayName=Tag meta-data from MD framework
-MDExternalMetadataStrategy_BINDING_DESCRIPTION=A method binding of the form of the form \#{bean.binding} where 'binding' has the signature <b>UIComponent binding()</b>, that returns the component instance to use. If not present, Facelets will automatically instantiate one.
-MDExternalMetadataStrategy_DEFINE_NAME_DESCRIPTION=The name of a template area. This name is referenced in instance documents using the insert tag
-MDExternalMetadataStrategy_HOTKEY_DESCRIPTION=The key in combination with CTRL-SHIFT to use to launch the debug viewer
-MDExternalMetadataStrategy_ID_DESCRIPTION=Assign a unique idea to generated component. If not present, Facelets will automatically generate one.
-MDExternalMetadataStrategy_INSERT_NAME_DESCRIPTION=The name of a template area to insert (defined in the template using the define tag). If not specified, the entire template will be inserted.
-MDExternalMetadataStrategy_PARAM_NAME_DESCRIPTION=The name of the new EL variable to declare
-MDExternalMetadataStrategy_PARAM_VALUE_DESCRIPTION=The literal or EL value to assign to the new variable
-MDExternalMetadataStrategy_REPEAT_VALUE_DESCRIPTION=The EL expression used to derive the list of items to repeat over
-MDExternalMetadataStrategy_REPEAT_VAR_DESCRIPTION=The name of the EL variable to use as the iterator
-MDExternalMetadataStrategy_SRC_DESCRIPTION=The path, absolute or relative to the original request, to another Facelet to include. May be EL. e.g. 'headerPage.xhtml'
-MDExternalMetadataStrategy_TEMPLATE_DESCRIPTION=A uri that points to the template to use. e.g. /WEB-INF/templates/mytemplate.xhtml
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/ChangeActionType.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/ChangeActionType.java
deleted file mode 100644
index 334897631..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/ChangeActionType.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.facet;
-
-/**
- * Indicates the type of change that should be made with the data in a
- * FacetChangeModel.
- *
- * @author cbateman
- *
- */
-public enum ChangeActionType
-{
- /**
- * Change is to add indicated values
- */
- ADD,
-
- /**
- * Change is to remove indicated values
- */
- REMOVE
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletChangeDelegate.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletChangeDelegate.java
deleted file mode 100644
index 84a5bb203..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletChangeDelegate.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.facet;
-
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.jst.jsf.facelet.core.internal.FaceletCoreTraceOptions;
-import org.eclipse.jst.jsf.facesconfig.emf.ApplicationType;
-import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
-import org.eclipse.jst.jsf.facesconfig.emf.ViewHandlerType;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.common.project.facet.core.IDelegate;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-
-/**
- * The super-class of all Facelet facet change delegates. The only expected
- * delegates at this time are install and uninstall. Each super-class must
- * decide the meaning of "change" and implement the abstract members
- * appropriately.
- *
- * @author cbateman
- *
- */
-public abstract class FaceletChangeDelegate implements IDelegate
-{
- /**
- * The default name of the Facelet runtime view handler
- */
- protected static final String RUNTIME_VIEWHANDLER_CLASS_NAME = "com.sun.facelets.FaceletViewHandler"; //$NON-NLS-1$
-
- public void execute(final IProject project, final IProjectFacetVersion fv,
- final Object config, final IProgressMonitor monitor)
- throws CoreException
- {
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable()
- {
- public void run()
- {
- final FacetChangeModel model = (FacetChangeModel) config;
-
- // XXX: look at glassfish changes
- handleDesignTimeViewHandler(project);
-
- if (model.isChgViewHandler())
- {
- maybeChangeFaceletViewHandler(project, monitor);
- }
-
- final WebAppConfigurator configurator = WebAppConfigurator
- .getConfigurator(project);
-
- if (configurator != null)
- {
- maybeChangeDefaultSuffix(model, configurator);
- maybeChangeConfigureListener(model, configurator);
- maybeChangeWebLifecycleListener(model, configurator);
- }
- else if (FaceletCoreTraceOptions.TRACE_FACETCHANGEDELEGATE)
- {
- FaceletCoreTraceOptions
- .log("FaceletChangeDelegate: No web configurator"); //$NON-NLS-1$
- }
- }
- });
- }
-
- /**
- * Performs the change to the web lifecycle listener configuration of of the
- * web.xml model using configurator, if applicable.
- *
- * @param model
- * @param configurator
- */
- protected abstract void maybeChangeWebLifecycleListener(
- FacetChangeModel model, WebAppConfigurator configurator);
-
- /**
- * Performs the change to the configure listener configuration of the
- * web.xml model using configurator, if applicable.
- *
- * @param model
- * @param configurator
- */
- protected abstract void maybeChangeConfigureListener(
- FacetChangeModel model, WebAppConfigurator configurator);
-
- /**
- * Performs the change to the DEFAULT_SUFFIX configuration of the web.xml
- * model using configurator, if applicable.
- *
- * @param model
- * @param configurator
- */
- protected abstract void maybeChangeDefaultSuffix(FacetChangeModel model,
- WebAppConfigurator configurator);
-
- /**
- * Changes the runtime view handler settings on project if applicable.
- *
- * @param project
- * @param monitor
- *
- */
- protected abstract void maybeChangeFaceletViewHandler(IProject project,
- IProgressMonitor monitor);
-
- /**
- * Change the designtime view handler if applicable.
- *
- * @param project
- */
- protected abstract void handleDesignTimeViewHandler(final IProject project);
-
- /**
- * @return a user displayable name of the sub-classing change delegate.
- */
- protected abstract String getDisplayName();
-
- /**
- * @param root
- * @return true if the Facelet view handler is already present in the
- * WEB-INF/faces-config.xml file.
- */
- protected final boolean isViewHandlerPresent(final FacesConfigType root)
- {
- final EList<?> applications = root.getApplication();
- for (final Object name : applications)
- {
- final ApplicationType app = (ApplicationType) name;
- if (app != null)
- {
- for (final Iterator<?> viewIt = app.getViewHandler().iterator(); viewIt
- .hasNext();)
- {
- final ViewHandlerType viewHandler = (ViewHandlerType) viewIt
- .next();
- if (viewHandler != null
- && RUNTIME_VIEWHANDLER_CLASS_NAME
- .equals(viewHandler.getTextContent().trim()))
- {
- return true;
- }
- }
- }
- }
- return false;
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletFacet.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletFacet.java
deleted file mode 100644
index ed425a425..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletFacet.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.facet;
-
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jst.jsf.core.internal.JSFCorePlugin;
-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;
-
-/**
- * Facelet facet constants and utilities
- * @author cbateman
- *
- */
-public final class FaceletFacet
-{
- /**
- * Facelet facet id
- */
- public final static String FACET_ID = "jsf.facelet"; //$NON-NLS-1$
- /**
- * The id of the Facelet HTML view handler
- */
- public final static String VIEW_HANDLER_ID = "org.eclipse.jst.jsf.facelet.core.html.viewhandler"; //$NON-NLS-1$
- static final String COM_SUN_FACES_APPLICATION_WEBAPP_LIFECYCLE_LISTENER = "com.sun.faces.application.WebappLifecycleListener"; //$NON-NLS-1$
- static final String COM_SUN_FACES_CONFIG_CONFIGURE_LISTENER = "com.sun.faces.config.ConfigureListener"; //$NON-NLS-1$
- static final String XHTML = ".xhtml"; //$NON-NLS-1$
- static final String JAVAX_FACES_DEFAULT_SUFFIX = "javax.faces.DEFAULT_SUFFIX"; //$NON-NLS-1$
-
- private FaceletFacet()
- {
- // no external instantiation
- }
-
- /**
- * @param project
- * @return true if projec has the facelet facet installed.
- */
- public static boolean hasFacet(final IProject project)
- {
- final IProjectFacetVersion facetVersion = getProjectFacet(project);
-
- if (facetVersion != null)
- {
- return true;
- }
- return false;
- }
-
- /**
- * Get the facet version for the project
- *
- * @param project
- * @return the project facet version or null if could not be found or if
- * project is not accessible
- */
- @SuppressWarnings("unchecked")
- public static IProjectFacetVersion getProjectFacet(final IProject project)
- {
- // check for null or inaccessible project
- if (project != null && project.isAccessible())
- {
- // check for Facelet facet on project
- try
- {
- final IFacetedProject facetedProject = ProjectFacetsManager
- .create(project);
- if (facetedProject != null)
- {
- final Set projectFacets = facetedProject.getProjectFacets();
- final Iterator itProjectFacets = projectFacets.iterator();
- while (itProjectFacets.hasNext())
- {
- final IProjectFacetVersion projectFacetVersion = (IProjectFacetVersion) itProjectFacets
- .next();
- if (FACET_ID.equals(projectFacetVersion
- .getProjectFacet().getId()))
- {
- return projectFacetVersion;
- }
- }
- }
- }
- catch (final CoreException ce)
- {
- // log error
- JSFCorePlugin.log(IStatus.ERROR, ce.getLocalizedMessage(), ce);
- }
- }
- return null;
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletFacetChangeDataModelProvider.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletFacetChangeDataModelProvider.java
deleted file mode 100644
index f987c6aac..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletFacetChangeDataModelProvider.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.facet;
-
-import java.beans.BeanInfo;
-import java.beans.IntrospectionException;
-import java.beans.Introspector;
-import java.beans.PropertyDescriptor;
-import java.util.Set;
-
-import org.eclipse.jst.jsf.facelet.core.internal.FaceletCorePlugin;
-import org.eclipse.wst.common.componentcore.datamodel.FacetInstallDataModelProvider;
-
-/**
- * The base data model provider for the facet install/uninstall
- *
- * @author cbateman
- *
- */
-public abstract class FaceletFacetChangeDataModelProvider extends
-FacetInstallDataModelProvider
-{
- /**
- * Change key identifier for web app lifecycle listener
- */
- protected static final String CHG_WEB_APP_LIFECYCLE_LISTENER = "chgWebAppLifecycleListener"; //$NON-NLS-1$
- /**
- * Change key identifier for configure listener
- */
- protected static final String CHG_CONFIGURE_LISTENER = "chgConfigureListener"; //$NON-NLS-1$
- /**
- * Change key identifier for the Facelet runtime view handler
- */
- protected static final String CHG_VIEW_HANDLER = "chgViewHandler"; //$NON-NLS-1$
- /**
- * Change key identifier for the default suffix
- */
- protected static final String CHG_DEFAULT_SUFFIX = "chgDefaultSuffix"; //$NON-NLS-1$
-
- private BeanInfo _beanInfo;
-
- /**
- *
- */
- public FaceletFacetChangeDataModelProvider()
- {
- try
- {
- _beanInfo = Introspector.getBeanInfo(FacetInstallModel.class);
- }
- catch (final IntrospectionException e)
- {
- // TODO: suppress for now
- FaceletCorePlugin.log("Problem getting bean info for FacetInstallModel", e); //$NON-NLS-1$
- }
- }
-
- @Override
- public Object create()
- {
- final FacetChangeModel model_ = createChangeModel();
-
- model_
- .setChgDefaultSuffix(((Boolean) getDefaultProperty(CHG_DEFAULT_SUFFIX)).booleanValue());
- model_.setChgViewHandler(((Boolean) getDefaultProperty(CHG_VIEW_HANDLER)).booleanValue());
- model_
- .setChgConfigureListener(((Boolean) getDefaultProperty(CHG_CONFIGURE_LISTENER)).booleanValue());
- model_
- .setChgWebAppLifecycleListener(((Boolean) getDefaultProperty(CHG_WEB_APP_LIFECYCLE_LISTENER)).booleanValue());
-
- return model_;
- }
-
- /**
- * @return the change model to be used by the delegate.
- */
- protected abstract FacetChangeModel createChangeModel();
-
- /**
- * Set the default property value
- */
- @Override
- public Object getDefaultProperty(final String propertyName)
- {
- return super.getDefaultProperty(propertyName);
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public Set getPropertyNames()
- {
- final Set<String> propSet = super.getPropertyNames();
- final PropertyDescriptor[] props = _beanInfo.getPropertyDescriptors();
- for (final PropertyDescriptor prop : props)
- {
- propSet.add(prop.getName());
- }
- return propSet;
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletFacetDefaultVersionProvider.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletFacetDefaultVersionProvider.java
deleted file mode 100644
index fd39d6024..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletFacetDefaultVersionProvider.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.facet;
-
-import org.eclipse.wst.common.project.facet.core.IDefaultVersionProvider;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-
-/**
- * Provides the default Facelet project facet version. Currently always returns
- * "1.1" facet version.
- */
-public final class FaceletFacetDefaultVersionProvider implements
- IDefaultVersionProvider
-{
-
- /**
- * The global id for the Facelet facet
- */
- private static final String DEFAULT_FACET_ID = FaceletFacet.FACET_ID;
-
- private static final String DEFAULT_FACET_VERSION = "1.0"; //$NON-NLS-1$
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.project.facet.core.IDefaultVersionProvider#getDefaultVersion()
- */
-
- public IProjectFacetVersion getDefaultVersion()
- {
- return ProjectFacetsManager.getProjectFacet(DEFAULT_FACET_ID)
- .getVersion(DEFAULT_FACET_VERSION);
- }
-
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletFacetInstallDataModelProvider.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletFacetInstallDataModelProvider.java
deleted file mode 100644
index 25ac2aafe..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletFacetInstallDataModelProvider.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.facet;
-
-
-/**
- * The data model provider for the facet install.
- *
- * @author cbateman
- *
- */
-public class FaceletFacetInstallDataModelProvider extends FaceletFacetChangeDataModelProvider
-{
- @Override
- public Object getDefaultProperty(final String propertyName)
- {
- if (propertyName.equals(CHG_DEFAULT_SUFFIX))
- {
- return Boolean.TRUE;
- }
- else if (propertyName.equals(CHG_VIEW_HANDLER))
- {
- return Boolean.TRUE;
- }
- else if (propertyName.equals(CHG_CONFIGURE_LISTENER))
- {
- return Boolean.FALSE;
- }
- else if (propertyName.equals(CHG_WEB_APP_LIFECYCLE_LISTENER))
- {
- return Boolean.FALSE;
- }
- return super.getDefaultProperty(propertyName);
- }
-
- @Override
- protected FacetChangeModel createChangeModel()
- {
- return new FacetInstallModel();
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletFacetUninstallModelProvider.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletFacetUninstallModelProvider.java
deleted file mode 100644
index e17e0710d..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletFacetUninstallModelProvider.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.facet;
-
-
-/**
- * The data model provider for facet uninstall.
- *
- * @author cbateman
- *
- */
-public class FaceletFacetUninstallModelProvider extends FaceletFacetChangeDataModelProvider
-{
- @Override
- public Object getDefaultProperty(final String propertyName)
- {
- if (propertyName.equals(CHG_DEFAULT_SUFFIX))
- {
- return Boolean.FALSE;
- }
- else if (propertyName.equals(CHG_VIEW_HANDLER))
- {
- return Boolean.FALSE;
- }
- else if (propertyName.equals(CHG_CONFIGURE_LISTENER))
- {
- return Boolean.FALSE;
- }
- else if (propertyName.equals(CHG_WEB_APP_LIFECYCLE_LISTENER))
- {
- return Boolean.FALSE;
- }
- return super.getDefaultProperty(propertyName);
- }
-
- @Override
- protected FacetChangeModel createChangeModel()
- {
- return new FaceletUninstallModel();
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletInstallDelegate.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletInstallDelegate.java
deleted file mode 100644
index 64eb0ee65..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletInstallDelegate.java
+++ /dev/null
@@ -1,234 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.facet;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.jst.jsf.designtime.DesignTimeApplicationManager;
-import org.eclipse.jst.jsf.facelet.core.internal.FaceletCoreTraceOptions;
-import org.eclipse.jst.jsf.facesconfig.emf.ApplicationType;
-import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigFactory;
-import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
-import org.eclipse.jst.jsf.facesconfig.emf.ViewHandlerType;
-import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-
-/**
- * The facet installing delegate for Facelets.
- *
- * @author cbateman
- *
- */
-public class FaceletInstallDelegate extends FaceletChangeDelegate
-{
-
- @Override
- public void execute(final IProject project, final IProjectFacetVersion fv,
- final Object config, final IProgressMonitor monitor)
- throws CoreException
- {
- final FacetChangeModel model = (FacetChangeModel) config;
- if (FaceletCoreTraceOptions.TRACE_FACETINSTALLDELEGATE)
- {
- FaceletCoreTraceOptions.log("Installing facet on project: " //$NON-NLS-1$
- + project.getName());
-
- FaceletCoreTraceOptions.log(String.format(
- "FaceletInstallDelegate: Add default selection %b", //$NON-NLS-1$
- Boolean.valueOf(model.isChgDefaultSuffix())));
- FaceletCoreTraceOptions
- .log(String
- .format(
- "FaceletInstallDelegate: Add view handler %b", Boolean.valueOf(model //$NON-NLS-1$
- .isChgViewHandler())));
- FaceletCoreTraceOptions.log(String.format(
- "FaceletInstallDelegate: Add configure listener %b", //$NON-NLS-1$
- Boolean.valueOf(model.isChgConfigureListener())));
- FaceletCoreTraceOptions
- .log(String
- .format(
- "FaceletInstallDelegate: Add web app lifecycle listener %b", //$NON-NLS-1$
- Boolean.valueOf(model
- .isChgWebAppLifecycleListener())));
- }
-
- try
- {
- if (monitor != null)
- {
- monitor.beginTask("Installing facelet facet", 1); //$NON-NLS-1$
- }
-
- super.execute(project, fv, config, monitor);
- }
- finally
- {
- if (monitor != null)
- {
- monitor.done();
- }
- }
- }
-
- /**
- * Install the facelet view handler in the WEB-INF/faces-config file if not
- * already present.
- *
- * @param project
- * @param monitor
- */
- @Override
- protected void maybeChangeFaceletViewHandler(final IProject project,
- final IProgressMonitor monitor)
- {
- if (FaceletCoreTraceOptions.TRACE_FACETINSTALLDELEGATE)
- {
- FaceletCoreTraceOptions
- .log("FaceletInstallDelegate: Installing facelet view handler"); //$NON-NLS-1$
- }
-
- final FacesConfigArtifactEdit edit = FacesConfigArtifactEdit
- .getFacesConfigArtifactEditForWrite(project,
- "WEB-INF/faces-config.xml"); //$NON-NLS-1$
- if (edit != null)
- {
- try
- {
- final FacesConfigType root = edit.getFacesConfig();
- if (!isViewHandlerPresent(root))
- {
- if (FaceletCoreTraceOptions.TRACE_FACETINSTALLDELEGATE)
- {
- FaceletCoreTraceOptions
- .log("FaceletInstallDelegate: View Handler not already found in faces-config"); //$NON-NLS-1$
- }
-
- PlatformUI.getWorkbench().getDisplay().syncExec(
- new TempSafeUpdateFacesConfigOnUIThread(edit,
- monitor));
-
- if (FaceletCoreTraceOptions.TRACE_FACETINSTALLDELEGATE)
- {
- FaceletCoreTraceOptions
- .log("FaceletInstallDelegate: Saved changes for facelet view handler"); //$NON-NLS-1$
- }
- }
- else
- {
- if (FaceletCoreTraceOptions.TRACE_FACETINSTALLDELEGATE)
- {
- FaceletCoreTraceOptions
- .log("FaceletInstallDelegate: View Handler NOT already found in faces-config; not adding"); //$NON-NLS-1$
- }
- }
- }
- finally
- {
- edit.dispose();
- }
- }
- }
-
- private static class TempSafeUpdateFacesConfigOnUIThread implements
- Runnable
- {
- private final FacesConfigArtifactEdit _edit;
- private final IProgressMonitor _monitor;
-
- public TempSafeUpdateFacesConfigOnUIThread(
- final FacesConfigArtifactEdit edit,
- final IProgressMonitor monitor)
- {
- _edit = edit;
- _monitor = monitor;
- }
-
- @SuppressWarnings("unchecked")
- public void run()
- {
-
- final FacesConfigType root = _edit.getFacesConfig();
- final EList applications = root.getApplication();
- ApplicationType application = null;
- if (applications.size() > 0)
- {
- application = (ApplicationType) applications.get(0);
- }
- else
- {
- application = FacesConfigFactory.eINSTANCE
- .createApplicationType();
- applications.add(application);
- }
- final ViewHandlerType viewHandlerType = FacesConfigFactory.eINSTANCE
- .createViewHandlerType();
- viewHandlerType.setTextContent(RUNTIME_VIEWHANDLER_CLASS_NAME);
- application.getViewHandler().add(viewHandlerType);
- _edit.save(_monitor);
- }
- }
-
- @Override
- protected void handleDesignTimeViewHandler(final IProject project)
- {
- final DesignTimeApplicationManager manager = DesignTimeApplicationManager
- .getInstance(project);
-
- manager.setViewHandlerId(FaceletFacet.VIEW_HANDLER_ID);
- }
-
- @Override
- protected String getDisplayName()
- {
- return Messages.FaceletInstallDelegate_FACET_INSTALLER_DELEGATE_DISPLAY_NAME;
- }
-
- @Override
- protected void maybeChangeDefaultSuffix(final FacetChangeModel model,
- final WebAppConfigurator configurator)
- {
- if (model.isChgDefaultSuffix())
- {
- if (FaceletCoreTraceOptions.TRACE_FACETINSTALLDELEGATE)
- {
- FaceletCoreTraceOptions
- .log("FaceletInstallDelegate: Installing DEFAULT_SUFFIX"); //$NON-NLS-1$
- }
- configurator.addContextParam(FaceletFacet.JAVAX_FACES_DEFAULT_SUFFIX, FaceletFacet.XHTML,
- false);
- }
- }
-
- @Override
- protected void maybeChangeConfigureListener(final FacetChangeModel model,
- final WebAppConfigurator configurator)
- {
- if (model.isChgConfigureListener())
- {
- if (FaceletCoreTraceOptions.TRACE_FACETINSTALLDELEGATE)
- {
- FaceletCoreTraceOptions
- .log("FaceletInstallDelegate: Install Configure Listener"); //$NON-NLS-1$
- }
- configurator.addListener(FaceletFacet.COM_SUN_FACES_CONFIG_CONFIGURE_LISTENER,
- false);
- }
- }
-
- @Override
- protected void maybeChangeWebLifecycleListener(
- final FacetChangeModel model, final WebAppConfigurator configurator)
- {
- if (model.isChgWebAppLifecycleListener())
- {
- if (FaceletCoreTraceOptions.TRACE_FACETINSTALLDELEGATE)
- {
- FaceletCoreTraceOptions
- .log("FaceletInstallDelegate: Install WebappLifecycleListener"); //$NON-NLS-1$
- }
- configurator.addListener(
- FaceletFacet.COM_SUN_FACES_APPLICATION_WEBAPP_LIFECYCLE_LISTENER, false);
- }
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletUninstallDelegate.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletUninstallDelegate.java
deleted file mode 100644
index 3e0170e3a..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletUninstallDelegate.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.facet;
-
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.jst.jsf.designtime.DesignTimeApplicationManager;
-import org.eclipse.jst.jsf.facelet.core.internal.FaceletCoreTraceOptions;
-import org.eclipse.jst.jsf.facesconfig.emf.ApplicationType;
-import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigType;
-import org.eclipse.jst.jsf.facesconfig.emf.ViewHandlerType;
-import org.eclipse.jst.jsf.facesconfig.util.FacesConfigArtifactEdit;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-
-/**
- * The facet removal delegate for Facelets.
- *
- * @author cbateman
- *
- */
-public class FaceletUninstallDelegate extends FaceletChangeDelegate
-{
-
- @Override
- public void execute(final IProject project, final IProjectFacetVersion fv,
- final Object config, final IProgressMonitor monitor)
- throws CoreException
- {
- final FacetChangeModel model = (FacetChangeModel) config;
- if (FaceletCoreTraceOptions.TRACE_FACETUNINSTALLDELEGATE)
- {
- FaceletCoreTraceOptions.log("Uninstalling facet on project: " //$NON-NLS-1$
- + project.getName());
-
- FaceletCoreTraceOptions.log(String.format(
- "FaceletUninstallDelegate: Remove default selection %b", //$NON-NLS-1$
- Boolean.valueOf(model.isChgDefaultSuffix())));
- FaceletCoreTraceOptions
- .log(String
- .format(
- "FaceletUninstallDelegate: Remove view handler %b", Boolean.valueOf(model //$NON-NLS-1$
- .isChgViewHandler())));
- FaceletCoreTraceOptions.log(String.format(
- "FaceletUninstallDelegate: Remove configure listener %b", //$NON-NLS-1$
- Boolean.valueOf(model.isChgConfigureListener())));
- FaceletCoreTraceOptions
- .log(String
- .format(
- "FaceletUninstallDelegate: Remove web app lifecycle listener %b", //$NON-NLS-1$
- Boolean.valueOf(model
- .isChgWebAppLifecycleListener())));
- }
-
- try
- {
- if (monitor != null)
- {
- monitor.beginTask("Uninstalling facelet facet", 1); //$NON-NLS-1$
- }
-
- super.execute(project, fv, config, monitor);
- }
- finally
- {
- if (monitor != null)
- {
- monitor.done();
- }
- }
- }
-
- /**
- * Install the facelet view handler in the WEB-INF/faces-config file if not
- * already present.
- *
- * @param project
- * @param monitor
- */
- @SuppressWarnings("unchecked")
- @Override
- protected void maybeChangeFaceletViewHandler(final IProject project,
- final IProgressMonitor monitor)
- {
- if (FaceletCoreTraceOptions.TRACE_FACETUNINSTALLDELEGATE)
- {
- FaceletCoreTraceOptions
- .log("FaceletInstallDelegate: Uninstalling facelet view handler"); //$NON-NLS-1$
- }
-
- final FacesConfigArtifactEdit edit = FacesConfigArtifactEdit
- .getFacesConfigArtifactEditForWrite(project,
- "WEB-INF/faces-config.xml"); //$NON-NLS-1$
- if (edit != null)
- {
- try
- {
- final FacesConfigType root = edit.getFacesConfig();
- if (isViewHandlerPresent(root))
- {
- if (FaceletCoreTraceOptions.TRACE_FACETUNINSTALLDELEGATE)
- {
- FaceletCoreTraceOptions
- .log("FaceletInstallDelegate: View Handler not already found in faces-config"); //$NON-NLS-1$
- }
- final EList applications = root.getApplication();
-
- for (final Iterator<?> appIt = applications.iterator(); appIt
- .hasNext();)
- {
- final ApplicationType application = (ApplicationType) appIt
- .next();
- for (final Iterator viewHandlerIt = application
- .getViewHandler().iterator(); viewHandlerIt
- .hasNext();)
- {
- final ViewHandlerType viewHandlerType = (ViewHandlerType) viewHandlerIt
- .next();
- if (viewHandlerType != null
- && RUNTIME_VIEWHANDLER_CLASS_NAME
- .equals(viewHandlerType
- .getTextContent().trim()))
- {
- viewHandlerIt.remove();
-
- if (FaceletCoreTraceOptions.TRACE_FACETUNINSTALLDELEGATE)
- {
- FaceletCoreTraceOptions
- .log("FaceletUninstallDelegate: Removed runtime view handler"); //$NON-NLS-1$
- }
- }
- }
- }
-
- edit.save(monitor);
-
- if (FaceletCoreTraceOptions.TRACE_FACETUNINSTALLDELEGATE)
- {
- FaceletCoreTraceOptions
- .log("FaceletUninstallDelegate: Saved changes for facelet view handler"); //$NON-NLS-1$
- }
- }
- else
- {
- if (FaceletCoreTraceOptions.TRACE_FACETUNINSTALLDELEGATE)
- {
- FaceletCoreTraceOptions
- .log("FaceletInstallDelegate: View Handler NOT already found in faces-config; not adding"); //$NON-NLS-1$
- }
- }
- }
- finally
- {
- edit.dispose();
- }
- }
- }
-
- @Override
- protected void handleDesignTimeViewHandler(final IProject project)
- {
- final DesignTimeApplicationManager manager = DesignTimeApplicationManager
- .getInstance(project);
-
- // TODO: need this API
- //manager.clearViewHandlerId();
- manager.setViewHandlerId("org.eclipse.jst.jsf.designtime.view.jspviewhandler"); //$NON-NLS-1$
- }
-
- @Override
- protected String getDisplayName()
- {
- return Messages.FaceletUninstallDelegate_FACET_INSTALLER_DELEGATE_DISPLAY_NAME;
- }
-
- @Override
- protected void maybeChangeDefaultSuffix(final FacetChangeModel model,
- final WebAppConfigurator configurator)
- {
- if (model.isChgDefaultSuffix())
- {
- if (FaceletCoreTraceOptions.TRACE_FACETUNINSTALLDELEGATE)
- {
- FaceletCoreTraceOptions
- .log("FaceletUninstallDelegate: Removing DEFAULT_SUFFIX"); //$NON-NLS-1$
- }
- configurator
- .removeContextParam(
- FaceletFacet.JAVAX_FACES_DEFAULT_SUFFIX,
- FaceletFacet.XHTML);
- }
- }
-
- @Override
- protected void maybeChangeConfigureListener(final FacetChangeModel model,
- final WebAppConfigurator configurator)
- {
- if (model.isChgConfigureListener())
- {
- if (FaceletCoreTraceOptions.TRACE_FACETUNINSTALLDELEGATE)
- {
- FaceletCoreTraceOptions
- .log("FaceletUninstallDelegate: Remove Configure Listener"); //$NON-NLS-1$
- }
- configurator
- .removeListener(FaceletFacet.COM_SUN_FACES_CONFIG_CONFIGURE_LISTENER);
- }
- }
-
- @Override
- protected void maybeChangeWebLifecycleListener(
- final FacetChangeModel model, final WebAppConfigurator configurator)
- {
- if (model.isChgWebAppLifecycleListener())
- {
- if (FaceletCoreTraceOptions.TRACE_FACETUNINSTALLDELEGATE)
- {
- FaceletCoreTraceOptions
- .log("FaceletUninstallDelegate: Remove WebappLifecycleListener"); //$NON-NLS-1$
- }
- configurator
- .removeListener(FaceletFacet.COM_SUN_FACES_APPLICATION_WEBAPP_LIFECYCLE_LISTENER);
- }
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletUninstallModel.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletUninstallModel.java
deleted file mode 100644
index c8b6d1907..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletUninstallModel.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.facet;
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-
-/*package*/ class FaceletUninstallModel extends FacetChangeModel
-{
- // default bean listeners
- private final PropertyChangeSupport _changeSupport = new PropertyChangeSupport(
- this);
-
- public void addPropertyChangeListener(final String propertyName,
- final PropertyChangeListener listener)
- {
- _changeSupport.addPropertyChangeListener(propertyName, listener);
- }
-
- public void removePropertyChangeListener(final String propertyName,
- final PropertyChangeListener listener)
- {
- _changeSupport.removePropertyChangeListener(propertyName, listener);
- }
-
- @Override
- public ChangeActionType getChangeActionType()
- {
- return ChangeActionType.REMOVE;
- }
-} \ No newline at end of file
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FacetChangeModel.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FacetChangeModel.java
deleted file mode 100644
index 1235e3fa6..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FacetChangeModel.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.facet;
-
-/**
- * Encapsulate configuration change data during facet install/uninstall
- * @author cbateman
- *
- */
-public abstract class FacetChangeModel
-{
- private boolean _chgDefaultSuffix;
- private boolean _chgViewHandler;
- private boolean _chgConfigureListener;
- private boolean _chgWebAppLifecycleListener;
-
- /**
- * @return the type of change action
- */
- public abstract ChangeActionType getChangeActionType();
-
- /**
- * @return true if should change the runtime view handler configuration
- */
- public boolean isChgViewHandler()
- {
- return _chgViewHandler;
- }
-
- /**
- * @param chgViewHandler
- */
- public void setChgViewHandler(final boolean chgViewHandler)
- {
- _chgViewHandler = chgViewHandler;
- }
-
- /**
- * @return true if should change DEFAULT_SUFFIX option
- */
- public boolean isChgDefaultSuffix()
- {
- return _chgDefaultSuffix;
- }
-
- /**
- * @param chgDefaultSuffix
- */
- public void setChgDefaultSuffix(final boolean chgDefaultSuffix)
- {
- _chgDefaultSuffix = chgDefaultSuffix;
- }
-
- /**
- * @return true if should change the configure listener option
- */
- public boolean isChgConfigureListener()
- {
- return _chgConfigureListener;
- }
-
- /**
- * @param chgConfigureListener
- */
- public void setChgConfigureListener(final boolean chgConfigureListener)
- {
- _chgConfigureListener = chgConfigureListener;
- }
-
- /**
- * @return true if should change the webapp lifecycle listener option
- */
- public boolean isChgWebAppLifecycleListener()
- {
- return _chgWebAppLifecycleListener;
- }
-
- /**
- * @param chgWebAppLifecycleListener
- */
- public void setChgWebAppLifecycleListener(
- final boolean chgWebAppLifecycleListener)
- {
- _chgWebAppLifecycleListener = chgWebAppLifecycleListener;
- }
-
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FacetInstallModel.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FacetInstallModel.java
deleted file mode 100644
index aeac135f6..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FacetInstallModel.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.facet;
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-
-/*package*/ class FacetInstallModel extends FacetChangeModel
-{
- // default bean listeners
- private final PropertyChangeSupport changeSupport = new PropertyChangeSupport(
- this);
-
- public void addPropertyChangeListener(final String propertyName,
- final PropertyChangeListener listener)
- {
- changeSupport.addPropertyChangeListener(propertyName, listener);
- }
-
- public void removePropertyChangeListener(final String propertyName,
- final PropertyChangeListener listener)
- {
- changeSupport.removePropertyChangeListener(propertyName, listener);
- }
-
- @Override
- public ChangeActionType getChangeActionType()
- {
- return ChangeActionType.ADD;
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/Messages.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/Messages.java
deleted file mode 100644
index b7e076ded..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/Messages.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.facet;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * NLS message file
- *
- * @author cbateman
- *
- */
-public class Messages extends NLS
-{
- private static final String BUNDLE_NAME = "org.eclipse.jst.jsf.facelet.core.internal.facet.messages"; //$NON-NLS-1$
- /**
- * see messages.properties
- */
- public static String FaceletInstallDelegate_FACET_INSTALLER_DELEGATE_DISPLAY_NAME;
- /**
- * see messages.properties
- */
- public static String FaceletUninstallDelegate_FACET_INSTALLER_DELEGATE_DISPLAY_NAME;
- static
- {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages()
- {
- // no external instantiation
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/WebAppConfigurator.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/WebAppConfigurator.java
deleted file mode 100644
index f5de1e9de..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/WebAppConfigurator.java
+++ /dev/null
@@ -1,394 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.facet;
-
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.j2ee.model.IModelProvider;
-import org.eclipse.jst.j2ee.model.ModelProviderManager;
-import org.eclipse.jst.jsf.facelet.core.internal.FaceletCorePlugin;
-
-/**
- * Insulates caller from the insane J2EE/JavaEE dual model.
- *
- * @author cbateman
- *
- */
-public abstract class WebAppConfigurator
-{
- /**
- * @param project
- * @return the configurator for project or null if none
- */
- public static WebAppConfigurator getConfigurator(final IProject project)
- {
- final IModelProvider provider = ModelProviderManager
- .getModelProvider(project);
- final Object webAppObj = provider.getModelObject();
- if (webAppObj == null)
- {
- FaceletCorePlugin.log("Error getting web app configurator", //$NON-NLS-1$
- new Throwable());
- return null;
- }
-
- if (webAppObj instanceof org.eclipse.jst.javaee.web.WebApp)
- {
- return new JavaEEWebAppConfigurator(project);
- }
- else if (webAppObj instanceof org.eclipse.jst.j2ee.webapplication.WebApp)
- {
- return new J2EEWebAppConfigurator(project);
- }
-
- return null;
- }
-
- private final IProject _project;
-
- WebAppConfigurator(final IProject project)
- {
- _project = project;
- }
-
- /**
- * @param paramName
- * @param paramValue
- * @param addEvenIfPresent
- */
- public abstract void addContextParam(final String paramName,
- final String paramValue, final boolean addEvenIfPresent);
-
- /**
- * @param paramName
- * @param paramValue
- */
- public abstract void removeContextParam(final String paramName,
- final String paramValue);
-
- /**
- * Adds the listenerClass to the webapp config. If addEventIfPresent is
- * false, then it will not add it if it finds it already. If true, it will
- * forcibly add.
- *
- * @param listenerClass
- * @param addEvenIfPresent
- */
- public abstract void addListener(final String listenerClass,
- final boolean addEvenIfPresent);
-
- /**
- * @param listenerClass
- */
- public abstract void removeListener(final String listenerClass);
-
- /**
- * @param runnable
- */
- protected void executeChange(final Runnable runnable)
- {
- final IPath webXMLPath = new Path("WEB-INF").append("web.xml"); //$NON-NLS-1$ //$NON-NLS-2$
- final IModelProvider provider = ModelProviderManager
- .getModelProvider(getProject());
- provider.modify(runnable, webXMLPath);
- }
-
- /**
- * @return the project
- */
- protected IProject getProject()
- {
- return _project;
- }
-
- @SuppressWarnings("unchecked")
- private static class JavaEEWebAppConfigurator extends WebAppConfigurator
- {
- public JavaEEWebAppConfigurator(final IProject project)
- {
- super(project);
- }
-
- @Override
- public void addContextParam(final String paramName,
- final String paramValue, final boolean addEvenIfPresent)
- {
- final Runnable runnable = new Runnable()
- {
- public void run()
- {
- final org.eclipse.jst.javaee.web.WebApp webApp = (org.eclipse.jst.javaee.web.WebApp) ModelProviderManager
- .getModelProvider(getProject()).getModelObject();
- if (addEvenIfPresent
- || !isContextParamPresent(webApp, paramName))
- {
- final org.eclipse.jst.javaee.core.ParamValue newParamValue = org.eclipse.jst.javaee.core.JavaeeFactory.eINSTANCE
- .createParamValue();
- newParamValue.setParamName(paramName);
- newParamValue.setParamValue(paramValue);
- webApp.getContextParams().add(newParamValue);
- }
- }
- };
- executeChange(runnable);
- }
-
- @Override
- public void removeContextParam(final String paramName,
- final String paramVal)
- {
- final Runnable runnable = new Runnable()
- {
- public void run()
- {
- final org.eclipse.jst.javaee.web.WebApp webApp = (org.eclipse.jst.javaee.web.WebApp) ModelProviderManager
- .getModelProvider(getProject()).getModelObject();
- for (final Iterator<?> it = webApp.getContextParams()
- .iterator(); it.hasNext();)
- {
- final org.eclipse.jst.javaee.core.ParamValue paramValue = (org.eclipse.jst.javaee.core.ParamValue) it
- .next();
- if (paramName.equals(paramValue.getParamName().trim())
- && paramVal.equals(paramValue.getParamValue()
- .trim()))
- {
- it.remove();
- }
- }
- }
- };
- executeChange(runnable);
- }
-
- private boolean isContextParamPresent(
- final org.eclipse.jst.javaee.web.WebApp webApp,
- final String paramName)
- {
- for (final Iterator<?> it = webApp.getContextParams().iterator(); it
- .hasNext();)
- {
- final org.eclipse.jst.javaee.core.ParamValue paramValue = (org.eclipse.jst.javaee.core.ParamValue) it
- .next();
- if (paramName.equals(paramValue.getParamName().trim()))
- {
- return true;
- }
- }
- return false;
- }
-
- @Override
- public void addListener(final String listenerClass,
- final boolean addEvenIfPresent)
- {
- final Runnable runnable = new Runnable()
- {
- public void run()
- {
- final org.eclipse.jst.javaee.web.WebApp webApp = (org.eclipse.jst.javaee.web.WebApp) ModelProviderManager
- .getModelProvider(getProject()).getModelObject();
-
- if (addEvenIfPresent
- || !isListenerPresent(webApp, listenerClass))
- {
- final org.eclipse.jst.javaee.core.Listener listener = org.eclipse.jst.javaee.core.JavaeeFactory.eINSTANCE
- .createListener();
- listener.setListenerClass(listenerClass);
- webApp.getListeners().add(listener);
- }
- }
- };
- executeChange(runnable);
- }
-
- @Override
- public void removeListener(final String listenerClass)
- {
- final Runnable runnable = new Runnable()
- {
- public void run()
- {
- final org.eclipse.jst.javaee.web.WebApp webApp = (org.eclipse.jst.javaee.web.WebApp) ModelProviderManager
- .getModelProvider(getProject()).getModelObject();
- for (final Iterator listenerIt = webApp.getListeners()
- .iterator(); listenerIt.hasNext();)
- {
- final org.eclipse.jst.javaee.core.Listener listener = (org.eclipse.jst.javaee.core.Listener) listenerIt
- .next();
- if (listenerClass.equals(listener.getListenerClass()
- .trim()))
- {
- listenerIt.remove();
- }
- }
- }
- };
- executeChange(runnable);
- }
-
- private boolean isListenerPresent(
- final org.eclipse.jst.javaee.web.WebApp webApp,
- final String listenerClass)
- {
- for (final Iterator listenerIt = webApp.getListeners().iterator(); listenerIt
- .hasNext();)
- {
- final org.eclipse.jst.javaee.core.Listener listener = (org.eclipse.jst.javaee.core.Listener) listenerIt
- .next();
- if (listenerClass.equals(listener.getListenerClass().trim()))
- {
- return true;
- }
- }
- return false;
- }
- }
-
- @SuppressWarnings("unchecked")
- private static class J2EEWebAppConfigurator extends WebAppConfigurator
- {
- public J2EEWebAppConfigurator(final IProject project)
- {
- super(project);
- }
-
- @Override
- public void addContextParam(final String paramName,
- final String paramValue, final boolean addEvenIfPresent)
- {
- final Runnable runnable = new Runnable()
- {
- public void run()
- {
- final org.eclipse.jst.j2ee.webapplication.WebApp webApp = (org.eclipse.jst.j2ee.webapplication.WebApp) ModelProviderManager
- .getModelProvider(getProject()).getModelObject();
-
- if (addEvenIfPresent
- || !isContextParamPresent(webApp, paramName))
- {
- final org.eclipse.jst.j2ee.common.ParamValue newParamValue = org.eclipse.jst.j2ee.common.CommonFactory.eINSTANCE
- .createParamValue();
- newParamValue.setName(paramName);
- newParamValue.setValue(paramValue);
- webApp.getContextParams().add(newParamValue);
- }
- }
- };
- executeChange(runnable);
- }
-
- @Override
- public void removeContextParam(final String paramName,
- final String paramVal)
- {
- final Runnable runnable = new Runnable()
- {
- public void run()
- {
- final org.eclipse.jst.j2ee.webapplication.WebApp webApp = (org.eclipse.jst.j2ee.webapplication.WebApp) ModelProviderManager
- .getModelProvider(getProject()).getModelObject();
- for (final Iterator it = webApp.getContextParams()
- .iterator(); it.hasNext();)
- {
- final org.eclipse.jst.j2ee.common.ParamValue paramValue = (org.eclipse.jst.j2ee.common.ParamValue) it
- .next();
- if (paramName.equals(paramValue.getName().trim())
- && paramVal
- .equals(paramValue.getValue().trim()))
- {
- it.remove();
- }
- }
- }
- };
- executeChange(runnable);
- }
-
- private boolean isContextParamPresent(
- final org.eclipse.jst.j2ee.webapplication.WebApp webApp,
- final String paramName)
- {
- for (final Iterator it = webApp.getContextParams().iterator(); it
- .hasNext();)
- {
- final org.eclipse.jst.j2ee.common.ParamValue paramValue = (org.eclipse.jst.j2ee.common.ParamValue) it
- .next();
- if (paramName.equals(paramValue.getName().trim()))
- {
- return true;
- }
- }
- return false;
- }
-
- @Override
- public void addListener(final String listenerClass,
- final boolean addEvenIfPresent)
- {
- final Runnable runnable = new Runnable()
- {
- public void run()
- {
- final org.eclipse.jst.j2ee.webapplication.WebApp webApp = (org.eclipse.jst.j2ee.webapplication.WebApp) ModelProviderManager
- .getModelProvider(getProject()).getModelObject();
-
- if (addEvenIfPresent
- || !isListenerPresent(webApp, listenerClass))
- {
- final org.eclipse.jst.j2ee.common.Listener listener = org.eclipse.jst.j2ee.common.CommonFactory.eINSTANCE
- .createListener();
- listener.setListenerClassName(listenerClass);
- webApp.getListeners().add(listener);
- }
- }
- };
- executeChange(runnable);
- }
-
- @Override
- public void removeListener(final String listenerClass)
- {
- final Runnable runnable = new Runnable()
- {
- public void run()
- {
- final org.eclipse.jst.j2ee.webapplication.WebApp webApp = (org.eclipse.jst.j2ee.webapplication.WebApp) ModelProviderManager
- .getModelProvider(getProject()).getModelObject();
-
- for (final Iterator listenerIt = webApp.getListeners()
- .iterator(); listenerIt.hasNext();)
- {
- final org.eclipse.jst.j2ee.common.Listener listener = (org.eclipse.jst.j2ee.common.Listener) listenerIt
- .next();
- if (listenerClass.equals(listener
- .getListenerClassName().trim()))
- {
- listenerIt.remove();
- }
- }
- }
- };
- executeChange(runnable);
- }
-
- private boolean isListenerPresent(
- final org.eclipse.jst.j2ee.webapplication.WebApp webApp,
- final String listenerClass)
- {
- for (final Iterator listenerIt = webApp.getListeners().iterator(); listenerIt
- .hasNext();)
- {
- final org.eclipse.jst.j2ee.common.Listener listener = (org.eclipse.jst.j2ee.common.Listener) listenerIt
- .next();
- if (listenerClass
- .equals(listener.getListenerClassName().trim()))
- {
- return true;
- }
- }
- return false;
- }
- }
-
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/messages.properties b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/messages.properties
deleted file mode 100644
index aa79cd5d7..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/messages.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-FaceletInstallDelegate_FACET_INSTALLER_DELEGATE_DISPLAY_NAME=Facelet Install Delegate
-FaceletUninstallDelegate_FACET_INSTALLER_DELEGATE_DISPLAY_NAME=Facelet Uninstall Delegate
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/metadata/FaceletNamespaceMetaDataLocator.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/metadata/FaceletNamespaceMetaDataLocator.java
deleted file mode 100644
index 9ded96b41..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/metadata/FaceletNamespaceMetaDataLocator.java
+++ /dev/null
@@ -1,173 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.metadata;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jface.util.SafeRunnable;
-import org.eclipse.jst.jsf.common.metadata.internal.AbstractMetaDataLocator;
-import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataChangeNotificationEvent;
-import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataLocator;
-import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataObserver;
-import org.eclipse.jst.jsf.common.metadata.internal.IMetaDataSourceModelProvider;
-import org.eclipse.jst.jsf.common.metadata.internal.IPathSensitiveMetaDataLocator;
-import org.eclipse.jst.jsf.common.metadata.internal.MetaDataChangeNotificationEvent;
-import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.Namespace;
-import org.eclipse.jst.jsf.core.IJSFCoreConstants;
-import org.eclipse.jst.jsf.core.JSFVersion;
-import org.eclipse.jst.jsf.core.internal.CompositeTagRegistryFactory;
-import org.eclipse.jst.jsf.core.internal.CompositeTagRegistryFactory.TagRegistryIdentifier;
-import org.eclipse.jst.jsf.core.jsfappconfig.JSFAppConfigUtils;
-import org.eclipse.jst.jsf.core.metadata.internal.INamespaceModelProvider;
-import org.eclipse.jst.jsf.designtime.internal.view.model.ITagRegistry;
-import org.eclipse.jst.jsf.designtime.internal.view.model.ITagRegistry.ITagRegistryListener;
-import org.eclipse.jst.jsf.designtime.internal.view.model.ITagRegistry.TagRegistryChangeEvent;
-import org.eclipse.jst.jsf.facelet.core.internal.FaceletCorePlugin;
-import org.eclipse.wst.common.project.facet.core.FacetedProjectFramework;
-import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectEvent;
-import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectEvent.Type;
-import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectListener;
-import org.eclipse.wst.common.project.facet.core.events.IProjectFacetActionEvent;
-
-
-/**
- * Locates Facelet {@link Namespace} metadata
- */
-public class FaceletNamespaceMetaDataLocator
- extends AbstractMetaDataLocator
- implements IPathSensitiveMetaDataLocator, ITagRegistryListener, IFacetedProjectListener {
-
- //in the future if there is an explicit xhtml content type id, we will need to use that here
- private static final IContentType XHTML_CONTENTTYPE =
- Platform.getContentTypeManager().getContentType("org.eclipse.wst.html.core.htmlsource"); //$NON-NLS-1$
-
- private IProject _project;
- private ITagRegistry _reg;
-
- public List<IMetaDataSourceModelProvider> locateMetaDataModelProviders(final String uri) {
- final List<IMetaDataSourceModelProvider> providers = new ArrayList<IMetaDataSourceModelProvider>();
- if (_reg != null) {
- final Namespace ns = _reg.getTagLibrary(uri);
-
- if (ns != null) {
- providers.add(new NamespaceSourceModel(ns));
- }
- }
- return providers;
- }
-
- public void startLocating() {
- if (_project != null && JSFAppConfigUtils.isValidJSFProject(_project)
- && JSFVersion.valueOfProject(_project).compareTo(JSFVersion.V2_0) >=0 ) {
-
- final TagRegistryIdentifier tagRegId = new TagRegistryIdentifier(_project, XHTML_CONTENTTYPE);
- _reg = CompositeTagRegistryFactory.getInstance().getRegistry(tagRegId);
- if (_reg != null) {
- _reg.addListener(this);
- }
- }
-
- //add faceted project listener that will check for JSF facet version
- //being added and the facelet registry not being initialized
- FacetedProjectFramework.addListener(this, Type.POST_INSTALL);
- }
-
- public void stopLocating() {
- if (_reg != null) {
- _reg.removeListener(this);
- _reg = null;
- }
- FacetedProjectFramework.removeListener(this);
- }
-
- public void setProjectContext(final IProject project) {
- _project = project;
- }
-
- public void registryChanged(final TagRegistryChangeEvent changeEvent) {
- for (final Namespace ns : changeEvent.getAffectedObjects()) {
- if (adaptTagRegistryEvent(changeEvent) != IMetaDataChangeNotificationEvent.ADDED) {
- final IMetaDataChangeNotificationEvent mdEvent = new MetaDataChangeNotificationEvent(this, ns.getNSUri(), adaptTagRegistryEvent(changeEvent));
- fireEvent(mdEvent);
- }
- }
- }
-
- private int adaptTagRegistryEvent(final TagRegistryChangeEvent event) {
- switch (event.getType()) {
- case ADDED_NAMESPACE:
- return IMetaDataChangeNotificationEvent.ADDED;
- case REMOVED_NAMESPACE:
- case REGISTRY_DISPOSED:
- return IMetaDataChangeNotificationEvent.REMOVED;
- default:
- return IMetaDataChangeNotificationEvent.CHANGED;
- }
- }
-
- private void fireEvent(final IMetaDataChangeNotificationEvent event) {
- SafeRunnable.run(new ISafeRunnable(){
-
- public void handleException(Throwable exception) {
- FaceletCorePlugin.log("Error while firing metadataChangeNotificationEvent" , exception) ; //$NON-NLS-1$
- }
-
- public void run() throws Exception {
- for (final IMetaDataObserver observer : getObservers()){
- observer.notifyMetadataChanged(event);
- }
- }
-
- });
- }
-
- public void handleEvent(final IFacetedProjectEvent event) {
- if (event.getProject().getProject() == _project) {
- final IProjectFacetActionEvent ev = (IProjectFacetActionEvent)event;
- if (ev.getProjectFacet().getId()
- .equals(IJSFCoreConstants.JSF_CORE_FACET_ID)) {
- //if jsf facet has been added, it may be a 2.0 faceted project now
- //call start locating again to add listener to facelet registry
- //if not already doing so.
- //only have to look at POST_INSTALL event since there is no version_changes option
- //currently with the JSF Facet
- if (ev.getType() == Type.POST_INSTALL && _reg == null) {
- startLocating();
- }
- }
- }
- }
- private class NamespaceSourceModel implements INamespaceModelProvider {
-
- private Namespace ns;
- private IMetaDataLocator locator;
-
- NamespaceSourceModel(final Namespace ns){
- this.ns = ns;
- }
-
- public Object getSourceModel() {
- return ns;
- }
-
- public IMetaDataLocator getLocator() {
- return locator;
- }
-
- public void setLocator(IMetaDataLocator locator) {
- this.locator = locator;
- }
-
- public Object getAdapter(Class klass) {
- return null;
- }
-
- public Namespace getNamespace() {
- return ns;
- }
- }
-
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/metadata/FaceletNamespaceMetaDataTranslator.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/metadata/FaceletNamespaceMetaDataTranslator.java
deleted file mode 100644
index 423521354..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/metadata/FaceletNamespaceMetaDataTranslator.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.metadata;
-
-import org.eclipse.jst.jsf.common.metadata.Entity;
-import org.eclipse.jst.jsf.common.metadata.Trait;
-import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.Namespace;
-import org.eclipse.jst.jsf.core.metadata.internal.NamespaceMetaDataTranslator;
-
-/**
- * Translates Facelet {@link Namespace} to standard {@link Entity} and {@link Trait} metadata
- *
- */
-public class FaceletNamespaceMetaDataTranslator extends NamespaceMetaDataTranslator {
- private static final String COMPOSITE = "http://java.sun.com/jsf/composite"; //$NON-NLS-1$
-
- @Override
- protected String getNamespaceDisplayLabel() {
- if (getMergedModel().getId().indexOf(COMPOSITE) == 0
- && getMergedModel().getId().length() > COMPOSITE.length())
- return getMergedModel().getId().substring(COMPOSITE.length()+1);
- return super.getNamespaceDisplayLabel();
- }
-
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/ELProxyContributor.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/ELProxyContributor.java
deleted file mode 100644
index c000bbc3c..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/ELProxyContributor.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.registry;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jem.internal.proxy.core.ConfigurationContributorAdapter;
-import org.eclipse.jem.internal.proxy.core.IConfigurationContributionController;
-import org.eclipse.jst.jsf.facelet.core.internal.FaceletCorePlugin;
-import org.osgi.framework.Bundle;
-
-/**
- * Contributes additional, sometimes fake, jars to the JEM classpath to allow
- * for smooth instantiation of introspected objects.
- *
- * @author cbateman
- *
- */
-public class ELProxyContributor extends ConfigurationContributorAdapter
-{
- private final IProject _project;
-
- /**
- * @param project
- */
- public ELProxyContributor(final IProject project)
- {
- _project = project;
- }
-
- @Override
- public void contributeClasspaths(
- final IConfigurationContributionController controller)
- throws CoreException
- {
- if (_project.isAccessible())
- {
- final IJavaProject javaProject = JavaCore.create(_project);
- final IType type = javaProject.findType("java.el.ELException"); //$NON-NLS-1$
-
- // if we can't find ELException on the classpath,then inject
- // our fake el jar to aid linkage while introspecting facelet libs
- if (type == null)
- {
- final Bundle faceletBundle = FaceletCorePlugin.getDefault().getBundle();
- controller.contributeClasspath(faceletBundle, "/jars/fake_el.jar", //$NON-NLS-1$
- IConfigurationContributionController.APPEND_USER_CLASSPATH,
- false);
- }
- }
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/FaceletMetaResolvingStrategy.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/FaceletMetaResolvingStrategy.java
deleted file mode 100644
index f202b1fa2..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/FaceletMetaResolvingStrategy.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.registry;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.emf.common.util.EList;
-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.model.types.TypeInfo;
-import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.IHandlerTagElement.TagHandlerType;
-import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ITagElement;
-import org.eclipse.jst.jsf.core.internal.tld.TagIdentifierFactory;
-import org.eclipse.jst.jsf.designtime.internal.Messages;
-import org.eclipse.jst.jsf.designtime.internal.view.mapping.ViewMetadataLoader;
-import org.eclipse.jst.jsf.designtime.internal.view.mapping.ViewMetadataMapper;
-import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagMapping;
-import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagToViewObjectMapping;
-import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.AbstractTagResolvingStrategy;
-import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.DefaultTagTypeInfo;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.FaceletDocumentFactory;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagAttribute;
-import org.eclipse.jst.jsf.facelet.core.internal.tagmodel.ComponentTag;
-import org.eclipse.jst.jsf.facelet.core.internal.tagmodel.ConverterTag;
-import org.eclipse.jst.jsf.facelet.core.internal.tagmodel.HandlerTag;
-import org.eclipse.jst.jsf.facelet.core.internal.tagmodel.NoArchetypeFaceletTag;
-import org.eclipse.jst.jsf.facelet.core.internal.tagmodel.ValidatorTag;
-import org.osgi.framework.Version;
-
-/**
- * Resolves facelet tags from JSF framework metadata.
- *
- * @author cbateman
- *
- */
-public class FaceletMetaResolvingStrategy
- extends
- AbstractTagResolvingStrategy<IFaceletTagResolvingStrategy.TLDWrapper, String>
- implements IFaceletTagResolvingStrategy
-{
-
- /**
- * strategy id
- */
- public final static String ID = "org.eclipse.jst.jsf.facelet.metadata.FaceletMetaResolvingStrategy"; //$NON-NLS-1$
- /**
- * displayable nameb
- */
- public final static String DISPLAY_NAME = Messages.DefaultJSPTagResolver_DisplayName;
-
- private final ViewMetadataLoader _loader;
- private final ViewMetadataMapper _mapper;
- private final FaceletDocumentFactory _factory;
-
- /**
- * @param project
- * @param factory
- */
- public FaceletMetaResolvingStrategy(final IProject project,
- final FaceletDocumentFactory factory)
- {
- _factory = factory;
- _loader = new ViewMetadataLoader(project);
- _mapper = new ViewMetadataMapper();
- }
-
- @Override
- public ITagElement resolve(
- final IFaceletTagResolvingStrategy.TLDWrapper elementDecl)
- {
- final String uri = elementDecl.getUri();
- final String tagName = elementDecl.getTagDefn().getTagName();
- final TagIdentifier tagId = TagIdentifierFactory.createJSPTagWrapper(
- uri, tagName);
- final TagMapping mapping = _loader.getTagToViewMapping(tagId);
-
- TypeInfo elementType = null;
- if (mapping != null)
- {
- elementType = findTypeInfo(mapping, "1.1", null); //$NON-NLS-1$
- }
- final List<FaceletTaglibTagAttribute> attributes =
- elementDecl.getTagDefn().getAttribute();
- if (elementType instanceof ComponentTypeInfo)
- {
- return new ComponentTag(uri, tagName,
- (ComponentTypeInfo) elementType, null, _factory,
- new MetadataAttributeAdvisor(tagId, _loader, attributes));
- }
- else if (elementType instanceof ConverterTypeInfo)
- {
- return new ConverterTag(uri, tagName,
- (ConverterTypeInfo) elementType, null, _factory,
- new MetadataAttributeAdvisor(tagId, _loader, attributes));
- }
- else if (elementType instanceof ValidatorTypeInfo)
- {
- return new ValidatorTag(uri, tagName,
- (ValidatorTypeInfo) elementType, null, _factory,
- new MetadataAttributeAdvisor(tagId, _loader, attributes));
- }
- else if (elementType instanceof TagHandlerType)
- {
- return new HandlerTag(uri, tagName,
- (TagHandlerType) elementType, null, _factory,
- new MetadataAttributeAdvisor(
- tagId, _loader, attributes));
- }
- else if (DefaultTagTypeInfo.isDefaultLib(tagId.getUri()))
- {
- return new NoArchetypeFaceletTag(uri, tagName, _factory, new MetadataAttributeAdvisor(tagId, _loader, attributes));
- }
-
- // not found
- return null;
- }
-
- private TypeInfo findTypeInfo(final TagMapping mapping,
- final String jsfVersion, final String libVersion)
- {
- final EList list = mapping.getVersionedTagToViewMappings();
-
- FIND_BY_VERSION: for (final Iterator<?> it = list.iterator(); it
- .hasNext();)
- {
- Object obj = it.next();
-
- if (obj instanceof TagToViewObjectMapping)
- {
- final TagToViewObjectMapping viewMapping = (TagToViewObjectMapping) obj;
-
- final String minJsfVersionString = viewMapping
- .getMinJSFVersion();
- if (minJsfVersionString != null)
- {
- try
- {
- final Version version = new Version(jsfVersion);
- final Version minVersion = Version
- .parseVersion(minJsfVersionString);
-
- if (version.compareTo(minVersion) < 0)
- {
- // my version is less than the minimum specified
- // by this meta-data
- continue FIND_BY_VERSION;
- }
- }
- catch (final IllegalArgumentException iae)
- {
- continue FIND_BY_VERSION;
- }
- }
- final String minLibVersionString = viewMapping
- .getMinLibraryVersion();
- if (libVersion != null && minLibVersionString != null)
- {
- try
- {
- final Version version = new Version(libVersion);
- final Version minLibVersion = Version
- .parseVersion(minLibVersionString);
-
- if (version.compareTo(minLibVersion) < 0)
- {
- // my lib version is less than the minimum specified
- // by the meta-data
- continue FIND_BY_VERSION;
- }
- }
- catch (IllegalArgumentException iae)
- {
- continue FIND_BY_VERSION;
- }
- }
- return _mapper.mapToFrameworkData(viewMapping.getTypeInfo());
- }
- }
- return null;
- }
-
- @Override
- public String getId()
- {
- return ID;
- }
-
- public String getDisplayName()
- {
- return DISPLAY_NAME;
- }
-
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/FaceletRegistryManager.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/FaceletRegistryManager.java
deleted file mode 100644
index 357458b0d..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/FaceletRegistryManager.java
+++ /dev/null
@@ -1,130 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.registry;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.jst.jsf.common.internal.resource.ResourceSingletonObjectManager;
-import org.eclipse.jst.jsf.core.JSFVersion;
-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.facelet.core.internal.FaceletCoreTraceOptions;
-
-/**
- * A per-resource singleton manager for TLDTagRegistry's.
- *
- * @author cbateman
- *
- */
-public final class FaceletRegistryManager extends
- ResourceSingletonObjectManager<FaceletTagRegistry, IProject>
-{
- // STATIC
- private static FaceletRegistryManager INSTANCE;
-
- /**
- * @return the singleton instance
- */
- private static FaceletRegistryManager getGlobalManager(final IWorkspace workspace)
- {
- if (FaceletCoreTraceOptions.TRACE_REGISTRYMANAGER)
- {
- FaceletCoreTraceOptions
- .log("FaceletRegistryManager: Initializing FaceletRegistryManager singleton"); //$NON-NLS-1$
- }
-
- synchronized(FaceletRegistryManager.class)
- {
- if (INSTANCE == null)
- {
- INSTANCE = new FaceletRegistryManager(workspace);
- }
-
- return INSTANCE;
- }
- }
-
- private FaceletRegistryManager(final IWorkspace workspace)
- {
- super(workspace);
- }
-
- @Override
- protected FaceletTagRegistry createNewInstance(final IProject project)
- {
- if (FaceletCoreTraceOptions.TRACE_REGISTRYMANAGER)
- {
- FaceletCoreTraceOptions.log("FaceletRegistryManager: creating new instance for " //$NON-NLS-1$
- + project.toString());
- }
-
- return new FaceletTagRegistry(project);
- }
-
- @Override
- protected void runAfterGetInstance(final IProject resource)
- {
- if (FaceletCoreTraceOptions.TRACE_REGISTRYMANAGER)
- {
- FaceletCoreTraceOptions.log("FaceletRegistryManager: Acquired instance for " //$NON-NLS-1$
- + resource.toString());
- }
- }
-
- @Override
- protected void runBeforeGetInstance(final IProject resource)
- {
- if (FaceletCoreTraceOptions.TRACE_REGISTRYMANAGER)
- {
- FaceletCoreTraceOptions.log("FaceletRegistryManager: Getting registry for " //$NON-NLS-1$
- + resource.toString());
- }
- }
-
- /**
- * Adapter used to allow creation by extension point.
- *
- * @author cbateman
- *
- */
- public static class MyRegistryFactory extends TagRegistryFactory
- {
- @Override
- public ITagRegistry createTagRegistry(IProject project) throws TagRegistryFactoryException
- {
- try
- {
- return getGlobalManager(project.getWorkspace()).getInstance(project);
- }
- catch (ManagedObjectException e)
- {
- throw new TagRegistryFactoryException(e);
- }
- }
-
- @Override
- public boolean isInstance(IProject project)
- {
- return getGlobalManager(project.getWorkspace()).isInstance(project);
- }
-
- public String getDisplayName()
- {
- return Messages.FaceletRegistryManager_REGISTRY_FACTORY_DISPLAYNAME;
- }
-
- @Override
- public boolean projectIsValid(IProject project) {
- if (project == null)
- {
- return false;
- }
-
- final JSFVersion jsfVersion = JSFVersion.valueOfProject(project);
- if (jsfVersion != null && jsfVersion.compareTo(JSFVersion.V2_0) >= 0)
- {
- return true;
- }
-
- return false;
- }
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/FaceletTagRegistry.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/FaceletTagRegistry.java
deleted file mode 100644
index 16f782b66..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/FaceletTagRegistry.java
+++ /dev/null
@@ -1,374 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.registry;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentLinkedQueue;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jst.jsf.common.internal.managedobject.IManagedObject;
-import org.eclipse.jst.jsf.common.internal.managedobject.ObjectManager.ManagedObjectException;
-import org.eclipse.jst.jsf.common.internal.policy.IdentifierOrderedIteratorPolicy;
-import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.Namespace;
-import org.eclipse.jst.jsf.core.internal.JSFCorePlugin;
-import org.eclipse.jst.jsf.core.internal.JSFCoreTraceOptions;
-import org.eclipse.jst.jsf.designtime.internal.view.model.AbstractTagRegistry;
-import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.CompositeTagResolvingStrategy;
-import org.eclipse.jst.jsf.facelet.core.internal.FaceletCorePlugin;
-import org.eclipse.jst.jsf.facelet.core.internal.FaceletCoreTraceOptions;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.FaceletDocumentFactory;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.IFaceletTagResolvingStrategy.TLDWrapper;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.FaceletTagIndex;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.IFaceletTagRecord;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.IProjectTaglibDescriptor;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.Listener;
-import org.eclipse.jst.jsf.facelet.core.internal.tagmodel.FaceletNamespace;
-
-/**
- * Registry of all facelet tag registries: at most one per project.
- *
- */
-public final class FaceletTagRegistry extends AbstractTagRegistry implements
- IManagedObject
-{
- // INSTANCE
- private final ConcurrentLinkedQueue<LibraryOperation> _changeOperations = new ConcurrentLinkedQueue<LibraryOperation>();
-
- private final IProject _project;
- private final Map<String, FaceletNamespace> _nsResolved;
- private final Set<FaceletNamespace> _unResolved;
- private final CompositeTagResolvingStrategy<TLDWrapper> _resolver;
- private final FaceletDocumentFactory _factory;
- private final LibraryOperationFactory _operationFactory = new LibraryOperationFactory(
- this);
- private boolean _isInitialized;
-
- private ChangeJob _changeJob;
- private MyTaglibListener _listener;
-
- FaceletTagRegistry(final IProject project)
- {
- _project = project;
- _nsResolved = new HashMap<String, FaceletNamespace>();
- _unResolved = new HashSet<FaceletNamespace>();
-
- final List<String> ids = new ArrayList<String>();
-
-//Commenting out this strategy because of current circular dependency with facelet md locating. See FaceletNamespaceMetaDataLocator.
-// ids.add(FaceletMetaResolvingStrategy.ID);
- ids.add(FaceletTagResolvingStrategy.ID);
- final IdentifierOrderedIteratorPolicy<String> policy = new IdentifierOrderedIteratorPolicy<String>(
- ids);
-
- // exclude things that are not explicitly listed in the policy. That
- // way preference-based disablement will cause those strategies to
- // be excluded.
- policy.setExcludeNonExplicitValues(true);
- _resolver = new CompositeTagResolvingStrategy<TLDWrapper>(policy);
-
- _factory = new FaceletDocumentFactory(project);
- // add the strategies
- _resolver.addStrategy(new FaceletTagResolvingStrategy(_project,
- _factory));
-
-//Commenting out this strategy because of current circular dependency with facelet md locating. See FaceletNamespaceMetaDataLocator.
-// _resolver.addStrategy(new FaceletMetaResolvingStrategy(_project, _factory));
-
- // _resolver.addStrategy(new DefaultJSPTagResolver(_project));
- // makes sure that a tag element will always be created for any
- // given tag definition even if other methods fail
- // _resolver.addStrategy(new UnresolvedJSPTagResolvingStrategy());
- _changeJob = new ChangeJob(project.getName());
- }
-
- /**
- * @return a copy of all tag libs, both with namespaces resolved and without
- * Changing the returned may has no effect on the registry, however
- * the containned objects are not copies.
- */
- @Override
- public synchronized Collection<FaceletNamespace> getAllTagLibraries()
- {
- final Set<FaceletNamespace> allTagLibraries = new HashSet<FaceletNamespace>();
- if (!_isInitialized)
- {
- try
- {
- initialize(false);
- _isInitialized = true;
- }
- catch (final JavaModelException e)
- {
- FaceletCorePlugin.log("Problem during initialization", e); //$NON-NLS-1$
- }
- catch (final CoreException e)
- {
- FaceletCorePlugin.log("Problem during initialization", e); //$NON-NLS-1$
- }
- }
- allTagLibraries.addAll(_nsResolved.values());
- allTagLibraries.addAll(_unResolved);
- return allTagLibraries;
- }
-
- private void initialize(boolean fireEvent) throws JavaModelException, CoreException
- {
- if (!_project.exists() || !_project.hasNature(JavaCore.NATURE_ID))
- {
- throw new CoreException(new Status(IStatus.ERROR,
- FaceletCorePlugin.PLUGIN_ID,
- "Project either does not exists or is not a java project: " //$NON-NLS-1$
- + _project));
- }
-
- final FaceletTagIndex index = FaceletTagIndex.getInstance(_project.getWorkspace());
-
- IProjectTaglibDescriptor tagDesc;
- try
- {
- tagDesc = index.getInstance(_project);
- }
- catch (ManagedObjectException e)
- {
- throw new CoreException(
- new Status(
- IStatus.ERROR,
- FaceletCorePlugin.PLUGIN_ID,
- "Error instantiating facelet tag index for project: " + _project.getName(), e)); //$NON-NLS-1$
- }
-
- if (tagDesc != null)
- {
- for (final IFaceletTagRecord taglib : tagDesc.getTagLibraries())
- {
- initialize(taglib, fireEvent);
- }
-
- _listener = new MyTaglibListener();
- tagDesc.addListener(_listener);
- }
- }
-
- FaceletNamespace initialize(final IFaceletTagRecord tagRecord,
- final boolean fireEvent)
- {
- if (JSFCoreTraceOptions.TRACE_JSPTAGREGISTRY_CHANGES)
- {
- FaceletCoreTraceOptions
- .log("TLDTagRegistry.initialize_TagRecord: Initializing new tld record: " + tagRecord.toString()); //$NON-NLS-1$
- }
- final FaceletNamespace ns = new FaceletNamespace(tagRecord, _resolver);
- _nsResolved.put(tagRecord.getURI(), ns);
-
- if (fireEvent)
- {
- fireEvent(new TagRegistryChangeEvent(this,
- TagRegistryChangeEvent.EventType.ADDED_NAMESPACE,
- Collections.singletonList(ns)));
- }
- return ns;
- }
-
- void remove(final IFaceletTagRecord tagRecord)
- {
- final FaceletNamespace ns = _nsResolved.remove(tagRecord.getURI());
-
- if (ns != null)
- {
- fireEvent(new TagRegistryChangeEvent(this,
- TagRegistryChangeEvent.EventType.REMOVED_NAMESPACE,
- Collections.singletonList(ns)));
- }
- }
-
- @Override
- public synchronized Namespace getTagLibrary(final String uri)
- {
- // TODO:
- getAllTagLibraries();
- return _nsResolved.get(uri);
- }
-
- @Override
- protected Job getRefreshJob(final boolean flushCaches)
- {
- return new Job("Refreshing Facelet tag registry for " + _project.getName()) //$NON-NLS-1$
- {
- @Override
- protected IStatus run(final IProgressMonitor monitor)
- {
-// if (FaceletCoreTraceOptions.TRACE_JSPTAGREGISTRY)
-// {
-// JSFCoreTraceOptions.log("FaceletTagRegistry.refresh: start"); //$NON-NLS-1$
-// }
-
- synchronized (FaceletTagRegistry.this)
- {
- if (JSFCoreTraceOptions.TRACE_JSPTAGREGISTRY)
- {
- JSFCoreTraceOptions
- .log("FaceletTagRegistry.refresh: start"); //$NON-NLS-1$
- }
-
- final List<Namespace> namespaces = new ArrayList(
- _nsResolved.values());
-
- if (flushCaches)
- {
- FaceletTagIndex.getInstance(_project.getWorkspace()).flush(_project);
- }
- // if we aren't flushing caches, then check point the
- // current namespace data, so it isn't lost when we clear
- // THE NAMESPACES
- else
- {
- checkpoint();
- }
-
- _nsResolved.clear();
-
- fireEvent(new TagRegistryChangeEvent(FaceletTagRegistry.this,
- TagRegistryChangeEvent.EventType.REMOVED_NAMESPACE,
- namespaces));
- try
- {
- initialize(true);
- }
- catch (JavaModelException e)
- {
- return new Status(IStatus.ERROR, FaceletCorePlugin.PLUGIN_ID, "Problem refreshing registry", e); //$NON-NLS-1$
- }
- catch (CoreException e)
- {
- return new Status(IStatus.ERROR, FaceletCorePlugin.PLUGIN_ID, "Problem refreshing registry", e); //$NON-NLS-1$
- }
-
-// if (JSFCoreTraceOptions.TRACE_JSPTAGREGISTRY)
-// {
-// JSFCoreTraceOptions
-// .log("TLDTagRegistry.refresh: finished");
-// }
- return Status.OK_STATUS;
- }
- }
- };
- }
-
- private class MyTaglibListener extends Listener
- {
- @Override
- public void changed(TaglibChangedEvent event)
- {
- switch (event.getChangeType())
- {
- case ADDED:
- addLibraryOperation(_operationFactory
- .createAddOperation(event.getNewValue()));
- break;
- case CHANGED:
- addLibraryOperation(_operationFactory
- .createChangeOperation(event.getNewValue()));
- break;
- case REMOVED:
- addLibraryOperation(_operationFactory
- .createRemoveOperation(event.getOldValue()));
- break;
- }
- }
- }
-
- private void addLibraryOperation(final LibraryOperation operation)
- {
- _changeOperations.add(operation);
- _changeJob.schedule();
- }
-
- private class ChangeJob extends Job
- {
- private int _rescheduleTime = -1;
-
- public ChangeJob(final String projectName)
- {
- super("Update job for project " + projectName); //$NON-NLS-1$
- }
-
- @Override
- protected IStatus run(final IProgressMonitor monitor)
- {
- synchronized (FaceletTagRegistry.this)
- {
- _rescheduleTime = -1;
-
- LibraryOperation operation = null;
- final MultiStatus multiStatus = new MultiStatus(
- JSFCorePlugin.PLUGIN_ID, 0, "Result of change job", //$NON-NLS-1$
- new Throwable());
- while ((operation = _changeOperations.poll()) != null)
- {
- _rescheduleTime = 10000; // ms
-
- operation.run();
- multiStatus.add(operation.getResult());
- }
-
- if (_rescheduleTime >= 0 && !monitor.isCanceled())
- {
- // if any operations were found on this run, reschedule
- // to run again in 10seconds based on the assumption that
- // events may be coming in bursts
- schedule(_rescheduleTime);
- }
-
- return multiStatus;
- }
- }
- }
-
- @Override
- protected void doDispose()
- {
- if (_listener != null)
- {
- FaceletTagIndex index = FaceletTagIndex.getInstance(_project.getWorkspace());
- try
- {
- IProjectTaglibDescriptor instance = index.getInstance(_project);
- instance.removeListener(_listener);
- }
- catch (ManagedObjectException e)
- {
- FaceletCorePlugin
- .log(
- "Disposing facelet tag registry for project: " + _project.getName(), e); //$NON-NLS-1$
- }
-
- _nsResolved.clear();
- }
- }
-
- @Override
- protected void cleanupPersistentState()
- {
- // TODO ??
-
- }
-
- public void checkpoint()
- {
- // TODO ??
-
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/FaceletTagResolvingStrategy.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/FaceletTagResolvingStrategy.java
deleted file mode 100644
index 7ba62383a..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/FaceletTagResolvingStrategy.java
+++ /dev/null
@@ -1,167 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.registry;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jem.internal.proxy.core.IConfigurationContributor;
-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.ITagElement;
-import org.eclipse.jst.jsf.core.internal.tld.TagIdentifierFactory;
-import org.eclipse.jst.jsf.designtime.internal.view.DTComponentIntrospector;
-import org.eclipse.jst.jsf.designtime.internal.view.mapping.ViewMetadataLoader;
-import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.AbstractTagResolvingStrategy;
-import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.IAttributeAdvisor;
-import org.eclipse.jst.jsf.facelet.core.internal.cm.FaceletDocumentFactory;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTag;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib_1_0.ComponentTagDefn;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib_1_0.ConverterTagDefn;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib_1_0.HandlerTagDefn;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib_1_0.SourceTagDefn;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib_1_0.ValidatorTagDefn;
-import org.eclipse.jst.jsf.facelet.core.internal.tagmodel.ComponentTag;
-import org.eclipse.jst.jsf.facelet.core.internal.tagmodel.ConverterTag;
-import org.eclipse.jst.jsf.facelet.core.internal.tagmodel.FaceletTag;
-import org.eclipse.jst.jsf.facelet.core.internal.tagmodel.HandlerTag;
-import org.eclipse.jst.jsf.facelet.core.internal.tagmodel.NoArchetypeFaceletTag;
-import org.eclipse.jst.jsf.facelet.core.internal.tagmodel.SourceTag;
-import org.eclipse.jst.jsf.facelet.core.internal.tagmodel.ValidatorTag;
-
-/*package*/class FaceletTagResolvingStrategy
- extends
- AbstractTagResolvingStrategy<IFaceletTagResolvingStrategy.TLDWrapper, String>
- implements IFaceletTagResolvingStrategy
-{
- public final static String ID = "org.eclipse.jst.jsf.facelet.core.FaceletTagResolvingStrategy"; //$NON-NLS-1$
- private final IProject _project;
- private final FaceletDocumentFactory _factory;
- private final ViewMetadataLoader _viewLoader;
-
- public FaceletTagResolvingStrategy(final IProject project,
- final FaceletDocumentFactory factory)
- {
- _project = project;
- _factory = factory;
- _viewLoader = new ViewMetadataLoader(project);
- }
-
- @Override
- public final String getId()
- {
- return ID;
- }
-
- @Override
- public final ITagElement resolve(final TLDWrapper tldWrapper)
- {
- return createFaceletTag(tldWrapper.getUri(), tldWrapper.getTagDefn());
- }
-
- public final String getDisplayName()
- {
- return Messages.FaceletTagResolvingStrategy_FACELET_TAG_RESOLVER_DISPLAY_NAME;
- }
-
- private FaceletTag createFaceletTag(final String uri, final FaceletTaglibTag tagDefn)
- {
- final String tagName = tagDefn.getTagName();
- final TagIdentifier tagId = TagIdentifierFactory.createJSPTagWrapper(
- uri, tagName);
-
- final IAttributeAdvisor advisor = new MetadataAttributeAdvisor(tagId,
- _viewLoader, tagDefn.getAttribute());
-
- if (tagDefn instanceof ComponentTagDefn)
- {
- final ComponentTagDefn componentTagDefn = (ComponentTagDefn) tagDefn;
- final String componentType = componentTagDefn.getComponentType();
- final String componentClass = DTComponentIntrospector
- .findComponentClass(componentType, _project);
-
- ComponentTypeInfo typeInfo = null;
-
- if (componentClass != null)
- {
- typeInfo = DTComponentIntrospector.getComponent(componentType,
- componentClass, _project,
- new IConfigurationContributor[]
- { new ELProxyContributor(_project) });
- }
- return new ComponentTag(uri, tagName, typeInfo, safeGetString(componentTagDefn.getHandlerClass()), _factory, advisor);
- }
- // render type is optional, but must have component type
- else if (tagDefn instanceof ValidatorTagDefn)
- {
- final ValidatorTagDefn validatorTagDefn = (ValidatorTagDefn) tagDefn;
- final String validatorId = validatorTagDefn.getValidatorId();
-
- ValidatorTypeInfo typeInfo;
-
- if (validatorId != null)
- {
- final String validatorClass = DTComponentIntrospector
- .findValidatorClass(validatorId, _project);
- typeInfo = new ValidatorTypeInfo(validatorClass, validatorId);
- }
- else
- {
- typeInfo = ValidatorTypeInfo.UNKNOWN;
- }
-
- return new ValidatorTag(uri, tagName, typeInfo, safeGetString(validatorTagDefn.getHandlerClass()), _factory,
- advisor);
- }
- // render type is optional, but must have converter id
- else if (tagDefn instanceof ConverterTagDefn)
- {
- final ConverterTagDefn converterTagDefn = (ConverterTagDefn) tagDefn;
- final String converterId = converterTagDefn.getConverterId();
-
- ConverterTypeInfo typeInfo;
-
- if (converterId != null)
- {
- final String converterClass = DTComponentIntrospector
- .findConverterClass(converterId, _project);
- typeInfo = new ConverterTypeInfo(converterClass, converterId);
- }
- else
- {
- typeInfo = ConverterTypeInfo.UNKNOWN;
- }
-
- // for now, all converters are unknown
- return new ConverterTag(uri, tagName, typeInfo,
- safeGetString(converterTagDefn.getHandlerClass()), _factory, advisor);
- }
- else if (tagDefn instanceof HandlerTagDefn)
- {
- final String handlerClass = safeGetString(((HandlerTagDefn)tagDefn).getHandlerClass());
- return new HandlerTag(uri, tagName, null, handlerClass, _factory, advisor);
- }
- else if (tagDefn instanceof SourceTagDefn)
- {
- final String source = ((SourceTagDefn)tagDefn).getSource();
- return new SourceTag(uri, tagName, source, _factory, advisor);
- }
-
- return new NoArchetypeFaceletTag(uri, tagName, _factory, advisor);
- }
-
- private static String safeGetString(final String value)
- {
- if (value == null)
- {
- return null;
- }
-
- final String trimmed = value.trim();
-
- if ("".equals(trimmed)) //$NON-NLS-1$
- {
- return null;
- }
-
- return trimmed;
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/IFaceletTagResolvingStrategy.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/IFaceletTagResolvingStrategy.java
deleted file mode 100644
index 2be5978e2..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/IFaceletTagResolvingStrategy.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.registry;
-
-import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.ITagResolvingStrategy;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTag;
-
-/**
- * @author cbateman
- *
- */
-public interface IFaceletTagResolvingStrategy extends
- ITagResolvingStrategy<IFaceletTagResolvingStrategy.TLDWrapper, String>
-{
-
- /**
- * Wraps data for Facelet tag information to used by the resolving strategy
- *
- * @author cbateman
- *
- */
- public static class TLDWrapper
- {
- private final String _uri;
- private final FaceletTaglibTag _tagDefn;
-
- /**
- * @param tagDefn
- * @param uri
- */
- public TLDWrapper(FaceletTaglibTag tagDefn, String uri)
- {
- super();
- _tagDefn = tagDefn;
- _uri = uri;
- }
-
- /**
- * @return the uri for the tld namespace
- */
- public final String getUri()
- {
- return _uri;
- }
-
- /**
- * @return the tag definition information
- */
- public final FaceletTaglibTag getTagDefn()
- {
- return _tagDefn;
- }
-
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/LibraryOperation.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/LibraryOperation.java
deleted file mode 100644
index 249dfaff9..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/LibraryOperation.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.registry;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jst.jsf.facelet.core.internal.FaceletCorePlugin;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.IFaceletTagRecord;
-
-abstract class LibraryOperation
-{
- protected final IFaceletTagRecord _changeRecord;
- private IStatus _result;
-
- protected LibraryOperation(final IFaceletTagRecord changeRecord)
- {
- if (changeRecord == null)
- {
- throw new NullPointerException();
- }
- _changeRecord = changeRecord;
- }
-
- public final void run()
- {
- try
- {
- _result = doRun();
- }
- catch (final Exception e)
- {
- _result = new Status(IStatus.ERROR, FaceletCorePlugin.PLUGIN_ID,
- "Problem during run", e); //$NON-NLS-1$
- }
- }
-
- public IStatus getResult()
- {
- return _result;
- }
-
- protected abstract IStatus doRun();
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/LibraryOperationFactory.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/LibraryOperationFactory.java
deleted file mode 100644
index c69cbfed9..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/LibraryOperationFactory.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.registry;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.IFaceletTagRecord;
-
-class LibraryOperationFactory
-{
- private final FaceletTagRegistry _tagRegistry;
-
- public LibraryOperationFactory(final FaceletTagRegistry tagRegistry)
- {
- _tagRegistry = tagRegistry;
- }
-
- LibraryOperation createAddOperation(final IFaceletTagRecord changeRecord)
- {
- return new AddTagLibrary(_tagRegistry, changeRecord);
- }
-
- LibraryOperation createRemoveOperation(final IFaceletTagRecord changeRecord)
- {
- return new RemoveTagLibrary(_tagRegistry, changeRecord);
- }
-
- LibraryOperation createChangeOperation(final IFaceletTagRecord changeRecord)
- {
- if (changeRecord == null)
- {
- throw new IllegalArgumentException();
- }
- return new ChangeTagLibrary(_tagRegistry, changeRecord);
- }
-
- private static class AddTagLibrary extends LibraryOperation
- {
- private final FaceletTagRegistry _tagRegistry;
-
- public AddTagLibrary(final FaceletTagRegistry tagRegistry,
- final IFaceletTagRecord newRecord)
- {
- super(newRecord);
- _tagRegistry = tagRegistry;
- }
-
- @Override
- protected IStatus doRun()
- {
- synchronized (_tagRegistry)
- {
- // fire change event if applicable
- _tagRegistry.initialize(_changeRecord, true);
- return Status.OK_STATUS;
- }
- }
- }
-
- private static class RemoveTagLibrary extends LibraryOperation
- {
- private final FaceletTagRegistry _tagRegistry;
-
- protected RemoveTagLibrary(final FaceletTagRegistry tagRegistry,
- final IFaceletTagRecord changeRecord)
- {
- super(changeRecord);
- _tagRegistry = tagRegistry;
- }
-
- @Override
- protected IStatus doRun()
- {
- _tagRegistry.remove(_changeRecord);
- return Status.OK_STATUS;
-
- }
-
- }
-
- private static class ChangeTagLibrary extends LibraryOperation
- {
- private final FaceletTagRegistry _tagRegistry;
-
- protected ChangeTagLibrary(final FaceletTagRegistry tagRegistry,
- final IFaceletTagRecord changeRecord)
- {
- super(changeRecord);
- _tagRegistry = tagRegistry;
- }
-
- @Override
- protected IStatus doRun()
- {
- IStatus result = null;
-
- synchronized (_tagRegistry)
- {
- result = new RemoveTagLibrary(_tagRegistry, _changeRecord).doRun();
-
- if (result.getSeverity() != IStatus.ERROR
- && result.getSeverity() != IStatus.CANCEL)
- {
- result = new AddTagLibrary(_tagRegistry, _changeRecord)
- .doRun();
- }
- }
-
- return result;
- }
-
- }
-
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/Messages.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/Messages.java
deleted file mode 100644
index 1a4f0d641..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/Messages.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.registry;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Externalized string manager.
- *
- * @author cbateman
- *
- */
-public final class Messages extends NLS
-{
- private static final String BUNDLE_NAME = "org.eclipse.jst.jsf.facelet.core.internal.registry.messages"; //$NON-NLS-1$
- /**
- * see messages.properties
- */
- public static String FaceletRegistryManager_REGISTRY_FACTORY_DISPLAYNAME;
- /**
- * see messages.properties
- */
- public static String FaceletTagRegistry_TAG_REGISTRY_REFRESH_JOB_DESCRIPTION;
- /**
- * see messages.properties
- */
- public static String FaceletTagResolvingStrategy_FACELET_TAG_RESOLVER_DISPLAY_NAME;
- static
- {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages()
- {
- // no instantiation
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/MetadataAttributeAdvisor.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/MetadataAttributeAdvisor.java
deleted file mode 100644
index d0ba0bf0b..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/MetadataAttributeAdvisor.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.registry;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.jst.jsf.common.dom.TagIdentifier;
-import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ComponentPropertyHandler;
-import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ITagAttribute;
-import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ITagAttributeHandler;
-import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.TagAttributeHandler;
-import org.eclipse.jst.jsf.designtime.internal.view.mapping.ViewMetadataLoader;
-import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.AttributeToPropertyMapping;
-import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.IAttributeAdvisor;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTagAttribute;
-import org.eclipse.jst.jsf.facelet.core.internal.tagmodel.FaceletAttribute;
-
-/**
- * An attribute advisor that composes multiple strategies for deriving information
- * about Facelet tags.
- *
- * @author cbateman
- *
- */
-/*package*/ class MetadataAttributeAdvisor implements IAttributeAdvisor
-{
- private final TagIdentifier _tagId;
- private final ViewMetadataLoader _loader;
- private List<FaceletTaglibTagAttribute> _attributes;
-
- /**
- * @param tagId
- * @param loader
- * @param attributes
- */
- public MetadataAttributeAdvisor(final TagIdentifier tagId,
- final ViewMetadataLoader loader, final List<FaceletTaglibTagAttribute> attributes)
- {
- _tagId = tagId;
- _loader = loader;
- _attributes = attributes;
- }
-
- public ITagAttributeHandler createAttributeHandler(final String name)
- throws UnknownAttributeException
- {
- final AttributeToPropertyMapping mapping = _loader.getAttributeMapping(
- _tagId, name);
- if (mapping != null)
- {
- final String customHandler = mapping.getCustomConversionFactoryId();
- final boolean isELAllowed = mapping.isElAllowed();
- final String propertyName = mapping.getPropertyName();
- if (propertyName != null)
- {
- return new ComponentPropertyHandler(customHandler, name,
- isELAllowed, propertyName);
- }
- return new TagAttributeHandler(customHandler, name, isELAllowed);
- }
- return new TagAttributeHandler(null, name, false);
- }
-
- public Map<String, ? extends ITagAttribute> getAttributes()
- {
- final Map<String, ITagAttribute> attributes = new HashMap<String, ITagAttribute>();
-
- for (final FaceletTaglibTagAttribute attribute : _attributes)
- {
- attributes.put(attribute.getName(), new FaceletAttribute(attribute));
- }
- return Collections.unmodifiableMap(attributes);
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/ServletBeanProxyContributor.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/ServletBeanProxyContributor.java
deleted file mode 100644
index 23947381b..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/ServletBeanProxyContributor.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- *
- */
-package org.eclipse.jst.jsf.facelet.core.internal.registry;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jem.internal.proxy.core.ConfigurationContributorAdapter;
-import org.eclipse.jem.internal.proxy.core.IConfigurationContributionController;
-import org.eclipse.jst.jsf.core.JSFVersion;
-import org.osgi.framework.Bundle;
-
-/**
- * Contributes dummy jsp servlet api to smooth the JEM instantiation for introspection.
- *
- * @author cbateman
- *
- */
-public class ServletBeanProxyContributor extends ConfigurationContributorAdapter
-{
- private static final String JAVAX_SERVLET_JSP = "javax.servlet.jsp"; //$NON-NLS-1$
- private static final String JAVAX_SERVLET = "javax.servlet"; //$NON-NLS-1$
- private final JSFVersion _jsfVersion;
-
- /**
- * @param jsfVersion
- */
- public ServletBeanProxyContributor(final JSFVersion jsfVersion)
- {
- if (jsfVersion == null)
- {
- throw new IllegalArgumentException("jsfVersion must not be null"); //$NON-NLS-1$
- }
-
- _jsfVersion = jsfVersion;
- }
-
- @Override
- public void contributeClasspaths(
- final IConfigurationContributionController controller)
- throws CoreException
- {
- if (_jsfVersion != JSFVersion.V1_2)
- {
- final Bundle servletBundle = Platform.getBundle(JAVAX_SERVLET);
- controller.contributeClasspath(servletBundle, (IPath) null,
- IConfigurationContributionController.APPEND_USER_CLASSPATH,
- true);
-
- final Bundle jspBundle = Platform.getBundle(JAVAX_SERVLET_JSP);
- controller.contributeClasspath(jspBundle, (IPath) null,
- IConfigurationContributionController.APPEND_USER_CLASSPATH,
- true);
- }
-
- }
-} \ No newline at end of file
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/messages.properties b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/messages.properties
deleted file mode 100644
index dd82d8168..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/messages.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-FaceletRegistryManager_REGISTRY_FACTORY_DISPLAYNAME=Facelet Registry Factory
-FaceletTagRegistry_TAG_REGISTRY_REFRESH_JOB_DESCRIPTION=Refreshing Facelet tag registry for
-FaceletTagResolvingStrategy_FACELET_TAG_RESOLVER_DISPLAY_NAME=Facelet Introspecting Tag Resolver
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/AbstractFaceletTaglibLocator.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/AbstractFaceletTaglibLocator.java
deleted file mode 100644
index 3b63d2ec0..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/AbstractFaceletTaglibLocator.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib;
-
-import java.util.Map;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.jsf.common.internal.locator.AbstractLocator;
-import org.eclipse.jst.jsf.common.internal.locator.ILocatorChangeListener;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.Listener.TaglibChangedEvent;
-
-/**
- * Parent of all locators of facelet taglibs.
- *
- * @author cbateman
- *
- */
-public abstract class AbstractFaceletTaglibLocator
- extends
- AbstractLocator<Map<String, ? extends IFaceletTagRecord>, IProject, String>
- implements IFaceletTaglibLocator
-{
- /**
- * @param id
- * @param displayName
- */
- public AbstractFaceletTaglibLocator(final String id,
- final String displayName)
- {
- super(id, displayName);
- // new MapMergingCompositionStrategy
- // <IProject, Map<String, IFaceletTagRecord>, Map<String,
- // IFaceletTagRecord>,
- // ILocator<Map<String, IFaceletTagRecord>, IProject, String>>
- // (new HashMap<String, IFaceletTagRecord>(), Collections.EMPTY_MAP)
- }
-
- /**
- * @return a list of all tag libraries known to this locator
- */
- @Override
- protected abstract Map<String, ? extends IFaceletTagRecord> doLocate(
- IProject context);
-
- /**
- * Listener argument must be of type Listener.
- *
- * @see org.eclipse.jst.jsf.common.internal.locator.AbstractLocator#addListener(org.eclipse.jst.jsf.common.internal.locator.ILocatorChangeListener)
- */
- @Override
- public void addListener(final ILocatorChangeListener listener)
- {
- if (!(listener instanceof Listener))
- {
- throw new IllegalArgumentException();
- }
- super.addListener(listener);
- }
-
- /**
- * @param listener
- */
- public void addListener(final Listener listener)
- {
- super.addListener(listener);
- }
-
- /**
- * @param taglibChangedEvent
- */
- protected void fireChangeEvent(final TaglibChangedEvent taglibChangedEvent)
- {
- super.fireChangeEvent(taglibChangedEvent);
- }
-
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/AbstractProjectTaglibDescriptorFactory.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/AbstractProjectTaglibDescriptorFactory.java
deleted file mode 100644
index 47866c0d0..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/AbstractProjectTaglibDescriptorFactory.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib;
-
-import org.eclipse.core.resources.IProject;
-
-/**
- * The base class for all impls of IProjectTaglibDescriptorFactory.
- *
- * @author cbateman
- *
- */
-public abstract class AbstractProjectTaglibDescriptorFactory implements IProjectTaglibDescriptorFactory
-{
-
- public abstract IProjectTaglibDescriptor create(IProject project,
- TagRecordFactory factory);
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/CompositeComponentTaglibLocator.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/CompositeComponentTaglibLocator.java
deleted file mode 100644
index 8cf8ced65..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/CompositeComponentTaglibLocator.java
+++ /dev/null
@@ -1,207 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib;
-
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.jsf.common.internal.locator.ILocatorProvider;
-import org.eclipse.jst.jsf.designtime.internal.resources.IJSFResource;
-import org.eclipse.jst.jsf.designtime.internal.resources.IJSFResourceContainer;
-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.IJSFResourceLocator;
-import org.eclipse.jst.jsf.designtime.internal.resources.JSFResourceChangeListener;
-import org.eclipse.jst.jsf.designtime.internal.resources.JSFResourceContainer;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.JSFResourceBasedTagRecord.Builder;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.Listener.TaglibChangedEvent;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.Listener.TaglibChangedEvent.CHANGE_TYPE;
-
-/**
- * A taglib locator that locates composite components, which a located as a type
- * of JSF locatable resource.
- *
- * @author cbateman
- *
- */
-public class CompositeComponentTaglibLocator extends
- AbstractFaceletTaglibLocator
-{
- private final class ResourceLocatorChangeListener extends
- JSFResourceChangeListener
- {
- @Override
- public void changed(final JSFResourceChangedEvent event)
- {
- final Builder builder = new Builder();
- switch (event.getChangeType())
- {
- case ADDED:
- case CHANGED:
- {
- handleAddAndChange(event, builder);
- }
- break;
- case REMOVED:
- {
- handleRemove(event, builder);
- }
- break;
- }
- }
-
- private void handleRemove(final JSFResourceChangedEvent event,
- final Builder builder)
- {
- List<TaglibChangedEvent> events = Collections.EMPTY_LIST;
- switch (event.getOldValue().getType())
- {
- case RESOURCE:
- {
- events = handleRemoveResource(event, builder);
- }
- break;
- case CONTAINER:
- {
- events = handleRemoveContainer(event, builder);
- }
- break;
- }
-
- _records = builder.merge(events, _records);
- for (final TaglibChangedEvent fireEvent : events)
- {
- fireChangeEvent(fireEvent);
- }
- }
-
- private List<TaglibChangedEvent> handleRemoveContainer(
- final JSFResourceChangedEvent event, final Builder builder)
- {
- final IJSFResourceFragment oldValue = event.getOldValue();
- builder.addLibrary((IJSFResourceContainer) oldValue,
- CHANGE_TYPE.REMOVED);
- return builder.createRemove(CompositeComponentTaglibLocator.this,
- _records);
- }
-
- private List<TaglibChangedEvent> handleRemoveResource(
- final JSFResourceChangedEvent event, final Builder builder)
- {
- final IJSFResourceFragment oldValue = event.getOldValue();
- builder.addTag((IJSFResource) oldValue, CHANGE_TYPE.REMOVED);
- return builder.createRemove(CompositeComponentTaglibLocator.this,
- _records);
- }
-
- private void handleAddAndChange(final JSFResourceChangedEvent event,
- final Builder builder)
- {
- List<TaglibChangedEvent> events = Collections.EMPTY_LIST;
-
- switch (event.getNewValue().getType())
- {
- case CONTAINER:
- // if it's a fragment handle as a possible library add
- events = handleFolderAddChange(event, builder);
- break;
- case RESOURCE:
- // otherwise, handle as a file add.
- events = handleFileAddChange(event, builder);
- break;
- }
-
- _records = builder.merge(events, _records);
-
- for (final TaglibChangedEvent fireEvent : events)
- {
- fireChangeEvent(fireEvent);
- }
- }
-
- private List<TaglibChangedEvent> handleFolderAddChange(
- final JSFResourceChangedEvent event, final Builder builder)
- {
- final JSFResourceContainer newValue = (JSFResourceContainer) event
- .getNewValue();
- builder.addLibrary(newValue, CHANGE_TYPE.ADDED);
- return builder.createMerge(CompositeComponentTaglibLocator.this,
- _records);
- }
-
- private List<TaglibChangedEvent> handleFileAddChange(
- final JSFResourceChangedEvent event, final Builder builder)
- {
- final IJSFResource newValue = (IJSFResource) event.getNewValue();
- builder.addTag(newValue, CHANGE_TYPE.ADDED);
- return builder.createMerge(CompositeComponentTaglibLocator.this,
- _records);
- }
- }
-
- /**
- * the id of the locator strategy.
- */
- public static final String ID = CompositeComponentTaglibLocator.class
- .getCanonicalName();
- private static final String DISPLAY_NAME = "Composite Composite Tag Lib Locator"; //$NON-NLS-1$
- private final ILocatorProvider<IJSFResourceLocator> _locatorProvider;
- private Map<String, JSFResourceBasedTagRecord> _records;
- private final ResourceLocatorChangeListener _listener;
-
- /**
- * @param locatorProvider
- */
- public CompositeComponentTaglibLocator(
- final ILocatorProvider<IJSFResourceLocator> locatorProvider)
- {
- super(ID, DISPLAY_NAME);
- _locatorProvider = locatorProvider;
- _locatorProvider.initialize();
- _listener = new ResourceLocatorChangeListener();
- }
-
- @Override
- public void start(final IProject initialContext)
- {
- for (final IJSFResourceLocator locator : _locatorProvider.getLocators())
- {
- locator.start(initialContext);
- locator.addListener(_listener);
- }
-
- final Builder builder = new Builder();
- for (final IJSFResourceLocator locator : _locatorProvider.getLocators())
- {
- final List<IJSFResourceFragment> resources = locator
- .locate(initialContext);
- for (final IJSFResourceFragment resource : resources)
- {
- if (resource.getType() == Type.RESOURCE)
- {
- builder.addTag((IJSFResource) resource, CHANGE_TYPE.ADDED);
- }
- }
- }
- _records = builder.build();
-
- super.start(initialContext);
- }
-
- @Override
- public void stop()
- {
- for (final IJSFResourceLocator locator : _locatorProvider.getLocators())
- {
- locator.stop();
- }
- super.stop();
- }
-
- @Override
- protected Map<String, ? extends IFaceletTagRecord> doLocate(
- final IProject context)
- {
- return Collections.unmodifiableMap(_records);
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/ContextParamSpecifiedFaceletTaglibLocator.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/ContextParamSpecifiedFaceletTaglibLocator.java
deleted file mode 100644
index 863b16cd7..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/ContextParamSpecifiedFaceletTaglibLocator.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 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:
- * Ian Trimble - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.j2ee.model.IModelProvider;
-import org.eclipse.jst.jsf.common.internal.componentcore.AbstractVirtualComponentQuery;
-import org.eclipse.jst.jsf.common.internal.managedobject.ObjectManager.ManagedObjectException;
-import org.eclipse.jst.jsf.common.internal.resource.WorkspaceMediator;
-import org.eclipse.jst.jsf.facelet.core.internal.FaceletCorePlugin;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.IFaceletTagRecord.WorkspaceTagRecordDescriptor;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.Listener.TaglibChangedEvent;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.Listener.TaglibChangedEvent.CHANGE_TYPE;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib;
-
-/**
- * Attempts to locate Facelet taglib's specified as xml files in project
- * relative paths specified in the Facelet.LIBRARIES servlet parameters.
- *
- * @author Based on class in org.eclipse.jst.jsf.coreby Ian Trimble - Oracle
- *
- * TODO:merge back with common code in JSFAppConfig framework
- */
-public class ContextParamSpecifiedFaceletTaglibLocator extends
- AbstractFaceletTaglibLocator
-{
- private static final String ID = ContextParamSpecifiedFaceletTaglibLocator.class
- .getCanonicalName();
- private static final String DISPLAYNAME = Messages.ContextParamSpecifiedFaceletTaglibLocator_0;
- private final IProject _project;
- private final Map<String, IFaceletTagRecord> _records;
- private final TagRecordFactory _factory;
- private final TaglibResourceManager _fileManager;
-
- /**
- * @param project
- * @param factory
- * @param webAppProvider
- * @param vcQuery
- * @param wsMediator
- */
- public ContextParamSpecifiedFaceletTaglibLocator(final IProject project,
- final TagRecordFactory factory,
- final IModelProvider webAppProvider,
- final AbstractVirtualComponentQuery vcQuery,
- final WorkspaceMediator wsMediator)
- {
- super(ID, DISPLAYNAME);
- _project = project;
- _records = new HashMap<String, IFaceletTagRecord>();
- _factory = factory;
- WebappConfiguration webConfig = new WebappConfiguration(project, webAppProvider,
- vcQuery, wsMediator);
- _fileManager = new TaglibResourceManager(project,
- new LibraryChangeHandler(), wsMediator, webConfig);
- }
-
- /*
- * (non-Javadoc)
- *
- * @seeorg.eclipse.jst.jsf.core.jsfappconfig.AbstractJSFAppConfigLocater#
- * startLocating()
- */
- @Override
- public void start(final IProject project)
- {
- _fileManager.initResources();
- super.start(project);
- }
-
- /*
- * (non-Javadoc)
- *
- * @seeorg.eclipse.jst.jsf.core.jsfappconfig.AbstractJSFAppConfigLocater#
- * stopLocating()
- */
- @Override
- public void stop()
- {
- _fileManager.dispose();
- super.stop();
- }
-
- @Override
- protected Map<String, ? extends IFaceletTagRecord> doLocate(
- final IProject context)
- {
- final List<IFile> files = _fileManager.getResources();
-
- _records.clear();
-
- for (final IFile file : files)
- {
- if (file.exists())
- {
- TaglibFileTracker tracker = null;
- try
- {
- tracker = (TaglibFileTracker) _fileManager.getInstance(file);
- } catch (final ManagedObjectException e)
- {
- FaceletCorePlugin.log("Creating record", e); //$NON-NLS-1$
- }
-
- final IFaceletTagRecord record = createTagRecord(file);
- if (record != null)
- {
- _records.put(record.getURI(), record);
- if (tracker != null)
- {
- tracker.setUri(record.getURI());
- }
- }
- }
- }
-
- return _records;
- }
-
- private IFaceletTagRecord createTagRecord(final IFile file)
- {
- InputStream is = null;
- if (!file.isAccessible())
- {
- return null;
- }
- try
- {
- is = file.getContents();
- final TagModelLoader loader = new TagModelLoader(file.getFullPath()
- .toFile().getCanonicalPath());
- loader.loadFromInputStream(is);
- final FaceletTaglib taglib = loader.getTaglib();
- // if no valid namespace, don't create a record.
- if (taglib != null && taglib.getNamespaceUri() != null && taglib.getNamespaceUri().trim().length()>0)
- {
- return _factory.createRecords(taglib, new WorkspaceTagRecordDescriptor(file));
- }
- } catch (final Exception e)
- {
- FaceletCorePlugin
- .log(
- "Loading web root taglibs for project: " + _project.getName(), e); //$NON-NLS-1$
- } finally
- {
- if (is != null)
- {
- try
- {
- is.close();
- } catch (final IOException e)
- {
- FaceletCorePlugin.log("Closing taglib.xml", e); //$NON-NLS-1$
- }
- }
- }
- return null;
- }
-
- class LibraryChangeHandler implements ILibraryChangeHandler
- {
- public void added(final IFile file)
- {
- final IFaceletTagRecord tagRecord = createTagRecord(file);
- TaglibFileTracker tracker = null;
- try
- {
- tracker = (TaglibFileTracker) _fileManager.getInstance(file);
- } catch (final ManagedObjectException e)
- {
- FaceletCorePlugin.log("Adding new library", e); //$NON-NLS-1$
- }
-
- if (tagRecord != null)
- {
-
- _records.put(tagRecord.getURI(), tagRecord);
- if (tracker != null)
- {
- tracker.setUri(tagRecord.getURI());
- }
-
- fireChangeEvent(new TaglibChangedEvent(
- ContextParamSpecifiedFaceletTaglibLocator.this, null,
- tagRecord, CHANGE_TYPE.ADDED));
- }
- }
-
- public void removed(final String uri, final IFile file)
- {
- final IFaceletTagRecord tagRecord = _records.remove(uri);
- if (tagRecord != null)
- {
- fireChangeEvent(new TaglibChangedEvent(
- ContextParamSpecifiedFaceletTaglibLocator.this, tagRecord,
- null, CHANGE_TYPE.REMOVED));
- }
- }
-
- public void changed(final String uri, final IFile file)
- {
- final IFaceletTagRecord oldValue = _records.remove(uri);
- final IFaceletTagRecord newValue = createTagRecord(file);
-
- if (oldValue == null)
- {
- // no oldValue, is newValue so ADD
- if (newValue != null)
- {
- _records.put(uri, newValue);
- fireChangeEvent(new TaglibChangedEvent(
- ContextParamSpecifiedFaceletTaglibLocator.this, null,
- newValue, CHANGE_TYPE.ADDED));
- }
- }
- // if there is an old value
- else
- {
- // oldValue but no new value, so REMOVE
- if (newValue == null)
- {
- fireChangeEvent(new TaglibChangedEvent(
- ContextParamSpecifiedFaceletTaglibLocator.this, oldValue,
- null, CHANGE_TYPE.REMOVED));
-
- }
- // both old and new value, so a change of some kind
- else
- {
- _records.put(uri, newValue);
- // if the namespaces match, then it's a simple change
- if (oldValue.getURI() != null && oldValue.getURI().equals(newValue.getURI()))
- {
- fireChangeEvent(new TaglibChangedEvent(
- ContextParamSpecifiedFaceletTaglibLocator.this,
- oldValue, newValue, CHANGE_TYPE.CHANGED));
- }
- // otherwise, it's a remove of old value and an add of new value
- else
- {
- fireChangeEvent(new TaglibChangedEvent(
- ContextParamSpecifiedFaceletTaglibLocator.this, oldValue,
- null, CHANGE_TYPE.REMOVED));
- fireChangeEvent(new TaglibChangedEvent(
- ContextParamSpecifiedFaceletTaglibLocator.this, null,
- newValue, CHANGE_TYPE.ADDED));
- }
- }
- }
- }
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/DefaultStandardTaglibLocator.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/DefaultStandardTaglibLocator.java
deleted file mode 100644
index e62b51ca2..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/DefaultStandardTaglibLocator.java
+++ /dev/null
@@ -1,130 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib;
-
-import java.io.File;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.jsf.facelet.core.internal.FaceletCorePlugin;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.IFaceletTagRecord.TagRecordDescriptor;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib;
-
-/**
- * @author cbateman
- *
- */
-public class DefaultStandardTaglibLocator extends AbstractFaceletTaglibLocator
-{
- private static final Set<String> taglibLocations;
- static
- {
- final Set<String> set = new HashSet<String>();
- set.add("/std-taglibs/html_basic.taglib.xml"); //$NON-NLS-1$
- set.add("/std-taglibs/composite.taglib.xml"); //$NON-NLS-1$
- set.add("/std-taglibs/facelets_jsf_core.taglib.xml"); //$NON-NLS-1$
- set.add("/std-taglibs/jstl-core.taglib.xml"); //$NON-NLS-1$
- set.add("/std-taglibs/jstl-fn.taglib.xml"); //$NON-NLS-1$
- set.add("/std-taglibs/ui.taglib.xml"); //$NON-NLS-1$
- taglibLocations = Collections.unmodifiableSet(set);
- }
- private static final Set<MyTagRecordDescriptor> DEFAULT_TAGLIBS;
- static
- {
- Set<MyTagRecordDescriptor> taglibs = new HashSet<MyTagRecordDescriptor>();
- for (final String location : taglibLocations)
- {
- try
- {
- final URL url = FaceletCorePlugin.getDefault().getBundle()
- .getEntry(location);
- final URL fileURL = FileLocator.toFileURL(url);
- File file = new File(fileURL.getPath());
- final InputStream openStream = fileURL.openStream();
- final TagModelLoader loader = new TagModelLoader(
- file.getAbsolutePath());
- loader.loadFromInputStream(openStream);
- final FaceletTaglib taglib = loader.getTaglib();
- MyTagRecordDescriptor desc = new MyTagRecordDescriptor(new Path(fileURL.toString()), taglib);
- taglibs.add(desc);
- } catch (final Exception e)
- {
- FaceletCorePlugin.log(
- "Trying to load default taglib for: " + location, e); //$NON-NLS-1$
- }
- }
- DEFAULT_TAGLIBS = Collections.unmodifiableSet(taglibs);
- }
- private HashMap<String, IFaceletTagRecord> _defaultRecords;
-
- /**
- *
- */
- public DefaultStandardTaglibLocator()
- {
- super("", ""); //$NON-NLS-1$//$NON-NLS-2$
- _defaultRecords = new HashMap<String, IFaceletTagRecord>();
- }
-
- @Override
- public void start(IProject project)
- {
- final TagRecordFactory factory = new TagRecordFactory(project,
- false);
-
- for (final MyTagRecordDescriptor desc : DEFAULT_TAGLIBS)
- {
- final IFaceletTagRecord record = factory.createRecords(desc.getTaglib(),
- desc);
- if (record != null)
- {
- _defaultRecords.put(record.getURI(), record);
- }
- }
- super.start(project);
- }
-
- @Override
- protected Map<String, ? extends IFaceletTagRecord> doLocate(IProject context)
- {
- return Collections.unmodifiableMap(_defaultRecords);
- }
-
- private static class MyTagRecordDescriptor extends TagRecordDescriptor
- {
- private final IPath _path;
- private final FaceletTaglib _taglib;
-
- public MyTagRecordDescriptor(final IPath path, final FaceletTaglib taglib)
- {
- super(Source.JAR);
- _path = path;
- _taglib = taglib;
- }
-
- @Override
- public IResource getResource()
- {
- return null;
- }
-
- @Override
- public IPath getPath()
- {
- return _path;
- }
-
- public FaceletTaglib getTaglib()
- {
- return _taglib;
- }
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/ExtensionBasedTagDescriptorFactoryProviderStrategy.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/ExtensionBasedTagDescriptorFactoryProviderStrategy.java
deleted file mode 100644
index 1c61b9c93..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/ExtensionBasedTagDescriptorFactoryProviderStrategy.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib;
-
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jst.jsf.common.internal.pde.AbstractSimpleClassExtensionRegistryReader;
-import org.eclipse.jst.jsf.common.internal.strategy.ISimpleStrategy;
-import org.eclipse.jst.jsf.core.jsfappconfig.internal.IJSFAppConfigManager;
-import org.eclipse.jst.jsf.facelet.core.internal.FaceletCorePlugin;
-
-/**
- * Extension-based strategy for returning {@link IJSFAppConfigManager}s
- *
- */
-public class ExtensionBasedTagDescriptorFactoryProviderStrategy implements
- ISimpleStrategy<IProject, IProjectTaglibDescriptorFactory>
-{
- private static IProjectTaglibDescriptorFactory EXT_PT_BASED_FACTORY;
- static
- {
- final ProjectTaglibDescriptorFactoryExtensionPointReader reader = new ProjectTaglibDescriptorFactoryExtensionPointReader();
- final List<IProjectTaglibDescriptorFactory> res = reader
- .getExtensions();
- if (res != null && res.size() > 0)
- {// return first
- EXT_PT_BASED_FACTORY = res.get(0);
- }
- }
-
- public IProjectTaglibDescriptorFactory perform(final IProject input)
- throws Exception
- {
- return EXT_PT_BASED_FACTORY != null ? EXT_PT_BASED_FACTORY
- : getNoResult();
- }
-
- private static class ProjectTaglibDescriptorFactoryExtensionPointReader
- extends
- AbstractSimpleClassExtensionRegistryReader<IProjectTaglibDescriptorFactory>
- {
- private static final String EXT_PT_ID = "projectTaglibDescriptorFactory"; //$NON-NLS-1$
- private static final String EXT_PT_ELEMENT = "factory"; //$NON-NLS-1$
- private static final String EXT_PT_ATTR = "class"; //$NON-NLS-1$
-
- protected ProjectTaglibDescriptorFactoryExtensionPointReader()
- {
- super(
- FaceletCorePlugin.PLUGIN_ID,
- EXT_PT_ID,
- EXT_PT_ELEMENT,
- EXT_PT_ATTR,
- new CompareOrgEclipseJstContributorsLastComparator<IProjectTaglibDescriptorFactory>());
- }
-
- @Override
- protected void handleLoadFailure(final CoreException ce)
- {
- org.eclipse.jst.jsf.core.internal.JSFCorePlugin
- .log(ce,
- "Error loading ProjectTaglibDescriptorFactory from extension"); //$NON-NLS-1$
- }
- }
-
- public IProjectTaglibDescriptorFactory getNoResult()
- {
- return null;
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/FaceletTagIndex.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/FaceletTagIndex.java
deleted file mode 100644
index cdef395f4..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/FaceletTagIndex.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.jst.j2ee.model.ModelProviderManager;
-import org.eclipse.jst.jsf.common.internal.componentcore.AbstractVirtualComponentQuery.DefaultVirtualComponentQuery;
-import org.eclipse.jst.jsf.common.internal.finder.AbstractMatcher.AlwaysMatcher;
-import org.eclipse.jst.jsf.common.internal.locator.AbstractLocatorProvider;
-import org.eclipse.jst.jsf.common.internal.locator.AbstractLocatorProvider.DefaultLocatorProvider;
-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.JavaCoreMediator;
-import org.eclipse.jst.jsf.common.internal.resource.ResourceSingletonObjectManager;
-import org.eclipse.jst.jsf.common.internal.resource.WorkspaceMediator;
-import org.eclipse.jst.jsf.common.internal.strategy.AbstractTestableExtensibleDefaultProviderSelectionStrategy;
-import org.eclipse.jst.jsf.common.internal.strategy.ISimpleStrategy;
-import org.eclipse.jst.jsf.designtime.internal.resources.IJSFResourceLocator;
-import org.eclipse.jst.jsf.designtime.internal.resources.JarBasedJSFResourceLocator;
-import org.eclipse.jst.jsf.designtime.internal.resources.WorkspaceJSFResourceLocator;
-
-/**
- * @author cbateman
- *
- */
-public class FaceletTagIndex extends
- ResourceSingletonObjectManager<IProjectTaglibDescriptor, IProject>
-{
- private ISimpleStrategy<IProject, IProjectTaglibDescriptorFactory> _tagDescriptorFactoryProvider;
-
- /**
- * @param ws
- */
- public FaceletTagIndex(final IWorkspace ws)
- {
- super(ws);
- _tagDescriptorFactoryProvider = new ProjectTaglibDescriptorFactoryProviderSelectionStrategy();
- }
-
- /**
- * @param ws
- * @param tagDescriptorFactoryProvider
- */
- public FaceletTagIndex(final IWorkspace ws, final ISimpleStrategy<IProject, IProjectTaglibDescriptorFactory> tagDescriptorFactoryProvider)
- {
- this(ws);
- _tagDescriptorFactoryProvider = tagDescriptorFactoryProvider;
- }
-
- private static FaceletTagIndex INSTANCE;
-
- /**
- * @param ws
- * @return the singleton instance
- */
- public static synchronized FaceletTagIndex getInstance(final IWorkspace ws)
- {
- if (INSTANCE == null)
- {
- INSTANCE = new FaceletTagIndex(ws);
- }
- return INSTANCE;
- }
-
- @Override
- protected IProjectTaglibDescriptor createNewInstance(final IProject project)
- {
- final TagRecordFactory factory = new TagRecordFactory(project, true);
- IProjectTaglibDescriptorFactory descFactory;
- try
- {
- descFactory = _tagDescriptorFactoryProvider
- .perform(project);
- return descFactory.create(project, factory);
- } catch (Exception e)
- {
- return null;
- }
- }
-
- /**
- * Force a project to refresh its tag index info
- *
- * @param project
- */
- public void flush(final IProject project)
- {
- final IProjectTaglibDescriptor flushedDescriptor = unmanageResource(project);
- flushedDescriptor.destroy();
- }
-
- /**
- * Used to decide what provider gets used to get the descriptor factory.
- * This allows us to inject a different descriptor factory than the default
- * through either a test setter (test-only) or production (ext point).
- *
- * @author cbateman
- *
- */
- private static class ProjectTaglibDescriptorFactoryProviderSelectionStrategy
- extends
- AbstractTestableExtensibleDefaultProviderSelectionStrategy<IProject, IProjectTaglibDescriptorFactory>
- {
- private static final IProjectTaglibDescriptorFactory NO_RESULT = null;
-
- public ProjectTaglibDescriptorFactoryProviderSelectionStrategy()
- {
- super();
- addDefaultStrategy(new DefaultProjectTaglibDescriptorFactoryProvider(
- new DefaultProjectTaglibDescriptorFactory()));
- addExtensionStrategy(new ExtensionBasedTagDescriptorFactoryProviderStrategy());
- }
-
- @Override
- public IProjectTaglibDescriptorFactory getNoResult()
- {
- return NO_RESULT;
- }
- }
-
- private static class DefaultProjectTaglibDescriptorFactoryProvider
- implements
- ISimpleStrategy<IProject, IProjectTaglibDescriptorFactory>
- {
- private final DefaultProjectTaglibDescriptorFactory _factory;
-
- public DefaultProjectTaglibDescriptorFactoryProvider(
- final DefaultProjectTaglibDescriptorFactory factory)
- {
- _factory = factory;
- }
-
- public IProjectTaglibDescriptorFactory perform(final IProject input)
- throws Exception
- {
- return _factory;
- }
-
- public IProjectTaglibDescriptorFactory getNoResult()
- {
- return null;
- }
- }
-
- /**
- * The default factory for creating per-project tag descriptors.
- *
- * @author cbateman
- *
- */
- public static class DefaultProjectTaglibDescriptorFactory extends
- AbstractProjectTaglibDescriptorFactory
- {
- @Override
- public IProjectTaglibDescriptor create(final IProject project,
- final TagRecordFactory factory)
- {
- final List<AbstractFaceletTaglibLocator> locators = new ArrayList<AbstractFaceletTaglibLocator>();
- locators.add(new JarFileFaceletTaglibLocator(factory));
- locators.add(new ContextParamSpecifiedFaceletTaglibLocator(project,
- factory, ModelProviderManager.getModelProvider(project),
- new DefaultVirtualComponentQuery(), new WorkspaceMediator()));
- final List<IJSFResourceLocator> resourceLocators = new ArrayList<IJSFResourceLocator>();
- resourceLocators
- .add(new JarBasedJSFResourceLocator(Collections.EMPTY_LIST,
- new CopyOnWriteArrayList<ILocatorChangeListener>(),
- new DefaultJarLocator(Collections
- .singletonList(new AlwaysMatcher()),
- new JavaCoreMediator()),
- new ContentTypeResolver()));
- final IWorkspace workspace = project.getWorkspace();
- resourceLocators.add(new WorkspaceJSFResourceLocator(
- Collections.EMPTY_LIST,
- new CopyOnWriteArrayList<ILocatorChangeListener>(),
- new DefaultVirtualComponentQuery(),
- new ContentTypeResolver(), workspace));
- final DefaultLocatorProvider<IJSFResourceLocator> resourceLocatorProvider = new DefaultLocatorProvider<IJSFResourceLocator>(
- resourceLocators);
- locators.add(new CompositeComponentTaglibLocator(
- resourceLocatorProvider));
- final LocatorProvider provider = new LocatorProvider(locators);
- return new ProjectTaglibDescriptor(project, factory, provider);
- }
- }
-
- /**
- * The locator provider used by the tag index.
- *
- * @author cbateman
- *
- */
- public static class LocatorProvider extends
- AbstractLocatorProvider<AbstractFaceletTaglibLocator>
- {
- private final List<AbstractFaceletTaglibLocator> _locators;
-
- /**
- * @param locators
- */
- public LocatorProvider(final List<AbstractFaceletTaglibLocator> locators)
- {
- _locators = locators;
- }
-
- @Override
- protected void doInitialize()
- {
- // nothing to do
- }
-
- @Override
- protected List<? extends AbstractFaceletTaglibLocator> doGetLocators()
- {
- return Collections.unmodifiableList(_locators);
- }
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/FaceletTagRecord.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/FaceletTagRecord.java
deleted file mode 100644
index 95db97fd4..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/FaceletTagRecord.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib;
-
-import java.util.Collection;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTag;
-
-/**
- * Super of all facelet tag records.
- *
- * @author cbateman
- *
- */
-public abstract class FaceletTagRecord implements IFaceletTagRecord
-{
- private final CopyOnWriteArrayList<ITagRecordChangeListener> _listeners;
- private final TagRecordDescriptor _descriptor;
-
- /**
- * @param descriptor
- *
- */
- public FaceletTagRecord(final TagRecordDescriptor descriptor)
- {
- _listeners = new CopyOnWriteArrayList<ITagRecordChangeListener>();
- _descriptor = descriptor;
- }
-
-
- public TagRecordDescriptor getDescriptor()
- {
- return _descriptor;
- }
-
-
- public void addListener(final ITagRecordChangeListener listener)
- {
- _listeners.addIfAbsent(listener);
- }
-
- public void removeListener(final ITagRecordChangeListener listener)
- {
- _listeners.remove(listener);
- }
-
- /**
- * @param event
- */
- protected void fireEvent(final TagRecordChangeEvent event)
- {
- for (final ITagRecordChangeListener listener : _listeners)
- {
- listener.changed(event);
- }
- }
-
- /**
- *
- */
- private static final long serialVersionUID = -4606745577562951499L;
-
- public abstract String getURI();
-
- public abstract FaceletTaglibTag getTag(final String name);
-
- public abstract Collection<? extends FaceletTaglibTag> getTags();
-
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/IFaceletTagRecord.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/IFaceletTagRecord.java
deleted file mode 100644
index 7de826b4f..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/IFaceletTagRecord.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib;
-
-import java.io.Serializable;
-import java.util.Collection;
-import java.util.EventObject;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTag;
-
-/**
- * @author cbateman
- *
- */
-public interface IFaceletTagRecord extends Serializable
-{
- /**
- * @return the uri of the tag library
- */
- String getURI();
-
- /**
- * This may be implemented differently than getTags().size(), since getting
- * all tags may be very expensive, while the overall number may be cheap.
- *
- * However, it should always be true that getTags().size() == getNumTags()
- *
- * @return the number of tags in this record.
- */
- int getNumTags();
-
- /**
- * @return the tag definitions
- */
- Collection<? extends FaceletTaglibTag> getTags();
-
- /**
- * @param name
- * @return the tag definition for name or null.
- */
- FaceletTaglibTag getTag(final String name);
-
- /**
- * @return the tag record descriptor for the record.
- */
- TagRecordDescriptor getDescriptor();
-
- /**
- * @param listener
- */
- void addListener(final ITagRecordChangeListener listener);
-
- /**
- * @param listener
- */
- void removeListener(final ITagRecordChangeListener listener);
-
- /**
- * Indicates that a tag record has changed
- */
- public static class TagRecordChangeEvent extends EventObject
- {
- /**
- *
- */
- private static final long serialVersionUID = 5655356157624922019L;
-
- /**
- * @param source
- */
- public TagRecordChangeEvent(final IFaceletTagRecord source)
- {
- super(source);
- }
- }
-
- /**
- * A listener for tag record change events.
- *
- */
- public interface ITagRecordChangeListener
- {
- /**
- * @param event
- */
- public void changed(final TagRecordChangeEvent event);
- }
-
- /**
- * Describes the source of a tag record in the filesystem and workspace.
- *
- */
- public abstract static class TagRecordDescriptor
- {
- private final Source _source;
-
- /**
- * @param source
- */
- public TagRecordDescriptor(final Source source)
- {
- super();
- _source = source;
- }
-
- /**
- * @return the source type of the descriptor
- */
- public Source getSource()
- {
- return _source;
- }
-
- /**
- * The source of the tag record
- *
- */
- public enum Source
- {
- /**
- * Tag record is defined in a file in the workspace. If this is the
- * source, then getResource() will never return null and will be of
- * type IFile.
- */
- WORKSPACE_FILE,
- /**
- * Tag record is defined in a folder in the workspace. If this is
- * the source, then getResource() will never return null and will be
- * of type IFolder.
- */
- WORKSPACE_FOLDER,
- /**
- * Tag record is defined in a jar file. If this is the source then
- * getResource() will return an IFile if the jar is in the workspace
- * and null otherwise.
- */
- JAR
- }
-
- /**
- * see Source for information on what this returns.
- *
- * @return the workspace resource where the tag record is defined. or
- * null if it is not in the workspace
- */
- public abstract IResource getResource();
-
- /**
- * @return the absolute path in the file system to the where the library
- * is defined. If Source is WORKSPACE_FOLDER then this will
- * point to a directory.
- *
- * Otherwise, it will point to a file.
- */
- public abstract IPath getPath();
- }
-
- /**
- * Describes a tag record defined in workspace.
- *
- */
- public static class WorkspaceTagRecordDescriptor extends
- TagRecordDescriptor
- {
- private final IResource _resource;
-
- /**
- * @param file
- */
- public WorkspaceTagRecordDescriptor(final IFile file)
- {
- super(Source.WORKSPACE_FILE);
- _resource = file;
- }
-
- /**
- * @param folder
- */
- public WorkspaceTagRecordDescriptor(final IFolder folder)
- {
- super(Source.WORKSPACE_FOLDER);
- _resource = folder;
- }
-
- @Override
- public IResource getResource()
- {
- return _resource;
- }
-
- @Override
- public IPath getPath()
- {
- return _resource.getLocation();
- }
- }
-
- /**
- * Describes a tag record defined in a jar. The additional entryName
- * provides the jar entry where the actual tag record source file is found.
- *
- */
- public static class JarTagRecordDescriptor extends TagRecordDescriptor
- {
- private final IResource _resourceJar;
- private final String _entryName;
- private final IPath _absPath;
-
- /**
- * @param resourceJar
- * @param entryName
- */
- public JarTagRecordDescriptor(final IResource resourceJar,
- final String entryName)
- {
- super(Source.JAR);
- _resourceJar = resourceJar;
- _entryName = entryName;
- _absPath = resourceJar.getLocation();
- }
-
- /**
- * @param absPath
- * @param entryName
- */
- public JarTagRecordDescriptor(final IPath absPath,
- final String entryName)
- {
- super(Source.JAR);
- _resourceJar = null;
- _absPath = absPath;
- _entryName = entryName;
- }
-
- @Override
- public IResource getResource()
- {
- return _resourceJar;
- }
-
- @Override
- public IPath getPath()
- {
- return _absPath;
- }
-
- /**
- * @return the entry name o
- */
- public final String getEntryName()
- {
- return _entryName;
- }
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/IFaceletTaglibLocator.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/IFaceletTaglibLocator.java
deleted file mode 100644
index 6d0f76165..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/IFaceletTaglibLocator.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib;
-
-import java.util.Map;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.jsf.common.internal.locator.ILocator;
-
-/**
- * A locator that returns a name-keyed map of facelet tag records for a particular
- * project.
- *
- * @author cbateman
- *
- */
-public interface IFaceletTaglibLocator extends ILocator<Map<String, ? extends IFaceletTagRecord>, IProject, String>
-{
- /**
- * @param listener
- */
- public abstract void addListener(final Listener listener);
-} \ No newline at end of file
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/ILibraryChangeHandler.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/ILibraryChangeHandler.java
deleted file mode 100644
index 69d51f5b7..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/ILibraryChangeHandler.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib;
-
-import org.eclipse.core.resources.IFile;
-
-/**
- * A callback interface used declare library changes to a client.
- *
- * @author cbateman
- *
- */
-public interface ILibraryChangeHandler
-{
-
- /**
- * Signal that the library defined in file with namespace uri has changed.
- *
- * @param uri
- * @param file
- */
- public abstract void changed(final String uri, final IFile file);
-
- /**
- * Signal that the library defined in file with namespace uri has been
- * removed as a library. This may or may not mean that file still exists.
- * @param uri
- * @param file
- */
- public abstract void removed(final String uri, final IFile file);
-
- /**
- * A new tag library defined in file has been added to the system.
- *
- * @param file
- */
- public abstract void added(final IFile file);
-
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/IProjectTaglibDescriptor.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/IProjectTaglibDescriptor.java
deleted file mode 100644
index effe16c7f..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/IProjectTaglibDescriptor.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib;
-
-import java.util.Collection;
-
-import org.eclipse.jst.jsf.common.internal.managedobject.IManagedObject;
-
-/**
- * A descriptor for all facelet taglibs in a project.
- *
- * @author cbateman
- *
- */
-public interface IProjectTaglibDescriptor extends IManagedObject
-{
- /**
- * @return get the tag library records
- */
- public Collection<? extends IFaceletTagRecord> getTagLibraries();
-
- /**
- * @param uri
- * @return get the tag library for uri
- */
- public IFaceletTagRecord getTagLibrary(final String uri);
-
- /**
- * @param listener
- */
- public void addListener(final Listener listener);
-
- /**
- * @param listener
- */
- public void removeListener(final Listener listener);
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/IProjectTaglibDescriptorFactory.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/IProjectTaglibDescriptorFactory.java
deleted file mode 100644
index 039d9268e..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/IProjectTaglibDescriptorFactory.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib;
-
-import org.eclipse.core.resources.IProject;
-
-/**
- * Implemented by factories that create new IProjectTaglibDescriptor objects.
- *
- * @author cbateman
- *
- */
-public interface IProjectTaglibDescriptorFactory
-{
- /**
- * @param project
- * @param factory
- * @param jarProvider
- * @param webAppProvider
- * @param vcQuery
- * @return a new taglib descriptor.
- */
- IProjectTaglibDescriptor create(final IProject project, final TagRecordFactory factory);
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/JSFResourceBasedTagRecord.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/JSFResourceBasedTagRecord.java
deleted file mode 100644
index a15276e70..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/JSFResourceBasedTagRecord.java
+++ /dev/null
@@ -1,421 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib;
-
-import java.io.File;
-import java.net.URL;
-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 org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.jsf.common.internal.util.JarUtilities;
-import org.eclipse.jst.jsf.designtime.internal.resources.IJSFResource;
-import org.eclipse.jst.jsf.designtime.internal.resources.IJSFResourceContainer;
-import org.eclipse.jst.jsf.designtime.internal.resources.IJSFResourceFragment;
-import org.eclipse.jst.jsf.designtime.internal.resources.IJarBasedJSFResource;
-import org.eclipse.jst.jsf.designtime.internal.resources.IWorkspaceJSFResourceFragment;
-import org.eclipse.jst.jsf.designtime.internal.resources.WorkspaceJSFResourceContainer;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.Listener.TaglibChangedEvent;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.Listener.TaglibChangedEvent.CHANGE_TYPE;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibFactory;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTag;
-
-/**
- * A facelet tag record is derived from a JSF locatable resource (ezcomp).
- *
- * @author cbateman
- *
- */
-public class JSFResourceBasedTagRecord extends FaceletTagRecord
-{
- private final List<FaceletTaglibTag> _tags;
- private final String _uri;
-
- /**
- * @param uri
- * @param tags
- * @param descriptor
- */
- public JSFResourceBasedTagRecord(final String uri,
- final List<FaceletTaglibTag> tags,
- final TagRecordDescriptor descriptor)
- {
- super(descriptor);
- _uri = uri;
- _tags = tags;
- }
-
- /**
- *
- */
- private static final long serialVersionUID = 5944923828112777373L;
-
- public int getNumTags()
- {
- return _tags.size();
- }
-
- @Override
- public String getURI()
- {
- return _uri;
- }
-
- @Override
- public FaceletTaglibTag getTag(final String name)
- {
- for (final FaceletTaglibTag tag : _tags)
- {
- if (tag.getTagName().equals(name))
- {
- return tag;
- }
- }
- return null;
- }
-
- @Override
- public Collection<? extends FaceletTaglibTag> getTags()
- {
- return Collections.unmodifiableCollection(_tags);
- }
-
- /**
- * Merge my tags with 'withThese'. Tags in my list will be replaced with
- * those in 'withThese' if their names match.
- *
- * @param withThese
- */
- /* package */JSFResourceBasedTagRecord mergeTags(
- final List<FaceletTaglibTag> withThese)
- {
- final List<FaceletTaglibTag> tags = new ArrayList<FaceletTaglibTag>(
- _tags);
- for (final FaceletTaglibTag mergeTag : withThese)
- {
- final FaceletTaglibTag tag = getTag(mergeTag.getTagName());
- if (tag != null)
- {
- tags.remove(tag);
- }
- tags.add(mergeTag);
- }
- return new JSFResourceBasedTagRecord(_uri, tags, getDescriptor());
- }
-
- /* package */JSFResourceBasedTagRecord removeTags(
- final List<FaceletTaglibTag> removeThese)
- {
- final List<FaceletTaglibTag> tags = new ArrayList<FaceletTaglibTag>(
- _tags);
- for (final FaceletTaglibTag mergeTag : removeThese)
- {
- final FaceletTaglibTag tag = getTag(mergeTag.getTagName());
- if (tag != null)
- {
- tags.remove(tag);
- }
- }
- return new JSFResourceBasedTagRecord(_uri, tags, getDescriptor());
- }
-
- /**
- * A builder for tag record.
- *
- * @author cbateman
- *
- */
- public static class Builder
- {
- private static final LibEntry WHOLE_LIBRARY = new LibEntry(null);
- private static final JSFResourceBasedTagRecord WHOLE_LIB_RECORD = new JSFResourceBasedTagRecord(null, Collections.EMPTY_LIST, null);
- private final Map<String, LibEntry> _tags = new HashMap<String, LibEntry>();
- private static final String FACELET_FILE_CONTENT_TYPE = "org.eclipse.wst.html.core.htmlsource"; //$NON-NLS-1$
-
- /**
- * @param jsfResource
- * @param changeType
- */
- public void addTag(final IJSFResource jsfResource,
- final CHANGE_TYPE changeType)
- {
- final String libraryName = jsfResource.getId().getLibraryName();
- if (libraryName == null)
- {
- return;
- }
- final String uri = String.format(
- "http://java.sun.com/jsf/composite/%s", libraryName); //$NON-NLS-1$
- LibEntry tags = _tags.get(uri);
- if (tags == null)
- {
- tags = new LibEntry(createDescriptor(jsfResource));
- _tags.put(uri, tags);
- }
- final String resourceName = jsfResource.getId().getResourceName();
- final IPath resourceNamePath = new Path(resourceName)
- .removeFileExtension();
- final FaceletTaglibTag tag = FaceletTaglibFactory.eINSTANCE
- .createFaceletTaglibTag();
- tag.setTagName(resourceNamePath.toString());
- switch (changeType)
- {
- case ADDED:
- case CHANGED:
- // only add to the list on a add/change if the resource
- // exists and is the right type
- if (jsfResource.isAccessible()
- && jsfResource
- .isContentType(FACELET_FILE_CONTENT_TYPE))
- {
- tags.addTag(tag);
- }
- break;
- case REMOVED:
- // add all comers to the remove list. There will only be
- // removal
- // on merge if ADDED/CHANGED path decided they should be
- // there.
- tags.addTag(tag);
- break;
- }
- }
-
- /**
- * @param jsfResource
- * @param changeType
- */
- public void addLibrary(final IJSFResourceContainer jsfResource,
- final CHANGE_TYPE changeType)
- {
- final String libraryName = jsfResource.getId().getLibraryName();
- if (libraryName == null || libraryName.trim().length() == 0)
- {
- return;
- }
- final String uri = String.format(
- "http://java.sun.com/jsf/composite/%s", libraryName); //$NON-NLS-1$
- if (changeType == CHANGE_TYPE.REMOVED)
- {
- _tags.put(uri, WHOLE_LIBRARY);
- } else
- {
- LibEntry tags = _tags.get(uri);
- if (tags == null)
- {
- tags = new LibEntry(createDescriptor(jsfResource));
- _tags.put(uri, tags);
- }
- }
- }
-
- /**
- * @return the built list of tag records.
- */
- public Map<String, JSFResourceBasedTagRecord> build()
- {
- final Map<String, JSFResourceBasedTagRecord> records = new HashMap<String, JSFResourceBasedTagRecord>();
- for (final Map.Entry<String, LibEntry> entry : _tags
- .entrySet())
- {
- if (entry.getValue() == WHOLE_LIBRARY)
- {
- records.put(entry.getKey(), WHOLE_LIB_RECORD);
- }
- else
- {
- final String uri = entry.getKey();
- final List<FaceletTaglibTag> tags = new ArrayList<FaceletTaglibTag>(entry.getValue().getTags());
- final TagRecordDescriptor descriptor = entry.getValue().getDescriptor();
- final JSFResourceBasedTagRecord newRecord = new JSFResourceBasedTagRecord(
- uri, tags, descriptor);
- records.put(entry.getKey(), newRecord);
- }
- }
- return records;
- }
-
- /**
- * @param locator
- * @param records
- * @return a list of taglib change events that reflect what will happen
- * when my tags are merged into the map 'records'.
- */
- public List<TaglibChangedEvent> createMerge(
- final AbstractFaceletTaglibLocator locator,
- final Map<String, JSFResourceBasedTagRecord> records)
- {
- final Map<String, JSFResourceBasedTagRecord> newRecords = build();
- final List<TaglibChangedEvent> mergeEvents = new ArrayList<TaglibChangedEvent>();
- for (final Map.Entry<String, JSFResourceBasedTagRecord> entry : newRecords
- .entrySet())
- {
- TaglibChangedEvent event = null;
- if (!records.containsKey(entry.getKey()))
- {
- event = new TaglibChangedEvent(locator, null,
- entry.getValue(), CHANGE_TYPE.ADDED);
- } else
- {
- final JSFResourceBasedTagRecord oldRecord = records
- .get(entry.getKey());
- final JSFResourceBasedTagRecord newRecord = oldRecord
- .mergeTags(entry.getValue()._tags);
- event = new TaglibChangedEvent(locator, oldRecord,
- newRecord, CHANGE_TYPE.CHANGED);
- }
- mergeEvents.add(event);
- }
- return mergeEvents;
- }
-
- /**
- * @param locator
- * @param records
- * @return a list of change events that will result from removing my
- * _tags from records.
- */
- public List<TaglibChangedEvent> createRemove(
- final AbstractFaceletTaglibLocator locator,
- final Map<String, JSFResourceBasedTagRecord> records)
- {
- final Map<String, JSFResourceBasedTagRecord> newRecords = build();
- final List<TaglibChangedEvent> mergeEvents = new ArrayList<TaglibChangedEvent>();
- for (final Map.Entry<String, JSFResourceBasedTagRecord> entry : newRecords
- .entrySet())
- {
- TaglibChangedEvent event = null;
- final JSFResourceBasedTagRecord oldRecord = records.get(entry
- .getKey());
- if (oldRecord != null)
- {
- final JSFResourceBasedTagRecord record = entry.getValue();
- if (record == WHOLE_LIB_RECORD)
- {
- event = new TaglibChangedEvent(locator, oldRecord,
- null, CHANGE_TYPE.REMOVED);
- } else
- {
- final JSFResourceBasedTagRecord newRecord = oldRecord
- .removeTags(entry.getValue()._tags);
- event = new TaglibChangedEvent(locator, oldRecord,
- newRecord, CHANGE_TYPE.CHANGED);
- }
- }
- if (event != null)
- {
- mergeEvents.add(event);
- }
- }
- return mergeEvents;
- }
-
- /**
- * @param events
- * @param withThese
- * @return a new merged map that contains withThese plus everything
- * here.
- */
- public Map<String, JSFResourceBasedTagRecord> merge(
- final List<TaglibChangedEvent> events,
- final Map<String, JSFResourceBasedTagRecord> withThese)
- {
- final Map<String, JSFResourceBasedTagRecord> newMap = new HashMap<String, JSFResourceBasedTagRecord>(
- withThese);
- for (final TaglibChangedEvent event : events)
- {
- switch (event.getChangeType())
- {
- case ADDED:
- case CHANGED:
- {
- final IFaceletTagRecord newRecord = event.getNewValue();
- // doubles as null check
- if (newRecord instanceof JSFResourceBasedTagRecord)
- {
- newMap.put(newRecord.getURI(),
- (JSFResourceBasedTagRecord) newRecord);
- }
- }
- break;
- case REMOVED:
- {
- final IFaceletTagRecord oldRecord = event.getOldValue();
- if (oldRecord != null)
- {
- newMap.remove(oldRecord.getURI());
- }
- }
- break;
- }
- }
- return newMap;
- }
-
- private TagRecordDescriptor createDescriptor(final IJSFResourceFragment resource)
- {
- if (resource instanceof IWorkspaceJSFResourceFragment)
- {
- if (resource instanceof WorkspaceJSFResourceContainer)
- {
- final IResource res = ((WorkspaceJSFResourceContainer)resource).getResource();
- return new WorkspaceTagRecordDescriptor((IFolder) res);
- }
- final IResource res = ((IWorkspaceJSFResourceFragment) resource)
- .getResource();
- return new WorkspaceTagRecordDescriptor((IFile) res);
- } else if (resource instanceof IJarBasedJSFResource)
- {
- final URL jarURL = ((IJarBasedJSFResource) resource)
- .getJarURL();
- final File file = JarUtilities.INSTANCE.getFile(jarURL);
- if (file != null)
- {
- final String absolutePath = file.getAbsolutePath();
- final String jarEntryName = ((IJarBasedJSFResource) resource)
- .getJarEntryName();
- return new JarTagRecordDescriptor(new Path(absolutePath),
- jarEntryName);
- }
- }
- return null;
- }
-
- private static class LibEntry
- {
- private final TagRecordDescriptor _descriptor;
- private final List<FaceletTaglibTag> _tags;
-
- /**
- * @param descriptor
- */
- public LibEntry(final TagRecordDescriptor descriptor)
- {
- super();
- _descriptor = descriptor;
- _tags = new ArrayList<FaceletTaglibTag>();
- }
-
- public TagRecordDescriptor getDescriptor()
- {
- return _descriptor;
- }
-
- public void addTag(final FaceletTaglibTag tag)
- {
- _tags.add(tag);
- }
-
- public List<FaceletTaglibTag> getTags()
- {
- return Collections.unmodifiableList(_tags);
- }
- }
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/JarFileFaceletTaglibLocator.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/JarFileFaceletTaglibLocator.java
deleted file mode 100644
index 01677e1dc..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/JarFileFaceletTaglibLocator.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib;
-
-import java.io.IOException;
-import java.io.InputStream;
-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.jar.JarEntry;
-import java.util.jar.JarFile;
-import java.util.regex.Pattern;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jst.jsf.common.internal.finder.AbstractMatcher.AlwaysMatcher;
-import org.eclipse.jst.jsf.common.internal.finder.AbstractMatcher.IMatcher;
-import org.eclipse.jst.jsf.common.internal.finder.VisitorMatcher;
-import org.eclipse.jst.jsf.common.internal.finder.acceptor.JarEntryMatchingAcceptor;
-import org.eclipse.jst.jsf.common.internal.finder.matcher.TaglibJarEntryFinder;
-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;
-import org.eclipse.jst.jsf.common.internal.resource.IJarLocator.JarChangeEvent;
-import org.eclipse.jst.jsf.common.internal.resource.IJarLocator.JarChangeListener;
-import org.eclipse.jst.jsf.common.internal.resource.JavaCoreMediator;
-import org.eclipse.jst.jsf.core.internal.JSFCorePlugin;
-import org.eclipse.jst.jsf.facelet.core.internal.FaceletCorePlugin;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.IFaceletTagRecord.JarTagRecordDescriptor;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.Listener.TaglibChangedEvent;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.Listener.TaglibChangedEvent.CHANGE_TYPE;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib;
-
-/**
- * A locator that finds Facelet taglibs in jars on the classpath
- *
- * @author cbateman
- *
- */
-public class JarFileFaceletTaglibLocator extends AbstractFaceletTaglibLocator
-{
- /**
- * Default taglib finder that looks in meta-inf
- */
- public static final TaglibJarEntryFinder _taglibMetaInfFinder = new TaglibJarEntryFinder(
- Pattern.compile("META-INF/.*\\.taglib\\.xml")); //$NON-NLS-1$
- /**
- * Default finder that looks in the glassfish package.
- */
- public static final TaglibJarEntryFinder _taglibGlassfishFinder = new TaglibJarEntryFinder(
- Pattern.compile("com/sun/faces/metadata/taglib/.*\\.taglib\\.xml")); //$NON-NLS-1$
- private static final List<IMatcher> MATCHERS;
- static
- {
- final List<IMatcher> matchers = new ArrayList<IMatcher>();
- matchers.add(_taglibGlassfishFinder);
- matchers.add(_taglibMetaInfFinder);
- MATCHERS = Collections.unmodifiableList(matchers);
- }
- private static final String DISPLAYNAME = Messages.JarFileFaceletTaglibLocator_0;
- private static final String ID = JarFileFaceletTaglibLocator.class
- .getCanonicalName();
- private final TagRecordFactory _factory;
- private final Map<String, IFaceletTagRecord> _records;
- private final IJarLocator _locator;
- private final List<IMatcher> _jarEntryMatchers;
-
- /**
- * @param factory
- */
- public JarFileFaceletTaglibLocator(final TagRecordFactory factory)
- {
- this(factory, new DefaultJarLocator(
- Collections.singletonList(new AlwaysMatcher()),
- new JavaCoreMediator()));
- }
-
- /**
- * @param factory
- * @param jarProvider
- */
- public JarFileFaceletTaglibLocator(final TagRecordFactory factory,
- final IJarLocator jarProvider)
- {
- this(factory, jarProvider, MATCHERS);
- }
-
- /**
- * @param factory
- * @param jarProvider
- * @param jarEntryMatchers
- */
- public JarFileFaceletTaglibLocator(final TagRecordFactory factory,
- final IJarLocator jarProvider, final List<IMatcher> jarEntryMatchers)
- {
- super(ID, DISPLAYNAME);
- _factory = factory;
- _records = new HashMap<String, IFaceletTagRecord>();
- _locator = jarProvider;
- _jarEntryMatchers = jarEntryMatchers;
- }
-
- @Override
- public void start(final IProject project)
- {
- _locator.start(project);
- final List<LibJarEntry> tagLibsFound = new ArrayList<LibJarEntry>();
- final Collection<? extends ClasspathJarFile> jars = _locator
- .getJars(project);
- for (final ClasspathJarFile cpJarFile : jars)
- {
- final JarFile jarFile = cpJarFile.getJarFile();
- if (jarFile != null)
- {
- tagLibsFound.addAll(processJar(cpJarFile, _jarEntryMatchers));
- }
- }
- for (final LibJarEntry jarEntry : tagLibsFound)
- {
- final IFaceletTagRecord record = _factory.createRecords(jarEntry
- .getTaglib(), new JarTagRecordDescriptor(
- jarEntry.getPath(), jarEntry.getEntryName()));
- if (record != null)
- {
- _records.put(record.getURI(), record);
- }
- }
- _locator.addListener(new JarChangeListener()
- {
- @Override
- public void changed(final JarChangeEvent event)
- {
- switch (event.getType())
- {
- case JAR_ADDED:
- {
- final ClasspathJarFile jar = event.getJar();
- final List<LibJarEntry> foundLibs = processJar(jar, _jarEntryMatchers);
- for (final LibJarEntry lib : foundLibs)
- {
- final IFaceletTagRecord newRecord = _factory.createRecords(
- lib.getTaglib(),
- new JarTagRecordDescriptor(lib
- .getPath(), lib
- .getEntryName()));
- _records.put(newRecord.getURI(), newRecord);
- fireChangeEvent(new TaglibChangedEvent(
- JarFileFaceletTaglibLocator.this, null,
- newRecord,
- CHANGE_TYPE.ADDED));
- }
- }
- break;
- case JAR_REMOVED:
- {
- final ClasspathJarFile jar = event.getJar();
- final List<IFaceletTagRecord> removeRecords =
- new ArrayList<IFaceletTagRecord>();
- for (final Map.Entry<String, IFaceletTagRecord> entry : _records
- .entrySet())
- {
- if (entry.getValue().getDescriptor()
- .getPath().equals(jar.getPath()))
- {
- removeRecords.add(entry.getValue());
- }
- }
-
- for (final IFaceletTagRecord removeMe : removeRecords)
- {
- _records.remove(removeMe);
- fireChangeEvent(new TaglibChangedEvent(
- JarFileFaceletTaglibLocator.this,
- removeMe, null,
- CHANGE_TYPE.REMOVED));
- }
- }
- break;
- }
- }
- });
- super.start(project);
- }
-
- @Override
- public void stop()
- {
- _locator.stop();
- super.stop();
- }
-
- @Override
- public Map<String, ? extends IFaceletTagRecord> doLocate(
- final IProject project)
- {
- return Collections.unmodifiableMap(_records);
- }
-
- /**
- * @param entry
- * @param defaultDtdStream
- * @throws Exception
- */
- private static List<LibJarEntry> processJar(final ClasspathJarFile cpJarFile,
- final List<IMatcher> jarEntryMatchers)
- {
- final List<LibJarEntry> tagLibsFound = new ArrayList<LibJarEntry>();
- final JarFile jarFile = cpJarFile.getJarFile();
- try
- {
- if (jarFile != null)
- {
- final JarEntryMatchingAcceptor acceptor = new JarEntryMatchingAcceptor();
- final VisitorMatcher<JarFile, JarEntry, String> matcher = new VisitorMatcher<JarFile, JarEntry, String>(
- "", "", acceptor, jarEntryMatchers); //$NON-NLS-1$//$NON-NLS-2$
- final Collection<? extends JarEntry> matchingEntries = matcher
- .find(jarFile);
- for (final JarEntry jarEntry : matchingEntries)
- {
- InputStream is = null;
- try
- {
- is = jarFile.getInputStream(jarEntry);
- final String name = jarEntry.getName();
- final TagModelLoader loader = new TagModelLoader(name);
- loader.loadFromInputStream(is);
- final FaceletTaglib tagLib = loader.getTaglib();
- if (tagLib != null)
- {
- tagLibsFound.add(new LibJarEntry(tagLib, cpJarFile
- .getPath(), name));
- }
- } catch (final Exception e)
- {
- FaceletCorePlugin.log(
- "Error initializing facelet registry entry", //$NON-NLS-1$
- e);
- } finally
- {
- if (is != null)
- {
- // is.close();
- }
- }
- }
- }
- } catch (final Exception e)
- {
- JSFCorePlugin.log(e,
- "While locating jar based facelet tag libraries"); //$NON-NLS-1$
- } finally
- {
- if (jarFile != null)
- {
- try
- {
- jarFile.close();
- } catch (final IOException ioe)
- {
- FaceletCorePlugin.log("Error closing jar file", ioe); //$NON-NLS-1$
- }
- }
- }
- return tagLibsFound;
- }
-
- private static class LibJarEntry
- {
- private final FaceletTaglib _taglib;
- private final String _entryName;
- private final IPath _iPath;
-
- public LibJarEntry(final FaceletTaglib taglib, final IPath iPath,
- final String entryName)
- {
- super();
- _taglib = taglib;
- _iPath = iPath;
- _entryName = entryName;
- }
-
- public FaceletTaglib getTaglib()
- {
- return _taglib;
- }
-
- public String getEntryName()
- {
- return _entryName;
- }
-
- public IPath getPath()
- {
- return _iPath;
- }
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/LibraryClassBasedTagRecord.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/LibraryClassBasedTagRecord.java
deleted file mode 100644
index 49970178f..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/LibraryClassBasedTagRecord.java
+++ /dev/null
@@ -1,538 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jem.internal.proxy.core.IBeanProxy;
-import org.eclipse.jem.internal.proxy.core.IBeanTypeProxy;
-import org.eclipse.jem.internal.proxy.core.IStringBeanProxy;
-import org.eclipse.jem.internal.proxy.core.ProxyFactoryRegistry;
-import org.eclipse.jst.jsf.core.internal.JSFCorePlugin;
-import org.eclipse.jst.jsf.core.internal.jem.BeanProxyUtil;
-import org.eclipse.jst.jsf.core.internal.jem.BeanProxyUtil.BeanProxyWrapper;
-import org.eclipse.jst.jsf.core.internal.jem.BeanProxyUtil.ProxyException;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTag;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib_1_0.FaceletLibraryClassTagLib;
-
-/**
- * @author cbateman
- *
- */
-/* package */class LibraryClassBasedTagRecord extends FaceletTagRecord
-{
-// private static final String METHOD_NAME_GET_VALUE = "getValue"; //$NON-NLS-1$
-// private static final String METHOD_NAME_GET_KEY = "getKey"; //$NON-NLS-1$
-// private static final String METHOD_NAME_HAS_NEXT = "hasNext"; //$NON-NLS-1$
-// private static final String METHOD_NAME_NEXT = "next"; //$NON-NLS-1$
-// private static final String METHOD_NAME_ITERATOR = "iterator"; //$NON-NLS-1$
-// private static final String METHOD_NAME_ENTRY_SET = "entrySet"; //$NON-NLS-1$
-// private static final String PROPERTY_NAME_FACTORIES = "factories"; //$NON-NLS-1$
-// private static final String QUALIFIED_CLASS_NAME__COM_SUN_FACELETS_TAG_ABSTRACT_TAG_LIBRARY = "com.sun.facelets.tag.AbstractTagLibrary"; //$NON-NLS-1$
-// private static final String QUALIFIED_CLASS_NAME_JAVA_UTIL_MAP = "java.util.Map"; //$NON-NLS-1$
-//
-// private static final String COM_SUN_FACELETS_TAG_ABSTRACT_TAG_LIBRARY$_HANDLER_FACTORY = "com.sun.facelets.tag.AbstractTagLibrary$HandlerFactory"; //$NON-NLS-1$
-// private static final String COM_SUN_FACELETS_TAG_ABSTRACT_TAG_LIBRARY$_USER_CONVERTER_HANDLER_FACTORY = "com.sun.facelets.tag.AbstractTagLibrary$UserConverterHandlerFactory"; //$NON-NLS-1$
-// private static final String COM_SUN_FACELETS_TAG_ABSTRACT_TAG_LIBRARY$_CONVERTER_HANDLER_FACTORY = "com.sun.facelets.tag.AbstractTagLibrary$ConverterHandlerFactory"; //$NON-NLS-1$
-// private static final String COM_SUN_FACELETS_TAG_ABSTRACT_TAG_LIBRARY$_USER_VALIDATOR_HANDLER_FACTORY = "com.sun.facelets.tag.AbstractTagLibrary$UserValidatorHandlerFactory"; //$NON-NLS-1$
-// private static final String COM_SUN_FACELETS_TAG_ABSTRACT_TAG_LIBRARY$_VALIDATOR_HANDLER_FACTORY = "com.sun.facelets.tag.AbstractTagLibrary$ValidatorHandlerFactory"; //$NON-NLS-1$
-// private static final String COM_SUN_FACELETS_TAG_ABSTRACT_TAG_LIBRARY$_USER_COMPONENT_HANDLER_FACTORY = "com.sun.facelets.tag.AbstractTagLibrary$UserComponentHandlerFactory"; //$NON-NLS-1$
-// private static final String COM_SUN_FACELETS_TAG_ABSTRACT_TAG_LIBRARY$_COMPONENT_HANDLER_FACTORY = "com.sun.facelets.tag.AbstractTagLibrary$ComponentHandlerFactory"; //$NON-NLS-1$
-//
-// private static final String FIELD_NAME_CONVERTER_ID = "converterId"; //$NON-NLS-1$
-// private static final String FIELD_NAME_VALIDATOR_ID = "validatorId"; //$NON-NLS-1$
-// private static final String FIELD_NAME_RENDER_TYPE = "renderType"; //$NON-NLS-1$
-// private static final String FIELD_NAME_COMPONENT_TYPE = "componentType"; //$NON-NLS-1$
-
- /**
- *
- */
- private static final long serialVersionUID = 4174629773250721041L;
- private static final String STATIC_MEMBER_NAMESPACE = "Namespace"; //$NON-NLS-1$
- private static final String METHOD_NAME_GET_NAMESPACE = "getNamespace"; //$NON-NLS-1$
-
- private final IProject _project;
- private final FaceletLibraryClassTagLib _model;
- private final ProxyFactoryRegistry _registry;
- private final AtomicBoolean _isInitialized = new AtomicBoolean(
- false);
-
- private String _uri;
- private BeanProxyWrapper _classTypeWrapper;
- private Map<String, FaceletTaglibTag> _tags;
-
- /**
- * @param registry
- * @param model
- * @param project
- * @param descriptor
- */
- public LibraryClassBasedTagRecord(final ProxyFactoryRegistry registry,
- final FaceletLibraryClassTagLib model, final IProject project, TagRecordDescriptor descriptor)
- {
- super(descriptor);
- _registry = registry;
- _model = model;
- _project = project;
- }
-
- public void initURI() throws CoreException
- {
- if (_isInitialized.get())
- {
- throw new CoreException(
- new Status(
- IStatus.ERROR,
- JSFCorePlugin.PLUGIN_ID,
- "Cannot initURI once the library is initialized for: " + _model.getLibraryClass())); //$NON-NLS-1$
- }
-
- final IBeanTypeProxy libFactoryTypeProxy = _registry
- .getBeanTypeProxyFactory().getBeanTypeProxy(
- _model.getLibraryClass());
-
- if (libFactoryTypeProxy == null)
- {
- throw new CoreException(new Status(IStatus.ERROR,
- JSFCorePlugin.PLUGIN_ID,
- "Couldn't find type proxy for " + _model.getLibraryClass())); //$NON-NLS-1$
- }
-
- // TODO: wrap in try per the Glassfish patch
- _classTypeWrapper = new BeanProxyWrapper(_project, libFactoryTypeProxy);
-
- try
- {
- _classTypeWrapper.init();
- }
- catch (final ProxyException e)
- {
- throw new CoreException(new Status(IStatus.ERROR,
- JSFCorePlugin.PLUGIN_ID,
- "Couldn't load class: " + _model.getLibraryClass(), e)); //$NON-NLS-1$
- }
-
- final String namespace = resolveNS(_classTypeWrapper);
- System.out.println(namespace);
-
- if (namespace == null)
- {
- throw new CoreException(new Status(IStatus.ERROR,
- JSFCorePlugin.PLUGIN_ID,
- "Couldn't load uri: " + _model.getLibraryClass())); //$NON-NLS-1$
-
- }
- _uri = namespace;
- }
-
- @Override
- public synchronized FaceletTaglibTag getTag(final String name)
- {
-// initializeIfNecessary();
- return _tags.get(name);
- }
-
- @Override
- public synchronized Collection<? extends FaceletTaglibTag> getTags()
- {
-// initializeIfNecessary();
- return Collections.unmodifiableCollection(_tags.values());
- }
-
-// private void initializeIfNecessary()
-// {
-// if (_isInitialized.compareAndSet(false, true))
-// {
-// if (_tags == null)
-// {
-// _tags = resolveTags();
-// }
-// }
-// }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.FaceletTagRecord
- * #getURI()
- */
- @Override
- public String getURI()
- {
- return _uri;
- }
-
-// private Map<String, FaceletTaglibTag> resolveTags()
-// {
-// final Map<String, FaceletTaglibTag> tags = new HashMap<String, FaceletTaglibTag>();
-//
-// // if the tag factory is a child of AbstractTagFactory, then we
-// // can try to get our hands on its private parts ...
-// final IBeanTypeProxy mapTypeProxy = _registry.getBeanTypeProxyFactory()
-// .getBeanTypeProxy(QUALIFIED_CLASS_NAME_JAVA_UTIL_MAP);
-// final IBeanTypeProxy componentFactoryTypeProxy = _registry
-// .getBeanTypeProxyFactory()
-// .getBeanTypeProxy(
-// QUALIFIED_CLASS_NAME__COM_SUN_FACELETS_TAG_ABSTRACT_TAG_LIBRARY);
-//
-// if (mapTypeProxy != null && componentFactoryTypeProxy != null)
-// {
-// final IFieldProxy fieldProxy = componentFactoryTypeProxy
-// .getDeclaredFieldProxy(PROPERTY_NAME_FACTORIES);
-//
-// if (fieldProxy != null)
-// {
-// if (fieldProxy.getFieldType().isKindOf(mapTypeProxy))
-// {
-// IBeanProxy factories = null;
-//
-// try
-// {
-// // need to turn off security checking on the private
-// // field
-// fieldProxy.setAccessible(true);
-// factories = fieldProxy.get(_classTypeWrapper
-// .getInstance());
-// }
-// catch (final ThrowableProxy e)
-// {
-// FaceletCorePlugin.log(
-// "Error getting factories from bean instance", //$NON-NLS-1$
-// e);
-// }
-//
-// if (factories != null)
-// {
-// final IMethodProxy entrySetMethod = fieldProxy
-// .getFieldType().getMethodProxy(
-// METHOD_NAME_ENTRY_SET);
-// if (entrySetMethod != null)
-// {
-// try
-// {
-// entrySetMethod.setAccessible(true);
-// final IBeanProxy entrySetProxy = entrySetMethod
-// .invoke(factories);
-//
-// if (entrySetProxy != null)
-// {
-// final IMethodProxy iteratorMethod = entrySetProxy
-// .getTypeProxy().getMethodProxy(
-// METHOD_NAME_ITERATOR);
-// iteratorMethod.setAccessible(true);
-// final IBeanProxy iteratorProxy = iteratorMethod
-// .invoke(entrySetProxy);
-//
-// if (iteratorProxy != null)
-// {
-// final IMethodProxy nextMethod = iteratorProxy
-// .getTypeProxy().getMethodProxy(
-// METHOD_NAME_NEXT);
-// nextMethod.setAccessible(true);
-// final IMethodProxy hasNextMethod = iteratorProxy
-// .getTypeProxy().getMethodProxy(
-// METHOD_NAME_HAS_NEXT);
-// hasNextMethod.setAccessible(true);
-//
-// while (((IBooleanBeanProxy) hasNextMethod
-// .invoke(iteratorProxy))
-// .booleanValue())
-// {
-// final IBeanProxy entryProxy = nextMethod
-// .invoke(iteratorProxy);
-// final IMethodProxy getKeyProxy = entryProxy
-// .getTypeProxy()
-// .getMethodProxy(
-// METHOD_NAME_GET_KEY);
-// final IMethodProxy getValueProxy = entryProxy
-// .getTypeProxy()
-// .getMethodProxy(
-// METHOD_NAME_GET_VALUE);
-// if (getKeyProxy != null
-// && getValueProxy != null)
-// {
-// getKeyProxy.setAccessible(true);
-// final IBeanProxy key = getKeyProxy
-// .invoke(entryProxy);
-//
-// if (key instanceof IStringBeanProxy)
-// {
-// final String name = ((IStringBeanProxy) key)
-// .stringValue();
-// getValueProxy
-// .setAccessible(true);
-// final IBeanProxy value = getValueProxy
-// .invoke(entryProxy);
-//
-// if (value != null)
-// {
-// final FaceletTaglibTag tagDefn = createTagDefn(
-// name,
-// value);
-// if (tagDefn != null)
-// {
-// tags.put(name,
-// tagDefn);
-// }
-// }
-// }
-// }
-// }
-// }
-// }
-// }
-// catch (final ThrowableProxy e)
-// {
-// FaceletCorePlugin.log(
-// "Error invoking entrySet", e); //$NON-NLS-1$
-// }
-// }
-// }
-//
-// }
-// }
-// }
-// return tags;
-// }
-
-// private FaceletTaglibTag createTagDefn(final String name,
-// final IBeanProxy handlerValueProxy)
- {
-// final IBeanTypeProxy handlerTypeProxy = handlerValueProxy.getTypeProxy();
-// final FaceletTaglibFactory TAGDEFN_FACTORY = FaceletTaglibFactory.eINSTANCE;
-//
-// final IBeanTypeProxy componentHandlerFactory = _registry
-// .getBeanTypeProxyFactory()
-// .getBeanTypeProxy(
-// COM_SUN_FACELETS_TAG_ABSTRACT_TAG_LIBRARY$_COMPONENT_HANDLER_FACTORY);
-// final IBeanTypeProxy userComponentHandlerFactory = _registry
-// .getBeanTypeProxyFactory()
-// .getBeanTypeProxy(
-// COM_SUN_FACELETS_TAG_ABSTRACT_TAG_LIBRARY$_USER_COMPONENT_HANDLER_FACTORY);
-// final IBeanTypeProxy validatorHandlerFactory = _registry
-// .getBeanTypeProxyFactory()
-// .getBeanTypeProxy(
-// COM_SUN_FACELETS_TAG_ABSTRACT_TAG_LIBRARY$_VALIDATOR_HANDLER_FACTORY);
-// final IBeanTypeProxy userValidatorHandlerFactory = _registry
-// .getBeanTypeProxyFactory()
-// .getBeanTypeProxy(
-// COM_SUN_FACELETS_TAG_ABSTRACT_TAG_LIBRARY$_USER_VALIDATOR_HANDLER_FACTORY);
-// final IBeanTypeProxy converterHandlerFactory = _registry
-// .getBeanTypeProxyFactory()
-// .getBeanTypeProxy(
-// COM_SUN_FACELETS_TAG_ABSTRACT_TAG_LIBRARY$_CONVERTER_HANDLER_FACTORY);
-// final IBeanTypeProxy userConverterHandlerFactory = _registry
-// .getBeanTypeProxyFactory()
-// .getBeanTypeProxy(
-// COM_SUN_FACELETS_TAG_ABSTRACT_TAG_LIBRARY$_USER_CONVERTER_HANDLER_FACTORY);
-// final IBeanTypeProxy handlerFactory = _registry
-// .getBeanTypeProxyFactory()
-// .getBeanTypeProxy(
-// COM_SUN_FACELETS_TAG_ABSTRACT_TAG_LIBRARY$_HANDLER_FACTORY);
-// final IBeanTypeProxy userTagFactory = _registry
-// .getBeanTypeProxyFactory()
-// .getBeanTypeProxy(
-// COM_SUN_FACELETS_TAG_ABSTRACT_TAG_LIBRARY$_HANDLER_FACTORY);
-//
-// FaceletTaglibTag tagDefn = null;
-//
-// if (handlerTypeProxy.isKindOf(componentHandlerFactory)
-// || handlerTypeProxy.isKindOf(userComponentHandlerFactory))
-// {
-// final IFieldProxy componentTypeProxy = handlerTypeProxy
-// .getDeclaredFieldProxy(FIELD_NAME_COMPONENT_TYPE);
-// final IFieldProxy rendererTypeProxy = handlerTypeProxy
-// .getDeclaredFieldProxy(FIELD_NAME_RENDER_TYPE);
-// try
-// {
-// if (componentTypeProxy != null)
-// {
-// componentTypeProxy.setAccessible(true);
-// rendererTypeProxy.setAccessible(true);
-// final IBeanProxy componentType = componentTypeProxy
-// .get(handlerValueProxy);
-// // final IBeanProxy rendererType = rendererTypeProxy
-// // .get(handlerValueProxy);
-//
-// // render type is optional, but must have component type
-// if (componentType instanceof IStringBeanProxy)
-// {
-// final String componentTypeValue = getMeaningfulString(((IStringBeanProxy) componentType)
-// .stringValue());
-//
-// if (componentTypeValue != null)
-// {
-// final ComponentTagDefn compTagDefn = TAGDEFN_FACTORY
-// .createComponentTagDefn();
-// compTagDefn.setComponentType(componentTypeValue);
-// // if (rendererType instanceof IStringBeanProxy)
-// // {
-// // compTagDefn
-// // .setRendererType(getMeaningfulString(((
-// // IStringBeanProxy) rendererType)
-// // .stringValue()));
-// // }
-// tagDefn = compTagDefn;
-// }
-// }
-// }
-// }
-// catch (final ThrowableProxy e)
-// {
-// FaceletCorePlugin.log("Error get component info", e); //$NON-NLS-1$
-// }
-// }
-// else if (handlerTypeProxy.isKindOf(validatorHandlerFactory)
-// || handlerTypeProxy.isKindOf(userValidatorHandlerFactory))
-// {
-// final IFieldProxy validatorIdProxy = handlerTypeProxy
-// .getDeclaredFieldProxy(FIELD_NAME_VALIDATOR_ID);
-//
-// try
-// {
-// if (validatorIdProxy != null)
-// {
-// validatorIdProxy.setAccessible(true);
-// final IBeanProxy validatorId = validatorIdProxy
-// .get(handlerValueProxy);
-//
-// final ValidatorTagDefn valTagDefn = TAGDEFN_FACTORY
-// .createValidatorTagDefn();
-// tagDefn = valTagDefn;
-//
-// if (validatorId instanceof IStringBeanProxy)
-// {
-// final String validatorIdValue = getMeaningfulString(((IStringBeanProxy) validatorId)
-// .stringValue());
-//
-// if (validatorIdValue != null)
-// {
-// valTagDefn.setValidatorId(validatorIdValue);
-// }
-// }
-// }
-// }
-// catch (final ThrowableProxy e)
-// {
-// FaceletCorePlugin.log("Error getting validator info", e); //$NON-NLS-1$
-// }
-// }
-// else if (handlerTypeProxy.isKindOf(converterHandlerFactory)
-// || handlerTypeProxy.isKindOf(userConverterHandlerFactory))
-// {
-// final IFieldProxy converterIdProxy = handlerTypeProxy
-// .getDeclaredFieldProxy(FIELD_NAME_CONVERTER_ID);
-//
-// try
-// {
-// if (converterIdProxy != null)
-// {
-// converterIdProxy.setAccessible(true);
-// final IBeanProxy converterId = converterIdProxy
-// .get(handlerValueProxy);
-//
-// final ConverterTagDefn converterTagDefn = TAGDEFN_FACTORY
-// .createConverterTagDefn();
-// tagDefn = converterTagDefn;
-//
-// if (converterId instanceof IStringBeanProxy)
-// {
-// final String converterIdValue = getMeaningfulString(((IStringBeanProxy) converterId)
-// .stringValue());
-//
-// if (converterIdValue != null)
-// {
-// converterTagDefn.setConverterId(converterIdValue);
-// }
-// }
-// }
-// }
-// catch (final ThrowableProxy e)
-// {
-// FaceletCorePlugin.log("Error getting validator info", e); //$NON-NLS-1$
-// }
-// }
-// else if (handlerTypeProxy.isKindOf(handlerFactory)
-// || handlerTypeProxy.isKindOf(userTagFactory))
-// {
-// tagDefn = TAGDEFN_FACTORY.createHandlerTagDefn();
-// }
-//
-// if (tagDefn != null)
-// {
-// tagDefn.setName(name);
-// }
-// return tagDefn;
- }
-
-// private String getMeaningfulString(final String value)
-// {
-// if (value == null)
-// {
-// return null;
-// }
-//
-// String retValue = value.trim();
-//
-// if ("".equals(retValue)) //$NON-NLS-1$
-// {
-// retValue = null;
-// }
-// return retValue;
-// }
-
- private String resolveNS(final BeanProxyWrapper beanProxy)
- {
- IBeanProxy resultProxy = null;
- try
- {
- resultProxy = beanProxy.call(METHOD_NAME_GET_NAMESPACE);
-
- if (resultProxy instanceof IStringBeanProxy)
- {
- return ((IStringBeanProxy) resultProxy).stringValue();
- }
- }
- catch (final BeanProxyUtil.ProxyException e)
- {
- // fall through
- }
-
- return resolveNSAggressively(beanProxy);
- }
-
- private String resolveNSAggressively(final BeanProxyWrapper beanProxy)
- {
- try
- {
- return beanProxy.getStringFieldValue(STATIC_MEMBER_NAMESPACE);
- }
- catch (final ProxyException e)
- {
- // fall through
- }
- return null;
- }
-
- public synchronized int getNumTags()
- {
-// initializeIfNecessary();
- return _tags.size();
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/Listener.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/Listener.java
deleted file mode 100644
index 07de09aef..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/Listener.java
+++ /dev/null
@@ -1,112 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib;
-
-import org.eclipse.jst.jsf.common.internal.locator.ILocatorChangeListener;
-
-/**
- * A listener for locator detected tag library changes
- * @author cbateman
- *
- */
-public abstract class Listener implements ILocatorChangeListener
-{
- /**
- * Indicates that a tag library has changed
- * @author cbateman
- *
- */
- public static class TaglibChangedEvent extends LocatorChangeEvent
- {
- /**
- * TODO: what happens if one locator has a namespace collision with
- * another one?
- */
- public enum CHANGE_TYPE
- {
- /**
- * Indicates that the library is new
- */
- ADDED,
-
- /**
- * Indicates that the library was removed.
- */
- REMOVED,
-
- /**
- * Indicates that the library is not new, but it's content
- * has changed
- */
- CHANGED
- }
-
- private final TaglibChangedEvent.CHANGE_TYPE _changeType;
- private final IFaceletTagRecord _oldValue;
- private final IFaceletTagRecord _newValue;
-
- /**
- * @param source
- * @param oldValue
- * @param newValue
- * @param changeType
- */
- public TaglibChangedEvent(
- final AbstractFaceletTaglibLocator source,
- final IFaceletTagRecord oldValue,
- final IFaceletTagRecord newValue,
- TaglibChangedEvent.CHANGE_TYPE changeType)
- {
- super(source);
- _changeType = changeType;
- _oldValue = oldValue;
- _newValue = newValue;
- }
-
- /**
- *
- */
- private static final long serialVersionUID = -4060018031568577836L;
-
- @Override
- public AbstractFaceletTaglibLocator getSource()
- {
- return (AbstractFaceletTaglibLocator) super.getSource();
- }
-
- /**
- * @return the type of the change
- */
- public final TaglibChangedEvent.CHANGE_TYPE getChangeType()
- {
- return _changeType;
- }
-
- /**
- * @return the old value. This is null if the event is ADDED
- */
- public final IFaceletTagRecord getOldValue()
- {
- return _oldValue;
- }
-
- /**
- * @return the new value. This is null if the event is REMOVED
- */
- public final IFaceletTagRecord getNewValue()
- {
- return _newValue;
- }
- }
-
-
- public final void changed(final LocatorChangeEvent event)
- {
- changed((TaglibChangedEvent)event);
- }
-
-
- /**
- * @param event
- *
- */
- public abstract void changed(Listener.TaglibChangedEvent event);
-} \ No newline at end of file
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/Messages.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/Messages.java
deleted file mode 100644
index 0ebb73d4a..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/Messages.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Package NLS manager.
- * @author cbateman
- *
- */
-public class Messages extends NLS
-{
- private static final String BUNDLE_NAME = "org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.messages"; //$NON-NLS-1$
- /**
- * see messages.properties.
- */
- public static String ContextParamSpecifiedFaceletTaglibLocator_0;
- /**
- * see messages.properties/
- */
- public static String JarFileFaceletTaglibLocator_0;
- static
- {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages()
- {
- // no external instantiation.
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/ProjectTaglibDescriptor.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/ProjectTaglibDescriptor.java
deleted file mode 100644
index cf9d74d46..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/ProjectTaglibDescriptor.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.jst.jsf.common.internal.locator.ILocatorProvider;
-import org.eclipse.jst.jsf.core.internal.tld.IFaceletConstants;
-import org.eclipse.jst.jsf.facelet.core.internal.FaceletCorePlugin;
-
-/**
- * Taglib descriptor for a project.
- *
- * @author cbateman
- *
- */
-public class ProjectTaglibDescriptor implements IProjectTaglibDescriptor
-{
- private final AtomicInteger _isInitialized = new AtomicInteger(
- 0);
- private final IProject _project;
- private final ILocatorProvider<AbstractFaceletTaglibLocator> _locatorProvider;
- private final MyChangeListener _libChangeListener;
- private final Map<String, IFaceletTagRecord> _tagRecords;
- private final TagRecordFactory _factory;
- private final AtomicBoolean _isDisposed = new AtomicBoolean(false);
- private final DefaultStandardTaglibLocator _defaultTaglibLocator;
-
- /**
- * @param project
- * @param factory
- * @param locatorProvider
- */
- public ProjectTaglibDescriptor(final IProject project, final TagRecordFactory factory,
- final ILocatorProvider<AbstractFaceletTaglibLocator> locatorProvider)
- {
- _project = project;
- _tagRecords = new HashMap<String, IFaceletTagRecord>();
- _locatorProvider = locatorProvider;
- _locatorProvider.initialize();
- _factory = factory;
- _libChangeListener = new MyChangeListener();
- _defaultTaglibLocator = new DefaultStandardTaglibLocator();
- _defaultTaglibLocator.start(project);
- }
-
- private void initialize()
- {
- if (_isInitialized.addAndGet(1) == 1)
- {
- synchronized (this)
- {
- for (final AbstractFaceletTaglibLocator locator : _locatorProvider.getLocators())
- {
- SafeRunner.run(new ISafeRunnable()
- {
- public void handleException(final Throwable exception)
- {
- FaceletCorePlugin
- .log(
- "While locating facelet libraries on project: " + _project.getName(), new Exception(exception)); //$NON-NLS-1$
- }
- public void run() throws Exception
- {
- locator.addListener(_libChangeListener);
- locator.start(_project);
- _tagRecords.putAll(locator.locate(_project));
- }
- });
- }
- // ensure that we add the standard tag libraries if we don't find them
- // on the classpath. The spec doesn't require that taglib's are
- // included in a JSF impl for these
- ensureStandardLibraries(_project);
- }
- }
- }
-
- private void ensureStandardLibraries(final IProject project)
- {
- final Map<String, ? extends IFaceletTagRecord> defaultRecords = _defaultTaglibLocator.locate(project);
- for (final String uri : IFaceletConstants.ALL_FACELET_TAGLIBS)
- {
- if (!_tagRecords.containsKey(uri))
- {
- IFaceletTagRecord faceletTagRecord = defaultRecords.get(uri);
- if (faceletTagRecord != null)
- {
- _tagRecords.put(uri, faceletTagRecord);
- }
- else
- {
- FaceletCorePlugin.log("Could not find taglib for uri: "+uri, new Exception()); //$NON-NLS-1$
- }
- }
- }
- }
-
- public Collection<? extends IFaceletTagRecord> getTagLibraries()
- {
- initialize();
- return Collections.unmodifiableCollection(_tagRecords.values());
- }
-
- void maybeLog(final Exception e)
- {
- if (_isInitialized.get() <= 1)
- {
- FaceletCorePlugin.log("Failed initializing taglib descriptor", e); //$NON-NLS-1$
- }
- }
-
- public IFaceletTagRecord getTagLibrary(final String uri)
- {
- initialize();
- return _tagRecords.get(uri);
- }
-
- public void addListener(final Listener listener)
- {
- for (final AbstractFaceletTaglibLocator locator : _locatorProvider.getLocators())
- {
- locator.addListener(listener);
- }
- }
-
- public void removeListener(final Listener listener)
- {
- for (final AbstractFaceletTaglibLocator locator : _locatorProvider.getLocators())
- {
- locator.removeListener(listener);
- }
- }
-
- public void checkpoint()
- {
- // do nothing
- }
-
- public void destroy()
- {
- // call dispose; there is no persistent data to cleanup.
- dispose();
- }
-
- public void dispose()
- {
- if (_isDisposed.compareAndSet(false, true))
- {
- for (final AbstractFaceletTaglibLocator locator : _locatorProvider.getLocators())
- {
- locator.stop();
- }
- _factory.dispose();
- }
- }
-
- public boolean isDisposed()
- {
- return _isDisposed.get();
- }
-
- private class MyChangeListener extends Listener
- {
- @Override
- public void changed(final TaglibChangedEvent event)
- {
- switch (event.getChangeType())
- {
- case ADDED:
- _tagRecords.put(event.getNewValue().getURI(), event
- .getNewValue());
- break;
- case CHANGED:
- _tagRecords.put(event.getNewValue().getURI(), event
- .getNewValue());
- break;
- case REMOVED:
- _tagRecords.remove(event.getOldValue());
- break;
- }
- }
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/TagModelLoader.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/TagModelLoader.java
deleted file mode 100644
index 2ec287de9..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/TagModelLoader.java
+++ /dev/null
@@ -1,239 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.ContentHandler;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.URIConverter;
-import org.eclipse.emf.ecore.resource.URIHandler;
-import org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.emf.ecore.resource.impl.URIHandlerImpl;
-import org.eclipse.emf.ecore.util.BasicExtendedMetaData;
-import org.eclipse.emf.ecore.util.ExtendedMetaData;
-import org.eclipse.emf.ecore.xmi.XMLResource;
-import org.eclipse.jst.jsf.facelet.core.internal.FaceletCorePlugin;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.DocumentRoot;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibPackage;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.util.FaceletTaglibResourceFactoryImpl;
-import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalog;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.INextCatalog;
-
-/**
- * Loads the facelet taglib file model using EMF.
- *
- * @author cbateman
- *
- */
-public class TagModelLoader
-{
- private final ResourceSetImpl _resSet;
- private final String _resourceUri;
- private DocumentRoot _docRoot;
- private FaceletTaglib _faceletTaglib;
- private final static List<URIHandler> DEFAULT_URI_HANDLERS;
- static
- {
- final List<URIHandler> handlers = new ArrayList<URIHandler>();
- final URIHandler handleFacelet = new DefaultFaceletURIHandler();
- handlers.add(handleFacelet);
- handlers.addAll(URIHandler.DEFAULT_HANDLERS);
- DEFAULT_URI_HANDLERS = handlers;
- }
-
- /**
- * @param resourceUri
- */
- public TagModelLoader(final String resourceUri)
- {
- this(resourceUri, new ExtensibleURIConverterImpl(DEFAULT_URI_HANDLERS,
- ContentHandler.Registry.INSTANCE.contentHandlers()));
- }
-
- /**
- * @param resourceUri
- * @param uriConverter
- */
- public TagModelLoader(final String resourceUri,
- final URIConverter uriConverter)
- {
- _resourceUri = resourceUri;
- _resSet = new ResourceSetImpl();
- _resSet.getPackageRegistry().put("http://java.sun.com/xml/ns/javaee", //$NON-NLS-1$
- FaceletTaglibPackage.eINSTANCE);
- _resSet.getPackageRegistry().put(
- "http://java.sun.com/xml/ns/javaee/web-facelettaglibrary.xsd", //$NON-NLS-1$
- FaceletTaglibPackage.eINSTANCE);
- _resSet.setURIConverter(uriConverter);
- final ExtendedMetaData extendedMetaData = new BasicExtendedMetaData(
- _resSet.getPackageRegistry());
- _resSet.getLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA,
- extendedMetaData);
- _resSet.getResourceFactoryRegistry().getExtensionToFactoryMap()
- .put("xml", new FaceletTaglibResourceFactoryImpl()); //$NON-NLS-1$
- }
-
- /**
- * @param is
- * @throws Exception
- */
- public void loadFromInputStream(final InputStream is) throws Exception
- {
- final Resource res = _resSet.createResource(URI
- .createFileURI(_resourceUri));
- if (res != null)
- {
- res.load(is, Collections.EMPTY_MAP);
- final EObject eObject = res.getContents().get(0);
- _docRoot = (DocumentRoot) eObject;
- _faceletTaglib = _docRoot.getFaceletTaglib();
- } else
- {
- // This is often caused if the extension of the file pointed to
- // by _resourceUri wasn't initialized in extensionToFactoryMap.
- throw new IllegalArgumentException("Could not create Resource"); //$NON-NLS-1$
- }
- }
-
- /**
- * @param os
- * @throws Exception
- */
- public void save(final OutputStream os) throws Exception
- {
- final Resource res = _resSet.createResource(URI
- .createFileURI(_resourceUri));
- if (res != null)
- {
- res.getContents().add(_docRoot);
- res.save(os, Collections.EMPTY_MAP);
- } else
- {
- throw new IllegalArgumentException("Could not create Resource"); //$NON-NLS-1$
- }
- }
-
- /**
- * @param faceletTaglib
- */
- public final void setTaglib(final FaceletTaglib faceletTaglib)
- {
- _faceletTaglib = faceletTaglib;
- }
-
- /**
- * @param docRoot
- */
- public final void setDocRoot(final DocumentRoot docRoot)
- {
- _docRoot = docRoot;
- }
-
- /**
- * @return the taglib or null if none has been loaded.
- */
- public FaceletTaglib getTaglib()
- {
- return _faceletTaglib;
- }
-
- /**
- * @return the doc root or null if none has been loaded.
- */
- public DocumentRoot getDocRoot()
- {
- return _docRoot;
- }
-
- /**
- * Handles facelet taglib dtd resolver requests
- *
- */
- private static final class DefaultFaceletURIHandler extends URIHandlerImpl
- {
- @Override
- public boolean canHandle(final URI uri)
- {
- return "http://java.sun.com/dtd/facelet-taglib_1_0.dtd".equals(uri.toString()); //$NON-NLS-1$
- }
-
- @Override
- public InputStream createInputStream(final URI uri, final Map<?, ?> options)
- throws IOException
- {
- try
- {
- return findFaceletDtdInCatalog();
- } catch (final URISyntaxException e)
- {
- FaceletCorePlugin.log(
- "While trying to load facelet dtd from catalog", e); //$NON-NLS-1$
- // fall through
- }
- return null;
- }
-
- private InputStream findFaceletDtdInCatalog() throws URISyntaxException, IOException
- {
- final ICatalog xmlCatalog = XMLCorePlugin.getDefault()
- .getDefaultXMLCatalog();
- if (xmlCatalog != null)
- {
- ICatalog systemCatalog = null;
- final INextCatalog[] nextCatalogs = xmlCatalog.getNextCatalogs();
- for (final INextCatalog catalog : nextCatalogs)
- {
- final ICatalog referencedCatalog = catalog
- .getReferencedCatalog();
- if (referencedCatalog != null)
- {
- if (XMLCorePlugin.SYSTEM_CATALOG_ID
- .equals(referencedCatalog.getId()))
- {
- systemCatalog = referencedCatalog;
- }
- }
- }
- if (systemCatalog != null)
- {
- ICatalogEntry foundEntry = null;
- for (final ICatalogEntry entry : systemCatalog.getCatalogEntries())
- {
- if ("-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN" //$NON-NLS-1$
- .equals(entry.getKey()))
- {
- foundEntry = entry;
- break;
- }
- }
- if (foundEntry != null)
- {
- final java.net.URI uri = new java.net.URI(foundEntry.getURI());
- URL url = URIUtil.toURL(uri);
- return url.openStream();
-// final String uriString = foundEntry.getURI();
-// if (URIUtil.isFileURI(uriString))
-// {
-// return new File(URIUtil.toFile(uriString));
-// }
- }
- }
- }
- return null;
- }
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/TagModelParser.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/TagModelParser.java
deleted file mode 100644
index bb7c1641c..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/TagModelParser.java
+++ /dev/null
@@ -1,461 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.eclipse.jst.jsf.facelet.core.internal.FaceletCorePlugin;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib_1_0.ComponentTagDefn;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib_1_0.ConverterTagDefn;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib_1_0.FaceletLibraryClassTagLib;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib_1_0.FaceletTaglibDefn;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib_1_0.FaceletTaglibFactory;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib_1_0.FaceletXMLDefnTaglib;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib_1_0.HandlerTagDefn;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib_1_0.SourceTagDefn;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib_1_0.TagDefn;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib_1_0.ValidatorTagDefn;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * A Facelet tag library document parser (dtd 1.0).
- *
- * @author cbateman
- *
- */
-public class TagModelParser
-{
- private static final String FACELET_TAGLIB_DTD_PATH = "/dtd/facelet-taglib_1_0.dtd"; //$NON-NLS-1$
-
-
- private static final String ELEMENT_NAME_VALIDATOR_ID = "validator-id"; //$NON-NLS-1$
- private static final String ELEMENT_NAME_CONVERTER_ID = "converter-id"; //$NON-NLS-1$
- private static final String ELEMENT_NAME_RENDERER_TYPE = "renderer-type"; //$NON-NLS-1$
- private static final String ELEMENT_NAME_COMPONENT_TYPE = "component-type"; //$NON-NLS-1$
- private static final String ELEMENT_NAME_VALIDATOR = "validator"; //$NON-NLS-1$
- private static final String ELEMENT_NAME_CONVERTER = "converter"; //$NON-NLS-1$
- private static final String ELEMENT_NAME_COMPONENT = "component"; //$NON-NLS-1$
- private static final String ELEMENT_NAME_HANDLER_CLASS = "handler-class"; //$NON-NLS-1$
- private static final String ELEMENT_NAME_SOURCE = "source"; //$NON-NLS-1$
- private static final String ELEMENT_NAME_TAG_NAME = "tag-name"; //$NON-NLS-1$
- private static final String ELEMENT_NAME_TAG = "tag"; //$NON-NLS-1$
- private static final String ELEMENT_NAME_NAMESPACE = "namespace"; //$NON-NLS-1$
- private static final String ELEMENT_NAME_LIBRARY_CLASS = "library-class"; //$NON-NLS-1$
- private static final String ELEMENT_NAME_FACELET_TAGLIB = "facelet-taglib"; //$NON-NLS-1$
- private static final String URI_FACELET_TAGLIB_1_0_DTD = "facelet-taglib_1_0.dtd"; //$NON-NLS-1$
- private static final String PUBLIC_DTD_FACELET_TAGLIB_1_0_DTD = "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"; //$NON-NLS-1$
-
- /**
- * @param is
- * @param dtdSourcePath
- * @return the taglib definition or null
- * @throws IOException
- * @throws ParserConfigurationException
- * @throws SAXException
- */
- public static FaceletTaglibDefn loadFromInputStream(final InputStream is, final String dtdSourcePath) throws IOException, ParserConfigurationException, SAXException
- {
- final byte[] buffer = getBufferForEntry(is);
- final InputStream dtdSource = getDefaultDTDSource(dtdSourcePath != null ? dtdSourcePath : FACELET_TAGLIB_DTD_PATH);
- final FaceletTaglibDefn taglib = loadFromBuffer(buffer, dtdSource);
- return taglib;
-
- }
- /**
- * @param buffer
- * @param defaultDtdStream
- * @return the tag library definition (loaded EMF model) for the buffer
- * @throws IOException
- * @throws ParserConfigurationException
- * @throws SAXException
- */
- public static FaceletTaglibDefn loadFromBuffer(final byte[] buffer,
- final InputStream defaultDtdStream) throws IOException,
- ParserConfigurationException, SAXException
- {
- final InputSource inputSource = new InputSource(
- new ByteArrayInputStream(buffer));
-
- final Document doc = TagModelParser.getDefaultTaglibDocument(
- inputSource, new InputSource(defaultDtdStream));
- final FaceletTaglibDefn tagLib = TagModelParser.processDocument(doc);
- return tagLib;
- }
-
- /**
- * @param path
- * @return the input stream for the default bundle Facelet dtd.
- * @throws IOException
- */
- protected static InputStream getDefaultDTDSource(final String path) throws IOException
- {
- final URL url = FaceletCorePlugin.getDefault().getBundle().getEntry(path);
-
- if (url != null)
- {
- return url.openStream();
- }
- return null;
- }
-
- /**
- * @param is must be open. Caller is responsible for closing.
- * @return load the stream into a byte buffer.
- */
- protected static byte[] getBufferForEntry(final InputStream is)
- {
- final ByteArrayOutputStream stream = new ByteArrayOutputStream();
- final byte[] buffer = new byte[2048];
-
- int bytesRead = 0;
-
- try
- {
- while (((bytesRead = is.read(buffer))) != -1)
- {
- stream.write(buffer, 0, bytesRead);
- }
- }
- catch (final IOException e)
- {
- FaceletCorePlugin.log("Error loading buffer", e); //$NON-NLS-1$
- return null;
- }
-
- return stream.toByteArray();
- }
-
- /**
- * @param taglibFile
- * @param defaultDTDSource
- * @return the default taglib dom Document
- * @throws IOException
- * @throws ParserConfigurationException
- * @throws SAXException
- */
- public static Document getDefaultTaglibDocument(
- final InputSource taglibFile, final InputSource defaultDTDSource)
- throws IOException, ParserConfigurationException, SAXException
- {
- final DocumentBuilderFactory factory = DocumentBuilderFactory
- .newInstance();
- factory.setValidating(false);
- factory.setIgnoringComments(true);
-
- final DocumentBuilder builder = factory.newDocumentBuilder();
-
- final DefaultHandler handler = new DefaultHandler()
- {
- @Override
- public InputSource resolveEntity(final String publicId,
- final String systemId) throws IOException, SAXException
- {
- if (PUBLIC_DTD_FACELET_TAGLIB_1_0_DTD.equals(publicId)
- || (systemId != null && systemId
- .endsWith(URI_FACELET_TAGLIB_1_0_DTD)))
-
- {
- return defaultDTDSource;
- }
- return super.resolveEntity(publicId, systemId);
- }
- };
-
- builder.setEntityResolver(handler);
- return builder.parse(taglibFile);
- }
-
- /**
- * @param doc
- * @return the facelet tag library or null
- */
- public static FaceletTaglibDefn processDocument(final Document doc)
- {
- Node curNode = null;
-
- for (int i = 0; i < doc.getChildNodes().getLength(); i++)
- {
- curNode = doc.getChildNodes().item(i);
-
- if (curNode.getNodeType() == Node.ELEMENT_NODE
- && ELEMENT_NAME_FACELET_TAGLIB
- .equals(curNode.getNodeName()))
- {
- break;
- }
- }
-
- if (curNode == null)
- {
- throw new IllegalArgumentException(
- "Couldn't find facelet-taglib node"); //$NON-NLS-1$
- }
-
- for (int i = 0; i < curNode.getChildNodes().getLength(); i++)
- {
- final Node node = curNode.getChildNodes().item(i);
-
- if (node.getNodeType() == Node.ELEMENT_NODE)
- {
- if (ELEMENT_NAME_LIBRARY_CLASS.equals(node.getNodeName()))
- {
- final FaceletLibraryClassTagLib faceletLibraryClassTagLib = FaceletTaglibFactory.eINSTANCE
- .createFaceletLibraryClassTagLib();
- faceletLibraryClassTagLib.setLibraryClass(node
- .getTextContent().trim());
- return faceletLibraryClassTagLib;
- }
- return processFaceletTaglibWithTags(curNode);
- }
- }
-
- return null;
- }
-
- private static FaceletXMLDefnTaglib processFaceletTaglibWithTags(
- final Node node)
- {
- String namespace = null;
- final List<Node> tagNodes = new ArrayList<Node>();
-
- for (int i = 0; i < node.getChildNodes().getLength(); i++)
- {
- final Node childNode = node.getChildNodes().item(i);
-
- if (childNode.getNodeType() == Node.ELEMENT_NODE)
- {
- if (ELEMENT_NAME_NAMESPACE.equals(childNode.getNodeName()))
- {
- namespace = childNode.getTextContent();
- }
- else if (ELEMENT_NAME_TAG.equals(childNode.getNodeName()))
- {
- tagNodes.add(childNode);
- }
- }
- }
-
- if (namespace != null)
- {
- final FaceletXMLDefnTaglib xmlDefnTaglib = FaceletTaglibFactory.eINSTANCE
- .createFaceletXMLDefnTaglib();
- xmlDefnTaglib.setNamespace(namespace);
-
- for (final Node tagNode : tagNodes)
- {
- final TagDefn tag = createTagFromNode(namespace, tagNode);
-
- if (tag != null)
- {
- xmlDefnTaglib.getTags().add(tag);
- }
- }
-
- return xmlDefnTaglib;
- }
- return null;
- }
-
- private static TagDefn createTagFromNode(final String namespace,
- final Node tagNode)
- {
- final Map<String, Node> children = indexChildren(tagNode);
-
- Node node = children.get(ELEMENT_NAME_TAG_NAME);
-
- if (node != null)
- {
- final String name = safeGetTextContext(node);
-
- if (name == null)
- {
- return null;
- }
-
- node = children.get(ELEMENT_NAME_HANDLER_CLASS);
-
- if (node != null)
- {
- final HandlerTagDefn handlerTag = FaceletTaglibFactory.eINSTANCE
- .createHandlerTagDefn();
- handlerTag.setHandlerClass(safeGetTextContext(node));
- handlerTag.setName(name);
- return handlerTag;
- }
-
- node = children.get(ELEMENT_NAME_SOURCE);
-
- if (node != null)
- {
- final SourceTagDefn sourceTag = FaceletTaglibFactory.eINSTANCE
- .createSourceTagDefn();
- sourceTag.setSource(safeGetTextContext(node));
- sourceTag.setName(name);
- return sourceTag;
- }
-
- node = children.get(ELEMENT_NAME_COMPONENT);
-
- if (node != null)
- {
- return createTagWithComponentType(namespace, name, node);
- }
-
- node = children.get(ELEMENT_NAME_CONVERTER);
-
- if (node != null)
- {
- return createTagWithConverter(namespace, name, node);
- }
-
- node = children.get(ELEMENT_NAME_VALIDATOR);
-
- if (node != null)
- {
- return createValidatorTag(namespace, name, node);
- }
- }
-
- return null;
- }
-
- private static ComponentTagDefn createTagWithComponentType(
- final String uri, final String tagName, final Node paramNode)
- {
- final Map<String, Node> componentChildren = indexChildren(paramNode);
- Node node = componentChildren.get(ELEMENT_NAME_COMPONENT_TYPE);
-
- if (node != null)
- {
- final String componentType = safeGetTextContext(node);
- String rendererType = null;
- String handlerClass = null;
-
- node = componentChildren.get(ELEMENT_NAME_RENDERER_TYPE);
- if (node != null)
- {
- rendererType = safeGetTextContext(node);
- }
-
- node = componentChildren.get(ELEMENT_NAME_HANDLER_CLASS);
- if (node != null)
- {
- handlerClass = safeGetTextContext(node);
- }
-
- final ComponentTagDefn componentTag = FaceletTaglibFactory.eINSTANCE
- .createComponentTagDefn();
- componentTag.setName(tagName);
- componentTag.setComponentType(componentType);
- componentTag.setHandlerClass(handlerClass);
- componentTag.setRendererType(rendererType);
- return componentTag;
- }
- return null;
- }
-
- private static ConverterTagDefn createTagWithConverter(final String uri,
- final String tagName, final Node paramNode)
- {
- final Map<String, Node> converterChildren = indexChildren(paramNode);
- Node node = converterChildren.get(ELEMENT_NAME_CONVERTER_ID);
-
- if (node != null)
- {
- final String converterId = safeGetTextContext(node);
- String handlerClass = null;
-
- node = converterChildren.get(ELEMENT_NAME_HANDLER_CLASS);
- if (node != null)
- {
- handlerClass = safeGetTextContext(node);
- }
-
- final ConverterTagDefn converterTag = FaceletTaglibFactory.eINSTANCE
- .createConverterTagDefn();
- converterTag.setName(tagName);
- converterTag.setConverterId(converterId);
- converterTag.setHandlerClass(handlerClass);
- return converterTag;
- }
- return null;
- }
-
- private static ValidatorTagDefn createValidatorTag(final String uri,
- final String tagName, final Node paramNode)
- {
- final Map<String, Node> converterChildren = indexChildren(paramNode);
- Node node = converterChildren.get(ELEMENT_NAME_VALIDATOR_ID);
-
- if (node != null)
- {
- final String validatorId = safeGetTextContext(node);
- String handlerClass = null;
-
- node = converterChildren.get(ELEMENT_NAME_HANDLER_CLASS);
- if (node != null)
- {
- handlerClass = safeGetTextContext(node);
- }
-
- final ValidatorTagDefn validatorTag = FaceletTaglibFactory.eINSTANCE
- .createValidatorTagDefn();
- validatorTag.setName(tagName);
- validatorTag.setHandlerClass(handlerClass);
- validatorTag.setValidatorId(validatorId);
- return validatorTag;
- }
- return null;
- }
-
- private static Map<String, Node> indexChildren(final Node node)
- {
- final Map<String, Node> children = new HashMap<String, Node>();
- final NodeList nodeList = node.getChildNodes();
-
- for (int i = 0; i < nodeList.getLength(); i++)
- {
- final Node childNode = nodeList.item(i);
-
- if (childNode.getNodeType() == Node.ELEMENT_NODE)
- {
- children.put(childNode.getNodeName(), childNode);
- }
- }
-
- return children;
- }
-
- private static String safeGetTextContext(final Node node)
- {
- String textContent = node.getTextContent();
- if (textContent == null)
- {
- return null;
- }
-
- textContent = textContent.trim();
-
- if ("".equals(textContent)) //$NON-NLS-1$
- {
- return null;
- }
-
- return textContent;
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/TagRecordFactory.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/TagRecordFactory.java
deleted file mode 100644
index ef06cecbe..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/TagRecordFactory.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.jem.internal.proxy.core.ICallbackRegistry;
-import org.eclipse.jem.internal.proxy.core.IConfigurationContributor;
-import org.eclipse.jem.internal.proxy.core.ProxyFactoryRegistry;
-import org.eclipse.jem.internal.proxy.ide.IDERegistration;
-import org.eclipse.jst.jsf.core.JSFVersion;
-import org.eclipse.jst.jsf.facelet.core.internal.FaceletCorePlugin;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.ELProxyContributor;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.ServletBeanProxyContributor;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.IFaceletTagRecord.TagRecordDescriptor;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib_1_0.FaceletLibraryClassTagLib;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib_1_0.FaceletXMLDefnTaglib;
-
-/**
- * Creates new tag records for a project.
- *
- */
-public class TagRecordFactory
-{
- private final ProxyFactoryRegistry _registry;
- private final IProject _project;
-
- /**
- * @param project
- * @param useJEMProxy TODO
- */
- public TagRecordFactory(final IProject project, boolean useJEMProxy)
- {
- _project = project;
- ProxyFactoryRegistry registry = NULL_REGISTRY;
- if (useJEMProxy)
- {
- try
- {
- registry = createProxyRegistry(_project);
- } catch (final Exception e)
- {
- FaceletCorePlugin.log("While creatinng proxy", e); //$NON-NLS-1$
- }
-
- }
- _registry = registry;
- }
-
- /**
- * @param taglibDefn
- * @param descriptor
- * @return the new tag record
- */
- public IFaceletTagRecord createRecords(final FaceletTaglib taglibDefn, final TagRecordDescriptor descriptor)
- {
- IFaceletTagRecord retValue = null;
-
- if (taglibDefn instanceof FaceletLibraryClassTagLib)
- {
- if (_registry != NULL_REGISTRY)
- {
- final LibraryClassBasedTagRecord record = new LibraryClassBasedTagRecord(
- _registry, (FaceletLibraryClassTagLib) taglibDefn,
- _project, descriptor);
- try
- {
- record.initURI();
- retValue = record;
- } catch (CoreException e)
- {
- FaceletCorePlugin
- .log("While creating record: " + record, e); //$NON-NLS-1$
- }
- }
- } else if (taglibDefn instanceof FaceletXMLDefnTaglib)
- {
- throw new UnsupportedOperationException();
- // final XMLBasedTagRecord record = new XMLBasedTagRecord(
- // (FaceletXMLDefnTaglib) taglibDefn);
- // retValue = record;
- } else
- {
- final XMLBasedTagRecord record = new XMLBasedTagRecord(taglibDefn, descriptor);
- retValue = record;
- }
- return retValue;
- }
-
- /**
- * Dispose the registry.
- */
- public void dispose()
- {
- if (_registry != null && _registry != NULL_REGISTRY)
- {
- SafeRunner.run(new ISafeRunnable()
- {
-
- public void run() throws Exception
- {
- _registry.terminateRegistry(false);
- }
-
- public void handleException(Throwable e)
- {
- FaceletCorePlugin.log("While creatinng proxy", e); //$NON-NLS-1$
- }
- });
- }
- }
-
- private static ProxyFactoryRegistry createProxyRegistry(
- final IProject project) throws CoreException
- {
- final IConfigurationContributor[] contributor = new IConfigurationContributor[]
- { new ServletBeanProxyContributor(JSFVersion.V1_1),
- new ELProxyContributor(project) };
-
- return IDERegistration.startAnImplementation(contributor, false,
- project, project.getName(), FaceletCorePlugin.PLUGIN_ID,
- new NullProgressMonitor());
- }
-
- private final static NullProxyFactoryRegistry NULL_REGISTRY = new NullProxyFactoryRegistry();
-
- private static class NullProxyFactoryRegistry extends ProxyFactoryRegistry
- {
-
- @Override
- public ICallbackRegistry getCallbackRegistry()
- {
- throw new UnsupportedOperationException("This is null proxy"); //$NON-NLS-1$
- }
-
- @Override
- protected void registryTerminated(final boolean wait)
- {
- throw new UnsupportedOperationException("This is null proxy"); //$NON-NLS-1$
- }
- }
-} \ No newline at end of file
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/TaglibFileTracker.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/TaglibFileTracker.java
deleted file mode 100644
index cc435e2c5..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/TaglibFileTracker.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jst.jsf.common.internal.resource.ResourceLifecycleEvent.ReasonType;
-import org.eclipse.jst.jsf.common.internal.resource.ResourceTracker;
-
-class TaglibFileTracker extends ResourceTracker<IFile>
-{
- private String _uri;
- private TaglibResourceManager _manager;
- private final ILibraryChangeHandler _handler;
-
- public TaglibFileTracker(final IFile file, final TaglibResourceManager manager,
- final ILibraryChangeHandler handler)
- {
- super(file);
- _manager = manager;
- _manager.addListener(this);
- _handler = handler;
- }
-
- public String getUri()
- {
- return _uri;
- }
-
- public final void setUri(final String uri)
- {
- _uri = uri;
- }
-
- @Override
- public void dispose()
- {
- _manager.removeListener(this);
- _manager = null;
- }
-
- @Override
- protected void fireResourceInAccessible(final IResource resource, final ReasonType reasonType)
- {
- // removed resources kick a remove event
- _handler.removed(_uri, getResource());
- }
-
- @Override
- protected void fireResourceChanged(final IResource resource, final ReasonType reasonType)
- {
- // changed resources kick a change event
- _handler.changed(_uri, getResource());
- }
-
- @Override
- protected void fireResourceAdded(final IResource affectedResource, final ReasonType reasonType)
- {
- // added resources kick an add event.
- _handler.added(getResource());
- }
-} \ No newline at end of file
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/TaglibResourceManager.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/TaglibResourceManager.java
deleted file mode 100644
index ce7cce0a5..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/TaglibResourceManager.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib;
-
-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.jst.jsf.common.internal.resource.ResourceManager;
-import org.eclipse.jst.jsf.common.internal.resource.ResourceTracker;
-import org.eclipse.jst.jsf.common.internal.resource.WorkspaceMediator;
-import org.eclipse.jst.jsf.facelet.core.internal.FaceletCorePlugin;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.WebappConfiguration.WebappListener;
-
-class TaglibResourceManager extends ResourceManager<IFile>
-{
- private ILibraryChangeHandler _handler;
- private final WebappConfiguration _webAppConfiguration;
-
- public TaglibResourceManager(final IProject project,
- final ILibraryChangeHandler handler,
- final WorkspaceMediator wsMediator,
- final WebappConfiguration webAppConfiguration)
- {
- super(project.getWorkspace());
- _handler = handler;
- _webAppConfiguration = webAppConfiguration;
- }
-
- @Override
- public List<IFile> getResources()
- {
- return _webAppConfiguration.getFiles();
- }
-
- @Override
- public void initResources()
- {
- _webAppConfiguration.start();
- _webAppConfiguration.addListener(new WebappListener()
- {
- @Override
- public void webappChanged(final WebappChangeEvent event)
- {
- for (final IFile file : event.getRemoved())
- {
- TaglibFileTracker tracker;
- // only fire removals on files that we are already managing: you can't remove
- // a file that is not there.
- if (isInstance(file))
- {
- tracker = (TaglibFileTracker) unmanageResource(file);
- _handler.removed(tracker.getUri(), file);
- }
- }
-
- for (final IFile file : event.getAdded())
- {
- _handler.added(file);
- }
- }
- });
- List<IFile> files = _webAppConfiguration.getFiles();
- for (final IFile file : files)
- {
- // add files to ensure we get add events for ones that don't exist.
- try
- {
- getInstance(file);
- } catch (ManagedObjectException e)
- {
- FaceletCorePlugin.log("While starting the taglib resource manager", e); //$NON-NLS-1$
- }
- }
- }
-
- @Override
- protected ResourceTracker createNewInstance(final IResource resource)
- {
- if (resource.getType() == IResource.FILE)
- {
- return new TaglibFileTracker((IFile) resource, this, _handler);
- }
- throw new IllegalArgumentException();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.jst.jsf.common.internal.resource.ResourceSingletonObjectManager
- * #dispose()
- */
- @Override
- public void dispose()
- {
- _webAppConfiguration.dispose();
- super.dispose();
- }
-} \ No newline at end of file
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/WebappConfiguration.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/WebappConfiguration.java
deleted file mode 100644
index e0117c8e7..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/WebappConfiguration.java
+++ /dev/null
@@ -1,400 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.StringTokenizer;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.j2ee.model.IModelProvider;
-import org.eclipse.jst.javaee.web.IWebCommon;
-import org.eclipse.jst.jsf.common.internal.componentcore.AbstractVirtualComponentQuery;
-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.WorkspaceMediator;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.WebappConfiguration.WebappListener.WebappChangeEvent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFile;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
-
-/**
- * Manages the web.xml elements of interest to Facelet tag libraries
- *
- * @author cbateman
- *
- */
-public class WebappConfiguration
-{
- /**
- * The param key for Facelet 1.x libraries declared in web.xml
- */
- public static final String FACELET_10_LIBRARIES_CONTEXT_PARAM_NAME = "facelets.LIBRARIES"; //$NON-NLS-1$
- /**
- * The param key for Facelet 2.0 libraries declared in web.xml
- */
- public static final String JSF20_FACELET_LIBRARIES_CONTEXT_PARAM_NAME = "javax.faces.FACELETS_LIBRARIES"; //$NON-NLS-1$
- private final IProject _project;
- /**
- * Cached instance of ContextParamAdapter.
- */
- private final ContextParamAdapter _contextParamAdapter;
- private List<IFile> _cachedFiles;
- private final IModelProvider _modelProvider;
- private final AbstractVirtualComponentQuery _vcQuery;
- private final LifecycleListener _lifecycleListener;
- private final WorkspaceMediator _wsMediator;
-
- /**
- * @param project
- * @param modelProvider
- * @param vcQuery
- * @param wsMediator
- */
- public WebappConfiguration(final IProject project,
- final IModelProvider modelProvider,
- final AbstractVirtualComponentQuery vcQuery,
- final WorkspaceMediator wsMediator)
- {
- _project = project;
- _vcQuery = vcQuery;
- _lifecycleListener = new LifecycleListener(getWebXmlFile(project),
- project.getWorkspace());
- _contextParamAdapter = new ContextParamAdapter();
- _modelProvider = modelProvider;
- _wsMediator = wsMediator;
- }
-
- /**
- * @param listener
- */
- public void addListener(final WebappListener listener)
- {
- _contextParamAdapter.addListener(listener);
- }
-
- /**
- * @param listener
- */
- public void removeListener(final WebappListener listener)
- {
- _contextParamAdapter.removeListener(listener);
- }
-
- /**
- * @return the list of IFile's
- */
- public List<IFile> getFiles()
- {
- final IVirtualFolder folder = _vcQuery.getWebContentFolder(_project);
-
- if (folder == null)
- {
- return Collections.emptyList();
- }
-
- final List<String> filenames = getConfigFilesFromContextParam(_project,
- _modelProvider);
- final List<IFile> files = new ArrayList<IFile>();
-
- for (final String filename : filenames)
- {
- final IVirtualFile vfile = folder.getFile(new Path(filename));
- if (vfile != null)
- {
- files.add(vfile.getUnderlyingFile());
- }
- }
- _cachedFiles = files;
- return Collections.unmodifiableList(_cachedFiles);
- }
-
- private IFile getWebXmlFile(final IProject project)
- {
- final IVirtualFolder webContentFolder = _vcQuery
- .getWebContentFolder(project);
- final IContainer folder = webContentFolder.getUnderlyingFolder();
- return folder.getFile(new Path("WEB-INF/web.xml")); //$NON-NLS-1$
- }
-
- /**
- *
- */
- public void start()
- {
- _lifecycleListener.addListener(_contextParamAdapter);
- }
-
- /**
- *
- */
- public void stop()
- {
- _lifecycleListener.removeListener(_contextParamAdapter);
- }
-
- /**
- *
- */
- public void dispose()
- {
- _lifecycleListener.dispose();
- }
-
- /**
- * Gets list of application configuration file names as listed in the JSF
- * CONFIG_FILES context parameter ("javax.faces.CONFIG_FILES"). Will return
- * an empty list if WebArtifactEdit is null, if WebApp is null, if context
- * parameter does not exist, or if trimmed context parameter's value is an
- * empty String.
- *
- * @param project
- * IProject instance for which to get the context parameter's
- * value.
- * @param provider
- * @return List of application configuration file names as listed in the JSF
- * CONFIG_FILES context parameter ("javax.faces.CONFIG_FILES"); list
- * may be empty.
- */
- public static List<String> getConfigFilesFromContextParam(
- final IProject project, final IModelProvider provider)
- {
- List<String> filesList = Collections.EMPTY_LIST;
- // if (JSFAppConfigUtils.isValidJSFProject(project))
- {
- final Object webAppObj = provider.getModelObject();
- if (webAppObj != null)
- {
- if (webAppObj instanceof org.eclipse.jst.javaee.web.WebApp)
- {
- filesList = getConfigFilesForJEEApp((org.eclipse.jst.javaee.web.WebApp) webAppObj);
- }
- }
-
- }
- return filesList;
- }
-
- private static List<String> getConfigFilesForJEEApp(
- final org.eclipse.jst.javaee.web.WebApp webApp)
- {
- String filesString = null;
- final List contextParams = webApp.getContextParams();
- final Iterator itContextParams = contextParams.iterator();
- final List<String> fileStrings = new ArrayList<String>();
- while (itContextParams.hasNext())
- {
- final org.eclipse.jst.javaee.core.ParamValue paramValue = (org.eclipse.jst.javaee.core.ParamValue) itContextParams
- .next();
- if (paramValue.getParamName().equals(
- FACELET_10_LIBRARIES_CONTEXT_PARAM_NAME)
- || paramValue.getParamName().equals(
- JSF20_FACELET_LIBRARIES_CONTEXT_PARAM_NAME))
- {
- filesString = paramValue.getParamValue();
- fileStrings.addAll(parseFilesString(filesString));
- }
- }
- return fileStrings;
- }
-
- private static List<String> parseFilesString(final String filesString)
- {
- final List<String> filesList = new ArrayList<String>();
- if (filesString != null && filesString.trim().length() > 0)
- {
- final StringTokenizer stFilesString = new StringTokenizer(
- filesString, ";"); //$NON-NLS-1$
- while (stFilesString.hasMoreTokens())
- {
- final String configFile = stFilesString.nextToken().trim();
- filesList.add(configFile);
- }
- }
- return filesList;
- }
-
- /**
- * Adapter implementation used to monitor addition/removal of context-param
- * nodes and change in name of existing nodes in order to respond to changes
- * to the JSF CONFIG_FILES context-param.
- *
- * @author Ian Trimble - Oracle
- */
- private class ContextParamAdapter implements IResourceLifecycleListener
- {
- private final CopyOnWriteArrayList<WebappListener> _listeners = new CopyOnWriteArrayList<WebappListener>();
-
- public void addListener(final WebappListener listener)
- {
- _listeners.addIfAbsent(listener);
- }
-
- public void removeListener(final WebappListener listener)
- {
- _listeners.remove(listener);
- }
-
- private void fireEvent(final WebappChangeEvent event)
- {
- for (final WebappListener listener : _listeners)
- {
- listener.webappChanged(event);
- }
- }
-
- private void checkAndFireFileChanges()
- {
- final List<IFile> oldFiles = _cachedFiles == null ? Collections.EMPTY_LIST
- : _cachedFiles;
- final List<IFile> newFiles = getFiles();
-
- final List<IFile> filesAdded = new ArrayList<IFile>();
- final List<IFile> filesRemoved = new ArrayList<IFile>();
-
- for (final IFile oldFile : oldFiles)
- {
- if (!newFiles.contains(oldFile))
- {
- filesRemoved.add(oldFile);
- }
- }
-
- for (final IFile newFile : newFiles)
- {
- if (!oldFiles.contains(newFile))
- {
- filesAdded.add(newFile);
- }
- }
-
- if (filesAdded.size() > 0 || filesRemoved.size() > 0)
- {
- fireEvent(new WebappChangeEvent(filesRemoved, filesAdded));
- }
- }
-
- /**
- * Called when a ContextParam instance is removed.
- *
- * @param contextParam
- * ContextParam instance.
- */
- protected void processParamValue(
- final org.eclipse.jst.javaee.core.ParamValue contextParam)
- {
- checkAndFireFileChanges();
- }
-
-// /**
-// * Tests if the passed ContextParam instance is the JSF CONFIG_FILES
-// * context parameter.
-// *
-// * @param contextParam
-// * ContextParam instance.
-// * @return true if the passed ContextParam instance is the JSF
-// * CONFIG_FILES context parameter, else false
-// */
-// protected boolean isConfigFilesContextParam(
-// final org.eclipse.jst.javaee.core.ParamValue contextParam)
-// {
-// boolean isConfigFiles = false;
-// if (contextParam != null)
-// {
-// final String name = contextParam.getParamName();
-// if (FACELET_10_LIBRARIES_CONTEXT_PARAM_NAME.equals(name)
-// || JSF20_FACELET_LIBRARIES_CONTEXT_PARAM_NAME
-// .equals(name))
-// {
-// isConfigFiles = true;
-// }
-// }
-// return isConfigFiles;
-// }
-
- public EventResult acceptEvent(final ResourceLifecycleEvent event)
- {
- // the event is only interesting if it is the web.xml
- if (event.getAffectedResource() instanceof IFile
- && "web.xml".equals(event.getAffectedResource().getProjectRelativePath().lastSegment())) //$NON-NLS-1$
- {
- if (event.getEventType() == EventType.RESOURCE_CHANGED)
- {
- handleChange();
- }
- }
- return EventResult.getDefaultEventResult();
- }
-
- private void handleChange()
- {
- final IWorkspaceRunnable runnable = new IWorkspaceRunnable()
- {
- public void run(final IProgressMonitor monitor) throws CoreException
- {
- final Object modelObject = _modelProvider.getModelObject();
- if (modelObject instanceof org.eclipse.jst.javaee.web.WebApp)
- {
- for (final org.eclipse.jst.javaee.core.ParamValue paramValue : ((IWebCommon) modelObject)
- .getContextParams())
- {
- processParamValue(paramValue);
- }
- }
- // TODO: possibly handle facelets 1.0 in pre-2.5 webapps in
- // the
- // future
- // if it's worth the complexity.
- // SEE previous revs in CVS.
- }
- };
- _wsMediator.runInWorkspaceJob(runnable, "Update web xml"); //$NON-NLS-1$
- }
- }
-
- abstract static class WebappListener
- {
- public static class WebappChangeEvent
- {
- private final List<IFile> _removed;
- private final List<IFile> _added;
-
- WebappChangeEvent(final List<IFile> removed, final List<IFile> added)
- {
- _removed = Collections.unmodifiableList(removed);
- _added = Collections.unmodifiableList(added);
- }
-
- public final List<IFile> getRemoved()
- {
- return _removed;
- }
-
- public final List<IFile> getAdded()
- {
- return _added;
- }
- }
-
- public abstract void webappChanged(final WebappChangeEvent event);
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/XMLBasedTagRecord.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/XMLBasedTagRecord.java
deleted file mode 100644
index 9fda90750..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/XMLBasedTagRecord.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTag;
-
-/**
- * A tag record based on an xml tag defined Facelet taglib.xml
- * @author cbateman
- *
- */
-public class XMLBasedTagRecord extends FaceletTagRecord
-{
- /**
- *
- */
- private static final long serialVersionUID = 1411551451386954263L;
- private final FaceletTaglib _taglibDefn;
- private Map<String, FaceletTaglibTag> _tagIndexByName;
-
- /**
- * @param taglibDefn
- * @param descriptor
- */
- public XMLBasedTagRecord(final FaceletTaglib taglibDefn, final TagRecordDescriptor descriptor)
- {
- super(descriptor);
- _taglibDefn = taglibDefn;
- }
-
- @Override
- public String getURI()
- {
- return _taglibDefn.getNamespaceUri();
- }
-
-
- @Override
- public FaceletTaglibTag getTag(final String name)
- {
- return getAndIndexElementDeclaration(name);
- }
-
- private synchronized FaceletTaglibTag getAndIndexElementDeclaration(final String name)
- {
- FaceletTaglibTag tagDefn = null;
-
- if (_tagIndexByName == null)
- {
- _tagIndexByName = new HashMap<String, FaceletTaglibTag>();
- }
- else
- {
- tagDefn = _tagIndexByName.get(name);
- }
-
- if (tagDefn == null && _tagIndexByName.size() < _taglibDefn.getTag().size())
- {
- tagDefn = findTag(name);
- if (tagDefn != null)
- {
- _tagIndexByName.put(name, tagDefn);
- }
- }
-
- return tagDefn;
- }
-
- private FaceletTaglibTag findTag(final String name)
- {
- for (final FaceletTaglibTag tag : _taglibDefn.getTag())
- {
- if (name.equals(tag.getTagName()))
- {
- return tag;
- }
- }
- return null;
- }
-
- @Override
- public List<FaceletTaglibTag> getTags()
- {
- return Collections.unmodifiableList(_taglibDefn.getTag());
- }
-
- public int getNumTags()
- {
- return _taglibDefn.getTag().size();
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/XMLBasedTagRecord_Facelet10.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/XMLBasedTagRecord_Facelet10.java
deleted file mode 100644
index 1a73273ac..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/XMLBasedTagRecord_Facelet10.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib;
-import org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTag;
-
-/**
- * A tag record based on an xml tag defined Facelet taglib.xml
- * @author cbateman
- *
- */
-public class XMLBasedTagRecord_Facelet10 extends FaceletTagRecord
-{
- /**
- *
- */
- private static final long serialVersionUID = 1411551451386954263L;
- private final FaceletTaglib _taglibDefn;
- private Map<String, FaceletTaglibTag> _tagIndexByName;
-
- /**
- * @param taglibDefn
- * @param descriptor
- */
- public XMLBasedTagRecord_Facelet10(final FaceletTaglib taglibDefn, final TagRecordDescriptor descriptor)
- {
- super(descriptor);
- _taglibDefn = taglibDefn;
- }
-
- @Override
- public String getURI()
- {
- return _taglibDefn.getNamespaceUri();
- }
-
-
- @Override
- public FaceletTaglibTag getTag(final String name)
- {
- return getAndIndexElementDeclaration(name);
- }
-
- private synchronized FaceletTaglibTag getAndIndexElementDeclaration(final String name)
- {
- FaceletTaglibTag tagDefn = null;
-
- if (_tagIndexByName == null)
- {
- _tagIndexByName = new HashMap<String, FaceletTaglibTag>();
- }
- else
- {
- tagDefn = _tagIndexByName.get(name);
- }
-
- if (tagDefn == null && _tagIndexByName.size() < _taglibDefn.getTag().size())
- {
- tagDefn = findTag(name);
- }
-
- return tagDefn;
- }
-
- private FaceletTaglibTag findTag(final String name)
- {
- for (final FaceletTaglibTag tag : _taglibDefn.getTag())
- {
- if (name.equals(tag.getTagName()))
- {
- return tag;
- }
- }
- return null;
- }
-
- @Override
- public List<FaceletTaglibTag> getTags()
- {
- return Collections.unmodifiableList(_taglibDefn.getTag());
- }
-
- public int getNumTags()
- {
- return _taglibDefn.getTag().size();
- }
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/Description.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/Description.java
deleted file mode 100644
index 42810acee..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/Description.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: Description.java,v 1.1 2010/03/18 06:24:36 cbateman Exp $
- */
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Description</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- *
- *
- * The description type is used by a description element to
- * provide text describing the parent element. The elements
- * that use this type should include any information that the
- * Deployment Component's Deployment File file producer wants
- * to provide to the consumer of the Deployment Component's
- * Deployment File (i.e., to the Deployer). Typically, the
- * tools used by such a Deployment File consumer will display
- * the description when processing the parent element that
- * contains the description.
- *
- * The lang attribute defines the language that the
- * description is provided in. The default value is "en" (English).
- *
- *
- * <!-- end-model-doc -->
- *
- *
- * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibPackage#getDescription()
- * @model extendedMetaData="name='descriptionType' kind='simple'"
- * @generated
- */
-public interface Description extends IdentifiableLangStringValue
-{
- // Description
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/DisplayName.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/DisplayName.java
deleted file mode 100644
index c44b49613..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/DisplayName.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: DisplayName.java,v 1.1 2010/03/18 06:24:36 cbateman Exp $
- */
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Display Name</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- *
- * <![CDATA[
- *
- * The display-name type contains a short name that is intended
- * to be displayed by tools. It is used by display-name
- * elements. The display name need not be unique.
- *
- * Example:
- *
- * ...
- * <display-name xml:lang="en">
- * Employee Self Service
- * </display-name>
- *
- * The value of the xml:lang attribute is "en" (English) by default.
- *
- * ]]>
- *
- * <!-- end-model-doc -->
- *
- *
- * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibPackage#getDisplayName()
- * @model extendedMetaData="name='display-nameType' kind='simple'"
- * @generated
- */
-public interface DisplayName extends IdentifiableLangStringValue
-{
- // DisplayName
-}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/DocumentRoot.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/DocumentRoot.java
deleted file mode 100644
index 3cb917636..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/DocumentRoot.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: DocumentRoot.java,v 1.1 2010/03/18 06:24:37 cbateman Exp $
- */
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib;
-
-import org.eclipse.emf.common.util.EMap;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.FeatureMap;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Document Root</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.DocumentRoot#getMixed <em>Mixed</em>}</li>
- * <li>{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.DocumentRoot#getXMLNSPrefixMap <em>XMLNS Prefix Map</em>}</li>
- * <li>{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.DocumentRoot#getXSISchemaLocation <em>XSI Schema Location</em>}</li>
- * <li>{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.DocumentRoot#getFaceletTaglib <em>Facelet Taglib</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibPackage#getDocumentRoot()
- * @model extendedMetaData="name='' kind='mixed'"
- * @generated
- */
-public interface DocumentRoot extends EObject
-{
- /**
- * Returns the value of the '<em><b>Mixed</b></em>' attribute list.
- * The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Mixed</em>' attribute list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Mixed</em>' attribute list.
- * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibPackage#getDocumentRoot_Mixed()
- * @model unique="false" dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true"
- * extendedMetaData="kind='elementWildcard' name=':mixed'"
- * @generated
- */
- FeatureMap getMixed();
-
- /**
- * Returns the value of the '<em><b>XMLNS Prefix Map</b></em>' map.
- * The key is of type {@link java.lang.String},
- * and the value is of type {@link java.lang.String},
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>XMLNS Prefix Map</em>' map isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>XMLNS Prefix Map</em>' map.
- * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibPackage#getDocumentRoot_XMLNSPrefixMap()
- * @model mapType="org.eclipse.emf.ecore.EStringToStringMapEntry<org.eclipse.emf.ecore.EString, org.eclipse.emf.ecore.EString>" transient="true"
- * extendedMetaData="kind='attribute' name='xmlns:prefix'"
- * @generated
- */
- EMap<String, String> getXMLNSPrefixMap();
-
- /**
- * Returns the value of the '<em><b>XSI Schema Location</b></em>' map.
- * The key is of type {@link java.lang.String},
- * and the value is of type {@link java.lang.String},
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>XSI Schema Location</em>' map isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>XSI Schema Location</em>' map.
- * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibPackage#getDocumentRoot_XSISchemaLocation()
- * @model mapType="org.eclipse.emf.ecore.EStringToStringMapEntry<org.eclipse.emf.ecore.EString, org.eclipse.emf.ecore.EString>" transient="true"
- * extendedMetaData="kind='attribute' name='xsi:schemaLocation'"
- * @generated
- */
- EMap<String, String> getXSISchemaLocation();
-
- /**
- * Returns the value of the '<em><b>Facelet Taglib</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Facelet Taglib</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Facelet Taglib</em>' containment reference.
- * @see #setFaceletTaglib(FaceletTaglib)
- * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibPackage#getDocumentRoot_FaceletTaglib()
- * @model containment="true" upper="-2" transient="true" volatile="true" derived="true"
- * extendedMetaData="kind='element' name='facelet-taglib' namespace='##targetNamespace'"
- * @generated
- */
- FaceletTaglib getFaceletTaglib();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.DocumentRoot#getFaceletTaglib <em>Facelet Taglib</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Facelet Taglib</em>' containment reference.
- * @see #getFaceletTaglib()
- * @generated
- */
- void setFaceletTaglib(FaceletTaglib value);
-
-} // DocumentRoot
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglib.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglib.java
deleted file mode 100644
index 1e872d8ea..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglib.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: FaceletTaglib.java,v 1.1 2010/03/18 06:24:29 cbateman Exp $
- */
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.util.FeatureMap;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Facelet Taglib</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- *
- * The top level XML element in a facelet tag library XML file.
- *
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib#getLibraryClass <em>Library Class</em>}</li>
- * <li>{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib#getNamespace <em>Namespace</em>}</li>
- * <li>{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib#getCompositeLibraryName <em>Composite Library Name</em>}</li>
- * <li>{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib#getGroup <em>Group</em>}</li>
- * <li>{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib#getTag <em>Tag</em>}</li>
- * <li>{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib#getFunction <em>Function</em>}</li>
- * <li>{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib#getTaglibExtension <em>Taglib Extension</em>}</li>
- * <li>{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib#getId <em>Id</em>}</li>
- * <li>{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib#getVersion <em>Version</em>}</li>
- * <li>{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib#getNamespaceUri <em>Namespace Uri</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibPackage#getFaceletTaglib()
- * @model extendedMetaData="name='facelet-taglibType' kind='elementOnly'"
- * @generated
- */
-public interface FaceletTaglib extends UserVisibleTaglibObject
-{
- /**
- * Returns the value of the '<em><b>Library Class</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Library Class</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Library Class</em>' containment reference.
- * @see #setLibraryClass(FullyQualifiedClass)
- * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibPackage#getFaceletTaglib_LibraryClass()
- * @model containment="true"
- * extendedMetaData="kind='element' name='library-class' namespace='##targetNamespace'"
- * @generated
- */
- FullyQualifiedClass getLibraryClass();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib#getLibraryClass <em>Library Class</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Library Class</em>' containment reference.
- * @see #getLibraryClass()
- * @generated
- */
- void setLibraryClass(FullyQualifiedClass value);
-
- /**
- * Returns the value of the '<em><b>Namespace</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Namespace</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Namespace</em>' containment reference.
- * @see #setNamespace(IdentifiableStringValue)
- * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibPackage#getFaceletTaglib_Namespace()
- * @model containment="true"
- * extendedMetaData="kind='element' name='namespace' namespace='##targetNamespace'"
- * @generated
- */
- IdentifiableStringValue getNamespace();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib#getNamespace <em>Namespace</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Namespace</em>' containment reference.
- * @see #getNamespace()
- * @generated
- */
- void setNamespace(IdentifiableStringValue value);
-
- /**
- * Returns the value of the '<em><b>Composite Library Name</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Composite Library Name</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Composite Library Name</em>' containment reference.
- * @see #setCompositeLibraryName(FullyQualifiedClass)
- * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibPackage#getFaceletTaglib_CompositeLibraryName()
- * @model containment="true"
- * extendedMetaData="kind='element' name='composite-library-name' namespace='##targetNamespace'"
- * @generated
- */
- FullyQualifiedClass getCompositeLibraryName();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib#getCompositeLibraryName <em>Composite Library Name</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Composite Library Name</em>' containment reference.
- * @see #getCompositeLibraryName()
- * @generated
- */
- void setCompositeLibraryName(FullyQualifiedClass value);
-
- /**
- * Returns the value of the '<em><b>Group</b></em>' attribute list.
- * The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Group</em>' attribute list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Group</em>' attribute list.
- * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibPackage#getFaceletTaglib_Group()
- * @model unique="false" dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true"
- * extendedMetaData="kind='group' name='group:6'"
- * @generated
- */
- FeatureMap getGroup();
-
- /**
- * Returns the value of the '<em><b>Tag</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibTag}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Tag</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Tag</em>' containment reference list.
- * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibPackage#getFaceletTaglib_Tag()
- * @model containment="true" transient="true" volatile="true" derived="true"
- * extendedMetaData="kind='element' name='tag' namespace='##targetNamespace' group='#group:6'"
- * @generated
- */
- EList<FaceletTaglibTag> getTag();
-
- /**
- * Returns the value of the '<em><b>Function</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibFunction}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Function</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Function</em>' containment reference list.
- * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibPackage#getFaceletTaglib_Function()
- * @model containment="true" transient="true" volatile="true" derived="true"
- * extendedMetaData="kind='element' name='function' namespace='##targetNamespace' group='#group:6'"
- * @generated
- */
- EList<FaceletTaglibFunction> getFunction();
-
- /**
- * Returns the value of the '<em><b>Taglib Extension</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibExtension}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Taglib Extension</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Taglib Extension</em>' containment reference list.
- * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibPackage#getFaceletTaglib_TaglibExtension()
- * @model containment="true"
- * extendedMetaData="kind='element' name='taglib-extension' namespace='##targetNamespace'"
- * @generated
- */
- EList<FaceletTaglibExtension> getTaglibExtension();
-
- /**
- * Returns the value of the '<em><b>Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Id</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Id</em>' attribute.
- * @see #setId(String)
- * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibPackage#getFaceletTaglib_Id()
- * @model id="true" dataType="org.eclipse.emf.ecore.xml.type.ID"
- * extendedMetaData="kind='attribute' name='id'"
- * @generated
- */
- String getId();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib#getId <em>Id</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Id</em>' attribute.
- * @see #getId()
- * @generated
- */
- void setId(String value);
-
- /**
- * Returns the value of the '<em><b>Version</b></em>' attribute.
- * The literals are from the enumeration {@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibVersion}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Version</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Version</em>' attribute.
- * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibVersion
- * @see #isSetVersion()
- * @see #unsetVersion()
- * @see #setVersion(FaceletTaglibVersion)
- * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibPackage#getFaceletTaglib_Version()
- * @model unsettable="true" required="true"
- * extendedMetaData="kind='attribute' name='version'"
- * @generated
- */
- FaceletTaglibVersion getVersion();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib#getVersion <em>Version</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Version</em>' attribute.
- * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibVersion
- * @see #isSetVersion()
- * @see #unsetVersion()
- * @see #getVersion()
- * @generated
- */
- void setVersion(FaceletTaglibVersion value);
-
- /**
- * Unsets the value of the '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib#getVersion <em>Version</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetVersion()
- * @see #getVersion()
- * @see #setVersion(FaceletTaglibVersion)
- * @generated
- */
- void unsetVersion();
-
- /**
- * Returns whether the value of the '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib#getVersion <em>Version</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Version</em>' attribute is set.
- * @see #unsetVersion()
- * @see #getVersion()
- * @see #setVersion(FaceletTaglibVersion)
- * @generated
- */
- boolean isSetVersion();
-
- /**
- * Returns the value of the '<em><b>Namespace Uri</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Namespace Uri</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Namespace Uri</em>' attribute.
- * @see #setNamespaceUri(String)
- * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibPackage#getFaceletTaglib_NamespaceUri()
- * @model dataType="org.eclipse.emf.ecore.xml.type.Token" transient="true" volatile="true"
- * @generated
- */
- String getNamespaceUri();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglib#getNamespaceUri <em>Namespace Uri</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Namespace Uri</em>' attribute.
- * @see #getNamespaceUri()
- * @generated
- */
- void setNamespaceUri(String value);
-
-} // FaceletTaglib
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibCanonicalName.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibCanonicalName.java
deleted file mode 100644
index 21fabab47..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibCanonicalName.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: FaceletTaglibCanonicalName.java,v 1.1 2010/03/18 06:24:29 cbateman Exp $
- */
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Facelet Taglib Canonical Name</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- *
- *
- * Defines the canonical name of a tag or attribute being
- * defined.
- *
- * The name must conform to the lexical rules for an NCName
- *
- *
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibCanonicalName#getValue <em>Value</em>}</li>
- * <li>{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibCanonicalName#getId <em>Id</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibPackage#getFaceletTaglibCanonicalName()
- * @model extendedMetaData="name='facelet-taglib-canonical-nameType' kind='simple'"
- * @generated
- */
-public interface FaceletTaglibCanonicalName extends EObject
-{
- /**
- * Returns the value of the '<em><b>Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Value</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Value</em>' attribute.
- * @see #setValue(String)
- * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibPackage#getFaceletTaglibCanonicalName_Value()
- * @model dataType="org.eclipse.emf.ecore.xml.type.NCName"
- * extendedMetaData="name=':0' kind='simple'"
- * @generated
- */
- String getValue();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibCanonicalName#getValue <em>Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Value</em>' attribute.
- * @see #getValue()
- * @generated
- */
- void setValue(String value);
-
- /**
- * Returns the value of the '<em><b>Id</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Id</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Id</em>' attribute.
- * @see #setId(String)
- * @see org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibPackage#getFaceletTaglibCanonicalName_Id()
- * @model id="true" dataType="org.eclipse.emf.ecore.xml.type.ID"
- * extendedMetaData="kind='attribute' name='id'"
- * @generated
- */
- String getId();
-
- /**
- * Sets the value of the '{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibCanonicalName#getId <em>Id</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Id</em>' attribute.
- * @see #getId()
- * @generated
- */
- void setId(String value);
-
-} // FaceletTaglibCanonicalName
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibExtension.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibExtension.java
deleted file mode 100644
index 75ab46717..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/faceletTaglib/FaceletTaglibExtension.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: FaceletTaglibExtension.java,v 1.1 2010/03/18 06:24:29 cbateman Exp $
- */
-package org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.FeatureMap;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Facelet Taglib Extension</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- *
- * Extension element for facelet-taglib. It may contain
- * implementation specific content.
- *
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibExtension#getAny <em>Any</em>}</li>
- * <li>{@link org.eclipse.jst.jsf.facelet.core.internal.registry.taglib.faceletTaglib.FaceletTaglibExtens