diff options
author | cbateman | 2008-05-12 17:42:23 +0000 |
---|---|---|
committer | cbateman | 2008-05-12 17:42:23 +0000 |
commit | 94fe5829410bb55b3ee8d76c6043e4ab25372ca8 (patch) | |
tree | 8bd4d831ac54a5c17d15f4716e7624900be1755a | |
parent | 4dabfbe92fc6d866d45e823dfb838d2d3cf611bf (diff) | |
download | webtools.jsf-94fe5829410bb55b3ee8d76c6043e4ab25372ca8.tar.gz webtools.jsf-94fe5829410bb55b3ee8d76c6043e4ab25372ca8.tar.xz webtools.jsf-94fe5829410bb55b3ee8d76c6043e4ab25372ca8.zip |
Fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=225000.
81 files changed, 10502 insertions, 354 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/metadata/viewMapping_trinidad.xml b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/metadata/viewMapping_trinidad.xml new file mode 100644 index 000000000..f030ebbe0 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/metadata/viewMapping_trinidad.xml @@ -0,0 +1,1913 @@ +<?xml version="1.0" encoding="ASCII"?> +<md:metadatamodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:viewMap="http://org.eclipse.jst.jsf.core/componentMapping.ecore" xsi:noNamespaceSchemaLocation="http://org.eclipse.jst.jsf.core/componentMapping.ecore" xmlns:md="http://org.eclipse.jst.jsf.common.metadata/metadata.ecore" id="http://myfaces.apache.org/trinidad" type="tagFile"> + <entity id="panelList" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.layout.CorePanelList</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXPanel</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CorePanelList</componentType> + <componentFamily>org.apache.myfaces.trinidad.Panel</componentFamily> + <renderType>org.apache.myfaces.trinidad.List</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="selectManyListbox" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.input.CoreSelectManyListbox</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXSelectMany</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXEditableValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.EditableValueHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreSelectManyListbox</componentType> + <componentFamily>org.apache.myfaces.trinidad.SelectMany</componentFamily> + <renderType>org.apache.myfaces.trinidad.Listbox</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="tree" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.data.CoreTree</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXTree</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXHierarchy</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXCollection</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>org.apache.myfaces.trinidad.model.RowKeyIndex</interfaces> + <interfaces>org.apache.myfaces.trinidad.component.CollectionComponent</interfaces> + <interfaces>javax.faces.component.NamingContainer</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreTree</componentType> + <componentFamily>org.apache.myfaces.trinidad.Tree</componentFamily> + <renderType>org.apache.myfaces.trinidad.Tree</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="validateDateTimeRange" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ValidatorTypeInfo_"> + <className>org.apache.myfaces.trinidadinternal.validator.DateTimeRangeValidator</className> + <validatorId>org.apache.myfaces.trinidad.DateTimeRange</validatorId> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="showDetailItem" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.layout.CoreShowDetailItem</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXShowDetail</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreShowDetailItem</componentType> + <componentFamily>org.apache.myfaces.trinidad.ShowDetail</componentFamily> + <renderType>org.apache.myfaces.trinidad.Item</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="panelTabbed" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.layout.CorePanelTabbed</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXShowOne</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CorePanelTabbed</componentType> + <componentFamily>org.apache.myfaces.trinidad.ShowOne</componentFamily> + <renderType>org.apache.myfaces.trinidad.Tab</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="selectItem" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.input.CoreSelectItem</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXSelectItem</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreSelectItem</componentType> + <componentFamily>org.apache.myfaces.trinidad.SelectItem</componentFamily> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="panelPopup" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.layout.CorePanelPopup</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXPanel</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CorePanelPopup</componentType> + <componentFamily>org.apache.myfaces.trinidad.Panel</componentFamily> + <renderType>org.apache.myfaces.trinidad.Popup</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="singleStepButtonBar" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.nav.CoreSingleStepButtonBar</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXSingleStep</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.ActionSource</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreSingleStepButtonBar</componentType> + <componentFamily>org.apache.myfaces.trinidad.SingleStep</componentFamily> + <renderType>org.apache.myfaces.trinidad.ButtonBar</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="componentRef" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.UIXComponentRef</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.NamingContainer</interfaces> + <componentType>org.apache.myfaces.trinidad.ComponentRef</componentType> + <componentFamily>org.apache.myfaces.trinidad.ComponentRef</componentFamily> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="panelChoice" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.layout.CorePanelChoice</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXShowOne</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CorePanelChoice</componentType> + <componentFamily>org.apache.myfaces.trinidad.ShowOne</componentFamily> + <renderType>org.apache.myfaces.trinidad.Choice</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="showDetail" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.layout.CoreShowDetail</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXShowDetail</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreShowDetail</componentType> + <componentFamily>org.apache.myfaces.trinidad.ShowDetail</componentFamily> + <renderType>org.apache.myfaces.trinidad.ShowDetail</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="processChoiceBar" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.nav.CoreProcessChoiceBar</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXProcess</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXNavigationHierarchy</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXHierarchy</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXCollection</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>org.apache.myfaces.trinidad.model.RowKeyIndex</interfaces> + <interfaces>javax.faces.component.NamingContainer</interfaces> + <interfaces>org.apache.myfaces.trinidad.component.CollectionComponent</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreProcessChoiceBar</componentType> + <componentFamily>org.apache.myfaces.trinidad.Process</componentFamily> + <renderType>org.apache.myfaces.trinidad.ChoiceBar</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="treeTable" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.data.CoreTreeTable</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXTreeTable</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXTree</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXHierarchy</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXCollection</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>org.apache.myfaces.trinidad.model.RowKeyIndex</interfaces> + <interfaces>org.apache.myfaces.trinidad.component.CollectionComponent</interfaces> + <interfaces>javax.faces.component.NamingContainer</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreTreeTable</componentType> + <componentFamily>org.apache.myfaces.trinidad.TreeTable</componentFamily> + <renderType>org.apache.myfaces.trinidad.TreeTable</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="subform" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.CoreSubform</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXSubform</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.NamingContainer</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreSubform</componentType> + <componentFamily>org.apache.myfaces.trinidad.Subform</componentFamily> + <renderType>org.apache.myfaces.trinidad.Subform</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="panelPage" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.layout.CorePanelPage</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXPanel</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CorePanelPage</componentType> + <componentFamily>org.apache.myfaces.trinidad.Panel</componentFamily> + <renderType>org.apache.myfaces.trinidad.Page</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="page" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.nav.CorePage</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXPage</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXNavigationHierarchy</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXHierarchy</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXCollection</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>org.apache.myfaces.trinidad.model.RowKeyIndex</interfaces> + <interfaces>javax.faces.component.NamingContainer</interfaces> + <interfaces>org.apache.myfaces.trinidad.component.CollectionComponent</interfaces> + <componentType>org.apache.myfaces.trinidad.CorePage</componentType> + <componentFamily>org.apache.myfaces.trinidad.Page</componentFamily> + <renderType>org.apache.myfaces.trinidad.Page</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="messages" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.output.CoreMessages</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXMessages</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreMessages</componentType> + <componentFamily>org.apache.myfaces.trinidad.Messages</componentFamily> + <renderType>org.apache.myfaces.trinidad.Messages</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="convertNumber" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ConverterTypeInfo_"> + <className>org.apache.myfaces.trinidadinternal.convert.NumberConverter</className> + <converterId>org.apache.myfaces.trinidad.Number</converterId> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="message" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.output.CoreMessage</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXMessage</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreMessage</componentType> + <componentFamily>org.apache.myfaces.trinidad.Message</componentFamily> + <renderType>org.apache.myfaces.trinidad.Message</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="showDetailHeader" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.layout.CoreShowDetailHeader</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXShowDetail</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreShowDetailHeader</componentType> + <componentFamily>org.apache.myfaces.trinidad.ShowDetail</componentFamily> + <renderType>org.apache.myfaces.trinidad.Header</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="chart" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.data.CoreChart</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXChart</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreChart</componentType> + <componentFamily>org.apache.myfaces.trinidad.Chart</componentFamily> + <renderType>org.apache.myfaces.trinidad.Chart</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="validateRegExp" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ValidatorTypeInfo_"> + <className>org.apache.myfaces.trinidadinternal.validator.RegExpValidator</className> + <validatorId>org.apache.myfaces.trinidad.RegExp</validatorId> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="outputDocument" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.output.CoreOutputDocument</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXOutput</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreOutputDocument</componentType> + <componentFamily>org.apache.myfaces.trinidad.Output</componentFamily> + <renderType>org.apache.myfaces.trinidad.Document</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="convertColor" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ConverterTypeInfo_"> + <className>org.apache.myfaces.trinidadinternal.convert.ColorConverter</className> + <converterId>org.apache.myfaces.trinidad.Color</converterId> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="icon" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.output.CoreIcon</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXObject</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreIcon</componentType> + <componentFamily>org.apache.myfaces.trinidad.Object</componentFamily> + <renderType>org.apache.myfaces.trinidad.Icon</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="image" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.output.CoreImage</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXObject</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreImage</componentType> + <componentFamily>org.apache.myfaces.trinidad.Object</componentFamily> + <renderType>org.apache.myfaces.trinidad.Image</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="inputText" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.input.CoreInputText</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXInput</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXEditableValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.EditableValueHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreInputText</componentType> + <componentFamily>org.apache.myfaces.trinidad.Input</componentFamily> + <renderType>org.apache.myfaces.trinidad.Text</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="poll" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.CorePoll</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXPoll</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CorePoll</componentType> + <componentFamily>org.apache.myfaces.trinidad.Poll</componentFamily> + <renderType>org.apache.myfaces.trinidad.Poll</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="goButton" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.nav.CoreGoButton</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXGo</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreGoButton</componentType> + <componentFamily>org.apache.myfaces.trinidad.Go</componentFamily> + <renderType>org.apache.myfaces.trinidad.Button</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="validateDoubleRange" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ValidatorTypeInfo_"> + <className>org.apache.myfaces.trinidadinternal.validator.DoubleRangeValidator</className> + <validatorId>org.apache.myfaces.trinidad.DoubleRange</validatorId> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="media" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.output.CoreMedia</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXObject</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreMedia</componentType> + <componentFamily>org.apache.myfaces.trinidad.Object</componentFamily> + <renderType>org.apache.myfaces.trinidad.Media</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="outputText" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.output.CoreOutputText</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXOutput</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreOutputText</componentType> + <componentFamily>org.apache.myfaces.trinidad.Output</componentFamily> + <renderType>org.apache.myfaces.trinidad.Text</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="selectRangeChoiceBar" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.data.CoreSelectRangeChoiceBar</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXSelectRange</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreSelectRangeChoiceBar</componentType> + <componentFamily>org.apache.myfaces.trinidad.SelectRange</componentFamily> + <renderType>org.apache.myfaces.trinidad.ChoiceBar</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="panelHorizontalLayout" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.layout.CorePanelHorizontalLayout</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXPanel</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CorePanelHorizontalLayout</componentType> + <componentFamily>org.apache.myfaces.trinidad.Panel</componentFamily> + <renderType>org.apache.myfaces.trinidad.HorizontalLayout</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="resetButton" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.input.CoreResetButton</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXReset</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreResetButton</componentType> + <componentFamily>org.apache.myfaces.trinidad.ResetButton</componentFamily> + <renderType>org.apache.myfaces.trinidad.Button</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="inputHidden" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.input.CoreInputHidden</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXInput</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXEditableValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.EditableValueHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreInputHidden</componentType> + <componentFamily>org.apache.myfaces.trinidad.Input</componentFamily> + <renderType>org.apache.myfaces.trinidad.Hidden</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="spacer" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.output.CoreSpacer</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXObject</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreSpacer</componentType> + <componentFamily>org.apache.myfaces.trinidad.Object</componentFamily> + <renderType>org.apache.myfaces.trinidad.Spacer</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="selectOneChoice" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.input.CoreSelectOneChoice</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXSelectOne</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXEditableValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.EditableValueHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreSelectOneChoice</componentType> + <componentFamily>org.apache.myfaces.trinidad.SelectOne</componentFamily> + <renderType>org.apache.myfaces.trinidad.Choice</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="table" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.data.CoreTable</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXTable</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXIterator</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXCollection</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.NamingContainer</interfaces> + <interfaces>org.apache.myfaces.trinidad.model.RowKeyIndex</interfaces> + <interfaces>org.apache.myfaces.trinidad.component.CollectionComponent</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreTable</componentType> + <componentFamily>org.apache.myfaces.trinidad.Table</componentFamily> + <renderType>org.apache.myfaces.trinidad.Table</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="switcher" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.UIXSwitcher</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.Switcher</componentType> + <componentFamily>org.apache.myfaces.trinidad.Switcher</componentFamily> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="panelGroupLayout" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.layout.CorePanelGroupLayout</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXPanel</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CorePanelGroupLayout</componentType> + <componentFamily>org.apache.myfaces.trinidad.Panel</componentFamily> + <renderType>org.apache.myfaces.trinidad.GroupLayout</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="panelHeader" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.layout.CorePanelHeader</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXPanel</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CorePanelHeader</componentType> + <componentFamily>org.apache.myfaces.trinidad.Panel</componentFamily> + <renderType>org.apache.myfaces.trinidad.Header</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="panelTip" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.layout.CorePanelTip</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXPanel</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CorePanelTip</componentType> + <componentFamily>org.apache.myfaces.trinidad.Panel</componentFamily> + <renderType>org.apache.myfaces.trinidad.Tip</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="selectManyShuttle" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.input.CoreSelectManyShuttle</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXSelectMany</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXEditableValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.EditableValueHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreSelectManyShuttle</componentType> + <componentFamily>org.apache.myfaces.trinidad.SelectMany</componentFamily> + <renderType>org.apache.myfaces.trinidad.Shuttle</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="panelCaptionGroup" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.layout.CorePanelCaptionGroup</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXPanel</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CorePanelCaptionGroup</componentType> + <componentFamily>org.apache.myfaces.trinidad.Panel</componentFamily> + <renderType>org.apache.myfaces.trinidad.PanelCaptionGroup</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="panelPageHeader" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.layout.CorePanelPageHeader</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXPanel</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CorePanelPageHeader</componentType> + <componentFamily>org.apache.myfaces.trinidad.Panel</componentFamily> + <renderType>org.apache.myfaces.trinidad.PageHeader</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="selectOneRadio" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.input.CoreSelectOneRadio</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXSelectOne</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXEditableValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.EditableValueHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreSelectOneRadio</componentType> + <componentFamily>org.apache.myfaces.trinidad.SelectOne</componentFamily> + <renderType>org.apache.myfaces.trinidad.Radio</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="selectOneListbox" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.input.CoreSelectOneListbox</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXSelectOne</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXEditableValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.EditableValueHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreSelectOneListbox</componentType> + <componentFamily>org.apache.myfaces.trinidad.SelectOne</componentFamily> + <renderType>org.apache.myfaces.trinidad.Listbox</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="selectBooleanRadio" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.input.CoreSelectBooleanRadio</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXSelectBoolean</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXEditableValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.EditableValueHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreSelectBooleanRadio</componentType> + <componentFamily>org.apache.myfaces.trinidad.SelectBoolean</componentFamily> + <renderType>org.apache.myfaces.trinidad.Radio</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="commandButton" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.nav.CoreCommandButton</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXCommand</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.ActionSource</interfaces> + <interfaces>org.apache.myfaces.trinidad.component.DialogSource</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreCommandButton</componentType> + <componentFamily>org.apache.myfaces.trinidad.Command</componentFamily> + <renderType>org.apache.myfaces.trinidad.Button</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="inputListOfValues" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.input.CoreInputListOfValues</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXSelectInput</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXEditableValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.EditableValueHolder</interfaces> + <interfaces>javax.faces.component.ActionSource</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreInputListOfValues</componentType> + <componentFamily>org.apache.myfaces.trinidad.SelectInput</componentFamily> + <renderType>org.apache.myfaces.trinidad.Text</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="goLink" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.nav.CoreGoLink</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXGo</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreGoLink</componentType> + <componentFamily>org.apache.myfaces.trinidad.Go</componentFamily> + <renderType>org.apache.myfaces.trinidad.Link</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="importScript" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.CoreImportScript</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreImportScript</componentType> + <componentFamily>org.apache.myfaces.trinidad.ImportScript</componentFamily> + <renderType>org.apache.myfaces.trinidad.ImportScript</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="group" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.UIXGroup</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.Group</componentType> + <componentFamily>org.apache.myfaces.trinidad.Group</componentFamily> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="train" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.nav.CoreTrain</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXProcess</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXNavigationHierarchy</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXHierarchy</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXCollection</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>org.apache.myfaces.trinidad.model.RowKeyIndex</interfaces> + <interfaces>javax.faces.component.NamingContainer</interfaces> + <interfaces>org.apache.myfaces.trinidad.component.CollectionComponent</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreTrain</componentType> + <componentFamily>org.apache.myfaces.trinidad.Process</componentFamily> + <renderType>org.apache.myfaces.trinidad.Train</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="chooseColor" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.input.CoreChooseColor</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXChoose</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreChooseColor</componentType> + <componentFamily>org.apache.myfaces.trinidad.Choose</componentFamily> + <renderType>org.apache.myfaces.trinidad.Color</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="commandNavigationItem" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.nav.CoreCommandNavigationItem</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXCommand</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.ActionSource</interfaces> + <interfaces>org.apache.myfaces.trinidad.component.DialogSource</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreCommandNavigationItem</componentType> + <componentFamily>org.apache.myfaces.trinidad.Command</componentFamily> + <renderType>org.apache.myfaces.trinidad.NavigationItem</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="chooseDate" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.input.CoreChooseDate</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXChoose</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreChooseDate</componentType> + <componentFamily>org.apache.myfaces.trinidad.Choose</componentFamily> + <renderType>org.apache.myfaces.trinidad.Date</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="panelButtonBar" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.layout.CorePanelButtonBar</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXPanel</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CorePanelButtonBar</componentType> + <componentFamily>org.apache.myfaces.trinidad.Panel</componentFamily> + <renderType>org.apache.myfaces.trinidad.ButtonBar</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="legend" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.output.CoreLegend</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXObject</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreLegend</componentType> + <componentFamily>org.apache.myfaces.trinidad.Object</componentFamily> + <renderType>org.apache.myfaces.trinidad.Legend</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="inputColor" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.input.CoreInputColor</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXSelectInput</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXEditableValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.EditableValueHolder</interfaces> + <interfaces>javax.faces.component.ActionSource</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreInputColor</componentType> + <componentFamily>org.apache.myfaces.trinidad.SelectInput</componentFamily> + <renderType>org.apache.myfaces.trinidad.Color</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="outputLabel" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.output.CoreOutputLabel</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXOutput</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreOutputLabel</componentType> + <componentFamily>org.apache.myfaces.trinidad.Output</componentFamily> + <renderType>org.apache.myfaces.trinidad.Label</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="inputFile" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.input.CoreInputFile</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXInput</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXEditableValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.EditableValueHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreInputFile</componentType> + <componentFamily>org.apache.myfaces.trinidad.Input</componentFamily> + <renderType>org.apache.myfaces.trinidad.File</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="panelFormLayout" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.layout.CorePanelFormLayout</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXPanel</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CorePanelFormLayout</componentType> + <componentFamily>org.apache.myfaces.trinidad.Panel</componentFamily> + <renderType>org.apache.myfaces.trinidad.FormLayout</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="form" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.CoreForm</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXForm</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreForm</componentType> + <componentFamily>org.apache.myfaces.trinidad.Form</componentFamily> + <renderType>org.apache.myfaces.trinidad.Form</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="validateLongRange" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ValidatorTypeInfo_"> + <className>org.apache.myfaces.trinidadinternal.validator.LongRangeValidator</className> + <validatorId>org.apache.myfaces.trinidad.LongRange</validatorId> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="column" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.data.CoreColumn</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXColumn</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreColumn</componentType> + <componentFamily>org.apache.myfaces.trinidad.Column</componentFamily> + <renderType>org.apache.myfaces.trinidad.Column</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="inputDate" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.input.CoreInputDate</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXSelectInput</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXEditableValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.EditableValueHolder</interfaces> + <interfaces>javax.faces.component.ActionSource</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreInputDate</componentType> + <componentFamily>org.apache.myfaces.trinidad.SelectInput</componentFamily> + <renderType>org.apache.myfaces.trinidad.Date</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="validateLength" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ValidatorTypeInfo_"> + <className>org.apache.myfaces.trinidadinternal.validator.LengthValidator</className> + <validatorId>org.apache.myfaces.trinidad.Length</validatorId> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="progressIndicator" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.output.CoreProgressIndicator</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXProgress</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.ActionSource</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreProgressIndicator</componentType> + <componentFamily>org.apache.myfaces.trinidad.Progress</componentFamily> + <renderType>org.apache.myfaces.trinidad.Indicator</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="validateDateRestriction" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ValidatorTypeInfo_"> + <className>org.apache.myfaces.trinidadinternal.validator.DateRestrictionValidator</className> + <validatorId>org.apache.myfaces.trinidad.DateRestriction</validatorId> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="panelSideBar" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.layout.CorePanelSideBar</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXPanel</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CorePanelSideBar</componentType> + <componentFamily>org.apache.myfaces.trinidad.Panel</componentFamily> + <renderType>org.apache.myfaces.trinidad.SideBar</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="convertDateTime" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ConverterTypeInfo_"> + <className>org.apache.myfaces.trinidadinternal.convert.DateTimeConverter</className> + <converterId>org.apache.myfaces.trinidad.DateTime</converterId> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="separator" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.output.CoreSeparator</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXObject</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreSeparator</componentType> + <componentFamily>org.apache.myfaces.trinidad.Object</componentFamily> + <renderType>org.apache.myfaces.trinidad.Separator</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="document" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.CoreDocument</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXDocument</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreDocument</componentType> + <componentFamily>org.apache.myfaces.trinidad.Document</componentFamily> + <renderType>org.apache.myfaces.trinidad.Document</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="inputNumberSpinbox" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.input.CoreInputNumberSpinbox</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXInput</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXEditableValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.EditableValueHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreInputNumberSpinbox</componentType> + <componentFamily>org.apache.myfaces.trinidad.Input</componentFamily> + <renderType>org.apache.myfaces.trinidad.NumberSpinbox</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="validateByteLength" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ValidatorTypeInfo_"> + <className>org.apache.myfaces.trinidadinternal.validator.ByteLengthValidator</className> + <validatorId>org.apache.myfaces.trinidad.ByteLength</validatorId> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="navigationTree" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.nav.CoreNavigationTree</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXNavigationTree</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXNavigationHierarchy</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXHierarchy</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXCollection</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>org.apache.myfaces.trinidad.model.RowKeyIndex</interfaces> + <interfaces>javax.faces.component.NamingContainer</interfaces> + <interfaces>org.apache.myfaces.trinidad.component.CollectionComponent</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreNavigationTree</componentType> + <componentFamily>org.apache.myfaces.trinidad.NavigationTree</componentFamily> + <renderType>org.apache.myfaces.trinidad.NavigationTree</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="selectBooleanCheckbox" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.input.CoreSelectBooleanCheckbox</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXSelectBoolean</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXEditableValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.EditableValueHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreSelectBooleanCheckbox</componentType> + <componentFamily>org.apache.myfaces.trinidad.SelectBoolean</componentFamily> + <renderType>org.apache.myfaces.trinidad.Checkbox</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="navigationPane" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.nav.CoreNavigationPane</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXNavigationLevel</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXNavigationHierarchy</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXHierarchy</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXCollection</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>org.apache.myfaces.trinidad.model.RowKeyIndex</interfaces> + <interfaces>org.apache.myfaces.trinidad.component.CollectionComponent</interfaces> + <interfaces>javax.faces.component.NamingContainer</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreNavigationPane</componentType> + <componentFamily>org.apache.myfaces.trinidad.NavigationLevel</componentFamily> + <renderType>org.apache.myfaces.trinidad.Pane</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="selectManyCheckbox" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.input.CoreSelectManyCheckbox</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXSelectMany</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXEditableValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.EditableValueHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreSelectManyCheckbox</componentType> + <componentFamily>org.apache.myfaces.trinidad.SelectMany</componentFamily> + <renderType>org.apache.myfaces.trinidad.Checkbox</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="statusIndicator" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.output.CoreStatusIndicator</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXObject</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreStatusIndicator</componentType> + <componentFamily>org.apache.myfaces.trinidad.Object</componentFamily> + <renderType>org.apache.myfaces.trinidad.StatusIndicator</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="panelRadio" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.layout.CorePanelRadio</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXShowOne</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CorePanelRadio</componentType> + <componentFamily>org.apache.myfaces.trinidad.ShowOne</componentFamily> + <renderType>org.apache.myfaces.trinidad.Radio</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="panelBox" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.layout.CorePanelBox</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXPanel</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CorePanelBox</componentType> + <componentFamily>org.apache.myfaces.trinidad.Panel</componentFamily> + <renderType>org.apache.myfaces.trinidad.Box</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="iterator" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.UIXIterator</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXCollection</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.NamingContainer</interfaces> + <componentType>org.apache.myfaces.trinidad.Iterator</componentType> + <componentFamily>org.apache.myfaces.trinidad.Iterator</componentFamily> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="panelBorderLayout" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.layout.CorePanelBorderLayout</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXPanel</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CorePanelBorderLayout</componentType> + <componentFamily>org.apache.myfaces.trinidad.Panel</componentFamily> + <renderType>org.apache.myfaces.trinidad.BorderLayout</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="panelAccordion" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.layout.CorePanelAccordion</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXPanel</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CorePanelAccordion</componentType> + <componentFamily>org.apache.myfaces.trinidad.Panel</componentFamily> + <renderType>org.apache.myfaces.trinidad.Accordion</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="commandLink" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.nav.CoreCommandLink</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXCommand</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.ActionSource</interfaces> + <interfaces>org.apache.myfaces.trinidad.component.DialogSource</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreCommandLink</componentType> + <componentFamily>org.apache.myfaces.trinidad.Command</componentFamily> + <renderType>org.apache.myfaces.trinidad.Link</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="panelLabelAndMessage" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.layout.CorePanelLabelAndMessage</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXPanel</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CorePanelLabelAndMessage</componentType> + <componentFamily>org.apache.myfaces.trinidad.Panel</componentFamily> + <renderType>org.apache.myfaces.trinidad.LabelAndMessage</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="selectOrderShuttle" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.input.CoreSelectOrderShuttle</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXSelectOrder</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXSelectMany</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXEditableValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.EditableValueHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreSelectOrderShuttle</componentType> + <componentFamily>org.apache.myfaces.trinidad.SelectOrder</componentFamily> + <renderType>org.apache.myfaces.trinidad.Shuttle</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="outputFormatted" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.output.CoreOutputFormatted</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXOutput</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXValue</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreOutputFormatted</componentType> + <componentFamily>org.apache.myfaces.trinidad.Output</componentFamily> + <renderType>org.apache.myfaces.trinidad.Formatted</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="breadCrumbs" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.nav.CoreBreadCrumbs</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXNavigationPath</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXNavigationHierarchy</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXHierarchy</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXCollection</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>org.apache.myfaces.trinidad.model.RowKeyIndex</interfaces> + <interfaces>org.apache.myfaces.trinidad.component.CollectionComponent</interfaces> + <interfaces>javax.faces.component.NamingContainer</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreBreadCrumbs</componentType> + <componentFamily>org.apache.myfaces.trinidad.NavigationPath</componentFamily> + <renderType>org.apache.myfaces.trinidad.BreadCrumbs</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> +</md:metadatamodel> diff --git a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/metadata/viewMapping_trinidad_html.xml b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/metadata/viewMapping_trinidad_html.xml new file mode 100644 index 000000000..c1423b7dc --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/metadata/viewMapping_trinidad_html.xml @@ -0,0 +1,193 @@ +<?xml version="1.0" encoding="ASCII"?> +<md:metadatamodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:viewMap="http://org.eclipse.jst.jsf.core/componentMapping.ecore" xsi:noNamespaceSchemaLocation="http://org.eclipse.jst.jsf.core/componentMapping.ecore" xmlns:md="http://org.eclipse.jst.jsf.common.metadata/metadata.ecore" id="http://myfaces.apache.org/trinidad/html" type="tagFile"> + <entity id="frame" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.html.HtmlFrame</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.HtmlFrame</componentType> + <componentFamily>org.apache.myfaces.trinidad.Frame</componentFamily> + <renderType>org.apache.myfaces.trinidad.Frame</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="html" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.html.HtmlHtml</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.HtmlHtml</componentType> + <componentFamily>org.apache.myfaces.trinidad.Html</componentFamily> + <renderType>org.apache.myfaces.trinidad.Html</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="script" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.html.HtmlScript</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.HtmlScript</componentType> + <componentFamily>org.apache.myfaces.trinidad.Script</componentFamily> + <renderType>org.apache.myfaces.trinidad.Script</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="head" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.html.HtmlHead</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.HtmlHead</componentType> + <componentFamily>org.apache.myfaces.trinidad.Head</componentFamily> + <renderType>org.apache.myfaces.trinidad.Head</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="rowLayout" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.html.HtmlRowLayout</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.HtmlRowLayout</componentType> + <componentFamily>org.apache.myfaces.trinidad.RowLayout</componentFamily> + <renderType>org.apache.myfaces.trinidad.RowLayout</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="frameBorderLayout" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.html.HtmlFrameBorderLayout</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.HtmlFrameBorderLayout</componentType> + <componentFamily>org.apache.myfaces.trinidad.FrameBorderLayout</componentFamily> + <renderType>org.apache.myfaces.trinidad.FrameBorderLayout</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="styleSheet" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.core.CoreStyleSheet</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.CoreStyleSheet</componentType> + <componentFamily>org.apache.myfaces.trinidad.StyleSheet</componentFamily> + <renderType>org.apache.myfaces.trinidad.StyleSheet</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="cellFormat" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.html.HtmlCellFormat</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.HtmlCellFormat</componentType> + <componentFamily>org.apache.myfaces.trinidad.CellFormat</componentFamily> + <renderType>org.apache.myfaces.trinidad.CellFormat</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="tableLayout" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.html.HtmlTableLayout</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.HtmlTableLayout</componentType> + <componentFamily>org.apache.myfaces.trinidad.TableLayout</componentFamily> + <renderType>org.apache.myfaces.trinidad.TableLayout</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="body" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>org.apache.myfaces.trinidad.component.html.HtmlBody</className> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponentBase</superClasses> + <superClasses>org.apache.myfaces.trinidad.component.UIXComponent</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>org.apache.myfaces.trinidad.HtmlBody</componentType> + <componentFamily>org.apache.myfaces.trinidad.Body</componentFamily> + <renderType>org.apache.myfaces.trinidad.Body</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> +</md:metadatamodel> diff --git a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/plugin.xml b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/plugin.xml index 33e08606c..53c935305 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/plugin.xml +++ b/jsf/plugins/org.eclipse.jst.jsf.apache.trinidad.tagsupport/plugin.xml @@ -27,6 +27,14 @@ location="$nl$/metadata/trinidad_html_dti.xml" uri="http://myfaces.apache.org/trinidad/html"> </standardMetaDataFile> + <standardMetaDataFile + location="$nl$/metadata/viewMapping_trinidad.xml" + uri="http://myfaces.apache.org/trinidad"> + </standardMetaDataFile> + <standardMetaDataFile + location="$nl$/metadata/viewMapping_trinidad_html.xml" + uri="http://myfaces.apache.org/trinidad/html"> + </standardMetaDataFile> </extension> <extension point="org.eclipse.jst.pagedesigner.pageDesignerExtension"> diff --git a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/component/ComponentInfo.java b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/component/ComponentInfo.java index 1b7fc2c95..12619e4b1 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/component/ComponentInfo.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/component/ComponentInfo.java @@ -21,6 +21,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; +import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; @@ -49,8 +50,7 @@ public class ComponentInfo extends ViewObject implements Serializable, private final static int DEFAULT_ARRAY_SIZE = 4; - private transient BeanPropertyManager _beanPropertyManager = new BeanPropertyManager( - this); + private transient BeanPropertyManager _beanPropertyManager; /** * Encapsulates all of the data for the view object */ @@ -71,6 +71,14 @@ public class ComponentInfo extends ViewObject implements Serializable, { super(new ComponentInfoData(id, parent, componentTypeInfo, isRendered)); _data = (ComponentInfoData) super.getData(); + + final Set propExclude = new HashSet(); + propExclude.add("attributeNames"); + propExclude.add("componentTypeInfo"); + propExclude.add("valueChangeListeners"); + propExclude.add("visitableChildren"); + + _beanPropertyManager = new BeanPropertyManager(this, propExclude); } /** @@ -105,7 +113,7 @@ public class ComponentInfo extends ViewObject implements Serializable, final ComponentTypeInfo componentTypeInfo, final Map attributes) { this(getStringProperty("id", attributes, false), parent, //$NON-NLS-1$ - componentTypeInfo, getBooleanProperty("rendered", attributes)); //$NON-NLS-1$ + componentTypeInfo, getBooleanProperty("rendered", attributes, false)); //$NON-NLS-1$ } /** @@ -135,21 +143,26 @@ public class ComponentInfo extends ViewObject implements Serializable, /** * @param key * @param attributes + * @param mandatory * * @return the value in attributes at location, forcing a ClassCastExceptio - * if it is no a Boolean. + * if it is not a Boolean and mandatory. returns false if no value + * and not mandatory * @throws IllegalArgumentException - * if key is not found (all boolean attributes are mandatory - * since there is no valid state for unset. + * if key is not found and value is mandatory */ protected static boolean getBooleanProperty(final String key, - final Map attributes) + final Map attributes, final boolean mandatory) { final Boolean value = (Boolean) attributes.get(key); if (value == null) { - throw new IllegalArgumentException(key + "is mandatory"); //$NON-NLS-1$ + if (mandatory) + { + throw new IllegalArgumentException(key + "is mandatory"); //$NON-NLS-1$ + } + return false; } return value.booleanValue(); @@ -159,7 +172,7 @@ public class ComponentInfo extends ViewObject implements Serializable, * @param key * @param attributes * @return the integer property for key. Casts the value to Number and calls - * Number.intValue(). + * Number.intValue(). 0 if no value. */ protected static int getIntegerProperty(final String key, final Map attributes) @@ -168,7 +181,7 @@ public class ComponentInfo extends ViewObject implements Serializable, if (value == null) { - throw new IllegalArgumentException(key + " is mandatory"); //$NON-NLS-1$ + return 0; } return value.intValue(); @@ -670,13 +683,17 @@ public class ComponentInfo extends ViewObject implements Serializable, * ComponentBeanProperty> */_beanProperties; // lazily private final transient ComponentInfo _component; + private final transient Set _excludeNames; /** * @param component + * @param excludeNames */ - protected BeanPropertyManager(final ComponentInfo component) + protected BeanPropertyManager(final ComponentInfo component, + final Set excludeNames) { _component = component; + _excludeNames = excludeNames; } /** @@ -756,7 +773,7 @@ public class ComponentInfo extends ViewObject implements Serializable, final List myProperties = getOrCreateBeanProperties(myClass, stopClass); - addToMap(myProperties, _component, myClass, allProperties); + addToMap(myProperties, _component, myClass, allProperties, _excludeNames); } { @@ -770,7 +787,8 @@ public class ComponentInfo extends ViewObject implements Serializable, // get all props, excluding the ones on Object. final List props = getOrCreateBeanProperties(adapterClass, null); - addToMap(props, declaringClass, adapterClass, allProperties); + addToMap(props, declaringClass, adapterClass, allProperties, + _excludeNames); } } @@ -780,26 +798,19 @@ public class ComponentInfo extends ViewObject implements Serializable, private static void addToMap( final List/* <ComponentBeanProperty> */addThese, final Object declaringObject, final Class declaringAdapter, - final Map toMe) + final Map toMe, + Set excludeNames) { for (final Iterator it = addThese.iterator(); it.hasNext();) { final PropertyDescriptor desc = (PropertyDescriptor) it.next(); - if (!toMe.containsKey(desc.getName())) + if (!toMe.containsKey(desc.getName()) + && !excludeNames.contains(desc.getName())) { toMe.put(desc.getName(), new ComponentBeanProperty( declaringAdapter, declaringObject, desc)); } - else - { - // TODO: need logging - System.err - .println("Name collision in properties. Trying to add [" //$NON-NLS-1$ - + desc.toString() - + " when already have " //$NON-NLS-1$ - + toMe.get(desc.getName())); - } } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/component/UICommandInfo.java b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/component/UICommandInfo.java index b98bc7c00..9ff50f466 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/component/UICommandInfo.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/component/UICommandInfo.java @@ -75,7 +75,7 @@ public class UICommandInfo extends ComponentInfo implements IActionSource2Info { { this(getStringProperty("id", attributes, true), //$NON-NLS-1$ parent, componentTypeInfo, - getBooleanProperty("rendered", attributes), //$NON-NLS-1$ + getBooleanProperty("rendered", attributes, false), //$NON-NLS-1$ getActionSourceInfo("$actionSourceInfo", attributes) //$NON-NLS-1$ ); } diff --git a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/component/UIDataInfo.java b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/component/UIDataInfo.java index 0bfd7e90c..56981af98 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/component/UIDataInfo.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/component/UIDataInfo.java @@ -105,18 +105,18 @@ public class UIDataInfo extends ComponentInfo implements INamingContainerInfo { this(getStringProperty("id", attributes, true), parent, //$NON-NLS-1$ componentTypeInfo, - getBooleanProperty("rendered", attributes), //$NON-NLS-1$ + getBooleanProperty("rendered", attributes, false), //$NON-NLS-1$ getDataModelInfo("$dataModel", attributes), //$NON-NLS-1$ getIntegerProperty("first", attributes), //$NON-NLS-1$ getComponentProperty("footer", attributes), //$NON-NLS-1$ getComponentProperty("header", attributes), //$NON-NLS-1$ getIntegerProperty("rowCount", attributes), //$NON-NLS-1$ - getBooleanProperty("rowAvailable", attributes), //$NON-NLS-1$ + getBooleanProperty("rowAvailable", attributes, false), //$NON-NLS-1$ attributes.get("rowData"), //$NON-NLS-1$ getIntegerProperty("rowIndex", attributes), //$NON-NLS-1$ getIntegerProperty("rows", attributes), //$NON-NLS-1$ attributes.get("value"), //$NON-NLS-1$ - getStringProperty("var", attributes, true)); //$NON-NLS-1$ + getStringProperty("var", attributes, false)); //$NON-NLS-1$ } private static DataModelInfo getDataModelInfo(String key, Map attributes) diff --git a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/component/UIFormInfo.java b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/component/UIFormInfo.java index 442b2e002..2b8233055 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/component/UIFormInfo.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/component/UIFormInfo.java @@ -56,9 +56,9 @@ public class UIFormInfo extends ComponentInfo implements INamingContainerInfo this(getStringProperty("id", attributes, true), //$NON-NLS-1$ parent, componentTypeInfo, - getBooleanProperty("rendered", attributes), //$NON-NLS-1$ - getBooleanProperty("prependId", attributes), //$NON-NLS-1$ - getBooleanProperty("submitted", attributes)); //$NON-NLS-1$ + getBooleanProperty("rendered", attributes, false), //$NON-NLS-1$ + getBooleanProperty("prependId", attributes, false), //$NON-NLS-1$ + getBooleanProperty("submitted", attributes, false)); //$NON-NLS-1$ } /** diff --git a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/component/UIInputInfo.java b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/component/UIInputInfo.java index 72420e490..14a613192 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/component/UIInputInfo.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/component/UIInputInfo.java @@ -102,7 +102,7 @@ public class UIInputInfo extends UIOutputInfo implements { this(getStringProperty("id", attributes, true), parent, typeInfo, //$NON-NLS-1$ getEditableValueHolderInfo("$editableValueHolderInfo", //$NON-NLS-1$ - attributes), getBooleanProperty("rendered", attributes)); //$NON-NLS-1$ + attributes), getBooleanProperty("rendered", attributes, false)); //$NON-NLS-1$ } private static IEditableValueHolderInfo getEditableValueHolderInfo( diff --git a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/component/UIOutputInfo.java b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/component/UIOutputInfo.java index 04e52d80f..bf5f3563a 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/component/UIOutputInfo.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/component/UIOutputInfo.java @@ -14,6 +14,7 @@ import java.util.List; import java.util.Map; import org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.IValueHolderInfo; +import org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.ValueHolderInfo; import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ConverterDecorator; /** @@ -75,7 +76,7 @@ public class UIOutputInfo extends ComponentInfo implements IValueHolderInfo { parent, typeInfo, getValueHolderInfo("$valueHolderInfo", attributes), //$NON-NLS-1$ - getBooleanProperty("rendered", attributes)); //$NON-NLS-1$ + getBooleanProperty("rendered", attributes, false)); //$NON-NLS-1$ } /** @@ -86,7 +87,21 @@ public class UIOutputInfo extends ComponentInfo implements IValueHolderInfo { */ protected static IValueHolderInfo getValueHolderInfo(String key, Map attributes) { - return (IValueHolderInfo) attributes.get(key); + IValueHolderInfo info = (IValueHolderInfo) attributes.get(key); + + if (info != null) + { + return info; + } + Object value = attributes.get("value"); + if (value != null) + { + Object converter = attributes.get("converter"); + Object localValue = attributes.get("localValue"); + + return new ValueHolderInfo((ConverterDecorator) converter, localValue, value); + } + return null; } // @Override diff --git a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/decorator/ConverterTypeInfo.java b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/decorator/ConverterTypeInfo.java index dbfac23a8..2b2e921e2 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/decorator/ConverterTypeInfo.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/decorator/ConverterTypeInfo.java @@ -24,8 +24,9 @@ public class ConverterTypeInfo extends ClassTypeInfo * serializable id */ private static final long serialVersionUID = -7238952424045449907L; - - private final String _converterId; + private static final String[] NO_FOR_CLASS = new String[0]; + private final String _converterId; + private final String[] _forClasses; /** * For unknown converters, use the UNKNOWN constant. @@ -46,6 +47,7 @@ public class ConverterTypeInfo extends ClassTypeInfo } _converterId = converterId; + _forClasses = NO_FOR_CLASS; } /** @@ -55,12 +57,13 @@ public class ConverterTypeInfo extends ClassTypeInfo * @param superClasses * @param interfaces * @param converterId + * @param forClass * @throws java.lang.IllegalArgumentException * if both className and converterId are null. * */ public ConverterTypeInfo(String className, String[] superClasses, - String[] interfaces, String converterId) + String[] interfaces, String converterId, String[] forClass) { super(className, superClasses, interfaces); if (className == null && converterId == null) @@ -70,6 +73,14 @@ public class ConverterTypeInfo extends ClassTypeInfo } _converterId = converterId; + if (forClass == null) + { + _forClasses = NO_FOR_CLASS; + } + else + { + _forClasses = forClass; + } } /** @@ -91,6 +102,7 @@ public class ConverterTypeInfo extends ClassTypeInfo { super(null, new String[0], new String[0]); _converterId = null; + _forClasses = NO_FOR_CLASS; } /** @@ -101,8 +113,34 @@ public class ConverterTypeInfo extends ClassTypeInfo return _converterId; } + /** + * @return a copy of the listof classes that this type converters to. May + * be empty. Never null. + */ + public final String[] getForClass() + { + final String[] returnArray = new String[_forClasses.length]; + System.arraycopy(_forClasses, 0, returnArray, 0, _forClasses.length); + return returnArray; + } + public String toString() { - return "Converter Type Info: type = " + _converterId + ", "+super.toString(); //$NON-NLS-1$ //$NON-NLS-2$ + String toString = ""; + + if (_forClasses.length > 0) + { + toString = "For-Classes: ["; + for (int i = 0; i < _forClasses.length; i++) + { + toString += _forClasses[i]; + if (i < _forClasses.length-1) + { + toString += ", "; + } + } + toString += "], "; + } + return toString + "Converter Type Info: type = " + _converterId + ", "+super.toString(); //$NON-NLS-1$ //$NON-NLS-2$ } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/types/ClassTypeInfo.java b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/types/ClassTypeInfo.java index aaedf6c57..4a39bc0b3 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/types/ClassTypeInfo.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/types/ClassTypeInfo.java @@ -115,7 +115,7 @@ public abstract class ClassTypeInfo extends TypeInfo implements IClassTypeInfo { supers += _superClasses[i]; - if (i < _superClasses.length-1) + if (i < _superClasses.length) { supers += ","; //$NON-NLS-1$ } diff --git a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/view/model/common/ComponentPropertyHandler.java b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/view/model/common/ComponentPropertyHandler.java new file mode 100644 index 000000000..aa505455b --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/view/model/common/ComponentPropertyHandler.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * 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.common.runtime.internal.view.model.common; + +/** + * Default implementation of IComponentPropertyHandler. + * + * @author cbateman + * + */ +public class ComponentPropertyHandler extends TagAttributeHandler implements + IComponentPropertyHandler +{ + /** + * + */ + private static final long serialVersionUID = 8614562842401106572L; + private final String _propertyName; + + /** + * @param customHandler + * @param name + * @param elAllowed + * @param propertyName + */ + public ComponentPropertyHandler(final String customHandler, + final String name, final boolean elAllowed, + final String propertyName) + { + super(customHandler, name, elAllowed); + _propertyName = propertyName; + } + + public String getPropertyName() + { + return _propertyName; + } +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/view/model/common/IComponentPropertyHandler.java b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/view/model/common/IComponentPropertyHandler.java new file mode 100644 index 000000000..dfcaf79cc --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/view/model/common/IComponentPropertyHandler.java @@ -0,0 +1,25 @@ +/******************************************************************************* + * Copyright (c) ${year} 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.common.runtime.internal.view.model.common; + +/** + * Maps tag attributes to component properties. + * + * @author cbateman + * + */ +public interface IComponentPropertyHandler extends ITagAttributeHandler +{ + /** + * @return the property name that this handler maps to. + */ + String getPropertyName(); +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/view/model/common/ITagAttributeHandler.java b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/view/model/common/ITagAttributeHandler.java new file mode 100644 index 000000000..f6d15c9ab --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/view/model/common/ITagAttributeHandler.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright (c) ${year} 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.common.runtime.internal.view.model.common; + +import java.io.Serializable; + +/** + * Basic information on attributes. + * TODO C.B: some question exists in my mind as to how/whether this should merge + * with meta-data enabled type descriptors. + * + * @author cbateman + * + */ +public interface ITagAttributeHandler extends Serializable +{ + /** + * @return the name of the attribute + */ + String getName(); + /** + * @return the name of an extension point used to perform custom handling + * of the attribute. + */ + String getCustomHandler(); + + /** + * @return true if the property allows EL expressions + */ + boolean isELAllowed(); +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/view/model/common/ITagElement.java b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/view/model/common/ITagElement.java index 1eb4a4ba3..23a8098ea 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/view/model/common/ITagElement.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/view/model/common/ITagElement.java @@ -11,6 +11,7 @@ package org.eclipse.jst.jsf.common.runtime.internal.view.model.common; import java.io.Serializable; +import java.util.Map; /** * Super-interface of all JSF tag elements. @@ -38,6 +39,13 @@ public interface ITagElement extends Serializable public abstract String getTagHandlerClassName(); /** + * @return an unmodifiable map, indexed by name, of all the attribute + * handlers available for this tag element. Each value in the Map + * must be a ITagAttributeHandler. + */ + public abstract Map getAttributeHandlers(); + + /** * Signals that the tag element should make any mutable data immutable * and throw exceptions if attempts are made to implement. Flag must * latch and become irrevocable. diff --git a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/view/model/common/TagAttributeHandler.java b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/view/model/common/TagAttributeHandler.java new file mode 100644 index 000000000..b29349515 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/view/model/common/TagAttributeHandler.java @@ -0,0 +1,57 @@ +/******************************************************************************* + * Copyright (c) ${year} 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.common.runtime.internal.view.model.common; + +/** + * Default implementation of ITagAttributeHandler. + * + * @author cbateman + * + */ +public class TagAttributeHandler implements ITagAttributeHandler +{ + /** + * + */ + private static final long serialVersionUID = 8153903018703133004L; + private final String _customHandler; + private final String _name; + private final boolean _elAllowed; + + /** + * @param customHandler + * @param name + * @param elAllowed + */ + public TagAttributeHandler(final String customHandler, final String name, + final boolean elAllowed) + { + super(); + _customHandler = customHandler; + _elAllowed = elAllowed; + _name = name; + } + + public String getCustomHandler() + { + return _customHandler; + } + + public String getName() + { + return _name; + } + + public boolean isELAllowed() + { + return _elAllowed; + } +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/view/model/common/TagElement.java b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/view/model/common/TagElement.java index ec2a8115a..fb04e6f77 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/view/model/common/TagElement.java +++ b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/view/model/common/TagElement.java @@ -10,6 +10,8 @@ *******************************************************************************/ package org.eclipse.jst.jsf.common.runtime.internal.view.model.common; +import java.util.Map; + /** * Abstract a tag element used to construct a view element * @@ -38,4 +40,9 @@ public abstract class TagElement implements ITagElement * @see org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ITagElement#getTagHandlerClassName() */ public abstract String getTagHandlerClassName(); + + /* (non-Javadoc) + * @see org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ITagElement#getAttributeHandlers() + */ + public abstract Map getAttributeHandlers(); } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/META-INF/MANIFEST.MF b/jsf/plugins/org.eclipse.jst.jsf.core/META-INF/MANIFEST.MF index 25a697e74..342edcecc 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/META-INF/MANIFEST.MF +++ b/jsf/plugins/org.eclipse.jst.jsf.core/META-INF/MANIFEST.MF @@ -71,6 +71,7 @@ Export-Package: org.eclipse.jst.jsf.core, org.eclipse.jst.jsf.designtime.internal.jsp;x-internal:=true, org.eclipse.jst.jsf.designtime.internal.symbols;x-friends:="org.eclipse.jst.jsf.designtime.tests", org.eclipse.jst.jsf.designtime.internal.view;x-internal:=true, + org.eclipse.jst.jsf.designtime.internal.view.mapping;x-internal:=true, org.eclipse.jst.jsf.designtime.internal.view.model;x-internal:=true, org.eclipse.jst.jsf.designtime.internal.view.model.jsp;x-internal:=true, org.eclipse.jst.jsf.designtime.internal.view.model.jsp.analyzer;x-friends:="org.eclipse.jst.jsf.designtime.tests", diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/model/componentMapping.ecore b/jsf/plugins/org.eclipse.jst.jsf.core/model/componentMapping.ecore new file mode 100644 index 000000000..1c882cf5d --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/model/componentMapping.ecore @@ -0,0 +1,143 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ecore:EPackage xmi:version="2.0" + xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="viewmapping" + nsURI="http://org.eclipse.jst.jsf.core/componentMapping.ecore" nsPrefix="viewMap"> + <eClassifiers xsi:type="ecore:EClass" name="TagMapping"> + <eOperations name="findBestMapping"> + <eParameters name="jsfVersion" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eParameters name="libVersion" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + </eOperations> + <eStructuralFeatures xsi:type="ecore:EReference" name="versionedTagToViewMappings" + upperBound="-1" eType="#//TagToViewObjectMapping" containment="true"> + <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> + <details key="kind" value="element"/> + <details key="name" value="versionedTagToViewMappings"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="customConversionFactoryId" + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> + <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> + <details key="kind" value="element"/> + <details key="name" value="customConversionFactoryId"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="beanMappedProperties" upperBound="-1" + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" defaultValueLiteral=""> + <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> + <details key="kind" value="element"/> + <details key="name" value="beanMappedProperties"/> + </eAnnotations> + </eStructuralFeatures> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="TagToViewObjectMapping"> + <eStructuralFeatures xsi:type="ecore:EReference" name="typeInfo" eType="#//ClassTypeInfo_" + containment="true"> + <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> + <details key="kind" value="element"/> + <details key="name" value="typeInfo"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="minJSFVersion" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" + defaultValueLiteral="1.1"> + <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> + <details key="kind" value="element"/> + <details key="name" value="minVersion"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="minLibraryVersion" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" + defaultValueLiteral=""> + <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> + <details key="kind" value="element"/> + <details key="name" value="minLibraryVersion"/> + </eAnnotations> + </eStructuralFeatures> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="ClassTypeInfo_"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="className" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> + <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> + <details key="kind" value="element"/> + <details key="name" value="className"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="superClasses" upperBound="-1" + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> + <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> + <details key="kind" value="element"/> + <details key="name" value="superClasses"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="interfaces" upperBound="-1" + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> + <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> + <details key="kind" value="element"/> + <details key="name" value="interfaces"/> + </eAnnotations> + </eStructuralFeatures> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="ComponentTypeInfo_" eSuperTypes="#//ClassTypeInfo_"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="componentType" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> + <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> + <details key="kind" value="element"/> + <details key="name" value="componentType"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="componentFamily" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> + <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> + <details key="kind" value="element"/> + <details key="name" value="componentFamily"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="renderType" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> + <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> + <details key="kind" value="element"/> + <details key="name" value="renderType"/> + </eAnnotations> + </eStructuralFeatures> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="ConverterTypeInfo_" eSuperTypes="#//ClassTypeInfo_"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="converterId" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> + <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> + <details key="kind" value="element"/> + <details key="name" value="converterId"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="forClasses" upperBound="-1" + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> + <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> + <details key="kind" value="element"/> + <details key="name" value="forClass"/> + </eAnnotations> + </eStructuralFeatures> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="ValidatorTypeInfo_" eSuperTypes="#//ClassTypeInfo_"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="validatorId" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> + <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> + <details key="kind" value="element"/> + <details key="name" value="validatorId"/> + </eAnnotations> + </eStructuralFeatures> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="AttributeToPropertyMapping"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="propertyName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> + <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> + <details key="kind" value="element"/> + <details key="name" value="propertyName"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="elAllowed" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" + defaultValueLiteral="true"> + <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> + <details key="kind" value="element"/> + <details key="name" value="elAllowed"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="customConversionFactoryId" + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> + <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> + <details key="kind" value="element"/> + <details key="name" value="customConversionFactoryId"/> + </eAnnotations> + </eStructuralFeatures> + </eClassifiers> +</ecore:EPackage> diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/model/componentMapping.genmodel b/jsf/plugins/org.eclipse.jst.jsf.core/model/componentMapping.genmodel new file mode 100644 index 000000000..19135f66a --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/model/componentMapping.genmodel @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<genmodel:GenModel xmi:version="2.0" + xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" + xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.jst.jsf.core/src" + modelPluginID="org.eclipse.jst.jsf.core" modelName="ComponentMapping" importerID="org.eclipse.emf.importer.ecore" + complianceLevel="5.0" language=""> + <foreignModel>componentMapping.ecore</foreignModel> + <genPackages prefix="ComponentMapping" basePackage="org.eclipse.jst.jsf.designtime.internal.view.mapping" + resource="XML" disposableProviderFactory="true" ecorePackage="componentMapping.ecore#/"> + <genClasses ecoreClass="componentMapping.ecore#//TagComponentMapping"> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference componentMapping.ecore#//TagComponentMapping/typeInfo"/> + </genClasses> + <genClasses ecoreClass="componentMapping.ecore#//ClassTypeInfo_"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute componentMapping.ecore#//ClassTypeInfo_/className"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute componentMapping.ecore#//ClassTypeInfo_/superClasses"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute componentMapping.ecore#//ClassTypeInfo_/interfaces"/> + </genClasses> + <genClasses ecoreClass="componentMapping.ecore#//ComponentTypeInfo_"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute componentMapping.ecore#//ComponentTypeInfo_/componentType"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute componentMapping.ecore#//ComponentTypeInfo_/componentFamily"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute componentMapping.ecore#//ComponentTypeInfo_/renderType"/> + </genClasses> + <genClasses ecoreClass="componentMapping.ecore#//ConverterTypeInfo_"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute componentMapping.ecore#//ConverterTypeInfo_/converterId"/> + </genClasses> + <genClasses ecoreClass="componentMapping.ecore#//ValidatorTypeInfo_"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute componentMapping.ecore#//ValidatorTypeInfo_/validatorId"/> + </genClasses> + </genPackages> +</genmodel:GenModel> diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/plugin.xml b/jsf/plugins/org.eclipse.jst.jsf.core/plugin.xml index fd7360475..04a9966f2 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/plugin.xml +++ b/jsf/plugins/org.eclipse.jst.jsf.core/plugin.xml @@ -11,6 +11,7 @@ <extension-point id="MetaDataEnabledFeatures" name="MetaDataEnabledFeatures" schema="schema/MetaDataEnabledFeatures.exsd"/> <extension-point id="tagregistry" name="JSF Tag Library Registry" schema="schema/tagregistry.exsd"/> <extension-point id="viewhandler" name="JSF View Handler Extension" schema="schema/viewhandler.exsd"/> + <extension-point id="customViewMapper" name="customViewMapper" schema="schema/customViewMapper.exsd"/> <extension point="org.eclipse.emf.ecore.generated_package"> <package @@ -21,6 +22,10 @@ uri = "http://org.eclipse.jsf.pagedesigner/paletteInfos.ecore" class = "org.eclipse.jst.jsf.tagdisplay.internal.paletteinfos.PaletteInfosPackage" genModel = "model/paletteInfos.genmodel" /> + <package + uri = "http://org.eclipse.jst.jsf.core/componentMapping.ecore" + class = "org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage" + genModel = "model/componentMapping.genmodel" /> </extension> <!-- JSF Project Facets --> <extension @@ -359,5 +364,12 @@ factoryId="org.eclipse.jst.jsf.core.valueExpressionSymbolFactory"> </contextSymbolFactory> </extension> + <extension + point="org.eclipse.jst.jsf.core.customViewMapper"> + <customViewMapper + class="org.eclipse.jst.jsf.designtime.internal.view.mapping.mappers.ValueHolderAttributeMapper" + id="valueHolderAttributeMapper"> + </customViewMapper> + </extension> </plugin> diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/schema/customViewMapper.exsd b/jsf/plugins/org.eclipse.jst.jsf.core/schema/customViewMapper.exsd new file mode 100644 index 000000000..19cea3f1c --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/schema/customViewMapper.exsd @@ -0,0 +1,104 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!-- Schema file written by PDE --> +<schema targetNamespace="org.eclipse.jst.jsf.core" xmlns="http://www.w3.org/2001/XMLSchema"> +<annotation> + <appinfo> + <meta.schema plugin="org.eclipse.jst.jsf.core" id="customViewMapper" name="customViewMapper"/> + </appinfo> + <documentation> + NOT API. CLIENTS SHOULD NOT USE. FUTURE COMPATABILITY IS EXPLICITLY NOT GUARANTEED. + </documentation> + </annotation> + + <element name="extension"> + <complexType> + <sequence> + <element ref="customViewMapper"/> + </sequence> + <attribute name="point" type="string" use="required"> + <annotation> + <documentation> + + </documentation> + </annotation> + </attribute> + <attribute name="id" type="string"> + <annotation> + <documentation> + + </documentation> + </annotation> + </attribute> + <attribute name="name" type="string"> + <annotation> + <documentation> + + </documentation> + <appinfo> + <meta.attribute translatable="true"/> + </appinfo> + </annotation> + </attribute> + </complexType> + </element> + + <element name="customViewMapper"> + <complexType> + <attribute name="id" type="string" use="required"> + <annotation> + <documentation> + Relative to the bundle name (actual id will be PLUGIN_ID + "." + $id). + </documentation> + </annotation> + </attribute> + <attribute name="class" type="string" use="required"> + <annotation> + <documentation> + + </documentation> + <appinfo> + <meta.attribute kind="java" basedOn="org.eclipse.jst.jsf.designtime.internal.view.mapping.AbstractCustomViewMapper:"/> + </appinfo> + </annotation> + </attribute> + </complexType> + </element> + + <annotation> + <appinfo> + <meta.section type="since"/> + </appinfo> + <documentation> + [Enter the first release in which this extension point appears.] + </documentation> + </annotation> + + <annotation> + <appinfo> + <meta.section type="examples"/> + </appinfo> + <documentation> + [Enter extension point usage example here.] + </documentation> + </annotation> + + <annotation> + <appinfo> + <meta.section type="apiinfo"/> + </appinfo> + <documentation> + [Enter API information here.] + </documentation> + </annotation> + + <annotation> + <appinfo> + <meta.section type="implementation"/> + </appinfo> + <documentation> + [Enter information about supplied implementation of this extension point.] + </documentation> + </annotation> + + +</schema> diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/ComponentConstructionData.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/ComponentConstructionData.java index 052413942..914f7efbf 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/ComponentConstructionData.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/ComponentConstructionData.java @@ -11,6 +11,7 @@ package org.eclipse.jst.jsf.designtime.internal.view; import org.eclipse.core.resources.IProject; +import org.eclipse.jface.text.IDocument; import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentInfo; /** @@ -24,18 +25,20 @@ public class ComponentConstructionData private ComponentInfo _parent; private int _idCounter; private final IProject _project; - + private final IDocument _document; /** * @param idCounter * @param parent * @param project + * @param document */ public ComponentConstructionData(final int idCounter, - final ComponentInfo parent, final IProject project) + final ComponentInfo parent, final IProject project, final IDocument document) { _parent = parent; _idCounter = idCounter; _project = project; + _document = document; } /** @@ -87,4 +90,13 @@ public class ComponentConstructionData { return _project; } + + /** + * @return the document context for the construction + */ + public final IDocument getDocument() + { + return _document; + } + } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/ViewObjectConstructionStrategy.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/ViewObjectConstructionStrategy.java index a49024a9e..ad3a7a231 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/ViewObjectConstructionStrategy.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/ViewObjectConstructionStrategy.java @@ -23,11 +23,13 @@ public abstract class ViewObjectConstructionStrategy<VIEW_DEFN_BASE_TYPE> { /** * For a tag element return the corresponding view object or null if - * there is no such object. + * there is no such object. XMLViewObjectMappingService must be updated + * if not null with any attribute->property mappings. * * @param viewBase the source object in the source * @param tagElement * @return a new view object or null if we can't do so */ - public abstract ViewObject createViewObject(VIEW_DEFN_BASE_TYPE viewBase, ITagElement tagElement); + public abstract ViewObject createViewObject(VIEW_DEFN_BASE_TYPE viewBase, + ITagElement tagElement); } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLComponentTreeConstructionStrategy.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLComponentTreeConstructionStrategy.java index 236ee9749..9139646ef 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLComponentTreeConstructionStrategy.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLComponentTreeConstructionStrategy.java @@ -14,18 +14,12 @@ import java.util.Iterator; import java.util.List; import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.IAdaptable; import org.eclipse.jface.text.IDocument; import org.eclipse.jst.jsf.common.runtime.internal.model.ViewObject; import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentFactory; import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentInfo; -import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ConverterDecorator; -import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.Decorator; -import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ValidatorDecorator; -import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext; -import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContextFactory; import org.eclipse.jst.jsf.designtime.context.DTFacesContext; -import org.eclipse.jst.jsf.designtime.internal.view.XMLViewObjectMappingService.ElementData; -import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; @@ -38,9 +32,10 @@ import org.w3c.dom.NodeList; public class XMLComponentTreeConstructionStrategy extends ComponentTreeConstructionStrategy<Node, IDocument> { - private final XMLViewDefnAdapter _adapter; - private final XMLViewObjectConstructionStrategy _objectConstructionStrategy; - private XMLViewObjectMappingService _tagMappingService; + private final XMLViewDefnAdapter _adapter; + // private final XMLViewObjectConstructionStrategy + // _objectConstructionStrategy; + private final IProject _project; /** * @param adapter @@ -50,8 +45,7 @@ public class XMLComponentTreeConstructionStrategy extends final XMLViewDefnAdapter adapter, final IProject project) { _adapter = adapter; - _objectConstructionStrategy = new XMLViewObjectConstructionStrategy( - adapter, new ComponentConstructionData(0, null, project)); + _project = project; } @Override @@ -64,24 +58,36 @@ public class XMLComponentTreeConstructionStrategy extends if (roots.size() > 0) { - _tagMappingService = (XMLViewObjectMappingService) viewRoot - .getServices() - .getAdapter(XMLViewObjectMappingService.class); - _objectConstructionStrategy.getConstructionData().setIdCounter(0); + final IAdaptable adaptable = viewRoot.getServices(); + + XMLViewObjectMappingService tagMappingService = null; + if (adaptable != null) + { + tagMappingService = (XMLViewObjectMappingService) adaptable + .getAdapter(XMLViewObjectMappingService.class); + } + final XMLViewObjectConstructionStrategy objectConstructionStrategy = + new XMLViewObjectConstructionStrategy( + _adapter, new ComponentConstructionData(0, null, _project, + container), tagMappingService); + + objectConstructionStrategy.getConstructionData().setIdCounter(0); // can only handle a single root for XML; should be the DOM root - return buildComponentTree(roots.get(0), viewRoot, container); + return buildComponentTree(roots.get(0), viewRoot, container, + objectConstructionStrategy); } return viewRoot; } private ComponentInfo buildComponentTree(final Node root, - final DTUIViewRoot viewRoot, final IDocument document) + final DTUIViewRoot viewRoot, final IDocument document, + final XMLViewObjectConstructionStrategy objectConstructionStrategy) { final ComponentInfo dummyRoot = ComponentFactory.createComponentInfo( null, null, null, true); // populate the dummy root - recurseDOMModel(root, dummyRoot, document); + recurseDOMModel(root, dummyRoot, document, objectConstructionStrategy); // try to extract the view defined root from the dummyRoot and update // 'root' with its children. @@ -157,60 +163,31 @@ public class XMLComponentTreeConstructionStrategy extends } private void recurseDOMModel(final Node node, final ComponentInfo parent, - final IDocument document) + final IDocument document, + XMLViewObjectConstructionStrategy objectConstructionStrategy) { ViewObject mappedObject = null; - _objectConstructionStrategy.getConstructionData().setParent(parent); + objectConstructionStrategy.getConstructionData().setParent(parent); mappedObject = _adapter.mapToViewObject(node, - _objectConstructionStrategy, document); + objectConstructionStrategy, document); ComponentInfo newParent = parent; - if (node instanceof Element) - { - maybeAddMapping(mappedObject, (Element) node, document); - } - if (mappedObject instanceof ComponentInfo) { parent.addChild((ComponentInfo) mappedObject); newParent = (ComponentInfo) mappedObject; } - else if (mappedObject instanceof ConverterDecorator) - { - // TODO: validate for parent is not a ValueHolder - parent.addDecorator((Decorator) mappedObject, - ComponentFactory.CONVERTER); - } - else if (mappedObject instanceof ValidatorDecorator) - { - // TODO: validate for parent is a not an EditableValueHolder - parent.addDecorator((Decorator) mappedObject, - ComponentFactory.VALIDATOR); - } final NodeList children = node.getChildNodes(); final int numChildren = children.getLength(); for (int i = 0; i < numChildren; i++) { - recurseDOMModel(children.item(i), newParent, document); - } - } - - private void maybeAddMapping(ViewObject mappedObject, Element node, - IDocument document) - { - if (mappedObject != null && _tagMappingService != null) - { - final String uri = _adapter.getNamespace(node, document); - final IStructuredDocumentContext context = IStructuredDocumentContextFactory.INSTANCE - .getContext(document, node); - final ElementData elementData = XMLViewObjectMappingService - .createElementData(uri, node.getLocalName(), context); - _tagMappingService.createMapping(elementData, mappedObject); + recurseDOMModel(children.item(i), newParent, document, + objectConstructionStrategy); } } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewDefnAdapter.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewDefnAdapter.java index c043d896e..842f92ccb 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewDefnAdapter.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewDefnAdapter.java @@ -12,6 +12,7 @@ package org.eclipse.jst.jsf.designtime.internal.view; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.List; import org.eclipse.core.runtime.IAdaptable; @@ -144,7 +145,8 @@ public abstract class XMLViewDefnAdapter extends context.getStructuredDocument()); final ElementData elementData = XMLViewObjectMappingService .createElementData(uri, viewDefnObject - .getLocalName(), context); + .getLocalName(), context, + Collections.EMPTY_MAP); return ((XMLViewObjectMappingService) serviceAdapter) .findViewObject(elementData); } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewObjectConstructionStrategy.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewObjectConstructionStrategy.java index d36891f99..983fd7f80 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewObjectConstructionStrategy.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewObjectConstructionStrategy.java @@ -16,6 +16,7 @@ import java.util.Map; import java.util.Set; import org.eclipse.jdt.core.Signature; +import org.eclipse.jface.text.IDocument; import org.eclipse.jst.jsf.common.internal.types.TypeConstants; import org.eclipse.jst.jsf.common.runtime.internal.model.ViewObject; import org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.ActionSourceInfo; @@ -30,14 +31,23 @@ import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ConverterDeco import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ConverterTypeInfo; import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ValidatorDecorator; import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ValidatorTypeInfo; +import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.IComponentPropertyHandler; import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.IComponentTagElement; import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.IConverterTagElement; +import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ITagAttributeHandler; import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ITagElement; import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.IValidatorTagElement; import org.eclipse.jst.jsf.common.util.JDTBeanProperty; +import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext; +import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContextFactory; import org.eclipse.jst.jsf.core.internal.JSFCorePlugin; +import org.eclipse.jst.jsf.designtime.internal.view.XMLViewObjectMappingService.ElementData; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.ICustomViewMapper; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.ICustomViewMapper.PropertyMapping; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.CustomViewMapperExtensionLoader; import org.w3c.dom.Attr; import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; /** * A strategy for constructing view objects. @@ -48,20 +58,32 @@ import org.w3c.dom.Element; public class XMLViewObjectConstructionStrategy extends ViewObjectConstructionStrategy<Element> { - private static final String GENERATED_ID = "_generatedId"; - private final ComponentConstructionData _constructionData; - private final XMLViewDefnAdapter _adapter; + private static final String GENERATED_ID = "_generatedId"; + private final ComponentConstructionData _constructionData; + private final XMLViewDefnAdapter _adapter; + private final XMLViewObjectMappingService _mappingService; /** * @param adapter + * MUST NOT BE NULL * @param constructionData + * MUST NOT BE NULL + * @param mappingService + * MAY BE NULL */ public XMLViewObjectConstructionStrategy(final XMLViewDefnAdapter adapter, - final ComponentConstructionData constructionData) + final ComponentConstructionData constructionData, + final XMLViewObjectMappingService mappingService) { super(); + if (adapter == null || constructionData == null) + { + throw new IllegalArgumentException( + "adapter and constructionData must not be null"); + } _constructionData = constructionData; _adapter = adapter; + _mappingService = mappingService; } @Override @@ -72,37 +94,55 @@ public class XMLViewObjectConstructionStrategy extends { if (tagElement instanceof IComponentTagElement) { - final ComponentTypeInfo typeInfo = ((IComponentTagElement) tagElement) - .getComponent(); String id = null; // only generate ids for non-viewroot components. This will // make the generated id's more faithful to runtime since the // running count won't be incremented for view roots (as they // won't at runtime). + final ComponentTypeInfo typeInfo = ((IComponentTagElement) tagElement) + .getComponent(); + if (!"javax.faces.ViewRoot".equals(typeInfo.getComponentType())) { id = calculateId(element, _constructionData); } - return findBestComponent(element, id, typeInfo); + return findBestComponent(tagElement.getUri(), element, id, + (IComponentTagElement) tagElement); } else if (tagElement instanceof IConverterTagElement) { final ConverterTypeInfo typeInfo = ((IConverterTagElement) tagElement) .getConverter(); // TODO: validate when no parent - return new ConverterDecorator(_constructionData.getParent(), - typeInfo); + ComponentInfo parent = _constructionData.getParent(); + parent = findFirstParent( + ComponentFactory.INTERFACE_VALUEHOLDER, parent); + if (parent != null) + { + parent.addDecorator( + new ConverterDecorator(parent, typeInfo), + ComponentFactory.CONVERTER); + } + // TODO: else validate problem } else if (tagElement instanceof IValidatorTagElement) { final ValidatorTypeInfo typeInfo = ((IValidatorTagElement) tagElement) .getValidator(); - return new ValidatorDecorator(_constructionData.getParent(), - typeInfo); + ComponentInfo parent = _constructionData.getParent(); + parent = findFirstParent( + ComponentFactory.INTERFACE_EDITABLEVALUEHOLDER, parent); + if (parent != null) + { + parent.addDecorator( + new ValidatorDecorator(parent, typeInfo), + ComponentFactory.VALIDATOR); + } + // TODO :else validate problem } } - catch (Exception e) + catch (final Exception e) { // log and ignore if an individual construction fails JSFCorePlugin.log(e, "Error constructing view object"); @@ -110,15 +150,31 @@ public class XMLViewObjectConstructionStrategy extends return null; } - private ComponentInfo findBestComponent(final Element srcElement, - final String id, final ComponentTypeInfo typeInfo) + private ComponentInfo findFirstParent(final String matchingType, + final ComponentInfo start) + { + ComponentInfo parent = start; + + while (parent != null && parent.getComponentTypeInfo() != null + && !parent.getComponentTypeInfo().isInstanceOf(matchingType)) + { + parent = parent.getParent(); + } + return parent; + } + + private ComponentInfo findBestComponent(final String uri, + final Element srcElement, final String id, + final IComponentTagElement tagElement) { ComponentInfo bestComponent = null; final ComponentInfo parent = _constructionData.getParent(); - final Map<String, Object> initMap = new HashMap(); - populateInitMap(initMap, srcElement, typeInfo); + final Map<String, Object> initMap = new HashMap<String, Object>(); + final Map<String, String> attributeToPropertyMap = new HashMap<String, String>(); + populateInitMap(uri, initMap, srcElement, tagElement, + attributeToPropertyMap); if (initMap.get("id") == null) { @@ -126,6 +182,8 @@ public class XMLViewObjectConstructionStrategy extends initMap.put("id", id); } + final ComponentTypeInfo typeInfo = tagElement.getComponent(); + // if we have a well-established base type, try that first // sub-classes must occur before superclasses to ensure most accurate // detection. @@ -163,35 +221,137 @@ public class XMLViewObjectConstructionStrategy extends } addTypeAdapters(bestComponent); - // populateAttributes(srcElement, bestComponent); + maybeMapXMLToViewObjects(bestComponent, srcElement, + attributeToPropertyMap, _constructionData.getDocument()); + maybeUpdateViewObject(bestComponent, srcElement, tagElement); return bestComponent; } - private void populateInitMap(final Map initMap, final Element srcElement, - final ComponentTypeInfo typeInfo) + // TODO: move to view definition adapter? + private void populateInitMap(final String uri, + final Map<String, Object> initMap, final Element srcElement, + final IComponentTagElement tagElement, + final Map<String, String> attributeToPropertyMap) { + final ComponentTypeInfo typeInfo = tagElement.getComponent(); final Map<String, JDTBeanProperty> properties = DTComponentIntrospector .getBeanProperties(typeInfo, _constructionData.getProject()); + final Map<String, ITagAttributeHandler> attributeHandlers = tagElement + .getAttributeHandlers(); + + final NamedNodeMap nodeMap = srcElement.getAttributes(); + + if (nodeMap != null && attributeHandlers != null) + { + for (int i = 0; i < nodeMap.getLength(); i++) + { + final Attr attr = (Attr) nodeMap.item(i); + if (attr != null) + { + final String name = attr.getLocalName(); + + if (name != null) + { + final ITagAttributeHandler attrHandler = attributeHandlers + .get(name); + if (attrHandler instanceof IComponentPropertyHandler) + { + mapComponentProperty(uri, srcElement, properties, + (IComponentPropertyHandler) attrHandler, + attr, name, initMap, attributeHandlers, + attributeToPropertyMap); + } + } + } + } + } + } - for (final Map.Entry<String, JDTBeanProperty> propertyEntry : properties - .entrySet()) + private void mapComponentProperty(final String uri, + final Element srcElement, + final Map<String, JDTBeanProperty> properties, + final IComponentPropertyHandler attrHandler, final Attr attr, + final String attributeName, final Map initMap, + final Map<String, ITagAttributeHandler> attributeHandlers, + final Map<String, String> attributeToPropertyMap) + { + final String propertyName = attrHandler.getPropertyName(); + if (properties.containsKey(propertyName)) { - final String name = propertyEntry.getKey(); + final String id = attrHandler.getCustomHandler(); - // see if there is an attribute on srcElement - final Attr valueAttr = _adapter.mapAttributeToComponent(srcElement, - name); + ICustomViewMapper mapper = null; + + if (id != null) + { + mapper = CustomViewMapperExtensionLoader + .getCustomViewMapper(id); + if (mapper != null) + { + final PropertyMapping mapping = mapper + .mapToComponentProperty(uri, srcElement, attr); + if (mapping != null) + { + initMap.put(mapping.getName(), mapping.getProperty()); + attributeToPropertyMap.put(attributeName, mapping + .getName()); + return; + } + } + } - if (valueAttr != null) + final String value = attr.getValue(); + if (value != null) { - final String value = valueAttr.getNodeValue(); + final Object convertedValue = convertFromString(value, + properties.get(propertyName)); + initMap.put(propertyName, convertedValue); + } + attributeToPropertyMap.put(attributeName, propertyName); + } + } - // TODO: need to handle EL cases - if (value != null) + private void maybeMapXMLToViewObjects(final ViewObject mappedObject, + final Element node, + final Map<String, String> attributeToProperties, + final IDocument document) + { + if (mappedObject != null && _mappingService != null) + { + final String uri = _adapter.getNamespace(node, document); + final IStructuredDocumentContext context = IStructuredDocumentContextFactory.INSTANCE + .getContext(document, node); + final ElementData elementData = XMLViewObjectMappingService + .createElementData(uri, node.getLocalName(), context, + attributeToProperties); + + _mappingService.createMapping(elementData, mappedObject); + } + } + + private void maybeUpdateViewObject(final ComponentInfo bestComponent, + final Element srcElement, final ITagElement tagElement) + { + for (int i = 0; i < srcElement.getAttributes().getLength(); i++) + { + final Attr attr = (Attr) srcElement.getAttributes().item(i); + final Map<String, ITagAttributeHandler> attributeHandlers = tagElement + .getAttributeHandlers(); + + if (attributeHandlers != null) + { + final String id = attributeHandlers.get(attr.getLocalName()) + .getCustomHandler(); + + ICustomViewMapper mapper = null; + + if (id != null) { - Object convertedValue = convertFromString(value, - propertyEntry.getValue()); - initMap.put(name, convertedValue); + mapper = CustomViewMapperExtensionLoader.getCustomViewMapper(id); + if (mapper != null) + { + mapper.doAttributeActions(bestComponent, srcElement, attr); + } } } } @@ -205,19 +365,19 @@ public class XMLViewObjectConstructionStrategy extends Object result = null; switch (Signature.getTypeSignatureKind(signature)) { - case Signature.BASE_TYPE_SIGNATURE: - result = convertFromBaseType(convertValue, signature); + case Signature.BASE_TYPE_SIGNATURE: + result = convertFromBaseType(convertValue, signature); break; - case Signature.CLASS_TYPE_SIGNATURE: - if (TypeConstants.TYPE_STRING.equals(signature)) - { - result = convertValue; - } - else if (TypeConstants.TYPE_JAVAOBJECT.equals(signature)) - { - result = convertValue; - } + case Signature.CLASS_TYPE_SIGNATURE: + if (TypeConstants.TYPE_STRING.equals(signature)) + { + result = convertValue; + } + else if (TypeConstants.TYPE_JAVAOBJECT.equals(signature)) + { + result = convertValue; + } break; } @@ -240,7 +400,7 @@ public class XMLViewObjectConstructionStrategy extends { return Integer.valueOf(convertValue); } - catch (NumberFormatException nfe) + catch (final NumberFormatException nfe) { return null; } @@ -249,10 +409,9 @@ public class XMLViewObjectConstructionStrategy extends { try { - return Long.valueOf(convertValue); } - catch (NumberFormatException nfe) + catch (final NumberFormatException nfe) { return null; } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewObjectMappingService.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewObjectMappingService.java index b15ab0ce1..362fc56b3 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewObjectMappingService.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/XMLViewObjectMappingService.java @@ -12,6 +12,7 @@ package org.eclipse.jst.jsf.designtime.internal.view; import java.io.IOException; import java.io.Serializable; +import java.util.Collections; import java.util.HashMap; import java.util.Map; @@ -226,10 +227,12 @@ public final class XMLViewObjectMappingService implements Serializable * @param namespace * @param tagName * @param context + * @param attributeToPropertyMap * @return a new Element data for the namespace/element name in 'context' */ public static ElementData createElementData(final String namespace, - final String tagName, final IStructuredDocumentContext context) + final String tagName, final IStructuredDocumentContext context, + final Map<String, String> attributeToPropertyMap) { final IFile file = getFile(context); final int offset = context.getDocumentPosition(); @@ -239,7 +242,8 @@ public final class XMLViewObjectMappingService implements Serializable { return new ElementData(offset, file.getFullPath().toString(), TagIdentifierFactory - .createJSPTagWrapper(namespace, tagName)); + .createJSPTagWrapper(namespace, tagName), + attributeToPropertyMap); } return null; } @@ -272,6 +276,7 @@ public final class XMLViewObjectMappingService implements Serializable private static final long serialVersionUID = 7937312530318827977L; private transient TagIdentifier _tagId; + private Map<String, String> _attributeToPropertyMap; private String _documentPath; private int _startOffset; @@ -279,14 +284,18 @@ public final class XMLViewObjectMappingService implements Serializable * @param startOffset * @param documentPath * @param tagId + * @param attributeToPropertyMap constructor takes copy of map */ private ElementData(final int startOffset, final String documentPath, - final TagIdentifier tagId) + final TagIdentifier tagId, Map<String, String> attributeToPropertyMap) { super(); _startOffset = startOffset; + _tagId = tagId; _documentPath = documentPath; + _attributeToPropertyMap = Collections.unmodifiableMap( + new HashMap<String,String>(attributeToPropertyMap)); } /** @@ -305,6 +314,16 @@ public final class XMLViewObjectMappingService implements Serializable return _tagId; } + /** + * @param forTagAttribute + * @return the name of the view object property that forTagAttribute + * maps to on this element or null if none. + */ + public final String getPropertyName(final String forTagAttribute) + { + return _attributeToPropertyMap.get(forTagAttribute); + } + final int getStartOffset() { return _startOffset; @@ -359,6 +378,5 @@ public final class XMLViewObjectMappingService implements Serializable hashCode ^= ~(_startOffset * 104551); return hashCode; } - } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/AbstractCustomViewMapper.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/AbstractCustomViewMapper.java new file mode 100644 index 000000000..f50a460e8 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/AbstractCustomViewMapper.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * 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.designtime.internal.view.mapping; + +import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentInfo; +import org.w3c.dom.Attr; +import org.w3c.dom.Element; + +/** + * Must be sub-classed by all ICustomViewMapper's. + * + * @author cbateman + * + */ +public abstract class AbstractCustomViewMapper implements ICustomViewMapper +{ + public abstract PropertyMapping mapToComponentProperty(final String uri, + final Element srcElement, final Attr attr); + + public abstract void doAttributeActions(final ComponentInfo bestComponent, + final Element srcElement, final Attr attr); +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/CustomViewMappingAdapter.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/CustomViewMappingAdapter.java new file mode 100644 index 000000000..4d3830bf3 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/CustomViewMappingAdapter.java @@ -0,0 +1,40 @@ +/******************************************************************************* + * 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.designtime.internal.view.mapping; + +import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentInfo; +import org.w3c.dom.Attr; +import org.w3c.dom.Element; + +/** + * A no-op implementation that sub-classes can selectively override. + * + * @author cbateman + * + */ +public class CustomViewMappingAdapter extends AbstractCustomViewMapper +{ + + @Override + public void doAttributeActions(ComponentInfo bestComponent, + Element srcElement, Attr attr) + { + // do nothing + } + + @Override + public PropertyMapping mapToComponentProperty(String uri, + Element srcElement, Attr attr) + { + // no mappings + return null; + } +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/ICustomViewMapper.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/ICustomViewMapper.java new file mode 100644 index 000000000..954167e59 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/ICustomViewMapper.java @@ -0,0 +1,83 @@ +/******************************************************************************* + * 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.designtime.internal.view.mapping; + +import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentInfo; +import org.w3c.dom.Attr; +import org.w3c.dom.Element; + +/** + * A custom view mapper to map from elements and attributes to view objects and + * properties. + * + * @author cbateman + * + */ +public interface ICustomViewMapper +{ + /** + * @param uri + * @param srcElement + * @param attr + * @return the name/value of the component property or null if no mapping. + */ + PropertyMapping mapToComponentProperty(final String uri, + final Element srcElement, final Attr attr); + + /** + * Allows a mapper to make updates to a component based on its attribute. + * May choose to do nothing. + * + * @param bestComponent + * @param srcElement + * @param attr + */ + void doAttributeActions(ComponentInfo bestComponent, Element srcElement, + Attr attr); + + /** + * The name/value pair of a component property mapping. + * + * @author cbateman + * + */ + public static class PropertyMapping + { + private final String _name; + private final Object _property; + + /** + * @param name + * @param property + */ + public PropertyMapping(final String name, final Object property) + { + _name = name; + _property = property; + } + + /** + * @return the property name + */ + public final String getName() + { + return _name; + } + + /** + * @return the property value + */ + public final Object getProperty() + { + return _property; + } + } +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/ViewMetadataGenerator.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/ViewMetadataGenerator.java new file mode 100644 index 000000000..919d54f28 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/ViewMetadataGenerator.java @@ -0,0 +1,202 @@ +package org.eclipse.jst.jsf.designtime.internal.view.mapping; + +import java.io.IOException; +import java.io.OutputStream; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.emf.ecore.util.BasicExtendedMetaData; +import org.eclipse.emf.ecore.util.ExtendedMetaData; +import org.eclipse.emf.ecore.xmi.XMLHelper; +import org.eclipse.emf.ecore.xmi.XMLResource; +import org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl; +import org.eclipse.emf.ecore.xmi.impl.XMLResourceFactoryImpl; +import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl; +import org.eclipse.jst.jsf.common.metadata.Entity; +import org.eclipse.jst.jsf.common.metadata.MetadataFactory; +import org.eclipse.jst.jsf.common.metadata.MetadataPackage; +import org.eclipse.jst.jsf.common.metadata.Model; +import org.eclipse.jst.jsf.common.metadata.Trait; +import org.eclipse.jst.jsf.common.runtime.internal.model.types.ClassTypeInfo; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ClassTypeInfo_; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingFactory; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagMapping; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagToViewObjectMapping; + +/** + * Generates View metadata from common.runtime objects. + * + * @author cbateman + * + */ +public class ViewMetadataGenerator +{ + private final ResourceSet _resourceSet; + private final ExtendedMetaData _extendedMetadata; + private final Model _root; + private final ViewMetadataMapper _mapper; + + /** + * @param uri + */ + public ViewMetadataGenerator(final String uri) + { + _root = MetadataFactory.eINSTANCE.createModel(); + _root.setId(uri); + _root.setType("tagFile"); + _resourceSet = new ResourceSetImpl(); + _mapper = new ViewMetadataMapper(); + _extendedMetadata = new BasicExtendedMetaData(_resourceSet + .getPackageRegistry()); + + // Register the appropriate resource factory to handle all file + // extensions. + // + _resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap() + .put(Resource.Factory.Registry.DEFAULT_EXTENSION, + new XMLResourceFactoryImpl()); + } + + /** + * The format of the strings should match OSGI version: + * + * MAJOR . MINOR . BUILD . QUALIFIER + * + * @param tagName + * @param typeInfo + * @param minJSFVersion + * the minimum JSF version, null for DEFAULT. + * @param minLibVersion + * the minimum library version, null for NONE. + */ + public void addTagToViewObjectMapping(final String tagName, + final ClassTypeInfo typeInfo, final String minJSFVersion, + final String minLibVersion) + { + final ClassTypeInfo_ metadata = _mapper.mapToMetadata(typeInfo); + + if (metadata != null) + { + final TagToViewObjectMapping viewMapping = + ComponentMappingFactory.eINSTANCE.createTagToViewObjectMapping(); + if (minJSFVersion != null) + { + viewMapping.setMinJSFVersion(minJSFVersion); + } + viewMapping.setMinLibraryVersion(minLibVersion); + viewMapping.setTypeInfo(metadata); + + final TagMapping tagMapping = findOrCreateTagMapping(tagName); + tagMapping.getVersionedTagToViewMappings().add(viewMapping); + + final Trait trait = MetadataFactory.eINSTANCE.createTrait(); + trait.setId(ViewMetadataMapper.DEFAULT_MAPPING_TRAIT_ID); + trait.setValue(tagMapping); + + final Entity entity = MetadataFactory.eINSTANCE.createEntity(); + entity.setId(tagName); + entity.setType("tag"); + entity.getTraits().add(trait); + + _root.getChildEntities().add(entity); + } + } + + private TagMapping findOrCreateTagMapping(final String tagName) + { + for (final Entity entity : (List<Entity>)_root.getChildEntities()) + { + if (entity.getId().equals(tagName)) + { + for (final Trait trait : (List<Trait>)entity.getTraits()) + { + if (trait.getId().equals(ViewMetadataMapper.DEFAULT_MAPPING_TRAIT_ID)) + { + return (TagMapping) trait.getValue(); + } + } + } + } + return ComponentMappingFactory.eINSTANCE.createTagMapping(); + } + + /** + * @param out + * @throws IOException + */ + public void save(final OutputStream out) throws IOException + { + final Resource res = new XMLResourceImpl() + { + @Override + protected XMLHelper createXMLHelper() + { + return new XMLHelperImpl() + { + public String getHREF(EObject obj) + { + return ComponentMappingPackage.eNS_URI; + } + + @Override + public EPackage getNoNamespacePackage() + { + return MetadataPackage.eINSTANCE; + } + }; + } + };// _resourceSet.createResource(URI.createURI("foo.xml")); + res.getContents().add(_root); + // res.setURI(uri); + // resourceSet.getResources().add(res); + // setLoadOptions(res); + Map options = new HashMap(); + options.put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE); + options.put(XMLResource.OPTION_EXTENDED_META_DATA, _extendedMetadata); + // options.put(XMLResource.OPTION_RESOURCE_HANDLER, res); + options.put(XMLResource.OPTION_LAX_FEATURE_PROCESSING, Boolean.TRUE); + options.put(XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.FALSE);// turning + // this + // off + // so + // that + // res.getErrors() + // has + // values + // to + // check! + // bizarre + // that + // I + // should + // need + // to + // do + // this. + res.save(out, options); + } + + // private void printHeader(final OutputStream out) throws IOException + // { + // final String header = "<md:metadatamodel \n" + // + "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" + // + "xmlns:ecore=\"http://www.eclipse.org/emf/2002/Ecore\"" + // + + // "xmlns:md=\"http://org.eclipse.jst.jsf.common.metadata/metadata.ecore\"" + // + + // "xmlns:mdt=\"http://org.eclipse.jst.jsf.common.metadata/metadataTraitTypes.ecore\" + // " + // + + // "xmlns:viewMap=\"http://org.eclipse.jst.jsf.core/componentMapping.ecore\"" + // + "id=\"http://java.sun.com/jsf/html\"" + // + "type\"tagFile\">"; + // out.write(header.getBytes()); + // } +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/ViewMetadataLoader.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/ViewMetadataLoader.java new file mode 100644 index 000000000..b422bb87c --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/ViewMetadataLoader.java @@ -0,0 +1,96 @@ +package org.eclipse.jst.jsf.designtime.internal.view.mapping; + +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.core.resources.IProject; +import org.eclipse.jst.jsf.common.dom.TagIdentifier; +import org.eclipse.jst.jsf.common.metadata.Entity; +import org.eclipse.jst.jsf.common.metadata.Trait; +import org.eclipse.jst.jsf.common.metadata.query.ITaglibDomainMetaDataModelContext; +import org.eclipse.jst.jsf.common.metadata.query.TaglibDomainMetaDataQueryHelper; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.AttributeToPropertyMapping; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagMapping; + +/** + * Loader class for view metadata. + * + * @author cbateman + * + */ +public class ViewMetadataLoader +{ + private final IProject _project; + private final Map<String, ITaglibDomainMetaDataModelContext> _metadataContexts; + + /** + * @param project + */ + public ViewMetadataLoader(final IProject project) + { + _project = project; + _metadataContexts = new HashMap<String, ITaglibDomainMetaDataModelContext>(); + } + + /** + * @param tagId + * @return the tag to view object mapping metadata for a tag in a particular + * metadata context or null if not found. + */ + public TagMapping getTagToViewMapping(final TagIdentifier tagId) + { + final ITaglibDomainMetaDataModelContext modelContext = createMetadataContext(tagId + .getUri()); + final Entity entity = TaglibDomainMetaDataQueryHelper.getEntity( + modelContext, tagId.getTagName()); + if (entity != null) + { + final Trait trait = TaglibDomainMetaDataQueryHelper.getTrait( + entity, ViewMetadataMapper.DEFAULT_MAPPING_TRAIT_ID); + if (trait != null) + { + return (TagMapping) trait.getValue(); + } + } + return null; + } + + private ITaglibDomainMetaDataModelContext createMetadataContext( + final String uri) + { + ITaglibDomainMetaDataModelContext modelContext = _metadataContexts + .get(uri); + + if (modelContext == null) + { + modelContext = TaglibDomainMetaDataQueryHelper + .createMetaDataModelContext(_project, uri); + _metadataContexts.put(uri, modelContext); + } + return modelContext; + } + + /** + * @param tagId + * @param name + * @return the attribute mapping for name on tagId or null if known + */ + public AttributeToPropertyMapping getAttributeMapping( + final TagIdentifier tagId, final String name) + { + final ITaglibDomainMetaDataModelContext modelContext = createMetadataContext(tagId + .getUri()); + final Entity entity = TaglibDomainMetaDataQueryHelper.getEntity( + modelContext, tagId.getTagName()+"/"+name); + if (entity != null) + { + final Trait trait = TaglibDomainMetaDataQueryHelper.getTrait( + entity, ViewMetadataMapper.DEFAULT_ATTRIBUTE_TRAIT_ID); + if (trait != null) + { + return (AttributeToPropertyMapping) trait.getValue(); + } + } + return null; + } +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/ViewMetadataMapper.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/ViewMetadataMapper.java new file mode 100644 index 000000000..a4bb00f8b --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/ViewMetadataMapper.java @@ -0,0 +1,170 @@ +package org.eclipse.jst.jsf.designtime.internal.view.mapping; + +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.ClassTypeInfo; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ClassTypeInfo_; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingFactory; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentTypeInfo_; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ConverterTypeInfo_; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ValidatorTypeInfo_; + +/** + * Maps meta-data to and from common.runtime data. In future, we may eliminate + * this class by making the EMF meta-data structures into the common.runtime + * data. + * + * @author cbateman + * + */ +public final class ViewMetadataMapper +{ + + /** + * The default trait id where meta-data will annotated + */ + public final static String DEFAULT_MAPPING_TRAIT_ID = "viewElementMapping"; //$NON-NLS-1$ + /** + * The default trait id where meta-data will be annotated. + */ + public final static String DEFAULT_ATTRIBUTE_TRAIT_ID = "attributeMapping"; //$NON-NLS-1$ + + /** + * @param classTypeInfo + * @return a framework ClassTypeInfo equivalent to classTypeInfo or null if + * none. + */ + public ClassTypeInfo mapToFrameworkData(final ClassTypeInfo_ classTypeInfo) + { + if (classTypeInfo instanceof ComponentTypeInfo_) + { + return createComponentTypeInfo_((ComponentTypeInfo_) classTypeInfo); + } + else if (classTypeInfo instanceof ConverterTypeInfo_) + { + return createConverterTypeInfo_((ConverterTypeInfo_) classTypeInfo); + } + else if (classTypeInfo instanceof ValidatorTypeInfo_) + { + return createValidatorTypeInfo_((ValidatorTypeInfo_) classTypeInfo); + } + return null; + } + + private ClassTypeInfo createValidatorTypeInfo_( + ValidatorTypeInfo_ classTypeInfo) + { + final String[] superClasses = classTypeInfo.getSuperClasses().toArray( + new String[0]); + final String[] interfaces = classTypeInfo.getInterfaces().toArray( + new String[0]); + if (classTypeInfo.getClassName()==null && classTypeInfo.getValidatorId() == null) + { + return ValidatorTypeInfo.UNKNOWN; + } + + return new ValidatorTypeInfo(classTypeInfo.getClassName(), + superClasses, interfaces, classTypeInfo.getValidatorId()); + } + + private ClassTypeInfo createConverterTypeInfo_( + ConverterTypeInfo_ classTypeInfo) + { + final String[] superClasses = classTypeInfo.getSuperClasses().toArray( + new String[0]); + final String[] interfaces = classTypeInfo.getInterfaces().toArray( + new String[0]); + if (classTypeInfo.getClassName() == null + && classTypeInfo.getConverterId() == null) + { + return ConverterTypeInfo.UNKNOWN; + } + final String[] forClasses = classTypeInfo.getForClasses().toArray( + new String[0]); + return new ConverterTypeInfo(classTypeInfo.getClassName(), + superClasses, interfaces, classTypeInfo.getConverterId(), + forClasses); + } + + private ClassTypeInfo createComponentTypeInfo_( + ComponentTypeInfo_ classTypeInfo) + { + final String[] superClasses = classTypeInfo.getSuperClasses().toArray( + new String[0]); + final String[] interfaces = classTypeInfo.getInterfaces().toArray( + new String[0]); + return new ComponentTypeInfo(classTypeInfo.getComponentType(), + classTypeInfo.getClassName(), superClasses, interfaces, + classTypeInfo.getComponentFamily(), classTypeInfo + .getRenderType()); + } + + /** + * @param classTypeInfo + * @return a metadata type info matching classTypeInfo or null if + * classTypeInfo isn't of a supported concrete type. + */ + public ClassTypeInfo_ mapToMetadata(final ClassTypeInfo classTypeInfo) + { + if (classTypeInfo instanceof ComponentTypeInfo) + { + return createComponentTypeInfo((ComponentTypeInfo) classTypeInfo); + } + else if (classTypeInfo instanceof ConverterTypeInfo) + { + return createConverterTypeInfo((ConverterTypeInfo) classTypeInfo); + } + else if (classTypeInfo instanceof ValidatorTypeInfo) + { + return createValidatorTypeInfo((ValidatorTypeInfo) classTypeInfo); + } + return null; + } + + private ClassTypeInfo_ createComponentTypeInfo( + final ComponentTypeInfo typeInfo) + { + final ComponentTypeInfo_ metadata = ComponentMappingFactory.eINSTANCE + .createComponentTypeInfo_(); + metadata.setComponentFamily(typeInfo.getComponentFamily()); + metadata.setComponentType(typeInfo.getComponentType()); + metadata.setRenderType(typeInfo.getRenderFamily()); + copy(typeInfo, metadata); + return metadata; + } + + private ClassTypeInfo_ createConverterTypeInfo( + final ConverterTypeInfo typeInfo) + { + final ConverterTypeInfo_ metadata = ComponentMappingFactory.eINSTANCE + .createConverterTypeInfo_(); + copy(typeInfo, metadata); + metadata.setConverterId(typeInfo.getConverterId()); + return metadata; + } + + private ClassTypeInfo_ createValidatorTypeInfo( + final ValidatorTypeInfo typeInfo) + { + final ValidatorTypeInfo_ metadata = ComponentMappingFactory.eINSTANCE + .createValidatorTypeInfo_(); + copy(typeInfo, metadata); + metadata.setValidatorId(typeInfo.getValidatorId()); + return metadata; + } + + private void copy(ClassTypeInfo source, ClassTypeInfo_ dest) + { + dest.setClassName(source.getClassName()); + for (final String interfaze : source.getInterfaces()) + { + dest.getInterfaces().add(interfaze); + } + + for (final String superClass : source.getSuperClasses()) + { + dest.getSuperClasses().add(superClass); + } + } +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/mappers/ValueHolderAttributeMapper.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/mappers/ValueHolderAttributeMapper.java new file mode 100644 index 000000000..7a2753665 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/mappers/ValueHolderAttributeMapper.java @@ -0,0 +1,61 @@ +/******************************************************************************* + * 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.designtime.internal.view.mapping.mappers; + +import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentFactory; +import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentInfo; +import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ConverterDecorator; +import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ConverterTypeInfo; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.CustomViewMappingAdapter; +import org.w3c.dom.Attr; +import org.w3c.dom.Element; + +/** + * Default mapper for value holders. + * + * @author cbateman + * + */ +public class ValueHolderAttributeMapper extends CustomViewMappingAdapter +{ + @Override + public void doAttributeActions(ComponentInfo bestComponent, + Element srcElement, Attr attr) + { + final String name = attr.getNodeName(); + + if ("converter".equals(name) + && bestComponent.getComponentTypeInfo().isInstanceOf( + ComponentFactory.INTERFACE_VALUEHOLDER)) + { + final String value = attr.getValue(); + + if (value != null) + { + ConverterTypeInfo typeInfo = null; + + if (!value.startsWith("#{")) + { + typeInfo = new ConverterTypeInfo(null, value); + + } + else + { + typeInfo = ConverterTypeInfo.UNKNOWN; + } + ConverterDecorator decorator = new ConverterDecorator( + bestComponent, typeInfo); + bestComponent.addDecorator(decorator, + ComponentFactory.CONVERTER); + } + } + } +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/AttributeToPropertyMapping.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/AttributeToPropertyMapping.java new file mode 100644 index 000000000..a30491531 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/AttributeToPropertyMapping.java @@ -0,0 +1,111 @@ +/** + * <copyright> + * </copyright> + * + * $Id: AttributeToPropertyMapping.java,v 1.1 2008/05/12 17:42:19 cbateman Exp $ + */ +package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Attribute To Property Mapping</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.AttributeToPropertyMapping#getPropertyName <em>Property Name</em>}</li> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.AttributeToPropertyMapping#isElAllowed <em>El Allowed</em>}</li> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.AttributeToPropertyMapping#getCustomConversionFactoryId <em>Custom Conversion Factory Id</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage#getAttributeToPropertyMapping() + * @model + * @generated + */ +public interface AttributeToPropertyMapping extends EObject +{ + /** + * Returns the value of the '<em><b>Property Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Property 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>Property Name</em>' attribute. + * @see #setPropertyName(String) + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage#getAttributeToPropertyMapping_PropertyName() + * @model extendedMetaData="kind='element' name='propertyName'" + * @generated + */ + String getPropertyName(); + + /** + * Sets the value of the '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.AttributeToPropertyMapping#getPropertyName <em>Property Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Property Name</em>' attribute. + * @see #getPropertyName() + * @generated + */ + void setPropertyName(String value); + + /** + * Returns the value of the '<em><b>El Allowed</b></em>' attribute. + * The default value is <code>"true"</code>. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>El Allowed</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>El Allowed</em>' attribute. + * @see #setElAllowed(boolean) + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage#getAttributeToPropertyMapping_ElAllowed() + * @model default="true" + * extendedMetaData="kind='element' name='elAllowed'" + * @generated + */ + boolean isElAllowed(); + + /** + * Sets the value of the '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.AttributeToPropertyMapping#isElAllowed <em>El Allowed</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>El Allowed</em>' attribute. + * @see #isElAllowed() + * @generated + */ + void setElAllowed(boolean value); + + /** + * Returns the value of the '<em><b>Custom Conversion Factory Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Custom Conversion Factory 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>Custom Conversion Factory Id</em>' attribute. + * @see #setCustomConversionFactoryId(String) + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage#getAttributeToPropertyMapping_CustomConversionFactoryId() + * @model extendedMetaData="kind='element' name='customConversionFactoryId'" + * @generated + */ + String getCustomConversionFactoryId(); + + /** + * Sets the value of the '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.AttributeToPropertyMapping#getCustomConversionFactoryId <em>Custom Conversion Factory Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Custom Conversion Factory Id</em>' attribute. + * @see #getCustomConversionFactoryId() + * @generated + */ + void setCustomConversionFactoryId(String value); + +} // AttributeToPropertyMapping diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/ClassTypeInfo_.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/ClassTypeInfo_.java new file mode 100644 index 000000000..bad26512d --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/ClassTypeInfo_.java @@ -0,0 +1,91 @@ +/** + * <copyright> + * </copyright> + * + * $Id: ClassTypeInfo_.java,v 1.1 2008/05/12 17:42:19 cbateman Exp $ + */ +package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Class Type Info </b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ClassTypeInfo_#getClassName <em>Class Name</em>}</li> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ClassTypeInfo_#getSuperClasses <em>Super Classes</em>}</li> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ClassTypeInfo_#getInterfaces <em>Interfaces</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage#getClassTypeInfo_() + * @model + * @generated + */ +public interface ClassTypeInfo_ extends EObject +{ + /** + * Returns the value of the '<em><b>Class Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Class 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>Class Name</em>' attribute. + * @see #setClassName(String) + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage#getClassTypeInfo__ClassName() + * @model extendedMetaData="kind='element' name='className'" + * @generated + */ + String getClassName(); + + /** + * Sets the value of the '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ClassTypeInfo_#getClassName <em>Class Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Class Name</em>' attribute. + * @see #getClassName() + * @generated + */ + void setClassName(String value); + + /** + * Returns the value of the '<em><b>Super Classes</b></em>' attribute list. + * The list contents are of type {@link java.lang.String}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Super Classes</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>Super Classes</em>' attribute list. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage#getClassTypeInfo__SuperClasses() + * @model extendedMetaData="kind='element' name='superClasses'" + * @generated + */ + EList<String> getSuperClasses(); + + /** + * Returns the value of the '<em><b>Interfaces</b></em>' attribute list. + * The list contents are of type {@link java.lang.String}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Interfaces</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>Interfaces</em>' attribute list. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage#getClassTypeInfo__Interfaces() + * @model extendedMetaData="kind='element' name='interfaces'" + * @generated + */ + EList<String> getInterfaces(); + +} // ClassTypeInfo_ diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/ComponentMappingFactory.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/ComponentMappingFactory.java new file mode 100644 index 000000000..9a45fa050 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/ComponentMappingFactory.java @@ -0,0 +1,101 @@ +/** + * <copyright> + * </copyright> + * + * $Id: ComponentMappingFactory.java,v 1.1 2008/05/12 17:42:19 cbateman Exp $ + */ +package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping; + +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.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage + * @generated + */ +public interface ComponentMappingFactory extends EFactory +{ + /** + * The singleton instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + ComponentMappingFactory eINSTANCE = org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ComponentMappingFactoryImpl.init(); + + /** + * Returns a new object of class '<em>Tag Mapping</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Tag Mapping</em>'. + * @generated + */ + TagMapping createTagMapping(); + + /** + * Returns a new object of class '<em>Tag To View Object Mapping</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Tag To View Object Mapping</em>'. + * @generated + */ + TagToViewObjectMapping createTagToViewObjectMapping(); + + /** + * Returns a new object of class '<em>Class Type Info </em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Class Type Info </em>'. + * @generated + */ + ClassTypeInfo_ createClassTypeInfo_(); + + /** + * Returns a new object of class '<em>Component Type Info </em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Component Type Info </em>'. + * @generated + */ + ComponentTypeInfo_ createComponentTypeInfo_(); + + /** + * Returns a new object of class '<em>Converter Type Info </em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Converter Type Info </em>'. + * @generated + */ + ConverterTypeInfo_ createConverterTypeInfo_(); + + /** + * Returns a new object of class '<em>Validator Type Info </em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Validator Type Info </em>'. + * @generated + */ + ValidatorTypeInfo_ createValidatorTypeInfo_(); + + /** + * Returns a new object of class '<em>Attribute To Property Mapping</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Attribute To Property Mapping</em>'. + * @generated + */ + AttributeToPropertyMapping createAttributeToPropertyMapping(); + + /** + * Returns the package supported by this factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the package supported by this factory. + * @generated + */ + ComponentMappingPackage getComponentMappingPackage(); + +} //ComponentMappingFactory diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/ComponentMappingPackage.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/ComponentMappingPackage.java new file mode 100644 index 000000000..e340b4f30 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/ComponentMappingPackage.java @@ -0,0 +1,949 @@ +/** + * <copyright> + * </copyright> + * + * $Id: ComponentMappingPackage.java,v 1.1 2008/05/12 17:42:19 cbateman Exp $ + */ +package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * <!-- begin-user-doc --> + * The <b>Package</b> for the model. + * It contains accessors for the meta objects to represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingFactory + * @model kind="package" + * @generated + */ +public interface ComponentMappingPackage extends EPackage +{ + /** + * The package name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNAME = "viewmapping"; + + /** + * The package namespace URI. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_URI = "http://org.eclipse.jst.jsf.core/componentMapping.ecore"; + + /** + * The package namespace name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_PREFIX = "viewMap"; + + /** + * The singleton instance of the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + ComponentMappingPackage eINSTANCE = org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ComponentMappingPackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.TagMappingImpl <em>Tag Mapping</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.TagMappingImpl + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ComponentMappingPackageImpl#getTagMapping() + * @generated + */ + int TAG_MAPPING = 0; + + /** + * The feature id for the '<em><b>Versioned Tag To View Mappings</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int TAG_MAPPING__VERSIONED_TAG_TO_VIEW_MAPPINGS = 0; + + /** + * The feature id for the '<em><b>Custom Conversion Factory Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int TAG_MAPPING__CUSTOM_CONVERSION_FACTORY_ID = 1; + + /** + * The feature id for the '<em><b>Bean Mapped Properties</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int TAG_MAPPING__BEAN_MAPPED_PROPERTIES = 2; + + /** + * The number of structural features of the '<em>Tag Mapping</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int TAG_MAPPING_FEATURE_COUNT = 3; + + /** + * The meta object id for the '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.TagToViewObjectMappingImpl <em>Tag To View Object Mapping</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.TagToViewObjectMappingImpl + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ComponentMappingPackageImpl#getTagToViewObjectMapping() + * @generated + */ + int TAG_TO_VIEW_OBJECT_MAPPING = 1; + + /** + * The feature id for the '<em><b>Type Info</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int TAG_TO_VIEW_OBJECT_MAPPING__TYPE_INFO = 0; + + /** + * The feature id for the '<em><b>Min JSF Version</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int TAG_TO_VIEW_OBJECT_MAPPING__MIN_JSF_VERSION = 1; + + /** + * The feature id for the '<em><b>Min Library Version</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int TAG_TO_VIEW_OBJECT_MAPPING__MIN_LIBRARY_VERSION = 2; + + /** + * The number of structural features of the '<em>Tag To View Object Mapping</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int TAG_TO_VIEW_OBJECT_MAPPING_FEATURE_COUNT = 3; + + /** + * The meta object id for the '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ClassTypeInfo_Impl <em>Class Type Info </em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ClassTypeInfo_Impl + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ComponentMappingPackageImpl#getClassTypeInfo_() + * @generated + */ + int CLASS_TYPE_INFO_ = 2; + + /** + * The feature id for the '<em><b>Class Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CLASS_TYPE_INFO___CLASS_NAME = 0; + + /** + * The feature id for the '<em><b>Super Classes</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CLASS_TYPE_INFO___SUPER_CLASSES = 1; + + /** + * The feature id for the '<em><b>Interfaces</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CLASS_TYPE_INFO___INTERFACES = 2; + + /** + * The number of structural features of the '<em>Class Type Info </em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CLASS_TYPE_INFO__FEATURE_COUNT = 3; + + /** + * The meta object id for the '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ComponentTypeInfo_Impl <em>Component Type Info </em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ComponentTypeInfo_Impl + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ComponentMappingPackageImpl#getComponentTypeInfo_() + * @generated + */ + int COMPONENT_TYPE_INFO_ = 3; + + /** + * The feature id for the '<em><b>Class Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPONENT_TYPE_INFO___CLASS_NAME = CLASS_TYPE_INFO___CLASS_NAME; + + /** + * The feature id for the '<em><b>Super Classes</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPONENT_TYPE_INFO___SUPER_CLASSES = CLASS_TYPE_INFO___SUPER_CLASSES; + + /** + * The feature id for the '<em><b>Interfaces</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPONENT_TYPE_INFO___INTERFACES = CLASS_TYPE_INFO___INTERFACES; + + /** + * The feature id for the '<em><b>Component Type</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPONENT_TYPE_INFO___COMPONENT_TYPE = CLASS_TYPE_INFO__FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Component Family</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPONENT_TYPE_INFO___COMPONENT_FAMILY = CLASS_TYPE_INFO__FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Render Type</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPONENT_TYPE_INFO___RENDER_TYPE = CLASS_TYPE_INFO__FEATURE_COUNT + 2; + + /** + * The number of structural features of the '<em>Component Type Info </em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPONENT_TYPE_INFO__FEATURE_COUNT = CLASS_TYPE_INFO__FEATURE_COUNT + 3; + + /** + * The meta object id for the '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ConverterTypeInfo_Impl <em>Converter Type Info </em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ConverterTypeInfo_Impl + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ComponentMappingPackageImpl#getConverterTypeInfo_() + * @generated + */ + int CONVERTER_TYPE_INFO_ = 4; + + /** + * The feature id for the '<em><b>Class Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CONVERTER_TYPE_INFO___CLASS_NAME = CLASS_TYPE_INFO___CLASS_NAME; + + /** + * The feature id for the '<em><b>Super Classes</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CONVERTER_TYPE_INFO___SUPER_CLASSES = CLASS_TYPE_INFO___SUPER_CLASSES; + + /** + * The feature id for the '<em><b>Interfaces</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CONVERTER_TYPE_INFO___INTERFACES = CLASS_TYPE_INFO___INTERFACES; + + /** + * The feature id for the '<em><b>Converter Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CONVERTER_TYPE_INFO___CONVERTER_ID = CLASS_TYPE_INFO__FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>For Classes</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CONVERTER_TYPE_INFO___FOR_CLASSES = CLASS_TYPE_INFO__FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>Converter Type Info </em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CONVERTER_TYPE_INFO__FEATURE_COUNT = CLASS_TYPE_INFO__FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ValidatorTypeInfo_Impl <em>Validator Type Info </em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ValidatorTypeInfo_Impl + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ComponentMappingPackageImpl#getValidatorTypeInfo_() + * @generated + */ + int VALIDATOR_TYPE_INFO_ = 5; + + /** + * The feature id for the '<em><b>Class Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VALIDATOR_TYPE_INFO___CLASS_NAME = CLASS_TYPE_INFO___CLASS_NAME; + + /** + * The feature id for the '<em><b>Super Classes</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VALIDATOR_TYPE_INFO___SUPER_CLASSES = CLASS_TYPE_INFO___SUPER_CLASSES; + + /** + * The feature id for the '<em><b>Interfaces</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VALIDATOR_TYPE_INFO___INTERFACES = CLASS_TYPE_INFO___INTERFACES; + + /** + * The feature id for the '<em><b>Validator Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VALIDATOR_TYPE_INFO___VALIDATOR_ID = CLASS_TYPE_INFO__FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Validator Type Info </em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VALIDATOR_TYPE_INFO__FEATURE_COUNT = CLASS_TYPE_INFO__FEATURE_COUNT + 1; + + + /** + * The meta object id for the '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.AttributeToPropertyMappingImpl <em>Attribute To Property Mapping</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.AttributeToPropertyMappingImpl + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ComponentMappingPackageImpl#getAttributeToPropertyMapping() + * @generated + */ + int ATTRIBUTE_TO_PROPERTY_MAPPING = 6; + + /** + * The feature id for the '<em><b>Property Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_TO_PROPERTY_MAPPING__PROPERTY_NAME = 0; + + /** + * The feature id for the '<em><b>El Allowed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_TO_PROPERTY_MAPPING__EL_ALLOWED = 1; + + /** + * The feature id for the '<em><b>Custom Conversion Factory Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_TO_PROPERTY_MAPPING__CUSTOM_CONVERSION_FACTORY_ID = 2; + + /** + * The number of structural features of the '<em>Attribute To Property Mapping</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ATTRIBUTE_TO_PROPERTY_MAPPING_FEATURE_COUNT = 3; + + + /** + * Returns the meta object for class '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagMapping <em>Tag Mapping</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Tag Mapping</em>'. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagMapping + * @generated + */ + EClass getTagMapping(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagMapping#getVersionedTagToViewMappings <em>Versioned Tag To View Mappings</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Versioned Tag To View Mappings</em>'. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagMapping#getVersionedTagToViewMappings() + * @see #getTagMapping() + * @generated + */ + EReference getTagMapping_VersionedTagToViewMappings(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagMapping#getCustomConversionFactoryId <em>Custom Conversion Factory Id</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Custom Conversion Factory Id</em>'. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagMapping#getCustomConversionFactoryId() + * @see #getTagMapping() + * @generated + */ + EAttribute getTagMapping_CustomConversionFactoryId(); + + /** + * Returns the meta object for the attribute list '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagMapping#getBeanMappedProperties <em>Bean Mapped Properties</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute list '<em>Bean Mapped Properties</em>'. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagMapping#getBeanMappedProperties() + * @see #getTagMapping() + * @generated + */ + EAttribute getTagMapping_BeanMappedProperties(); + + /** + * Returns the meta object for class '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagToViewObjectMapping <em>Tag To View Object Mapping</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Tag To View Object Mapping</em>'. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagToViewObjectMapping + * @generated + */ + EClass getTagToViewObjectMapping(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagToViewObjectMapping#getTypeInfo <em>Type Info</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Type Info</em>'. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagToViewObjectMapping#getTypeInfo() + * @see #getTagToViewObjectMapping() + * @generated + */ + EReference getTagToViewObjectMapping_TypeInfo(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagToViewObjectMapping#getMinJSFVersion <em>Min JSF Version</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Min JSF Version</em>'. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagToViewObjectMapping#getMinJSFVersion() + * @see #getTagToViewObjectMapping() + * @generated + */ + EAttribute getTagToViewObjectMapping_MinJSFVersion(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagToViewObjectMapping#getMinLibraryVersion <em>Min Library Version</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Min Library Version</em>'. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagToViewObjectMapping#getMinLibraryVersion() + * @see #getTagToViewObjectMapping() + * @generated + */ + EAttribute getTagToViewObjectMapping_MinLibraryVersion(); + + /** + * Returns the meta object for class '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ClassTypeInfo_ <em>Class Type Info </em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Class Type Info </em>'. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ClassTypeInfo_ + * @generated + */ + EClass getClassTypeInfo_(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ClassTypeInfo_#getClassName <em>Class Name</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Class Name</em>'. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ClassTypeInfo_#getClassName() + * @see #getClassTypeInfo_() + * @generated + */ + EAttribute getClassTypeInfo__ClassName(); + + /** + * Returns the meta object for the attribute list '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ClassTypeInfo_#getSuperClasses <em>Super Classes</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute list '<em>Super Classes</em>'. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ClassTypeInfo_#getSuperClasses() + * @see #getClassTypeInfo_() + * @generated + */ + EAttribute getClassTypeInfo__SuperClasses(); + + /** + * Returns the meta object for the attribute list '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ClassTypeInfo_#getInterfaces <em>Interfaces</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute list '<em>Interfaces</em>'. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ClassTypeInfo_#getInterfaces() + * @see #getClassTypeInfo_() + * @generated + */ + EAttribute getClassTypeInfo__Interfaces(); + + /** + * Returns the meta object for class '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentTypeInfo_ <em>Component Type Info </em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Component Type Info </em>'. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentTypeInfo_ + * @generated + */ + EClass getComponentTypeInfo_(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentTypeInfo_#getComponentType <em>Component Type</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Component Type</em>'. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentTypeInfo_#getComponentType() + * @see #getComponentTypeInfo_() + * @generated + */ + EAttribute getComponentTypeInfo__ComponentType(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentTypeInfo_#getComponentFamily <em>Component Family</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Component Family</em>'. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentTypeInfo_#getComponentFamily() + * @see #getComponentTypeInfo_() + * @generated + */ + EAttribute getComponentTypeInfo__ComponentFamily(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentTypeInfo_#getRenderType <em>Render Type</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Render Type</em>'. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentTypeInfo_#getRenderType() + * @see #getComponentTypeInfo_() + * @generated + */ + EAttribute getComponentTypeInfo__RenderType(); + + /** + * Returns the meta object for class '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ConverterTypeInfo_ <em>Converter Type Info </em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Converter Type Info </em>'. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ConverterTypeInfo_ + * @generated + */ + EClass getConverterTypeInfo_(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ConverterTypeInfo_#getConverterId <em>Converter Id</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Converter Id</em>'. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ConverterTypeInfo_#getConverterId() + * @see #getConverterTypeInfo_() + * @generated + */ + EAttribute getConverterTypeInfo__ConverterId(); + + /** + * Returns the meta object for the attribute list '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ConverterTypeInfo_#getForClasses <em>For Classes</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute list '<em>For Classes</em>'. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ConverterTypeInfo_#getForClasses() + * @see #getConverterTypeInfo_() + * @generated + */ + EAttribute getConverterTypeInfo__ForClasses(); + + /** + * Returns the meta object for class '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ValidatorTypeInfo_ <em>Validator Type Info </em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Validator Type Info </em>'. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ValidatorTypeInfo_ + * @generated + */ + EClass getValidatorTypeInfo_(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ValidatorTypeInfo_#getValidatorId <em>Validator Id</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Validator Id</em>'. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ValidatorTypeInfo_#getValidatorId() + * @see #getValidatorTypeInfo_() + * @generated + */ + EAttribute getValidatorTypeInfo__ValidatorId(); + + /** + * Returns the meta object for class '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.AttributeToPropertyMapping <em>Attribute To Property Mapping</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Attribute To Property Mapping</em>'. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.AttributeToPropertyMapping + * @generated + */ + EClass getAttributeToPropertyMapping(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.AttributeToPropertyMapping#getPropertyName <em>Property Name</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Property Name</em>'. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.AttributeToPropertyMapping#getPropertyName() + * @see #getAttributeToPropertyMapping() + * @generated + */ + EAttribute getAttributeToPropertyMapping_PropertyName(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.AttributeToPropertyMapping#isElAllowed <em>El Allowed</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>El Allowed</em>'. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.AttributeToPropertyMapping#isElAllowed() + * @see #getAttributeToPropertyMapping() + * @generated + */ + EAttribute getAttributeToPropertyMapping_ElAllowed(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.AttributeToPropertyMapping#getCustomConversionFactoryId <em>Custom Conversion Factory Id</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Custom Conversion Factory Id</em>'. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.AttributeToPropertyMapping#getCustomConversionFactoryId() + * @see #getAttributeToPropertyMapping() + * @generated + */ + EAttribute getAttributeToPropertyMapping_CustomConversionFactoryId(); + + /** + * 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 + */ + ComponentMappingFactory getComponentMappingFactory(); + + /** + * <!-- 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.designtime.internal.view.mapping.viewmapping.impl.TagMappingImpl <em>Tag Mapping</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.TagMappingImpl + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ComponentMappingPackageImpl#getTagMapping() + * @generated + */ + EClass TAG_MAPPING = eINSTANCE.getTagMapping(); + + /** + * The meta object literal for the '<em><b>Versioned Tag To View Mappings</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference TAG_MAPPING__VERSIONED_TAG_TO_VIEW_MAPPINGS = eINSTANCE.getTagMapping_VersionedTagToViewMappings(); + + /** + * The meta object literal for the '<em><b>Custom Conversion Factory Id</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute TAG_MAPPING__CUSTOM_CONVERSION_FACTORY_ID = eINSTANCE.getTagMapping_CustomConversionFactoryId(); + + /** + * The meta object literal for the '<em><b>Bean Mapped Properties</b></em>' attribute list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute TAG_MAPPING__BEAN_MAPPED_PROPERTIES = eINSTANCE.getTagMapping_BeanMappedProperties(); + + /** + * The meta object literal for the '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.TagToViewObjectMappingImpl <em>Tag To View Object Mapping</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.TagToViewObjectMappingImpl + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ComponentMappingPackageImpl#getTagToViewObjectMapping() + * @generated + */ + EClass TAG_TO_VIEW_OBJECT_MAPPING = eINSTANCE.getTagToViewObjectMapping(); + + /** + * The meta object literal for the '<em><b>Type Info</b></em>' containment reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference TAG_TO_VIEW_OBJECT_MAPPING__TYPE_INFO = eINSTANCE.getTagToViewObjectMapping_TypeInfo(); + + /** + * The meta object literal for the '<em><b>Min JSF Version</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute TAG_TO_VIEW_OBJECT_MAPPING__MIN_JSF_VERSION = eINSTANCE.getTagToViewObjectMapping_MinJSFVersion(); + + /** + * The meta object literal for the '<em><b>Min Library Version</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute TAG_TO_VIEW_OBJECT_MAPPING__MIN_LIBRARY_VERSION = eINSTANCE.getTagToViewObjectMapping_MinLibraryVersion(); + + /** + * The meta object literal for the '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ClassTypeInfo_Impl <em>Class Type Info </em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ClassTypeInfo_Impl + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ComponentMappingPackageImpl#getClassTypeInfo_() + * @generated + */ + EClass CLASS_TYPE_INFO_ = eINSTANCE.getClassTypeInfo_(); + + /** + * The meta object literal for the '<em><b>Class Name</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute CLASS_TYPE_INFO___CLASS_NAME = eINSTANCE.getClassTypeInfo__ClassName(); + + /** + * The meta object literal for the '<em><b>Super Classes</b></em>' attribute list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute CLASS_TYPE_INFO___SUPER_CLASSES = eINSTANCE.getClassTypeInfo__SuperClasses(); + + /** + * The meta object literal for the '<em><b>Interfaces</b></em>' attribute list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute CLASS_TYPE_INFO___INTERFACES = eINSTANCE.getClassTypeInfo__Interfaces(); + + /** + * The meta object literal for the '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ComponentTypeInfo_Impl <em>Component Type Info </em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ComponentTypeInfo_Impl + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ComponentMappingPackageImpl#getComponentTypeInfo_() + * @generated + */ + EClass COMPONENT_TYPE_INFO_ = eINSTANCE.getComponentTypeInfo_(); + + /** + * The meta object literal for the '<em><b>Component Type</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COMPONENT_TYPE_INFO___COMPONENT_TYPE = eINSTANCE.getComponentTypeInfo__ComponentType(); + + /** + * The meta object literal for the '<em><b>Component Family</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COMPONENT_TYPE_INFO___COMPONENT_FAMILY = eINSTANCE.getComponentTypeInfo__ComponentFamily(); + + /** + * The meta object literal for the '<em><b>Render Type</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COMPONENT_TYPE_INFO___RENDER_TYPE = eINSTANCE.getComponentTypeInfo__RenderType(); + + /** + * The meta object literal for the '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ConverterTypeInfo_Impl <em>Converter Type Info </em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ConverterTypeInfo_Impl + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ComponentMappingPackageImpl#getConverterTypeInfo_() + * @generated + */ + EClass CONVERTER_TYPE_INFO_ = eINSTANCE.getConverterTypeInfo_(); + + /** + * The meta object literal for the '<em><b>Converter Id</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute CONVERTER_TYPE_INFO___CONVERTER_ID = eINSTANCE.getConverterTypeInfo__ConverterId(); + + /** + * The meta object literal for the '<em><b>For Classes</b></em>' attribute list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute CONVERTER_TYPE_INFO___FOR_CLASSES = eINSTANCE.getConverterTypeInfo__ForClasses(); + + /** + * The meta object literal for the '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ValidatorTypeInfo_Impl <em>Validator Type Info </em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ValidatorTypeInfo_Impl + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ComponentMappingPackageImpl#getValidatorTypeInfo_() + * @generated + */ + EClass VALIDATOR_TYPE_INFO_ = eINSTANCE.getValidatorTypeInfo_(); + + /** + * The meta object literal for the '<em><b>Validator Id</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VALIDATOR_TYPE_INFO___VALIDATOR_ID = eINSTANCE.getValidatorTypeInfo__ValidatorId(); + + /** + * The meta object literal for the '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.AttributeToPropertyMappingImpl <em>Attribute To Property Mapping</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.AttributeToPropertyMappingImpl + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ComponentMappingPackageImpl#getAttributeToPropertyMapping() + * @generated + */ + EClass ATTRIBUTE_TO_PROPERTY_MAPPING = eINSTANCE.getAttributeToPropertyMapping(); + + /** + * The meta object literal for the '<em><b>Property Name</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute ATTRIBUTE_TO_PROPERTY_MAPPING__PROPERTY_NAME = eINSTANCE.getAttributeToPropertyMapping_PropertyName(); + + /** + * The meta object literal for the '<em><b>El Allowed</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute ATTRIBUTE_TO_PROPERTY_MAPPING__EL_ALLOWED = eINSTANCE.getAttributeToPropertyMapping_ElAllowed(); + + /** + * The meta object literal for the '<em><b>Custom Conversion Factory Id</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute ATTRIBUTE_TO_PROPERTY_MAPPING__CUSTOM_CONVERSION_FACTORY_ID = eINSTANCE.getAttributeToPropertyMapping_CustomConversionFactoryId(); + + } + +} //ComponentMappingPackage diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/ComponentTypeInfo_.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/ComponentTypeInfo_.java new file mode 100644 index 000000000..e537498e1 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/ComponentTypeInfo_.java @@ -0,0 +1,108 @@ +/** + * <copyright> + * </copyright> + * + * $Id: ComponentTypeInfo_.java,v 1.1 2008/05/12 17:42:19 cbateman Exp $ + */ +package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Component Type Info </b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentTypeInfo_#getComponentType <em>Component Type</em>}</li> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentTypeInfo_#getComponentFamily <em>Component Family</em>}</li> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentTypeInfo_#getRenderType <em>Render Type</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage#getComponentTypeInfo_() + * @model + * @generated + */ +public interface ComponentTypeInfo_ extends ClassTypeInfo_ +{ + /** + * Returns the value of the '<em><b>Component Type</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Component Type</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Component Type</em>' attribute. + * @see #setComponentType(String) + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage#getComponentTypeInfo__ComponentType() + * @model extendedMetaData="kind='element' name='componentType'" + * @generated + */ + String getComponentType(); + + /** + * Sets the value of the '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentTypeInfo_#getComponentType <em>Component Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Component Type</em>' attribute. + * @see #getComponentType() + * @generated + */ + void setComponentType(String value); + + /** + * Returns the value of the '<em><b>Component Family</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Component Family</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Component Family</em>' attribute. + * @see #setComponentFamily(String) + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage#getComponentTypeInfo__ComponentFamily() + * @model extendedMetaData="kind='element' name='componentFamily'" + * @generated + */ + String getComponentFamily(); + + /** + * Sets the value of the '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentTypeInfo_#getComponentFamily <em>Component Family</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Component Family</em>' attribute. + * @see #getComponentFamily() + * @generated + */ + void setComponentFamily(String value); + + /** + * Returns the value of the '<em><b>Render Type</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Render Type</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Render Type</em>' attribute. + * @see #setRenderType(String) + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage#getComponentTypeInfo__RenderType() + * @model extendedMetaData="kind='element' name='renderType'" + * @generated + */ + String getRenderType(); + + /** + * Sets the value of the '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentTypeInfo_#getRenderType <em>Render Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Render Type</em>' attribute. + * @see #getRenderType() + * @generated + */ + void setRenderType(String value); + +} // ComponentTypeInfo_ diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/ConverterTypeInfo_.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/ConverterTypeInfo_.java new file mode 100644 index 000000000..d7dbc5484 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/ConverterTypeInfo_.java @@ -0,0 +1,73 @@ +/** + * <copyright> + * </copyright> + * + * $Id: ConverterTypeInfo_.java,v 1.1 2008/05/12 17:42:19 cbateman Exp $ + */ +package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping; + +import org.eclipse.emf.common.util.EList; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Converter Type Info </b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ConverterTypeInfo_#getConverterId <em>Converter Id</em>}</li> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ConverterTypeInfo_#getForClasses <em>For Classes</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage#getConverterTypeInfo_() + * @model + * @generated + */ +public interface ConverterTypeInfo_ extends ClassTypeInfo_ +{ + /** + * Returns the value of the '<em><b>Converter Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Converter 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>Converter Id</em>' attribute. + * @see #setConverterId(String) + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage#getConverterTypeInfo__ConverterId() + * @model extendedMetaData="kind='element' name='converterId'" + * @generated + */ + String getConverterId(); + + /** + * Sets the value of the '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ConverterTypeInfo_#getConverterId <em>Converter Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Converter Id</em>' attribute. + * @see #getConverterId() + * @generated + */ + void setConverterId(String value); + + /** + * Returns the value of the '<em><b>For Classes</b></em>' attribute list. + * The list contents are of type {@link java.lang.String}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>For Classes</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>For Classes</em>' attribute list. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage#getConverterTypeInfo__ForClasses() + * @model extendedMetaData="kind='element' name='forClass'" + * @generated + */ + EList<String> getForClasses(); + +} // ConverterTypeInfo_ diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/CustomViewMapperExtensionLoader.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/CustomViewMapperExtensionLoader.java new file mode 100644 index 000000000..540a76158 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/CustomViewMapperExtensionLoader.java @@ -0,0 +1,100 @@ +/******************************************************************************* + * 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.designtime.internal.view.mapping.viewmapping; + +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.IExtension; +import org.eclipse.core.runtime.IExtensionPoint; +import org.eclipse.jst.jsf.core.internal.JSFCorePlugin; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.ICustomViewMapper; + +/** + * @author cbateman + * + */ +public class CustomViewMapperExtensionLoader +{ + private final static String EXTENSION_ID = "customViewMapper"; + private final static String ELEMENT_NAME = "customViewMapper"; + + private static Map<String, ICustomViewMapper> _extensions; + + /** + * @param id + * @return the list of handlers. The list is not modifiable and will throw + * exceptions if it is attempted. + */ + public static synchronized ICustomViewMapper getCustomViewMapper( + final String id) + { + if (_extensions == null) + { + _extensions = Collections.unmodifiableMap(readAllHandlers()); + } + return _extensions.get(id); + } + + private static Map<String, ICustomViewMapper> readAllHandlers() + { + final Map<String, ICustomViewMapper> handlers = new HashMap<String, ICustomViewMapper>(); + final IExtensionPoint extensionPoint = JSFCorePlugin.getDefault() + .getExtension(EXTENSION_ID); + final IExtension[] extensions = extensionPoint.getExtensions(); + + for (final IExtension ext : extensions) + { + final IConfigurationElement[] configElements = ext + .getConfigurationElements(); + + for (final IConfigurationElement element : configElements) + { + if (ELEMENT_NAME.equals(element.getName())) + { + try + { + final String pluginId = element.getContributor() + .getName(); + final String name = element.getAttribute("id"); + final Object customHandler = element + .createExecutableExtension("class"); + if (customHandler instanceof ICustomViewMapper + && name != null) + { + handlers.put(pluginId + "." + name, + (ICustomViewMapper) customHandler); + } + else + { + JSFCorePlugin.log( + "Error loading tag registry extension: " + + element.getContributor().getName() + + "." + element.getAttribute("id") + , new Throwable("No exception: stack trace only")); + } + } + catch (final CoreException e) + { + JSFCorePlugin.log(e, + "Error loading tag registry extension: " + + element.getContributor().getName() + + "." + element.getAttribute("id")); + } + } + } + } + return handlers; + } +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/TagMapping.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/TagMapping.java new file mode 100644 index 000000000..4f824a1ea --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/TagMapping.java @@ -0,0 +1,103 @@ +/** + * <copyright> + * </copyright> + * + * $Id: TagMapping.java,v 1.1 2008/05/12 17:42:19 cbateman Exp $ + */ +package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Tag Mapping</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagMapping#getVersionedTagToViewMappings <em>Versioned Tag To View Mappings</em>}</li> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagMapping#getCustomConversionFactoryId <em>Custom Conversion Factory Id</em>}</li> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagMapping#getBeanMappedProperties <em>Bean Mapped Properties</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage#getTagMapping() + * @model + * @generated + */ +public interface TagMapping extends EObject +{ + /** + * Returns the value of the '<em><b>Versioned Tag To View Mappings</b></em>' containment reference list. + * The list contents are of type {@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagToViewObjectMapping}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Versioned Tag To View Mappings</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>Versioned Tag To View Mappings</em>' containment reference list. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage#getTagMapping_VersionedTagToViewMappings() + * @model containment="true" + * extendedMetaData="kind='element' name='versionedTagToViewMappings'" + * @generated + */ + EList<TagToViewObjectMapping> getVersionedTagToViewMappings(); + + /** + * Returns the value of the '<em><b>Custom Conversion Factory Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Custom Conversion Factory 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>Custom Conversion Factory Id</em>' attribute. + * @see #setCustomConversionFactoryId(String) + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage#getTagMapping_CustomConversionFactoryId() + * @model extendedMetaData="kind='element' name='customConversionFactoryId'" + * @generated + */ + String getCustomConversionFactoryId(); + + /** + * Sets the value of the '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagMapping#getCustomConversionFactoryId <em>Custom Conversion Factory Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Custom Conversion Factory Id</em>' attribute. + * @see #getCustomConversionFactoryId() + * @generated + */ + void setCustomConversionFactoryId(String value); + + /** + * Returns the value of the '<em><b>Bean Mapped Properties</b></em>' attribute list. + * The list contents are of type {@link java.lang.String}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Bean Mapped Properties</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>Bean Mapped Properties</em>' attribute list. + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage#getTagMapping_BeanMappedProperties() + * @model default="" + * extendedMetaData="kind='element' name='beanMappedProperties'" + * @generated + */ + EList<String> getBeanMappedProperties(); + + /** + * <!-- begin-user-doc --> + * @param jsfVersion + * @param libVersion + * <!-- end-user-doc --> + * @model + * @generated + */ + void findBestMapping(String jsfVersion, String libVersion); + +} // TagMapping diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/TagToViewObjectMapping.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/TagToViewObjectMapping.java new file mode 100644 index 000000000..608ba0f16 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/TagToViewObjectMapping.java @@ -0,0 +1,114 @@ +/** + * <copyright> + * </copyright> + * + * $Id: TagToViewObjectMapping.java,v 1.1 2008/05/12 17:42:19 cbateman Exp $ + */ +package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Tag To View Object Mapping</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagToViewObjectMapping#getTypeInfo <em>Type Info</em>}</li> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagToViewObjectMapping#getMinJSFVersion <em>Min JSF Version</em>}</li> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagToViewObjectMapping#getMinLibraryVersion <em>Min Library Version</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage#getTagToViewObjectMapping() + * @model + * @generated + */ +public interface TagToViewObjectMapping extends EObject +{ + /** + * Returns the value of the '<em><b>Type Info</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Type Info</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Type Info</em>' containment reference. + * @see #setTypeInfo(ClassTypeInfo_) + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage#getTagToViewObjectMapping_TypeInfo() + * @model containment="true" + * extendedMetaData="kind='element' name='typeInfo'" + * @generated + */ + ClassTypeInfo_ getTypeInfo(); + + /** + * Sets the value of the '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagToViewObjectMapping#getTypeInfo <em>Type Info</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Type Info</em>' containment reference. + * @see #getTypeInfo() + * @generated + */ + void setTypeInfo(ClassTypeInfo_ value); + + /** + * Returns the value of the '<em><b>Min JSF Version</b></em>' attribute. + * The default value is <code>"1.1"</code>. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Min JSF 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>Min JSF Version</em>' attribute. + * @see #setMinJSFVersion(String) + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage#getTagToViewObjectMapping_MinJSFVersion() + * @model default="1.1" + * extendedMetaData="kind='element' name='minVersion'" + * @generated + */ + String getMinJSFVersion(); + + /** + * Sets the value of the '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagToViewObjectMapping#getMinJSFVersion <em>Min JSF Version</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Min JSF Version</em>' attribute. + * @see #getMinJSFVersion() + * @generated + */ + void setMinJSFVersion(String value); + + /** + * Returns the value of the '<em><b>Min Library Version</b></em>' attribute. + * The default value is <code>""</code>. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Min Library 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>Min Library Version</em>' attribute. + * @see #setMinLibraryVersion(String) + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage#getTagToViewObjectMapping_MinLibraryVersion() + * @model default="" + * extendedMetaData="kind='element' name='minLibraryVersion'" + * @generated + */ + String getMinLibraryVersion(); + + /** + * Sets the value of the '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagToViewObjectMapping#getMinLibraryVersion <em>Min Library Version</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Min Library Version</em>' attribute. + * @see #getMinLibraryVersion() + * @generated + */ + void setMinLibraryVersion(String value); + +} // TagToViewObjectMapping diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/ValidatorTypeInfo_.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/ValidatorTypeInfo_.java new file mode 100644 index 000000000..608568431 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/ValidatorTypeInfo_.java @@ -0,0 +1,54 @@ +/** + * <copyright> + * </copyright> + * + * $Id: ValidatorTypeInfo_.java,v 1.1 2008/05/12 17:42:19 cbateman Exp $ + */ +package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Validator Type Info </b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ValidatorTypeInfo_#getValidatorId <em>Validator Id</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage#getValidatorTypeInfo_() + * @model + * @generated + */ +public interface ValidatorTypeInfo_ extends ClassTypeInfo_ +{ + /** + * Returns the value of the '<em><b>Validator Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Validator 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>Validator Id</em>' attribute. + * @see #setValidatorId(String) + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage#getValidatorTypeInfo__ValidatorId() + * @model extendedMetaData="kind='element' name='validatorId'" + * @generated + */ + String getValidatorId(); + + /** + * Sets the value of the '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ValidatorTypeInfo_#getValidatorId <em>Validator Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Validator Id</em>' attribute. + * @see #getValidatorId() + * @generated + */ + void setValidatorId(String value); + +} // ValidatorTypeInfo_ diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/AttributeToPropertyMappingImpl.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/AttributeToPropertyMappingImpl.java new file mode 100644 index 000000000..b39915897 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/AttributeToPropertyMappingImpl.java @@ -0,0 +1,293 @@ +/** + * <copyright> + * </copyright> + * + * $Id: AttributeToPropertyMappingImpl.java,v 1.1 2008/05/12 17:42:20 cbateman Exp $ + */ +package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.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.designtime.internal.view.mapping.viewmapping.AttributeToPropertyMapping; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Attribute To Property Mapping</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.AttributeToPropertyMappingImpl#getPropertyName <em>Property Name</em>}</li> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.AttributeToPropertyMappingImpl#isElAllowed <em>El Allowed</em>}</li> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.AttributeToPropertyMappingImpl#getCustomConversionFactoryId <em>Custom Conversion Factory Id</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class AttributeToPropertyMappingImpl extends EObjectImpl implements AttributeToPropertyMapping +{ + /** + * The default value of the '{@link #getPropertyName() <em>Property Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPropertyName() + * @generated + * @ordered + */ + protected static final String PROPERTY_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPropertyName() <em>Property Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPropertyName() + * @generated + * @ordered + */ + protected String propertyName = PROPERTY_NAME_EDEFAULT; + + /** + * The default value of the '{@link #isElAllowed() <em>El Allowed</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isElAllowed() + * @generated + * @ordered + */ + protected static final boolean EL_ALLOWED_EDEFAULT = true; + + /** + * The cached value of the '{@link #isElAllowed() <em>El Allowed</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isElAllowed() + * @generated + * @ordered + */ + protected boolean elAllowed = EL_ALLOWED_EDEFAULT; + + /** + * The default value of the '{@link #getCustomConversionFactoryId() <em>Custom Conversion Factory Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCustomConversionFactoryId() + * @generated + * @ordered + */ + protected static final String CUSTOM_CONVERSION_FACTORY_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getCustomConversionFactoryId() <em>Custom Conversion Factory Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCustomConversionFactoryId() + * @generated + * @ordered + */ + protected String customConversionFactoryId = CUSTOM_CONVERSION_FACTORY_ID_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected AttributeToPropertyMappingImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return ComponentMappingPackage.Literals.ATTRIBUTE_TO_PROPERTY_MAPPING; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getPropertyName() + { + return propertyName; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setPropertyName(String newPropertyName) + { + String oldPropertyName = propertyName; + propertyName = newPropertyName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentMappingPackage.ATTRIBUTE_TO_PROPERTY_MAPPING__PROPERTY_NAME, oldPropertyName, propertyName)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isElAllowed() + { + return elAllowed; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setElAllowed(boolean newElAllowed) + { + boolean oldElAllowed = elAllowed; + elAllowed = newElAllowed; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentMappingPackage.ATTRIBUTE_TO_PROPERTY_MAPPING__EL_ALLOWED, oldElAllowed, elAllowed)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getCustomConversionFactoryId() + { + return customConversionFactoryId; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setCustomConversionFactoryId(String newCustomConversionFactoryId) + { + String oldCustomConversionFactoryId = customConversionFactoryId; + customConversionFactoryId = newCustomConversionFactoryId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentMappingPackage.ATTRIBUTE_TO_PROPERTY_MAPPING__CUSTOM_CONVERSION_FACTORY_ID, oldCustomConversionFactoryId, customConversionFactoryId)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case ComponentMappingPackage.ATTRIBUTE_TO_PROPERTY_MAPPING__PROPERTY_NAME: + return getPropertyName(); + case ComponentMappingPackage.ATTRIBUTE_TO_PROPERTY_MAPPING__EL_ALLOWED: + return isElAllowed() ? Boolean.TRUE : Boolean.FALSE; + case ComponentMappingPackage.ATTRIBUTE_TO_PROPERTY_MAPPING__CUSTOM_CONVERSION_FACTORY_ID: + return getCustomConversionFactoryId(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case ComponentMappingPackage.ATTRIBUTE_TO_PROPERTY_MAPPING__PROPERTY_NAME: + setPropertyName((String)newValue); + return; + case ComponentMappingPackage.ATTRIBUTE_TO_PROPERTY_MAPPING__EL_ALLOWED: + setElAllowed(((Boolean)newValue).booleanValue()); + return; + case ComponentMappingPackage.ATTRIBUTE_TO_PROPERTY_MAPPING__CUSTOM_CONVERSION_FACTORY_ID: + setCustomConversionFactoryId((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case ComponentMappingPackage.ATTRIBUTE_TO_PROPERTY_MAPPING__PROPERTY_NAME: + setPropertyName(PROPERTY_NAME_EDEFAULT); + return; + case ComponentMappingPackage.ATTRIBUTE_TO_PROPERTY_MAPPING__EL_ALLOWED: + setElAllowed(EL_ALLOWED_EDEFAULT); + return; + case ComponentMappingPackage.ATTRIBUTE_TO_PROPERTY_MAPPING__CUSTOM_CONVERSION_FACTORY_ID: + setCustomConversionFactoryId(CUSTOM_CONVERSION_FACTORY_ID_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case ComponentMappingPackage.ATTRIBUTE_TO_PROPERTY_MAPPING__PROPERTY_NAME: + return PROPERTY_NAME_EDEFAULT == null ? propertyName != null : !PROPERTY_NAME_EDEFAULT.equals(propertyName); + case ComponentMappingPackage.ATTRIBUTE_TO_PROPERTY_MAPPING__EL_ALLOWED: + return elAllowed != EL_ALLOWED_EDEFAULT; + case ComponentMappingPackage.ATTRIBUTE_TO_PROPERTY_MAPPING__CUSTOM_CONVERSION_FACTORY_ID: + return CUSTOM_CONVERSION_FACTORY_ID_EDEFAULT == null ? customConversionFactoryId != null : !CUSTOM_CONVERSION_FACTORY_ID_EDEFAULT.equals(customConversionFactoryId); + } + 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(" (propertyName: "); + result.append(propertyName); + result.append(", elAllowed: "); + result.append(elAllowed); + result.append(", customConversionFactoryId: "); + result.append(customConversionFactoryId); + result.append(')'); + return result.toString(); + } + +} //AttributeToPropertyMappingImpl diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ClassTypeInfo_Impl.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ClassTypeInfo_Impl.java new file mode 100644 index 000000000..b5607fb19 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ClassTypeInfo_Impl.java @@ -0,0 +1,264 @@ +/** + * <copyright> + * </copyright> + * + * $Id: ClassTypeInfo_Impl.java,v 1.1 2008/05/12 17:42:20 cbateman Exp $ + */ +package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; + +import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; + +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ClassTypeInfo_; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Class Type Info </b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ClassTypeInfo_Impl#getClassName <em>Class Name</em>}</li> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ClassTypeInfo_Impl#getSuperClasses <em>Super Classes</em>}</li> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ClassTypeInfo_Impl#getInterfaces <em>Interfaces</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class ClassTypeInfo_Impl extends EObjectImpl implements ClassTypeInfo_ +{ + /** + * The default value of the '{@link #getClassName() <em>Class Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getClassName() + * @generated + * @ordered + */ + protected static final String CLASS_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getClassName() <em>Class Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getClassName() + * @generated + * @ordered + */ + protected String className = CLASS_NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getSuperClasses() <em>Super Classes</em>}' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSuperClasses() + * @generated + * @ordered + */ + protected EList<String> superClasses; + + /** + * The cached value of the '{@link #getInterfaces() <em>Interfaces</em>}' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getInterfaces() + * @generated + * @ordered + */ + protected EList<String> interfaces; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ClassTypeInfo_Impl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return ComponentMappingPackage.Literals.CLASS_TYPE_INFO_; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getClassName() + { + return className; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setClassName(String newClassName) + { + String oldClassName = className; + className = newClassName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentMappingPackage.CLASS_TYPE_INFO___CLASS_NAME, oldClassName, className)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<String> getSuperClasses() + { + if (superClasses == null) + { + superClasses = new EDataTypeUniqueEList<String>(String.class, this, ComponentMappingPackage.CLASS_TYPE_INFO___SUPER_CLASSES); + } + return superClasses; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<String> getInterfaces() + { + if (interfaces == null) + { + interfaces = new EDataTypeUniqueEList<String>(String.class, this, ComponentMappingPackage.CLASS_TYPE_INFO___INTERFACES); + } + return interfaces; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case ComponentMappingPackage.CLASS_TYPE_INFO___CLASS_NAME: + return getClassName(); + case ComponentMappingPackage.CLASS_TYPE_INFO___SUPER_CLASSES: + return getSuperClasses(); + case ComponentMappingPackage.CLASS_TYPE_INFO___INTERFACES: + return getInterfaces(); + } + 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 ComponentMappingPackage.CLASS_TYPE_INFO___CLASS_NAME: + setClassName((String)newValue); + return; + case ComponentMappingPackage.CLASS_TYPE_INFO___SUPER_CLASSES: + getSuperClasses().clear(); + getSuperClasses().addAll((Collection<? extends String>)newValue); + return; + case ComponentMappingPackage.CLASS_TYPE_INFO___INTERFACES: + getInterfaces().clear(); + getInterfaces().addAll((Collection<? extends String>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case ComponentMappingPackage.CLASS_TYPE_INFO___CLASS_NAME: + setClassName(CLASS_NAME_EDEFAULT); + return; + case ComponentMappingPackage.CLASS_TYPE_INFO___SUPER_CLASSES: + getSuperClasses().clear(); + return; + case ComponentMappingPackage.CLASS_TYPE_INFO___INTERFACES: + getInterfaces().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case ComponentMappingPackage.CLASS_TYPE_INFO___CLASS_NAME: + return CLASS_NAME_EDEFAULT == null ? className != null : !CLASS_NAME_EDEFAULT.equals(className); + case ComponentMappingPackage.CLASS_TYPE_INFO___SUPER_CLASSES: + return superClasses != null && !superClasses.isEmpty(); + case ComponentMappingPackage.CLASS_TYPE_INFO___INTERFACES: + return interfaces != null && !interfaces.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(" (className: "); + result.append(className); + result.append(", superClasses: "); + result.append(superClasses); + result.append(", interfaces: "); + result.append(interfaces); + result.append(')'); + return result.toString(); + } + +} //ClassTypeInfo_Impl diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ComponentMappingFactoryImpl.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ComponentMappingFactoryImpl.java new file mode 100644 index 000000000..5cb08177b --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ComponentMappingFactoryImpl.java @@ -0,0 +1,184 @@ +/** + * <copyright> + * </copyright> + * + * $Id: ComponentMappingFactoryImpl.java,v 1.1 2008/05/12 17:42:20 cbateman Exp $ + */ +package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.*; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Factory</b>. + * <!-- end-user-doc --> + * @generated + */ +public class ComponentMappingFactoryImpl extends EFactoryImpl implements ComponentMappingFactory +{ + /** + * Creates the default factory implementation. + * <!-- begin-user-doc --> + * @return the factory + * <!-- end-user-doc --> + * @generated + */ + public static ComponentMappingFactory init() + { + try + { + ComponentMappingFactory theComponentMappingFactory = (ComponentMappingFactory)EPackage.Registry.INSTANCE.getEFactory("http://org.eclipse.jst.jsf.core/componentMapping.ecore"); + if (theComponentMappingFactory != null) + { + return theComponentMappingFactory; + } + } + catch (Exception exception) + { + EcorePlugin.INSTANCE.log(exception); + } + return new ComponentMappingFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ComponentMappingFactoryImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EObject create(EClass eClass) + { + switch (eClass.getClassifierID()) + { + case ComponentMappingPackage.TAG_MAPPING: return createTagMapping(); + case ComponentMappingPackage.TAG_TO_VIEW_OBJECT_MAPPING: return createTagToViewObjectMapping(); + case ComponentMappingPackage.CLASS_TYPE_INFO_: return createClassTypeInfo_(); + case ComponentMappingPackage.COMPONENT_TYPE_INFO_: return createComponentTypeInfo_(); + case ComponentMappingPackage.CONVERTER_TYPE_INFO_: return createConverterTypeInfo_(); + case ComponentMappingPackage.VALIDATOR_TYPE_INFO_: return createValidatorTypeInfo_(); + case ComponentMappingPackage.ATTRIBUTE_TO_PROPERTY_MAPPING: return createAttributeToPropertyMapping(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public TagMapping createTagMapping() + { + TagMappingImpl tagMapping = new TagMappingImpl(); + return tagMapping; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public TagToViewObjectMapping createTagToViewObjectMapping() + { + TagToViewObjectMappingImpl tagToViewObjectMapping = new TagToViewObjectMappingImpl(); + return tagToViewObjectMapping; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ClassTypeInfo_ createClassTypeInfo_() + { + ClassTypeInfo_Impl classTypeInfo_ = new ClassTypeInfo_Impl(); + return classTypeInfo_; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ComponentTypeInfo_ createComponentTypeInfo_() + { + ComponentTypeInfo_Impl componentTypeInfo_ = new ComponentTypeInfo_Impl(); + return componentTypeInfo_; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ConverterTypeInfo_ createConverterTypeInfo_() + { + ConverterTypeInfo_Impl converterTypeInfo_ = new ConverterTypeInfo_Impl(); + return converterTypeInfo_; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ValidatorTypeInfo_ createValidatorTypeInfo_() + { + ValidatorTypeInfo_Impl validatorTypeInfo_ = new ValidatorTypeInfo_Impl(); + return validatorTypeInfo_; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AttributeToPropertyMapping createAttributeToPropertyMapping() + { + AttributeToPropertyMappingImpl attributeToPropertyMapping = new AttributeToPropertyMappingImpl(); + return attributeToPropertyMapping; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ComponentMappingPackage getComponentMappingPackage() + { + return (ComponentMappingPackage)getEPackage(); + } + + /** + * <!-- begin-user-doc --> + * @return the package + * <!-- end-user-doc --> + * @deprecated + * @generated + */ + @Deprecated + public static ComponentMappingPackage getPackage() + { + return ComponentMappingPackage.eINSTANCE; + } + +} //ComponentMappingFactoryImpl diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ComponentMappingPackageImpl.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ComponentMappingPackageImpl.java new file mode 100644 index 000000000..5d73875f9 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ComponentMappingPackageImpl.java @@ -0,0 +1,699 @@ +/** + * <copyright> + * </copyright> + * + * $Id: ComponentMappingPackageImpl.java,v 1.1 2008/05/12 17:42:20 cbateman Exp $ + */ +package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.impl.EPackageImpl; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.AttributeToPropertyMapping; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ClassTypeInfo_; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingFactory; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentTypeInfo_; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ConverterTypeInfo_; +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.mapping.viewmapping.ValidatorTypeInfo_; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Package</b>. + * <!-- end-user-doc --> + * @generated + */ +public class ComponentMappingPackageImpl extends EPackageImpl implements ComponentMappingPackage +{ + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass tagMappingEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass tagToViewObjectMappingEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass classTypeInfo_EClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass componentTypeInfo_EClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass converterTypeInfo_EClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass validatorTypeInfo_EClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass attributeToPropertyMappingEClass = 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.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage#eNS_URI + * @see #init() + * @generated + */ + private ComponentMappingPackageImpl() + { + super(eNS_URI, ComponentMappingFactory.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 initialized package + * <!-- end-user-doc --> + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ComponentMappingPackage init() + { + if (isInited) return (ComponentMappingPackage)EPackage.Registry.INSTANCE.getEPackage(ComponentMappingPackage.eNS_URI); + + // Obtain or create and register package + ComponentMappingPackageImpl theComponentMappingPackage = (ComponentMappingPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof ComponentMappingPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new ComponentMappingPackageImpl()); + + isInited = true; + + // Create package meta-data objects + theComponentMappingPackage.createPackageContents(); + + // Initialize created meta-data + theComponentMappingPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theComponentMappingPackage.freeze(); + + return theComponentMappingPackage; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getTagMapping() + { + return tagMappingEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getTagMapping_VersionedTagToViewMappings() + { + return (EReference)tagMappingEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getTagMapping_CustomConversionFactoryId() + { + return (EAttribute)tagMappingEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getTagMapping_BeanMappedProperties() + { + return (EAttribute)tagMappingEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getTagToViewObjectMapping() + { + return tagToViewObjectMappingEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getTagToViewObjectMapping_TypeInfo() + { + return (EReference)tagToViewObjectMappingEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getTagToViewObjectMapping_MinJSFVersion() + { + return (EAttribute)tagToViewObjectMappingEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getTagToViewObjectMapping_MinLibraryVersion() + { + return (EAttribute)tagToViewObjectMappingEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getClassTypeInfo_() + { + return classTypeInfo_EClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getClassTypeInfo__ClassName() + { + return (EAttribute)classTypeInfo_EClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getClassTypeInfo__SuperClasses() + { + return (EAttribute)classTypeInfo_EClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getClassTypeInfo__Interfaces() + { + return (EAttribute)classTypeInfo_EClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getComponentTypeInfo_() + { + return componentTypeInfo_EClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getComponentTypeInfo__ComponentType() + { + return (EAttribute)componentTypeInfo_EClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getComponentTypeInfo__ComponentFamily() + { + return (EAttribute)componentTypeInfo_EClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getComponentTypeInfo__RenderType() + { + return (EAttribute)componentTypeInfo_EClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getConverterTypeInfo_() + { + return converterTypeInfo_EClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getConverterTypeInfo__ConverterId() + { + return (EAttribute)converterTypeInfo_EClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getConverterTypeInfo__ForClasses() + { + return (EAttribute)converterTypeInfo_EClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getValidatorTypeInfo_() + { + return validatorTypeInfo_EClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getValidatorTypeInfo__ValidatorId() + { + return (EAttribute)validatorTypeInfo_EClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getAttributeToPropertyMapping() + { + return attributeToPropertyMappingEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getAttributeToPropertyMapping_PropertyName() + { + return (EAttribute)attributeToPropertyMappingEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getAttributeToPropertyMapping_ElAllowed() + { + return (EAttribute)attributeToPropertyMappingEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getAttributeToPropertyMapping_CustomConversionFactoryId() + { + return (EAttribute)attributeToPropertyMappingEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ComponentMappingFactory getComponentMappingFactory() + { + return (ComponentMappingFactory)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 + tagMappingEClass = createEClass(TAG_MAPPING); + createEReference(tagMappingEClass, TAG_MAPPING__VERSIONED_TAG_TO_VIEW_MAPPINGS); + createEAttribute(tagMappingEClass, TAG_MAPPING__CUSTOM_CONVERSION_FACTORY_ID); + createEAttribute(tagMappingEClass, TAG_MAPPING__BEAN_MAPPED_PROPERTIES); + + tagToViewObjectMappingEClass = createEClass(TAG_TO_VIEW_OBJECT_MAPPING); + createEReference(tagToViewObjectMappingEClass, TAG_TO_VIEW_OBJECT_MAPPING__TYPE_INFO); + createEAttribute(tagToViewObjectMappingEClass, TAG_TO_VIEW_OBJECT_MAPPING__MIN_JSF_VERSION); + createEAttribute(tagToViewObjectMappingEClass, TAG_TO_VIEW_OBJECT_MAPPING__MIN_LIBRARY_VERSION); + + classTypeInfo_EClass = createEClass(CLASS_TYPE_INFO_); + createEAttribute(classTypeInfo_EClass, CLASS_TYPE_INFO___CLASS_NAME); + createEAttribute(classTypeInfo_EClass, CLASS_TYPE_INFO___SUPER_CLASSES); + createEAttribute(classTypeInfo_EClass, CLASS_TYPE_INFO___INTERFACES); + + componentTypeInfo_EClass = createEClass(COMPONENT_TYPE_INFO_); + createEAttribute(componentTypeInfo_EClass, COMPONENT_TYPE_INFO___COMPONENT_TYPE); + createEAttribute(componentTypeInfo_EClass, COMPONENT_TYPE_INFO___COMPONENT_FAMILY); + createEAttribute(componentTypeInfo_EClass, COMPONENT_TYPE_INFO___RENDER_TYPE); + + converterTypeInfo_EClass = createEClass(CONVERTER_TYPE_INFO_); + createEAttribute(converterTypeInfo_EClass, CONVERTER_TYPE_INFO___CONVERTER_ID); + createEAttribute(converterTypeInfo_EClass, CONVERTER_TYPE_INFO___FOR_CLASSES); + + validatorTypeInfo_EClass = createEClass(VALIDATOR_TYPE_INFO_); + createEAttribute(validatorTypeInfo_EClass, VALIDATOR_TYPE_INFO___VALIDATOR_ID); + + attributeToPropertyMappingEClass = createEClass(ATTRIBUTE_TO_PROPERTY_MAPPING); + createEAttribute(attributeToPropertyMappingEClass, ATTRIBUTE_TO_PROPERTY_MAPPING__PROPERTY_NAME); + createEAttribute(attributeToPropertyMappingEClass, ATTRIBUTE_TO_PROPERTY_MAPPING__EL_ALLOWED); + createEAttribute(attributeToPropertyMappingEClass, ATTRIBUTE_TO_PROPERTY_MAPPING__CUSTOM_CONVERSION_FACTORY_ID); + } + + /** + * <!-- 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 + componentTypeInfo_EClass.getESuperTypes().add(this.getClassTypeInfo_()); + converterTypeInfo_EClass.getESuperTypes().add(this.getClassTypeInfo_()); + validatorTypeInfo_EClass.getESuperTypes().add(this.getClassTypeInfo_()); + + // Initialize classes and features; add operations and parameters + initEClass(tagMappingEClass, TagMapping.class, "TagMapping", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getTagMapping_VersionedTagToViewMappings(), this.getTagToViewObjectMapping(), null, "versionedTagToViewMappings", null, 0, -1, TagMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getTagMapping_CustomConversionFactoryId(), ecorePackage.getEString(), "customConversionFactoryId", null, 0, 1, TagMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getTagMapping_BeanMappedProperties(), ecorePackage.getEString(), "beanMappedProperties", "", 0, -1, TagMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + EOperation op = addEOperation(tagMappingEClass, null, "findBestMapping", 0, 1, IS_UNIQUE, IS_ORDERED); + addEParameter(op, ecorePackage.getEString(), "jsfVersion", 0, 1, IS_UNIQUE, IS_ORDERED); + addEParameter(op, ecorePackage.getEString(), "libVersion", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(tagToViewObjectMappingEClass, TagToViewObjectMapping.class, "TagToViewObjectMapping", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getTagToViewObjectMapping_TypeInfo(), this.getClassTypeInfo_(), null, "typeInfo", null, 0, 1, TagToViewObjectMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getTagToViewObjectMapping_MinJSFVersion(), ecorePackage.getEString(), "minJSFVersion", "1.1", 0, 1, TagToViewObjectMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getTagToViewObjectMapping_MinLibraryVersion(), ecorePackage.getEString(), "minLibraryVersion", "", 0, 1, TagToViewObjectMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(classTypeInfo_EClass, ClassTypeInfo_.class, "ClassTypeInfo_", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getClassTypeInfo__ClassName(), ecorePackage.getEString(), "className", null, 0, 1, ClassTypeInfo_.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getClassTypeInfo__SuperClasses(), ecorePackage.getEString(), "superClasses", null, 0, -1, ClassTypeInfo_.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getClassTypeInfo__Interfaces(), ecorePackage.getEString(), "interfaces", null, 0, -1, ClassTypeInfo_.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(componentTypeInfo_EClass, ComponentTypeInfo_.class, "ComponentTypeInfo_", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getComponentTypeInfo__ComponentType(), ecorePackage.getEString(), "componentType", null, 0, 1, ComponentTypeInfo_.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getComponentTypeInfo__ComponentFamily(), ecorePackage.getEString(), "componentFamily", null, 0, 1, ComponentTypeInfo_.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getComponentTypeInfo__RenderType(), ecorePackage.getEString(), "renderType", null, 0, 1, ComponentTypeInfo_.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(converterTypeInfo_EClass, ConverterTypeInfo_.class, "ConverterTypeInfo_", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getConverterTypeInfo__ConverterId(), ecorePackage.getEString(), "converterId", null, 0, 1, ConverterTypeInfo_.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getConverterTypeInfo__ForClasses(), ecorePackage.getEString(), "forClasses", null, 0, -1, ConverterTypeInfo_.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(validatorTypeInfo_EClass, ValidatorTypeInfo_.class, "ValidatorTypeInfo_", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getValidatorTypeInfo__ValidatorId(), ecorePackage.getEString(), "validatorId", null, 0, 1, ValidatorTypeInfo_.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(attributeToPropertyMappingEClass, AttributeToPropertyMapping.class, "AttributeToPropertyMapping", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getAttributeToPropertyMapping_PropertyName(), ecorePackage.getEString(), "propertyName", null, 0, 1, AttributeToPropertyMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAttributeToPropertyMapping_ElAllowed(), ecorePackage.getEBoolean(), "elAllowed", "true", 0, 1, AttributeToPropertyMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAttributeToPropertyMapping_CustomConversionFactoryId(), ecorePackage.getEString(), "customConversionFactoryId", null, 0, 1, AttributeToPropertyMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // 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"; + addAnnotation + (getTagMapping_VersionedTagToViewMappings(), + source, + new String[] + { + "kind", "element", + "name", "versionedTagToViewMappings" + }); + addAnnotation + (getTagMapping_CustomConversionFactoryId(), + source, + new String[] + { + "kind", "element", + "name", "customConversionFactoryId" + }); + addAnnotation + (getTagMapping_BeanMappedProperties(), + source, + new String[] + { + "kind", "element", + "name", "beanMappedProperties" + }); + addAnnotation + (getTagToViewObjectMapping_TypeInfo(), + source, + new String[] + { + "kind", "element", + "name", "typeInfo" + }); + addAnnotation + (getTagToViewObjectMapping_MinJSFVersion(), + source, + new String[] + { + "kind", "element", + "name", "minVersion" + }); + addAnnotation + (getTagToViewObjectMapping_MinLibraryVersion(), + source, + new String[] + { + "kind", "element", + "name", "minLibraryVersion" + }); + addAnnotation + (getClassTypeInfo__ClassName(), + source, + new String[] + { + "kind", "element", + "name", "className" + }); + addAnnotation + (getClassTypeInfo__SuperClasses(), + source, + new String[] + { + "kind", "element", + "name", "superClasses" + }); + addAnnotation + (getClassTypeInfo__Interfaces(), + source, + new String[] + { + "kind", "element", + "name", "interfaces" + }); + addAnnotation + (getComponentTypeInfo__ComponentType(), + source, + new String[] + { + "kind", "element", + "name", "componentType" + }); + addAnnotation + (getComponentTypeInfo__ComponentFamily(), + source, + new String[] + { + "kind", "element", + "name", "componentFamily" + }); + addAnnotation + (getComponentTypeInfo__RenderType(), + source, + new String[] + { + "kind", "element", + "name", "renderType" + }); + addAnnotation + (getConverterTypeInfo__ConverterId(), + source, + new String[] + { + "kind", "element", + "name", "converterId" + }); + addAnnotation + (getConverterTypeInfo__ForClasses(), + source, + new String[] + { + "kind", "element", + "name", "forClass" + }); + addAnnotation + (getValidatorTypeInfo__ValidatorId(), + source, + new String[] + { + "kind", "element", + "name", "validatorId" + }); + addAnnotation + (getAttributeToPropertyMapping_PropertyName(), + source, + new String[] + { + "kind", "element", + "name", "propertyName" + }); + addAnnotation + (getAttributeToPropertyMapping_ElAllowed(), + source, + new String[] + { + "kind", "element", + "name", "elAllowed" + }); + addAnnotation + (getAttributeToPropertyMapping_CustomConversionFactoryId(), + source, + new String[] + { + "kind", "element", + "name", "customConversionFactoryId" + }); + } + +} //ComponentMappingPackageImpl diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ComponentTypeInfo_Impl.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ComponentTypeInfo_Impl.java new file mode 100644 index 000000000..ceae1a899 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ComponentTypeInfo_Impl.java @@ -0,0 +1,292 @@ +/** + * <copyright> + * </copyright> + * + * $Id: ComponentTypeInfo_Impl.java,v 1.1 2008/05/12 17:42:20 cbateman Exp $ + */ +package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentTypeInfo_; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Component Type Info </b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ComponentTypeInfo_Impl#getComponentType <em>Component Type</em>}</li> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ComponentTypeInfo_Impl#getComponentFamily <em>Component Family</em>}</li> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ComponentTypeInfo_Impl#getRenderType <em>Render Type</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class ComponentTypeInfo_Impl extends ClassTypeInfo_Impl implements ComponentTypeInfo_ +{ + /** + * The default value of the '{@link #getComponentType() <em>Component Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getComponentType() + * @generated + * @ordered + */ + protected static final String COMPONENT_TYPE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getComponentType() <em>Component Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getComponentType() + * @generated + * @ordered + */ + protected String componentType = COMPONENT_TYPE_EDEFAULT; + + /** + * The default value of the '{@link #getComponentFamily() <em>Component Family</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getComponentFamily() + * @generated + * @ordered + */ + protected static final String COMPONENT_FAMILY_EDEFAULT = null; + + /** + * The cached value of the '{@link #getComponentFamily() <em>Component Family</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getComponentFamily() + * @generated + * @ordered + */ + protected String componentFamily = COMPONENT_FAMILY_EDEFAULT; + + /** + * The default value of the '{@link #getRenderType() <em>Render Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getRenderType() + * @generated + * @ordered + */ + protected static final String RENDER_TYPE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getRenderType() <em>Render Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getRenderType() + * @generated + * @ordered + */ + protected String renderType = RENDER_TYPE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ComponentTypeInfo_Impl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return ComponentMappingPackage.Literals.COMPONENT_TYPE_INFO_; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getComponentType() + { + return componentType; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setComponentType(String newComponentType) + { + String oldComponentType = componentType; + componentType = newComponentType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentMappingPackage.COMPONENT_TYPE_INFO___COMPONENT_TYPE, oldComponentType, componentType)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getComponentFamily() + { + return componentFamily; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setComponentFamily(String newComponentFamily) + { + String oldComponentFamily = componentFamily; + componentFamily = newComponentFamily; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentMappingPackage.COMPONENT_TYPE_INFO___COMPONENT_FAMILY, oldComponentFamily, componentFamily)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getRenderType() + { + return renderType; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setRenderType(String newRenderType) + { + String oldRenderType = renderType; + renderType = newRenderType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentMappingPackage.COMPONENT_TYPE_INFO___RENDER_TYPE, oldRenderType, renderType)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case ComponentMappingPackage.COMPONENT_TYPE_INFO___COMPONENT_TYPE: + return getComponentType(); + case ComponentMappingPackage.COMPONENT_TYPE_INFO___COMPONENT_FAMILY: + return getComponentFamily(); + case ComponentMappingPackage.COMPONENT_TYPE_INFO___RENDER_TYPE: + return getRenderType(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case ComponentMappingPackage.COMPONENT_TYPE_INFO___COMPONENT_TYPE: + setComponentType((String)newValue); + return; + case ComponentMappingPackage.COMPONENT_TYPE_INFO___COMPONENT_FAMILY: + setComponentFamily((String)newValue); + return; + case ComponentMappingPackage.COMPONENT_TYPE_INFO___RENDER_TYPE: + setRenderType((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case ComponentMappingPackage.COMPONENT_TYPE_INFO___COMPONENT_TYPE: + setComponentType(COMPONENT_TYPE_EDEFAULT); + return; + case ComponentMappingPackage.COMPONENT_TYPE_INFO___COMPONENT_FAMILY: + setComponentFamily(COMPONENT_FAMILY_EDEFAULT); + return; + case ComponentMappingPackage.COMPONENT_TYPE_INFO___RENDER_TYPE: + setRenderType(RENDER_TYPE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case ComponentMappingPackage.COMPONENT_TYPE_INFO___COMPONENT_TYPE: + return COMPONENT_TYPE_EDEFAULT == null ? componentType != null : !COMPONENT_TYPE_EDEFAULT.equals(componentType); + case ComponentMappingPackage.COMPONENT_TYPE_INFO___COMPONENT_FAMILY: + return COMPONENT_FAMILY_EDEFAULT == null ? componentFamily != null : !COMPONENT_FAMILY_EDEFAULT.equals(componentFamily); + case ComponentMappingPackage.COMPONENT_TYPE_INFO___RENDER_TYPE: + return RENDER_TYPE_EDEFAULT == null ? renderType != null : !RENDER_TYPE_EDEFAULT.equals(renderType); + } + 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(" (componentType: "); + result.append(componentType); + result.append(", componentFamily: "); + result.append(componentFamily); + result.append(", renderType: "); + result.append(renderType); + result.append(')'); + return result.toString(); + } + +} //ComponentTypeInfo_Impl diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ConverterTypeInfo_Impl.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ConverterTypeInfo_Impl.java new file mode 100644 index 000000000..988532025 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ConverterTypeInfo_Impl.java @@ -0,0 +1,222 @@ +/** + * <copyright> + * </copyright> + * + * $Id: ConverterTypeInfo_Impl.java,v 1.1 2008/05/12 17:42:20 cbateman Exp $ + */ +package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl; + +import java.util.Collection; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ConverterTypeInfo_; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Converter Type Info </b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ConverterTypeInfo_Impl#getConverterId <em>Converter Id</em>}</li> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ConverterTypeInfo_Impl#getForClasses <em>For Classes</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class ConverterTypeInfo_Impl extends ClassTypeInfo_Impl implements ConverterTypeInfo_ +{ + /** + * The default value of the '{@link #getConverterId() <em>Converter Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getConverterId() + * @generated + * @ordered + */ + protected static final String CONVERTER_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getConverterId() <em>Converter Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getConverterId() + * @generated + * @ordered + */ + protected String converterId = CONVERTER_ID_EDEFAULT; + + /** + * The cached value of the '{@link #getForClasses() <em>For Classes</em>}' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getForClasses() + * @generated + * @ordered + */ + protected EList<String> forClasses; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ConverterTypeInfo_Impl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return ComponentMappingPackage.Literals.CONVERTER_TYPE_INFO_; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getConverterId() + { + return converterId; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setConverterId(String newConverterId) + { + String oldConverterId = converterId; + converterId = newConverterId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentMappingPackage.CONVERTER_TYPE_INFO___CONVERTER_ID, oldConverterId, converterId)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<String> getForClasses() + { + if (forClasses == null) + { + forClasses = new EDataTypeUniqueEList<String>(String.class, this, ComponentMappingPackage.CONVERTER_TYPE_INFO___FOR_CLASSES); + } + return forClasses; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case ComponentMappingPackage.CONVERTER_TYPE_INFO___CONVERTER_ID: + return getConverterId(); + case ComponentMappingPackage.CONVERTER_TYPE_INFO___FOR_CLASSES: + return getForClasses(); + } + 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 ComponentMappingPackage.CONVERTER_TYPE_INFO___CONVERTER_ID: + setConverterId((String)newValue); + return; + case ComponentMappingPackage.CONVERTER_TYPE_INFO___FOR_CLASSES: + getForClasses().clear(); + getForClasses().addAll((Collection<? extends String>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case ComponentMappingPackage.CONVERTER_TYPE_INFO___CONVERTER_ID: + setConverterId(CONVERTER_ID_EDEFAULT); + return; + case ComponentMappingPackage.CONVERTER_TYPE_INFO___FOR_CLASSES: + getForClasses().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case ComponentMappingPackage.CONVERTER_TYPE_INFO___CONVERTER_ID: + return CONVERTER_ID_EDEFAULT == null ? converterId != null : !CONVERTER_ID_EDEFAULT.equals(converterId); + case ComponentMappingPackage.CONVERTER_TYPE_INFO___FOR_CLASSES: + return forClasses != null && !forClasses.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(" (converterId: "); + result.append(converterId); + result.append(", forClasses: "); + result.append(forClasses); + result.append(')'); + return result.toString(); + } + +} //ConverterTypeInfo_Impl diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/TagMappingImpl.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/TagMappingImpl.java new file mode 100644 index 000000000..fedaf6726 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/TagMappingImpl.java @@ -0,0 +1,294 @@ +/** + * <copyright> + * </copyright> + * + * $Id: TagMappingImpl.java,v 1.1 2008/05/12 17:42:20 cbateman Exp $ + */ +package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.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.EDataTypeUniqueEList; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagMapping; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagToViewObjectMapping; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Tag Mapping</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.TagMappingImpl#getVersionedTagToViewMappings <em>Versioned Tag To View Mappings</em>}</li> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.TagMappingImpl#getCustomConversionFactoryId <em>Custom Conversion Factory Id</em>}</li> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.TagMappingImpl#getBeanMappedProperties <em>Bean Mapped Properties</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class TagMappingImpl extends EObjectImpl implements TagMapping +{ + /** + * The cached value of the '{@link #getVersionedTagToViewMappings() <em>Versioned Tag To View Mappings</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getVersionedTagToViewMappings() + * @generated + * @ordered + */ + protected EList<TagToViewObjectMapping> versionedTagToViewMappings; + + /** + * The default value of the '{@link #getCustomConversionFactoryId() <em>Custom Conversion Factory Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCustomConversionFactoryId() + * @generated + * @ordered + */ + protected static final String CUSTOM_CONVERSION_FACTORY_ID_EDEFAULT = null; + /** + * The cached value of the '{@link #getCustomConversionFactoryId() <em>Custom Conversion Factory Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCustomConversionFactoryId() + * @generated + * @ordered + */ + protected String customConversionFactoryId = CUSTOM_CONVERSION_FACTORY_ID_EDEFAULT; + + /** + * The cached value of the '{@link #getBeanMappedProperties() <em>Bean Mapped Properties</em>}' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getBeanMappedProperties() + * @generated + * @ordered + */ + protected EList<String> beanMappedProperties; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected TagMappingImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return ComponentMappingPackage.Literals.TAG_MAPPING; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<TagToViewObjectMapping> getVersionedTagToViewMappings() + { + if (versionedTagToViewMappings == null) + { + versionedTagToViewMappings = new EObjectContainmentEList<TagToViewObjectMapping>(TagToViewObjectMapping.class, this, ComponentMappingPackage.TAG_MAPPING__VERSIONED_TAG_TO_VIEW_MAPPINGS); + } + return versionedTagToViewMappings; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getCustomConversionFactoryId() + { + return customConversionFactoryId; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setCustomConversionFactoryId(String newCustomConversionFactoryId) + { + String oldCustomConversionFactoryId = customConversionFactoryId; + customConversionFactoryId = newCustomConversionFactoryId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentMappingPackage.TAG_MAPPING__CUSTOM_CONVERSION_FACTORY_ID, oldCustomConversionFactoryId, customConversionFactoryId)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<String> getBeanMappedProperties() + { + if (beanMappedProperties == null) + { + beanMappedProperties = new EDataTypeUniqueEList<String>(String.class, this, ComponentMappingPackage.TAG_MAPPING__BEAN_MAPPED_PROPERTIES); + } + return beanMappedProperties; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void findBestMapping(String jsfVersion, String libVersion) + { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case ComponentMappingPackage.TAG_MAPPING__VERSIONED_TAG_TO_VIEW_MAPPINGS: + return ((InternalEList<?>)getVersionedTagToViewMappings()).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 ComponentMappingPackage.TAG_MAPPING__VERSIONED_TAG_TO_VIEW_MAPPINGS: + return getVersionedTagToViewMappings(); + case ComponentMappingPackage.TAG_MAPPING__CUSTOM_CONVERSION_FACTORY_ID: + return getCustomConversionFactoryId(); + case ComponentMappingPackage.TAG_MAPPING__BEAN_MAPPED_PROPERTIES: + return getBeanMappedProperties(); + } + 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 ComponentMappingPackage.TAG_MAPPING__VERSIONED_TAG_TO_VIEW_MAPPINGS: + getVersionedTagToViewMappings().clear(); + getVersionedTagToViewMappings().addAll((Collection<? extends TagToViewObjectMapping>)newValue); + return; + case ComponentMappingPackage.TAG_MAPPING__CUSTOM_CONVERSION_FACTORY_ID: + setCustomConversionFactoryId((String)newValue); + return; + case ComponentMappingPackage.TAG_MAPPING__BEAN_MAPPED_PROPERTIES: + getBeanMappedProperties().clear(); + getBeanMappedProperties().addAll((Collection<? extends String>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case ComponentMappingPackage.TAG_MAPPING__VERSIONED_TAG_TO_VIEW_MAPPINGS: + getVersionedTagToViewMappings().clear(); + return; + case ComponentMappingPackage.TAG_MAPPING__CUSTOM_CONVERSION_FACTORY_ID: + setCustomConversionFactoryId(CUSTOM_CONVERSION_FACTORY_ID_EDEFAULT); + return; + case ComponentMappingPackage.TAG_MAPPING__BEAN_MAPPED_PROPERTIES: + getBeanMappedProperties().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case ComponentMappingPackage.TAG_MAPPING__VERSIONED_TAG_TO_VIEW_MAPPINGS: + return versionedTagToViewMappings != null && !versionedTagToViewMappings.isEmpty(); + case ComponentMappingPackage.TAG_MAPPING__CUSTOM_CONVERSION_FACTORY_ID: + return CUSTOM_CONVERSION_FACTORY_ID_EDEFAULT == null ? customConversionFactoryId != null : !CUSTOM_CONVERSION_FACTORY_ID_EDEFAULT.equals(customConversionFactoryId); + case ComponentMappingPackage.TAG_MAPPING__BEAN_MAPPED_PROPERTIES: + return beanMappedProperties != null && !beanMappedProperties.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(" (customConversionFactoryId: "); + result.append(customConversionFactoryId); + result.append(", beanMappedProperties: "); + result.append(beanMappedProperties); + result.append(')'); + return result.toString(); + } + +} //TagMappingImpl diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/TagToViewObjectMappingImpl.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/TagToViewObjectMappingImpl.java new file mode 100644 index 000000000..dbaaa73c2 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/TagToViewObjectMappingImpl.java @@ -0,0 +1,314 @@ +/** + * <copyright> + * </copyright> + * + * $Id: TagToViewObjectMappingImpl.java,v 1.1 2008/05/12 17:42:20 cbateman Exp $ + */ +package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.notify.NotificationChain; +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.jst.jsf.designtime.internal.view.mapping.viewmapping.ClassTypeInfo_; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagToViewObjectMapping; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Tag To View Object Mapping</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.TagToViewObjectMappingImpl#getTypeInfo <em>Type Info</em>}</li> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.TagToViewObjectMappingImpl#getMinJSFVersion <em>Min JSF Version</em>}</li> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.TagToViewObjectMappingImpl#getMinLibraryVersion <em>Min Library Version</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class TagToViewObjectMappingImpl extends EObjectImpl implements TagToViewObjectMapping +{ + /** + * The cached value of the '{@link #getTypeInfo() <em>Type Info</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTypeInfo() + * @generated + * @ordered + */ + protected ClassTypeInfo_ typeInfo; + + /** + * The default value of the '{@link #getMinJSFVersion() <em>Min JSF Version</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMinJSFVersion() + * @generated + * @ordered + */ + protected static final String MIN_JSF_VERSION_EDEFAULT = "1.1"; + + /** + * The cached value of the '{@link #getMinJSFVersion() <em>Min JSF Version</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMinJSFVersion() + * @generated + * @ordered + */ + protected String minJSFVersion = MIN_JSF_VERSION_EDEFAULT; + + /** + * The default value of the '{@link #getMinLibraryVersion() <em>Min Library Version</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMinLibraryVersion() + * @generated + * @ordered + */ + protected static final String MIN_LIBRARY_VERSION_EDEFAULT = ""; + + /** + * The cached value of the '{@link #getMinLibraryVersion() <em>Min Library Version</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMinLibraryVersion() + * @generated + * @ordered + */ + protected String minLibraryVersion = MIN_LIBRARY_VERSION_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected TagToViewObjectMappingImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return ComponentMappingPackage.Literals.TAG_TO_VIEW_OBJECT_MAPPING; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ClassTypeInfo_ getTypeInfo() + { + return typeInfo; + } + + /** + * <!-- begin-user-doc --> + * @param newTypeInfo + * @param msgs + * @return the notification chain + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetTypeInfo(ClassTypeInfo_ newTypeInfo, NotificationChain msgs) + { + ClassTypeInfo_ oldTypeInfo = typeInfo; + typeInfo = newTypeInfo; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ComponentMappingPackage.TAG_TO_VIEW_OBJECT_MAPPING__TYPE_INFO, oldTypeInfo, newTypeInfo); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setTypeInfo(ClassTypeInfo_ newTypeInfo) + { + if (newTypeInfo != typeInfo) + { + NotificationChain msgs = null; + if (typeInfo != null) + msgs = ((InternalEObject)typeInfo).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ComponentMappingPackage.TAG_TO_VIEW_OBJECT_MAPPING__TYPE_INFO, null, msgs); + if (newTypeInfo != null) + msgs = ((InternalEObject)newTypeInfo).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ComponentMappingPackage.TAG_TO_VIEW_OBJECT_MAPPING__TYPE_INFO, null, msgs); + msgs = basicSetTypeInfo(newTypeInfo, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentMappingPackage.TAG_TO_VIEW_OBJECT_MAPPING__TYPE_INFO, newTypeInfo, newTypeInfo)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getMinJSFVersion() + { + return minJSFVersion; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setMinJSFVersion(String newMinJSFVersion) + { + String oldMinJSFVersion = minJSFVersion; + minJSFVersion = newMinJSFVersion; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentMappingPackage.TAG_TO_VIEW_OBJECT_MAPPING__MIN_JSF_VERSION, oldMinJSFVersion, minJSFVersion)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getMinLibraryVersion() + { + return minLibraryVersion; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setMinLibraryVersion(String newMinLibraryVersion) + { + String oldMinLibraryVersion = minLibraryVersion; + minLibraryVersion = newMinLibraryVersion; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentMappingPackage.TAG_TO_VIEW_OBJECT_MAPPING__MIN_LIBRARY_VERSION, oldMinLibraryVersion, minLibraryVersion)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case ComponentMappingPackage.TAG_TO_VIEW_OBJECT_MAPPING__TYPE_INFO: + return basicSetTypeInfo(null, 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 ComponentMappingPackage.TAG_TO_VIEW_OBJECT_MAPPING__TYPE_INFO: + return getTypeInfo(); + case ComponentMappingPackage.TAG_TO_VIEW_OBJECT_MAPPING__MIN_JSF_VERSION: + return getMinJSFVersion(); + case ComponentMappingPackage.TAG_TO_VIEW_OBJECT_MAPPING__MIN_LIBRARY_VERSION: + return getMinLibraryVersion(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case ComponentMappingPackage.TAG_TO_VIEW_OBJECT_MAPPING__TYPE_INFO: + setTypeInfo((ClassTypeInfo_)newValue); + return; + case ComponentMappingPackage.TAG_TO_VIEW_OBJECT_MAPPING__MIN_JSF_VERSION: + setMinJSFVersion((String)newValue); + return; + case ComponentMappingPackage.TAG_TO_VIEW_OBJECT_MAPPING__MIN_LIBRARY_VERSION: + setMinLibraryVersion((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case ComponentMappingPackage.TAG_TO_VIEW_OBJECT_MAPPING__TYPE_INFO: + setTypeInfo((ClassTypeInfo_)null); + return; + case ComponentMappingPackage.TAG_TO_VIEW_OBJECT_MAPPING__MIN_JSF_VERSION: + setMinJSFVersion(MIN_JSF_VERSION_EDEFAULT); + return; + case ComponentMappingPackage.TAG_TO_VIEW_OBJECT_MAPPING__MIN_LIBRARY_VERSION: + setMinLibraryVersion(MIN_LIBRARY_VERSION_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case ComponentMappingPackage.TAG_TO_VIEW_OBJECT_MAPPING__TYPE_INFO: + return typeInfo != null; + case ComponentMappingPackage.TAG_TO_VIEW_OBJECT_MAPPING__MIN_JSF_VERSION: + return MIN_JSF_VERSION_EDEFAULT == null ? minJSFVersion != null : !MIN_JSF_VERSION_EDEFAULT.equals(minJSFVersion); + case ComponentMappingPackage.TAG_TO_VIEW_OBJECT_MAPPING__MIN_LIBRARY_VERSION: + return MIN_LIBRARY_VERSION_EDEFAULT == null ? minLibraryVersion != null : !MIN_LIBRARY_VERSION_EDEFAULT.equals(minLibraryVersion); + } + return super.eIsSet(featureID); + } + + @Override + public String toString() + { + return "TagToViewObjectMapping: typeInfo="+getTypeInfo(); + } +} //TagToViewObjectMappingImpl diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ValidatorTypeInfo_Impl.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ValidatorTypeInfo_Impl.java new file mode 100644 index 000000000..bcfcfdbf2 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/impl/ValidatorTypeInfo_Impl.java @@ -0,0 +1,180 @@ +/** + * <copyright> + * </copyright> + * + * $Id: ValidatorTypeInfo_Impl.java,v 1.1 2008/05/12 17:42:20 cbateman Exp $ + */ +package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ValidatorTypeInfo_; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Validator Type Info </b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.impl.ValidatorTypeInfo_Impl#getValidatorId <em>Validator Id</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class ValidatorTypeInfo_Impl extends ClassTypeInfo_Impl implements ValidatorTypeInfo_ +{ + /** + * The default value of the '{@link #getValidatorId() <em>Validator Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValidatorId() + * @generated + * @ordered + */ + protected static final String VALIDATOR_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValidatorId() <em>Validator Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValidatorId() + * @generated + * @ordered + */ + protected String validatorId = VALIDATOR_ID_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ValidatorTypeInfo_Impl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return ComponentMappingPackage.Literals.VALIDATOR_TYPE_INFO_; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getValidatorId() + { + return validatorId; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setValidatorId(String newValidatorId) + { + String oldValidatorId = validatorId; + validatorId = newValidatorId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentMappingPackage.VALIDATOR_TYPE_INFO___VALIDATOR_ID, oldValidatorId, validatorId)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case ComponentMappingPackage.VALIDATOR_TYPE_INFO___VALIDATOR_ID: + return getValidatorId(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case ComponentMappingPackage.VALIDATOR_TYPE_INFO___VALIDATOR_ID: + setValidatorId((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case ComponentMappingPackage.VALIDATOR_TYPE_INFO___VALIDATOR_ID: + setValidatorId(VALIDATOR_ID_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case ComponentMappingPackage.VALIDATOR_TYPE_INFO___VALIDATOR_ID: + return VALIDATOR_ID_EDEFAULT == null ? validatorId != null : !VALIDATOR_ID_EDEFAULT.equals(validatorId); + } + 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(" (validatorId: "); + result.append(validatorId); + result.append(')'); + return result.toString(); + } + +} //ValidatorTypeInfo_Impl diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/util/ComponentMappingAdapterFactory.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/util/ComponentMappingAdapterFactory.java new file mode 100644 index 000000000..767687908 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/util/ComponentMappingAdapterFactory.java @@ -0,0 +1,256 @@ +/** + * <copyright> + * </copyright> + * + * $Id: ComponentMappingAdapterFactory.java,v 1.1 2008/05/12 17:42:21 cbateman Exp $ + */ +package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.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.designtime.internal.view.mapping.viewmapping.*; + +/** + * <!-- 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.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage + * @generated + */ +public class ComponentMappingAdapterFactory extends AdapterFactoryImpl +{ + /** + * The cached model package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static ComponentMappingPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ComponentMappingAdapterFactory() + { + if (modelPackage == null) + { + modelPackage = ComponentMappingPackage.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 ComponentMappingSwitch<Adapter> modelSwitch = + new ComponentMappingSwitch<Adapter>() + { + @Override + public Adapter caseTagMapping(TagMapping object) + { + return createTagMappingAdapter(); + } + @Override + public Adapter caseTagToViewObjectMapping(TagToViewObjectMapping object) + { + return createTagToViewObjectMappingAdapter(); + } + @Override + public Adapter caseClassTypeInfo_(ClassTypeInfo_ object) + { + return createClassTypeInfo_Adapter(); + } + @Override + public Adapter caseComponentTypeInfo_(ComponentTypeInfo_ object) + { + return createComponentTypeInfo_Adapter(); + } + @Override + public Adapter caseConverterTypeInfo_(ConverterTypeInfo_ object) + { + return createConverterTypeInfo_Adapter(); + } + @Override + public Adapter caseValidatorTypeInfo_(ValidatorTypeInfo_ object) + { + return createValidatorTypeInfo_Adapter(); + } + @Override + public Adapter caseAttributeToPropertyMapping(AttributeToPropertyMapping object) + { + return createAttributeToPropertyMappingAdapter(); + } + @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.designtime.internal.view.mapping.viewmapping.TagMapping <em>Tag Mapping</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.designtime.internal.view.mapping.viewmapping.TagMapping + * @generated + */ + public Adapter createTagMappingAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.TagToViewObjectMapping <em>Tag To View Object Mapping</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.designtime.internal.view.mapping.viewmapping.TagToViewObjectMapping + * @generated + */ + public Adapter createTagToViewObjectMappingAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ClassTypeInfo_ <em>Class Type Info </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.designtime.internal.view.mapping.viewmapping.ClassTypeInfo_ + * @generated + */ + public Adapter createClassTypeInfo_Adapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentTypeInfo_ <em>Component Type Info </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.designtime.internal.view.mapping.viewmapping.ComponentTypeInfo_ + * @generated + */ + public Adapter createComponentTypeInfo_Adapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ConverterTypeInfo_ <em>Converter Type Info </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.designtime.internal.view.mapping.viewmapping.ConverterTypeInfo_ + * @generated + */ + public Adapter createConverterTypeInfo_Adapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ValidatorTypeInfo_ <em>Validator Type Info </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.designtime.internal.view.mapping.viewmapping.ValidatorTypeInfo_ + * @generated + */ + public Adapter createValidatorTypeInfo_Adapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.AttributeToPropertyMapping <em>Attribute To Property Mapping</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.designtime.internal.view.mapping.viewmapping.AttributeToPropertyMapping + * @generated + */ + public Adapter createAttributeToPropertyMappingAdapter() + { + 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; + } + +} //ComponentMappingAdapterFactory diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/util/ComponentMappingResourceFactoryImpl.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/util/ComponentMappingResourceFactoryImpl.java new file mode 100644 index 000000000..08f2fbf27 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/util/ComponentMappingResourceFactoryImpl.java @@ -0,0 +1,59 @@ +/** + * <copyright> + * </copyright> + * + * $Id: ComponentMappingResourceFactoryImpl.java,v 1.1 2008/05/12 17:42:21 cbateman Exp $ + */ +package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.util; + +import org.eclipse.emf.common.util.URI; + +import org.eclipse.emf.ecore.resource.Resource; + +import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; + +import org.eclipse.emf.ecore.xmi.XMLResource; + +/** + * <!-- begin-user-doc --> + * The <b>Resource Factory</b> associated with the package. + * <!-- end-user-doc --> + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.util.ComponentMappingResourceImpl + * @generated + */ +public class ComponentMappingResourceFactoryImpl extends ResourceFactoryImpl +{ + /** + * Creates an instance of the resource factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ComponentMappingResourceFactoryImpl() + { + super(); + } + + /** + * Creates an instance of the resource. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Resource createResource(URI uri) + { + XMLResource result = new ComponentMappingResourceImpl(uri); + result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); + result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); + + result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE); + + result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); + result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); + + result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE); + return result; + } + +} //ComponentMappingResourceFactoryImpl diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/util/ComponentMappingResourceImpl.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/util/ComponentMappingResourceImpl.java new file mode 100644 index 000000000..8d3c819df --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/util/ComponentMappingResourceImpl.java @@ -0,0 +1,34 @@ +/** + * <copyright> + * </copyright> + * + * $Id: ComponentMappingResourceImpl.java,v 1.1 2008/05/12 17:42:21 cbateman Exp $ + */ +package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.util; + +import org.eclipse.emf.common.util.URI; + +import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl; + +/** + * <!-- begin-user-doc --> + * The <b>Resource </b> associated with the package. + * <!-- end-user-doc --> + * @see org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.util.ComponentMappingResourceFactoryImpl + * @generated + */ +public class ComponentMappingResourceImpl extends XMLResourceImpl +{ + /** + * Creates an instance of the resource. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param uri the URI of the new resource. + * @generated + */ + public ComponentMappingResourceImpl(URI uri) + { + super(uri); + } + +} //ComponentMappingResourceImpl diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/util/ComponentMappingSwitch.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/util/ComponentMappingSwitch.java new file mode 100644 index 000000000..3de410697 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/util/ComponentMappingSwitch.java @@ -0,0 +1,286 @@ +/** + * <copyright> + * </copyright> + * + * $Id: ComponentMappingSwitch.java,v 1.1 2008/05/12 17:42:21 cbateman Exp $ + */ +package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.util; + +import java.util.List; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.*; + +/** + * <!-- 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.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage + * @generated + */ +public class ComponentMappingSwitch<T> +{ + /** + * The cached model package + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static ComponentMappingPackage modelPackage; + + /** + * Creates an instance of the switch. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ComponentMappingSwitch() + { + if (modelPackage == null) + { + modelPackage = ComponentMappingPackage.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 ComponentMappingPackage.TAG_MAPPING: + { + TagMapping tagMapping = (TagMapping)theEObject; + T result = caseTagMapping(tagMapping); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ComponentMappingPackage.TAG_TO_VIEW_OBJECT_MAPPING: + { + TagToViewObjectMapping tagToViewObjectMapping = (TagToViewObjectMapping)theEObject; + T result = caseTagToViewObjectMapping(tagToViewObjectMapping); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ComponentMappingPackage.CLASS_TYPE_INFO_: + { + ClassTypeInfo_ classTypeInfo_ = (ClassTypeInfo_)theEObject; + T result = caseClassTypeInfo_(classTypeInfo_); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ComponentMappingPackage.COMPONENT_TYPE_INFO_: + { + ComponentTypeInfo_ componentTypeInfo_ = (ComponentTypeInfo_)theEObject; + T result = caseComponentTypeInfo_(componentTypeInfo_); + if (result == null) result = caseClassTypeInfo_(componentTypeInfo_); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ComponentMappingPackage.CONVERTER_TYPE_INFO_: + { + ConverterTypeInfo_ converterTypeInfo_ = (ConverterTypeInfo_)theEObject; + T result = caseConverterTypeInfo_(converterTypeInfo_); + if (result == null) result = caseClassTypeInfo_(converterTypeInfo_); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ComponentMappingPackage.VALIDATOR_TYPE_INFO_: + { + ValidatorTypeInfo_ validatorTypeInfo_ = (ValidatorTypeInfo_)theEObject; + T result = caseValidatorTypeInfo_(validatorTypeInfo_); + if (result == null) result = caseClassTypeInfo_(validatorTypeInfo_); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ComponentMappingPackage.ATTRIBUTE_TO_PROPERTY_MAPPING: + { + AttributeToPropertyMapping attributeToPropertyMapping = (AttributeToPropertyMapping)theEObject; + T result = caseAttributeToPropertyMapping(attributeToPropertyMapping); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Tag Mapping</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>Tag Mapping</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseTagMapping(TagMapping object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Tag To View Object Mapping</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>Tag To View Object Mapping</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseTagToViewObjectMapping(TagToViewObjectMapping object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Class Type Info </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>Class Type Info </em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseClassTypeInfo_(ClassTypeInfo_ object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Component Type Info </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>Component Type Info </em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseComponentTypeInfo_(ComponentTypeInfo_ object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Converter Type Info </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>Converter Type Info </em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseConverterTypeInfo_(ConverterTypeInfo_ object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Validator Type Info </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>Validator Type Info </em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseValidatorTypeInfo_(ValidatorTypeInfo_ object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Attribute To Property Mapping</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 To Property Mapping</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAttributeToPropertyMapping(AttributeToPropertyMapping 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; + } + +} //ComponentMappingSwitch diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/util/ComponentMappingXMLProcessor.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/util/ComponentMappingXMLProcessor.java new file mode 100644 index 000000000..0280c4e09 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/mapping/viewmapping/util/ComponentMappingXMLProcessor.java @@ -0,0 +1,58 @@ +/** + * <copyright> + * </copyright> + * + * $Id: ComponentMappingXMLProcessor.java,v 1.1 2008/05/12 17:42:21 cbateman Exp $ + */ +package org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.util; + +import java.util.Map; + +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.resource.Resource; + +import org.eclipse.emf.ecore.xmi.util.XMLProcessor; + +import org.eclipse.jst.jsf.designtime.internal.view.mapping.viewmapping.ComponentMappingPackage; + +/** + * This class contains helper methods to serialize and deserialize XML documents + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ +public class ComponentMappingXMLProcessor extends XMLProcessor +{ + + /** + * Public constructor to instantiate the helper. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ComponentMappingXMLProcessor() + { + super((EPackage.Registry.INSTANCE)); + ComponentMappingPackage.eINSTANCE.eClass(); + } + + /** + * Register for "*" and "xml" file extensions the ComponentMappingResourceFactoryImpl factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected Map<String, Resource.Factory> getRegistrations() + { + if (registrations == null) + { + super.getRegistrations(); + registrations.put(XML_EXTENSION, new ComponentMappingResourceFactoryImpl()); + registrations.put(STAR_EXTENSION, new ComponentMappingResourceFactoryImpl()); + } + return registrations; + } + +} //ComponentMappingXMLProcessor diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/CMNodeNamedMapAdapter.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/CMNodeNamedMapAdapter.java new file mode 100644 index 000000000..4a2ab0fe2 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/CMNodeNamedMapAdapter.java @@ -0,0 +1,179 @@ +/******************************************************************************* + * 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.designtime.internal.view.model.jsp; + +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.Serializable; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.atomic.AtomicBoolean; + +import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ITagAttributeHandler; +import org.eclipse.jst.jsf.core.internal.JSFCorePlugin; +import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.IAttributeAdvisor.UnknownAttributeException; +import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDElementDeclaration; +import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration; + +/** + * Adapts TLDDocument attributes to a simple map of ITagAttributeHandler. Map is + * unmodifiable. + * + * @author cbateman + * + */ +public class CMNodeNamedMapAdapter implements + Map<String, ITagAttributeHandler>, Serializable +{ + /** + * serializable id + */ + private static final long serialVersionUID = -4188412823197830484L; + private transient final TLDElementDeclaration _tldElement; + private transient final IAttributeAdvisor _advisor; + private transient AtomicBoolean _isInitialized = new AtomicBoolean(false); + private final Map<String, ITagAttributeHandler> _cache; + + /** + * @param tldDoc + * @param advisor + */ + public CMNodeNamedMapAdapter(final TLDElementDeclaration tldDoc, + final IAttributeAdvisor advisor) + { + _tldElement = tldDoc; + _advisor = advisor; + _cache = new HashMap<String, ITagAttributeHandler>(); + } + + public boolean containsKey(Object key) + { + ensureAllAttributes(); + return _cache.containsKey(key); + } + + public boolean containsValue(Object value) + { + ensureAllAttributes(); + return _cache.containsValue(value); + } + + public Set<java.util.Map.Entry<String, ITagAttributeHandler>> entrySet() + { + ensureAllAttributes(); + return _cache.entrySet(); + } + + + public ITagAttributeHandler get(Object key) + { + if (key instanceof String) + { + return getOrCreateAttribute((String) key); + } + return null; + } + + public boolean isEmpty() + { + return size() == 0; + } + + public Set<String> keySet() + { + ensureAllAttributes(); + return Collections.unmodifiableSet(_cache.keySet()); + } + + public int size() + { + if (_tldElement != null) + { + return _tldElement.getAttributes().getLength(); + } + return _cache.size(); + } + + public Collection<ITagAttributeHandler> values() + { + ensureAllAttributes(); + return Collections.unmodifiableCollection(_cache.values()); + } + + private synchronized ITagAttributeHandler getOrCreateAttribute(final String name) + { + ITagAttributeHandler tagAttr = _cache.get(name); + + if (tagAttr == null) + { + try + { + tagAttr = _advisor.createAttributeHandler(name); + _cache.put(name, tagAttr); + } + catch (UnknownAttributeException e) + { + JSFCorePlugin.log(e, "Trying to get attribute for "+name); + } + } + + return tagAttr; + } + + private void ensureAllAttributes() + { + if (_isInitialized.compareAndSet(false, true)) + { + for (final Iterator it = _tldElement.getAttributes().iterator(); it.hasNext();) + { + final CMAttributeDeclaration attrDecl = (CMAttributeDeclaration) it.next(); + getOrCreateAttribute(attrDecl.getAttrName()); + } + } + } + + public void clear() + { + throw new UnsupportedOperationException("Cannot modify map"); + } + + public ITagAttributeHandler put(String key, ITagAttributeHandler value) + { + throw new UnsupportedOperationException("Cannot modify map"); + } + + public void putAll(Map<? extends String, ? extends ITagAttributeHandler> t) + { + throw new UnsupportedOperationException("Cannot modify map"); + } + + public ITagAttributeHandler remove(Object key) + { + throw new UnsupportedOperationException("Cannot modify map"); + } + + private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException + { + in.defaultReadObject(); + _isInitialized = new AtomicBoolean(true); + } + + private void writeObject(final ObjectOutputStream out) throws IOException + { + ensureAllAttributes(); + out.defaultWriteObject(); + } +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/DefaultJSPTagResolver.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/DefaultJSPTagResolver.java index eaa72dc80..aa01276aa 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/DefaultJSPTagResolver.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/DefaultJSPTagResolver.java @@ -10,7 +10,10 @@ *******************************************************************************/ package org.eclipse.jst.jsf.designtime.internal.view.model.jsp; +import java.util.Iterator; + 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; @@ -18,11 +21,14 @@ import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ValidatorType import org.eclipse.jst.jsf.common.runtime.internal.model.types.TypeInfo; import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ITagElement; import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.IHandlerTagElement.TagHandlerType; -import org.eclipse.jst.jsf.core.JSFVersion; import org.eclipse.jst.jsf.core.internal.tld.TagIdentifierFactory; -import org.eclipse.jst.jsf.core.jsfappconfig.JSFAppConfigUtils; +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.IAttributeAdvisor.NullAttributeAdvisor; import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDElementDeclaration; -import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion; +import org.osgi.framework.Version; /** * ** TEMPORARY CLASS UNTIL META-DATA STRATEGY IS AVAILABLE ** @@ -35,64 +41,130 @@ public class DefaultJSPTagResolver extends JSPTagResolvingStrategy /** * strategy id */ - public final static String ID = "org.eclipse.jst.jsf.THISISTEMPORARY"; + public final static String ID = "org.eclipse.jst.jsf.metadata.DefaultJSPTagResolver"; /** * displayable nameb */ - public final static String DISPLAY_NAME = "Meta-data Driven Resolver"; + public final static String DISPLAY_NAME = "Meta-data Driven Resolver"; - private final IProject _project; + private final ViewMetadataLoader _loader; + private final ViewMetadataMapper _mapper; /** * @param project */ public DefaultJSPTagResolver(final IProject project) { - _project = project; + _loader = new ViewMetadataLoader(project); + _mapper = new ViewMetadataMapper(); } @Override public ITagElement resolve(final TLDElementDeclaration elementDecl) { - final IProjectFacetVersion version = JSFAppConfigUtils - .getProjectFacet(_project); - final String versionAsString = version.getVersionString(); - final JSFVersion jsfVersion = JSFVersion.valueOfString(versionAsString); + // final IProjectFacetVersion version = JSFAppConfigUtils + // .getProjectFacet(_project); + // final String versionAsString = version.getVersionString(); + // final JSFVersion jsfVersion = JSFVersion.valueOfString(versionAsString); final TagIdentifier tagId = TagIdentifierFactory - .createTLDTagWrapper(elementDecl); - DefaultTagTypeInfo defaultTagTypeInfo = new DefaultTagTypeInfo(); - final TypeInfo elementType = defaultTagTypeInfo.getTypeInfo(tagId, jsfVersion); + .createTLDTagWrapper(elementDecl); + // final DefaultTagTypeInfo defaultTagTypeInfo = new DefaultTagTypeInfo(); + final TagMapping mapping = _loader.getTagToViewMapping(tagId); + + TypeInfo elementType = null; + if (mapping != null) + { + elementType = findTypeInfo(mapping, "1.1", null); + } if (elementType instanceof ComponentTypeInfo) { return new TLDComponentTagElement(elementDecl, - (ComponentTypeInfo) elementType); + (ComponentTypeInfo) elementType, new MetadataAttributeAdvisor(tagId, _loader)); } else if (elementType instanceof ConverterTypeInfo) { return new TLDConverterTagElement(elementDecl, - (ConverterTypeInfo) elementType); + (ConverterTypeInfo) elementType, new MetadataAttributeAdvisor(tagId, _loader)); } else if (elementType instanceof ValidatorTypeInfo) { return new TLDValidatorTagElement(elementDecl, - (ValidatorTypeInfo) elementType); + (ValidatorTypeInfo) elementType, new MetadataAttributeAdvisor(tagId, _loader)); } else if (elementType instanceof TagHandlerType) { return new TLDTagHandlerElement(elementDecl, - (TagHandlerType) elementType); + (TagHandlerType) elementType, new MetadataAttributeAdvisor(tagId, _loader)); } - else if (defaultTagTypeInfo.isDefaultLib(tagId.getUri())) + else if (DefaultTagTypeInfo.isDefaultLib(tagId.getUri())) { - return new TLDTagElement(elementDecl); + return new TLDTagElement(elementDecl, new NullAttributeAdvisor()); } // 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() @@ -104,7 +176,4 @@ public class DefaultJSPTagResolver extends JSPTagResolvingStrategy { return DISPLAY_NAME; } - - - } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/DefaultTagTypeInfo.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/DefaultTagTypeInfo.java index 610ff34a0..989e03b35 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/DefaultTagTypeInfo.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/DefaultTagTypeInfo.java @@ -71,7 +71,7 @@ public final class DefaultTagTypeInfo * @param uri * @return true if uri is covered by this class */ - public boolean isDefaultLib(final String uri) + public static boolean isDefaultLib(final String uri) { return URI_IS_A_JSF_LIB.contains(uri); } @@ -536,120 +536,120 @@ public final class DefaultTagTypeInfo static { - final Map<TagIdentifier, TypeInfo> elements = new HashMap<TagIdentifier, TypeInfo>(); + final Map<TagIdentifier, TypeInfo> commonElements = new HashMap<TagIdentifier, TypeInfo>(); // IJSFConstants.TAG_IDENTIFIER_PHASELISTENER); // IJSFConstants.TAG_IDENTIFIER_SETPROPERTYACTIONLISTENER); - elements.put(IJSFConstants.TAG_IDENTIFIER_ACTIONLISTENER, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_ACTIONLISTENER, TagHandlerType.ACTIONLISTENER); - elements.put(IJSFConstants.TAG_IDENTIFIER_ATTRIBUTE, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_ATTRIBUTE, TagHandlerType.ATTRIBUTE); - elements.put(IJSFConstants.TAG_IDENTIFIER_CONVERTDATETIME, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_CONVERTDATETIME, CONVERTERINFO_DATETIME); - elements.put(IJSFConstants.TAG_IDENTIFIER_CONVERTER, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_CONVERTER, ConverterTypeInfo.UNKNOWN); - elements.put(IJSFConstants.TAG_IDENTIFIER_CONVERTNUMBER, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_CONVERTNUMBER, CONVERTERINFO_NUMBER); - elements.put(IJSFConstants.TAG_IDENTIFIER_FACET, TagHandlerType.FACET); + commonElements.put(IJSFConstants.TAG_IDENTIFIER_FACET, TagHandlerType.FACET); // elements.put(IJSFConstants.TAG_IDENTIFIER_LOADBUNDLE, // TagHandlerType.); - elements.put(IJSFConstants.TAG_IDENTIFIER_PARAM, COMPINFO_PARAM); - elements.put(IJSFConstants.TAG_IDENTIFIER_SELECTITEM, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_PARAM, COMPINFO_PARAM); + commonElements.put(IJSFConstants.TAG_IDENTIFIER_SELECTITEM, COMPINFO_SELECTITEM); - elements.put(IJSFConstants.TAG_IDENTIFIER_SELECTITEMS, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_SELECTITEMS, COMPINFO_SELECTITEMS); - elements.put(IJSFConstants.TAG_IDENTIFIER_SUBVIEW, COMPINFO_SUBVIEW); - elements.put(IJSFConstants.TAG_IDENTIFIER_VALIDATEDOUBLERANGE, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_SUBVIEW, COMPINFO_SUBVIEW); + commonElements.put(IJSFConstants.TAG_IDENTIFIER_VALIDATEDOUBLERANGE, VALIDATORINFO_DOUBLERANGE); - elements.put(IJSFConstants.TAG_IDENTIFIER_VALIDATELENGTH, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_VALIDATELENGTH, VALIDATORINFO_LENGTH); - elements.put(IJSFConstants.TAG_IDENTIFIER_VALIDATELONGRANGE, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_VALIDATELONGRANGE, VALIDATORINFO_LONGRANGE); - elements.put(IJSFConstants.TAG_IDENTIFIER_VALIDATOR, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_VALIDATOR, ValidatorTypeInfo.UNKNOWN); - elements.put(IJSFConstants.TAG_IDENTIFIER_VALUECHANGELISTENER, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_VALUECHANGELISTENER, TagHandlerType.VALUECHANGELISTENER); - elements.put(IJSFConstants.TAG_IDENTIFIER_VERBATIM, COMPINFO_VERBATIM); - elements.put(IJSFConstants.TAG_IDENTIFIER_VIEW, COMPINFO_VIEW); + commonElements.put(IJSFConstants.TAG_IDENTIFIER_VERBATIM, COMPINFO_VERBATIM); + commonElements.put(IJSFConstants.TAG_IDENTIFIER_VIEW, COMPINFO_VIEW); // JSF 1.2 core elements // none currently... // JSF 1.1/1.2 HTML tags // html verifier - elements.put(IJSFConstants.TAG_IDENTIFIER_COLUMN, COMPINFO_COLUMN); + commonElements.put(IJSFConstants.TAG_IDENTIFIER_COLUMN, COMPINFO_COLUMN); - elements.put(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_COMMANDBUTTON, COMPINFO_COMMAND); - elements.put(IJSFConstants.TAG_IDENTIFIER_COMMANDLINK, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_COMMANDLINK, COMPINFO_COMMANDLINK); - elements.put(IJSFConstants.TAG_IDENTIFIER_DATA_TABLE, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_DATA_TABLE, COMPINFO_DATATABLE); - elements.put(IJSFConstants.TAG_IDENTIFIER_FORM, COMPINFO_FORM); + commonElements.put(IJSFConstants.TAG_IDENTIFIER_FORM, COMPINFO_FORM); - elements.put(IJSFConstants.TAG_IDENTIFIER_GRAPHICIMAGE, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_GRAPHICIMAGE, COMPINFO_GRAPHIC); - elements.put(IJSFConstants.TAG_IDENTIFIER_INPUTHIDDEN, COMPINFO_HIDDEN); + commonElements.put(IJSFConstants.TAG_IDENTIFIER_INPUTHIDDEN, COMPINFO_HIDDEN); - elements.put(IJSFConstants.TAG_IDENTIFIER_INPUTSECRET, COMPINFO_SECRET); + commonElements.put(IJSFConstants.TAG_IDENTIFIER_INPUTSECRET, COMPINFO_SECRET); - elements + commonElements .put(IJSFConstants.TAG_IDENTIFIER_INPUTTEXT, COMPINFO_INPUTTEXT); - elements.put(IJSFConstants.TAG_IDENTIFIER_INPUTTEXTAREA, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_INPUTTEXTAREA, COMPINFO_INPUTTEXTAREA); - elements.put(IJSFConstants.TAG_IDENTIFIER_MESSAGE, COMPINFO_MESSAGE); + commonElements.put(IJSFConstants.TAG_IDENTIFIER_MESSAGE, COMPINFO_MESSAGE); - elements.put(IJSFConstants.TAG_IDENTIFIER_MESSAGES, COMPINFO_MESSAGES); + commonElements.put(IJSFConstants.TAG_IDENTIFIER_MESSAGES, COMPINFO_MESSAGES); - elements.put(IJSFConstants.TAG_IDENTIFIER_OUTPUTFORMAT, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_OUTPUTFORMAT, COMPINFO_OUTPUTFORMAT); - elements.put(IJSFConstants.TAG_IDENTIFIER_OUTPUTLABEL, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_OUTPUTLABEL, COMPINFO_OUTPUTLABEL); - elements.put(IJSFConstants.TAG_IDENTIFIER_OUTPUTLINK, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_OUTPUTLINK, COMPINFO_OUTPUTLINK); - elements.put(IJSFConstants.TAG_IDENTIFIER_OUTPUTTEXT, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_OUTPUTTEXT, COMPINFO_OUTPUTTEXT); - elements.put(IJSFConstants.TAG_IDENTIFIER_PANEL_GRID, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_PANEL_GRID, COMPINFO_PANELGRID); - elements.put(IJSFConstants.TAG_IDENTIFIER_PANEL_GROUP, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_PANEL_GROUP, COMPINFO_PANELGROUP); - elements.put(IJSFConstants.TAG_IDENTIFIER_SELECTBOOLEANCHECKBOX, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_SELECTBOOLEANCHECKBOX, COMPINFO_SELECTBOOLEANCHECKBOX); - elements.put(IJSFConstants.TAG_IDENTIFIER_SELECTMANYCHECKBOX, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_SELECTMANYCHECKBOX, COMPINFO_SELECTMANYCHECKBOX); - elements.put(IJSFConstants.TAG_IDENTIFIER_SELECTMANYLISTBOX, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_SELECTMANYLISTBOX, COMPINFO_SELECTMANYLISTBOX); - elements.put(IJSFConstants.TAG_IDENTIFIER_SELECTMANYMENU, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_SELECTMANYMENU, COMPINFO_SELECTMANYMENU); - elements.put(IJSFConstants.TAG_IDENTIFIER_SELECTONELISTBOX, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_SELECTONELISTBOX, COMPINFO_SELECTONELISTBOX); - elements.put(IJSFConstants.TAG_IDENTIFIER_SELECTONEMENU, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_SELECTONEMENU, COMPINFO_SELECTONEMENU); - elements.put(IJSFConstants.TAG_IDENTIFIER_SELECTONERADIO, + commonElements.put(IJSFConstants.TAG_IDENTIFIER_SELECTONERADIO, COMPINFO_SELECTONERADIO); - JSF11_ELEMENTS = Collections.unmodifiableMap(elements); + JSF11_ELEMENTS = Collections.unmodifiableMap(commonElements); JSF12_ELEMENTS = Collections - .unmodifiableMap(new HashMap<TagIdentifier, TypeInfo>(elements)); + .unmodifiableMap(new HashMap<TagIdentifier, TypeInfo>(commonElements)); } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/IAttributeAdvisor.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/IAttributeAdvisor.java new file mode 100644 index 000000000..f473ab312 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/IAttributeAdvisor.java @@ -0,0 +1,88 @@ +/******************************************************************************* + * 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.designtime.internal.view.model.jsp; + +import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ITagAttributeHandler; +import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.TagAttributeHandler; + +/** + * @author cbateman + * + */ +public interface IAttributeAdvisor +{ + + /** + * @param name + * @return a tag attribute handler for the name. + * @throws UnknownAttributeException if name does not match a known attribute. + */ + ITagAttributeHandler createAttributeHandler(String name) throws UnknownAttributeException; + + /** + * @author cbateman + * + */ + public static class NullAttributeAdvisor implements IAttributeAdvisor + { + public ITagAttributeHandler createAttributeHandler(String name) + throws UnknownAttributeException + { + return new TagAttributeHandler(null, name, false); + } + } + + /** + * Indicates an unknown attribute was requested or encountered + * @author cbateman + * + */ + public static class UnknownAttributeException extends Exception + { + /** + * + */ + private static final long serialVersionUID = -988838913707929315L; + + /** + * + */ + public UnknownAttributeException() + { + super(); + } + + /** + * @param message + * @param cause + */ + public UnknownAttributeException(String message, Throwable cause) + { + super(message, cause); + } + + /** + * @param message + */ + public UnknownAttributeException(String message) + { + super(message); + } + + /** + * @param cause + */ + public UnknownAttributeException(Throwable cause) + { + super(cause); + } + } +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/MetadataAttributeAdvisor.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/MetadataAttributeAdvisor.java new file mode 100644 index 000000000..c85ec8a28 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/MetadataAttributeAdvisor.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * 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.designtime.internal.view.model.jsp; + +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.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; + +/* package */class MetadataAttributeAdvisor implements IAttributeAdvisor +{ + private final TagIdentifier _tagId; + private final ViewMetadataLoader _loader; + + public MetadataAttributeAdvisor(final TagIdentifier tagId, + final ViewMetadataLoader loader) + { + _tagId = tagId; + _loader = loader; + } + + 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); + } +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDComponentTagElement.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDComponentTagElement.java index 3704a4613..4e081bd36 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDComponentTagElement.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDComponentTagElement.java @@ -22,25 +22,27 @@ import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDElement * */ public class TLDComponentTagElement extends TLDJSFTagElement implements - IComponentTagElement +IComponentTagElement { /** * */ private static final long serialVersionUID = -6479445622102799425L; private final ComponentTypeInfo _componentTypeInfo; - + /** * @param elementDecl * @param componentTypeInfo + * @param advisor */ - public TLDComponentTagElement(final TLDElementDeclaration elementDecl, final ComponentTypeInfo componentTypeInfo) + public TLDComponentTagElement(final TLDElementDeclaration elementDecl + , final ComponentTypeInfo componentTypeInfo, final IAttributeAdvisor advisor) { - super(elementDecl); + super(elementDecl, advisor); _componentTypeInfo = componentTypeInfo; } - public ComponentTypeInfo getComponent() + public ComponentTypeInfo getComponent() { return _componentTypeInfo; } @@ -54,6 +56,8 @@ public class TLDComponentTagElement extends TLDJSFTagElement implements @Override public String toString() { - return _componentTypeInfo.toString(); + final String attributes = constructAttributesString(); + return _componentTypeInfo.toString() + + (!"".equals(attributes) ? "\n" + attributes : ""); } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDConverterTagElement.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDConverterTagElement.java index 95d7c019f..257a6f479 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDConverterTagElement.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDConverterTagElement.java @@ -27,14 +27,15 @@ public class TLDConverterTagElement extends TLDJSFTagElement implements IConvert */ private static final long serialVersionUID = 2854457220470229847L; private final ConverterTypeInfo _converterTypeInfo; - + /** * @param elementDecl * @param converterTypeInfo + * @param advisor */ - public TLDConverterTagElement(TLDElementDeclaration elementDecl, ConverterTypeInfo converterTypeInfo) + public TLDConverterTagElement(final TLDElementDeclaration elementDecl, final ConverterTypeInfo converterTypeInfo, final IAttributeAdvisor advisor) { - super(elementDecl); + super(elementDecl, advisor); _converterTypeInfo = converterTypeInfo; } @@ -51,7 +52,7 @@ public class TLDConverterTagElement extends TLDJSFTagElement implements IConvert { return _converterTypeInfo; } - + @Override public String toString() { diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDJSFTagElement.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDJSFTagElement.java index e0c63fcd1..58f88a865 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDJSFTagElement.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDJSFTagElement.java @@ -29,10 +29,12 @@ public abstract class TLDJSFTagElement extends TLDTagElement implements /** * @param elementDecl + * @param advisor */ - public TLDJSFTagElement(final TLDElementDeclaration elementDecl) + public TLDJSFTagElement(final TLDElementDeclaration elementDecl + , final IAttributeAdvisor advisor) { - super(elementDecl); + super(elementDecl, advisor); } public abstract TagType getType(); diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDTagElement.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDTagElement.java index d644a026e..f7ad76617 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDTagElement.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDTagElement.java @@ -11,7 +11,11 @@ package org.eclipse.jst.jsf.designtime.internal.view.model.jsp; import java.io.Serializable; +import java.util.Iterator; +import java.util.Map; +import java.util.Map.Entry; +import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ITagAttributeHandler; import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.TagElement; import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDDocument; import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDElementDeclaration; @@ -24,67 +28,26 @@ import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument; * @author cbateman * */ -public class TLDTagElement extends TagElement +public class TLDTagElement extends TagElement { /** * */ private static final long serialVersionUID = -874272538404837105L; - private TLDElementData _tldData; -// private final transient AtomicBoolean _locked; + private final TLDElementData _tldData; - /** + /** * @param elementDecl + * @param advisor */ - public TLDTagElement(TLDElementDeclaration elementDecl) + public TLDTagElement(final TLDElementDeclaration elementDecl + , final IAttributeAdvisor advisor) { - _tldData = new DocumentElementData(elementDecl); -// _locked = new AtomicBoolean(false); + _tldData = new DocumentElementData(elementDecl, advisor); } -// /** -// * DO NOT use directly. -// * -// * Used to initialize transient fields during deserialization. -// */ -// protected TLDTagElement() -// { -// _locked = new AtomicBoolean(false); -// } -// /** -// * Change the element decl. This should only be used during deserialization -// * to set the transient field. Will throw an UnsupportedOperationException -// * if called after setLocked() -// * -// * @param elementDecl -// */ -// public final void setElementDecl(final TLDElementDeclaration elementDecl) -// { -// if (_locked.get()) -// { -// throw new UnsupportedOperationException("object is locked"); -// } -// _tldData = new DocumentElementData(elementDecl); -// } - - /** - * Signals that the class should become immutable and throw exceptions - * if mutation is attempted on non-final data - */ -// public final void setLocked() -// { -// _locked.set(true); -// } - - /** - * @return true if setLocked has been called. - */ -// public final boolean isLocked() -// { -// return _locked.get(); -// } @Override - public String getName() + public String getName() { return _tldData.getName(); } @@ -99,25 +62,55 @@ public class TLDTagElement extends TagElement public String getTagHandlerClassName() { return _tldData.getTagHandlerClassName(); } - + @Override public String toString() { - return String.format("Tag: Tag Handler: name=%s, uri=%s, tagHandlerClassName=%s" - , getName(), getUri(), getTagHandlerClassName()); + return String.format("Tag: Tag Handler: name=%s, uri=%s, tagHandlerClassName=%s\n" + , getName(), getUri(), getTagHandlerClassName()) + + constructAttributesString(); + } + + /** + * @return a string representation of the attributes. + */ + protected String constructAttributesString() + { + String attributes = ""; + + for (final Iterator it = getAttributeHandlers().entrySet().iterator(); it.hasNext();) + { + final Map.Entry entry = (Entry) it.next(); + final String name = (String) entry.getKey(); + final ITagAttributeHandler handler = (ITagAttributeHandler) entry.getValue(); + + attributes += String.format("\t\t\tAttribute: name=%s, customHandler=%s, propertyName=%s, isELAllowed=%b\n", + name, handler.getCustomHandler(), handler.getName(), + Boolean.valueOf(handler.isELAllowed())); + } + return attributes; + } + + @Override + public Map getAttributeHandlers() + { + return _tldData.getAttributes(); } private static class DocumentElementData extends TLDElementData { /** - * + * serialization id */ private static final long serialVersionUID = -6160324802818766058L; private final TLDElementDeclaration _tldDoc; + private final CMNodeNamedMapAdapter _adapter; - public DocumentElementData(final TLDElementDeclaration tldDoc) + public DocumentElementData(final TLDElementDeclaration tldDoc, + final IAttributeAdvisor advisor) { _tldDoc = tldDoc; + _adapter = new CMNodeNamedMapAdapter(tldDoc, advisor); } @Override @@ -136,20 +129,31 @@ public class TLDTagElement extends TagElement public String getUri() { final CMDocument owner = _tldDoc.getOwnerDocument(); - + if (owner instanceof TLDDocument) { return ((TLDDocument)owner).getUri(); } return null; } - + private Object writeReplace() { - return new SerializedTLDElementData(getName(), getTagHandlerClassName(), getUri()); + return new SerializedTLDElementData(getName(), getTagHandlerClassName(), getUri() + , _adapter); + } + + @Override + public Map<String, ? extends ITagAttributeHandler> getAttributes() + { + return _adapter; } } - + + /** + * @author cbateman + * + */ private static class SerializedTLDElementData extends TLDElementData { /** @@ -159,20 +163,23 @@ public class TLDTagElement extends TagElement private final String _name; private final String _uri; private final String _tagHandlerClassName; + private final Map<String, ? extends ITagAttributeHandler> _tagAttributes; - /** * @param name * @param tagHandlerClassName * @param uri + * @param tagAttributes */ - private SerializedTLDElementData(String name, - String tagHandlerClassName, String uri) + private SerializedTLDElementData(final String name, + final String tagHandlerClassName, final String uri, + final Map<String, ? extends ITagAttributeHandler> tagAttributes) { super(); _name = name; _tagHandlerClassName = tagHandlerClassName; _uri = uri; + _tagAttributes = tagAttributes; } @Override @@ -192,8 +199,14 @@ public class TLDTagElement extends TagElement { return _uri; } - + + @Override + public Map<String, ? extends ITagAttributeHandler> getAttributes() + { + return _tagAttributes; + } } + private static abstract class TLDElementData implements Serializable { /** @@ -203,5 +216,6 @@ public class TLDTagElement extends TagElement public abstract String getTagHandlerClassName(); public abstract String getName(); public abstract String getUri(); + public abstract Map<String, ? extends ITagAttributeHandler> getAttributes(); } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDTagHandlerElement.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDTagHandlerElement.java index b56d22111..d637f49e2 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDTagHandlerElement.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDTagHandlerElement.java @@ -20,7 +20,7 @@ import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDElement * */ public class TLDTagHandlerElement extends TLDJSFTagElement implements - IHandlerTagElement +IHandlerTagElement { /** * @@ -31,10 +31,11 @@ public class TLDTagHandlerElement extends TLDJSFTagElement implements /** * @param elementDecl * @param tagHandlerType + * @param advisor */ - public TLDTagHandlerElement(final TLDElementDeclaration elementDecl, final TagHandlerType tagHandlerType) + public TLDTagHandlerElement(final TLDElementDeclaration elementDecl, final TagHandlerType tagHandlerType, final IAttributeAdvisor advisor) { - super(elementDecl); + super(elementDecl, advisor); _tagHandlerType = tagHandlerType; } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDValidatorTagElement.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDValidatorTagElement.java index 88ead72b2..e99d97b07 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDValidatorTagElement.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/TLDValidatorTagElement.java @@ -16,7 +16,7 @@ import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDElement /** * A TLD-defined tag (i.e. JSP) that maps one-to-one with a JSF Converter - * + * * @author cbateman * */ @@ -27,14 +27,15 @@ public class TLDValidatorTagElement extends TLDJSFTagElement implements IValidat */ private static final long serialVersionUID = 4251223772554969477L; private final ValidatorTypeInfo _validator; - + /** * @param elementDecl - * @param validatorTypeInfo + * @param validatorTypeInfo + * @param advisor */ - public TLDValidatorTagElement(TLDElementDeclaration elementDecl, ValidatorTypeInfo validatorTypeInfo) + public TLDValidatorTagElement(final TLDElementDeclaration elementDecl, final ValidatorTypeInfo validatorTypeInfo, final IAttributeAdvisor advisor) { - super(elementDecl); + super(elementDecl, advisor); _validator = validatorTypeInfo; } @@ -46,7 +47,7 @@ public class TLDValidatorTagElement extends TLDJSFTagElement implements IValidat @Override public final TagType getType() { - return TagType.VALIDATOR; + return TagType.VALIDATOR; } @Override diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/UnresolvedJSPTagResolvingStrategy.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/UnresolvedJSPTagResolvingStrategy.java index b1617db1c..29accf1c7 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/UnresolvedJSPTagResolvingStrategy.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/UnresolvedJSPTagResolvingStrategy.java @@ -11,6 +11,7 @@ package org.eclipse.jst.jsf.designtime.internal.view.model.jsp; import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ITagElement; +import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.IAttributeAdvisor.NullAttributeAdvisor; import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDElementDeclaration; /** @@ -47,7 +48,7 @@ public class UnresolvedJSPTagResolvingStrategy extends JSPTagResolvingStrategy public ITagElement resolve(TLDElementDeclaration element) { // just create a tag element - return new TLDTagElement(element); + return new TLDTagElement(element, new NullAttributeAdvisor()); } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/analyzer/TagAnalyzer.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/analyzer/TagAnalyzer.java index 89b71c905..468907c71 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/analyzer/TagAnalyzer.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/analyzer/TagAnalyzer.java @@ -46,6 +46,7 @@ import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.TLDConverterTagEle import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.TLDTagElement; import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.TLDTagHandlerElement; import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.TLDValidatorTagElement; +import org.eclipse.jst.jsf.designtime.internal.view.model.jsp.IAttributeAdvisor.NullAttributeAdvisor; import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDElementDeclaration; /** @@ -651,7 +652,7 @@ public final class TagAnalyzer if (typeInfo != null) { final TLDComponentTagElement tagElement = new TLDComponentTagElement( - tldDecl, typeInfo); + tldDecl, typeInfo, new NullAttributeAdvisor()); return tagElement; } } @@ -681,14 +682,14 @@ public final class TagAnalyzer final ConverterTypeInfo typeInfo = DTComponentIntrospector .getConverter(converterId, converterClass); final TLDConverterTagElement tagElement = new TLDConverterTagElement( - tldDecl, typeInfo); + tldDecl, typeInfo, new NullAttributeAdvisor()); return tagElement; } } // we know (actually we assume by contract) that this a converter // so create an unknown converter tag for it - return new TLDConverterTagElement(tldDecl, ConverterTypeInfo.UNKNOWN); + return new TLDConverterTagElement(tldDecl, ConverterTypeInfo.UNKNOWN, new NullAttributeAdvisor()); } /** @@ -711,13 +712,13 @@ public final class TagAnalyzer final ValidatorTypeInfo typeInfo = DTComponentIntrospector .getValidator(validatorId, validatorClass); final TLDValidatorTagElement tagElement = new TLDValidatorTagElement( - tldDecl, typeInfo); + tldDecl, typeInfo, new NullAttributeAdvisor()); return tagElement; } } // we know (actually we assume by contract) that this a validator // so create an unknown converter tag for it - return new TLDValidatorTagElement(tldDecl, ValidatorTypeInfo.UNKNOWN); + return new TLDValidatorTagElement(tldDecl, ValidatorTypeInfo.UNKNOWN, new NullAttributeAdvisor()); } /** @@ -731,12 +732,12 @@ public final class TagAnalyzer if (DTComponentIntrospector.isTypeNameInstanceOfClass(type, FACET_TAG_HANDLER)) { - return new TLDTagHandlerElement(tldDecl, TagHandlerType.FACET); + return new TLDTagHandlerElement(tldDecl, TagHandlerType.FACET, new NullAttributeAdvisor()); } else if (DTComponentIntrospector.isTypeNameInstanceOfClass(type, ATTRIBUTE_TAG_HANDLER)) { - return new TLDTagHandlerElement(tldDecl, TagHandlerType.ATTRIBUTE); + return new TLDTagHandlerElement(tldDecl, TagHandlerType.ATTRIBUTE, new NullAttributeAdvisor()); } // else if (isTypeNameInstanceOfClass(type, ACTIONLISTENER_TAG_HANDLER)) // { diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/registry/TLDRegistryPreferences.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/registry/TLDRegistryPreferences.java index 7ba04ad50..aa0ed8f58 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/registry/TLDRegistryPreferences.java +++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/model/jsp/registry/TLDRegistryPreferences.java @@ -169,9 +169,15 @@ public class TLDRegistryPreferences for (int i = 0; i < ids.length; i += 3) { final String displayName = ids[i]; - final String id = ids[i + 1]; + String id = ids[i + 1]; final String enabled = ids[i + 2]; + // fix old id for meta-data resolver + if ("org.eclipse.jst.jsf.THISISTEMPORARY".equals(id)) + { + id = DefaultJSPTagResolver.ID; + } + final StrategyIdentifier strategyIdentifier = new StrategyIdentifier( displayName, id); list.add(new OrderableObject(strategyIdentifier diff --git a/jsf/plugins/org.eclipse.jst.jsf.standard.tagsupport/metadata/viewMappings_core.xml b/jsf/plugins/org.eclipse.jst.jsf.standard.tagsupport/metadata/viewMappings_core.xml new file mode 100644 index 000000000..f32d1335b --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.standard.tagsupport/metadata/viewMappings_core.xml @@ -0,0 +1,188 @@ +<?xml version="1.0" encoding="ASCII"?> +<md:metadatamodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:viewMap="http://org.eclipse.jst.jsf.core/componentMapping.ecore" xsi:noNamespaceSchemaLocation="http://org.eclipse.jst.jsf.core/componentMapping.ecore" xmlns:md="http://org.eclipse.jst.jsf.common.metadata/metadata.ecore" id="http://java.sun.com/jsf/core" type="tagFile"> + <entity id="view" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.UIViewRoot</className> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.ViewRoot</componentType> + <componentFamily>javax.faces.ViewRoot</componentFamily> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="validateDoubleRange" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ValidatorTypeInfo_"> + <className>javax.faces.validator.DoubleRangeValidator</className> + <validatorId>javax.faces.DoubleRange</validatorId> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="subview" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.UINamingContainer</className> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.NamingContainer</interfaces> + <componentType>javax.faces.NamingContainer</componentType> + <componentFamily>javax.faces.NamingContainer</componentFamily> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="converter" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ConverterTypeInfo_"/> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="convertNumber" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ConverterTypeInfo_"> + <className>javax.faces.convert.NumberConverter</className> + <converterId>javax.faces.Number</converterId> + <forClass>java.lang.Number</forClass> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="validateLongRange" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ValidatorTypeInfo_"> + <className>javax.faces.validator.LongRangeValidator</className> + <validatorId>javax.faces.LongRange</validatorId> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="validateLength" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ValidatorTypeInfo_"> + <className>javax.faces.validator.LengthValidator</className> + <validatorId>javax.faces.Length</validatorId> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="convertDateTime" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ConverterTypeInfo_"> + <className>javax.faces.convert.DateTimeConverter</className> + <converterId>javax.faces.DateTime</converterId> + <forClass>java.util.Date</forClass> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="validator" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ValidatorTypeInfo_"/> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="verbatim" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.UIOutput</className> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <componentType>javax.faces.Output</componentType> + <componentFamily>javax.faces.Output</componentFamily> + <renderType>javax.faces.Text</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="selectItem" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.UISelectItem</className> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.SelectItem</componentType> + <componentFamily>javax.faces.SelectItem</componentFamily> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="selectItems" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.UISelectItems</className> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.SelectItems</componentType> + <componentFamily>javax.faces.SelectItems</componentFamily> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="param" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.UIParameter</className> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.Parameter</componentType> + <componentFamily>javax.faces.Parameter</componentFamily> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> +</md:metadatamodel>
\ No newline at end of file diff --git a/jsf/plugins/org.eclipse.jst.jsf.standard.tagsupport/metadata/viewMappings_html.xml b/jsf/plugins/org.eclipse.jst.jsf.standard.tagsupport/metadata/viewMappings_html.xml new file mode 100644 index 000000000..b81a5c6d9 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.standard.tagsupport/metadata/viewMappings_html.xml @@ -0,0 +1,551 @@ +<?xml version="1.0" encoding="ASCII"?> +<md:metadatamodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:viewMap="http://org.eclipse.jst.jsf.core/componentMapping.ecore" xmlns:md="http://org.eclipse.jst.jsf.common.metadata/metadata.ecore" xsi:noNamespaceSchemaLocation="http://org.eclipse.jst.jsf.core/componentMapping.ecore" id="http://java.sun.com/jsf/html" type="tagFile"> + <entity id="selectOneMenu" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.html.HtmlSelectOneMenu</className> + <superClasses>javax.faces.component.UISelectOne</superClasses> + <superClasses>javax.faces.component.UIInput</superClasses> + <superClasses>javax.faces.component.UIOutput</superClasses> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.EditableValueHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.HtmlSelectOneMenu</componentType> + <componentFamily>javax.faces.SelectOne</componentFamily> + <renderType>javax.faces.Menu</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="selectManyListbox" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.html.HtmlSelectManyListbox</className> + <superClasses>javax.faces.component.UISelectMany</superClasses> + <superClasses>javax.faces.component.UIInput</superClasses> + <superClasses>javax.faces.component.UIOutput</superClasses> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.EditableValueHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.HtmlSelectManyListbox</componentType> + <componentFamily>javax.faces.SelectMany</componentFamily> + <renderType>javax.faces.Listbox</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="form" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.html.HtmlForm</className> + <superClasses>javax.faces.component.UIForm</superClasses> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.NamingContainer</interfaces> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.HtmlForm</componentType> + <componentFamily>javax.faces.Form</componentFamily> + <renderType>javax.faces.Form</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="message" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.html.HtmlMessage</className> + <superClasses>javax.faces.component.UIMessage</superClasses> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.HtmlMessage</componentType> + <componentFamily>javax.faces.Message</componentFamily> + <renderType>javax.faces.Message</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="graphicImage" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.html.HtmlGraphicImage</className> + <superClasses>javax.faces.component.UIGraphic</superClasses> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.HtmlGraphicImage</componentType> + <componentFamily>javax.faces.Graphic</componentFamily> + <renderType>javax.faces.Image</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="column" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.UIColumn</className> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.Column</componentType> + <componentFamily>javax.faces.Column</componentFamily> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="outputFormat" type="tag"> + <include-entity-group id="common-valueholder-attributes"/> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <beanMappedProperties>value</beanMappedProperties> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.html.HtmlOutputFormat</className> + <superClasses>javax.faces.component.UIOutput</superClasses> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.HtmlOutputFormat</componentType> + <componentFamily>javax.faces.Output</componentFamily> + <renderType>javax.faces.Format</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="selectManyMenu" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.html.HtmlSelectManyMenu</className> + <superClasses>javax.faces.component.UISelectMany</superClasses> + <superClasses>javax.faces.component.UIInput</superClasses> + <superClasses>javax.faces.component.UIOutput</superClasses> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.EditableValueHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.HtmlSelectManyMenu</componentType> + <componentFamily>javax.faces.SelectMany</componentFamily> + <renderType>javax.faces.Menu</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="selectOneRadio" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.html.HtmlSelectOneRadio</className> + <superClasses>javax.faces.component.UISelectOne</superClasses> + <superClasses>javax.faces.component.UIInput</superClasses> + <superClasses>javax.faces.component.UIOutput</superClasses> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.EditableValueHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.HtmlSelectOneRadio</componentType> + <componentFamily>javax.faces.SelectOne</componentFamily> + <renderType>javax.faces.Radio</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="panelGroup" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.html.HtmlPanelGroup</className> + <superClasses>javax.faces.component.UIPanel</superClasses> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.HtmlPanelGroup</componentType> + <componentFamily>javax.faces.Panel</componentFamily> + <renderType>javax.faces.Group</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="selectOneListbox" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.html.HtmlSelectOneListbox</className> + <superClasses>javax.faces.component.UISelectOne</superClasses> + <superClasses>javax.faces.component.UIInput</superClasses> + <superClasses>javax.faces.component.UIOutput</superClasses> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.EditableValueHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.HtmlSelectOneListbox</componentType> + <componentFamily>javax.faces.SelectOne</componentFamily> + <renderType>javax.faces.Listbox</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="commandButton" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.html.HtmlCommandButton</className> + <superClasses>javax.faces.component.UICommand</superClasses> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.ActionSource</interfaces> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.HtmlCommandButton</componentType> + <componentFamily>javax.faces.Command</componentFamily> + <renderType>javax.faces.Button</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="inputText" type="tag"> + <include-entity-group id="common-valueholder-attributes"/> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.html.HtmlInputText</className> + <superClasses>javax.faces.component.UIInput</superClasses> + <superClasses>javax.faces.component.UIOutput</superClasses> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.EditableValueHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.HtmlInputText</componentType> + <componentFamily>javax.faces.Input</componentFamily> + <renderType>javax.faces.Text</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="dataTable" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.html.HtmlDataTable</className> + <superClasses>javax.faces.component.UIData</superClasses> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.NamingContainer</interfaces> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.HtmlDataTable</componentType> + <componentFamily>javax.faces.Data</componentFamily> + <renderType>javax.faces.Table</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="selectBooleanCheckbox" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.html.HtmlSelectBooleanCheckbox</className> + <superClasses>javax.faces.component.UISelectBoolean</superClasses> + <superClasses>javax.faces.component.UIInput</superClasses> + <superClasses>javax.faces.component.UIOutput</superClasses> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.EditableValueHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.HtmlSelectBooleanCheckbox</componentType> + <componentFamily>javax.faces.SelectBoolean</componentFamily> + <renderType>javax.faces.Checkbox</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="outputText" type="tag"> + <include-entity-group id="common-valueholder-attributes"/> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.html.HtmlOutputText</className> + <superClasses>javax.faces.component.UIOutput</superClasses> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.HtmlOutputText</componentType> + <componentFamily>javax.faces.Output</componentFamily> + <renderType>javax.faces.Text</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="selectManyCheckbox" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.html.HtmlSelectManyCheckbox</className> + <superClasses>javax.faces.component.UISelectMany</superClasses> + <superClasses>javax.faces.component.UIInput</superClasses> + <superClasses>javax.faces.component.UIOutput</superClasses> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.EditableValueHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.HtmlSelectManyCheckbox</componentType> + <componentFamily>javax.faces.SelectMany</componentFamily> + <renderType>javax.faces.Checkbox</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="inputSecret" type="tag"> + <include-entity-group id="common-valueholder-attributes"/> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.html.HtmlInputSecret</className> + <superClasses>javax.faces.component.UIInput</superClasses> + <superClasses>javax.faces.component.UIOutput</superClasses> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.EditableValueHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.HtmlInputSecret</componentType> + <componentFamily>javax.faces.Input</componentFamily> + <renderType>javax.faces.Secret</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="panelGrid" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.html.HtmlPanelGrid</className> + <superClasses>javax.faces.component.UIPanel</superClasses> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.HtmlPanelGrid</componentType> + <componentFamily>javax.faces.Panel</componentFamily> + <renderType>javax.faces.Grid</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="commandLink" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.html.HtmlCommandLink</className> + <superClasses>javax.faces.component.UICommand</superClasses> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.ActionSource</interfaces> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.HtmlCommandLink</componentType> + <componentFamily>javax.faces.Command</componentFamily> + <renderType>javax.faces.Link</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="inputHidden" type="tag"> + <include-entity-group id="common-valueholder-attributes"/> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.html.HtmlInputHidden</className> + <superClasses>javax.faces.component.UIInput</superClasses> + <superClasses>javax.faces.component.UIOutput</superClasses> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.EditableValueHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.HtmlInputHidden</componentType> + <componentFamily>javax.faces.Input</componentFamily> + <renderType>javax.faces.Hidden</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="inputTextarea" type="tag"> + <include-entity-group id="common-valueholder-attributes"/> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.html.HtmlInputTextarea</className> + <superClasses>javax.faces.component.UIInput</superClasses> + <superClasses>javax.faces.component.UIOutput</superClasses> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.EditableValueHolder</interfaces> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.HtmlInputTextarea</componentType> + <componentFamily>javax.faces.Input</componentFamily> + <renderType>javax.faces.Textarea</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="outputLabel" type="tag"> + <include-entity-group id="common-valueholder-attributes"/> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.html.HtmlOutputLabel</className> + <superClasses>javax.faces.component.UIOutput</superClasses> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.HtmlOutputLabel</componentType> + <componentFamily>javax.faces.Output</componentFamily> + <renderType>javax.faces.Label</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="outputLink" type="tag"> + <include-entity-group id="common-valueholder-attributes"/> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.html.HtmlOutputLink</className> + <superClasses>javax.faces.component.UIOutput</superClasses> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.ValueHolder</interfaces> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.HtmlOutputLink</componentType> + <componentFamily>javax.faces.Output</componentFamily> + <renderType>javax.faces.Link</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entity id="messages" type="tag"> + <trait id="viewElementMapping"> + <md:value xsi:type="viewMap:TagMapping"> + <versionedTagToViewMappings> + <typeInfo xsi:type="viewMap:ComponentTypeInfo_"> + <className>javax.faces.component.html.HtmlMessages</className> + <superClasses>javax.faces.component.UIMessages</superClasses> + <superClasses>javax.faces.component.UIComponentBase</superClasses> + <superClasses>javax.faces.component.UIComponent</superClasses> + <superClasses>java.lang.Object</superClasses> + <interfaces>javax.faces.component.StateHolder</interfaces> + <componentType>javax.faces.HtmlMessages</componentType> + <componentFamily>javax.faces.Messages</componentFamily> + <renderType>javax.faces.Messages</renderType> + </typeInfo> + </versionedTagToViewMappings> + </md:value> + </trait> + </entity> + <entityGroup id="common-valueholder-attributes"> + <entity id="value"> + <trait id="attributeMapping"> + <md:value xsi:type="viewMap:AttributeToPropertyMapping"> + <propertyName>value</propertyName> + <elAllowed>true</elAllowed> + </md:value> + </trait> + </entity> + <entity id="converter"> + <trait id="attributeMapping"> + <md:value xsi:type="viewMap:AttributeToPropertyMapping"> + <customConversionFactoryId>org.eclipse.jst.jsf.core.valueHolderAttributeMapper</customConversionFactoryId> + <elAllowed>true</elAllowed> + </md:value> + </trait> + </entity> + </entityGroup> +</md:metadatamodel> diff --git a/jsf/plugins/org.eclipse.jst.jsf.standard.tagsupport/plugin.xml b/jsf/plugins/org.eclipse.jst.jsf.standard.tagsupport/plugin.xml index 90ddd9644..d68e875d4 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.standard.tagsupport/plugin.xml +++ b/jsf/plugins/org.eclipse.jst.jsf.standard.tagsupport/plugin.xml @@ -30,6 +30,14 @@ <standardMetaDataFile location="$nl$/metadata/symbolInfoMetadata.xml" uri="http://java.sun.com/jsf/core"/> + <standardMetaDataFile + location="$nl$/metadata/viewMappings_core.xml" + uri="http://java.sun.com/jsf/core"> + </standardMetaDataFile> + <standardMetaDataFile + location="$nl$/metadata/viewMappings_html.xml" + uri="http://java.sun.com/jsf/html"> + </standardMetaDataFile> </extension> </plugin> diff --git a/jsf/plugins/org.eclipse.jst.jsf.ui/.options b/jsf/plugins/org.eclipse.jst.jsf.ui/.options new file mode 100644 index 000000000..9b3610198 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.ui/.options @@ -0,0 +1,6 @@ +# Debugging options for the org.eclipse.jst.jsf.core + +# Turn on general debugging for the org.eclipse.jsf.ui plugin. +org.eclipse.jst.jsf.ui/debug=false + +org.eclipse.jst.jsf.ui/metadatagen=false diff --git a/jsf/plugins/org.eclipse.jst.jsf.ui/src/org/eclipse/jst/jsf/ui/internal/JSFUITraceOptions.java b/jsf/plugins/org.eclipse.jst.jsf.ui/src/org/eclipse/jst/jsf/ui/internal/JSFUITraceOptions.java new file mode 100644 index 000000000..14c3eab02 --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.ui/src/org/eclipse/jst/jsf/ui/internal/JSFUITraceOptions.java @@ -0,0 +1,72 @@ +package org.eclipse.jst.jsf.ui.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 JSFUITraceOptions +{ + /** + * True if debug tracing is enabled. Other tracing cannot be enabled unless + * this is enabled. + */ + public static final boolean ENABLED; + + /** + * True if development mode for meta-data generation is enabled + */ + public static final boolean TRACE_METADATAGEN; + + private static final String KEY_DEBUG_ENABLED = "/debug"; + private static final String KEY_DESIGNTIME = "/metadatagen"; + + + static + { + final DebugOptions debugOptions = FrameworkDebugOptions.getDefault(); + + ENABLED = debugOptions != null + && debugOptions.getBooleanOption(JSFUiPlugin.PLUGIN_ID + + KEY_DEBUG_ENABLED, false); + + if (ENABLED) + { + TRACE_METADATAGEN = debugOptions.getBooleanOption( + JSFUiPlugin.PLUGIN_ID + KEY_DESIGNTIME, false); + } + else + { + TRACE_METADATAGEN = false; + } + } + + /** + * @param message + */ + public static void log(final String message) + { + System.out.println(message); + } + + /** + * @param msg A short label placed before the trace of t to show the source + * @param t + */ + public static void log(final String msg, final Throwable t) + { + System.out.printf("%s: Exception Trace:\n\n",msg); + t.printStackTrace(System.out); + System.out.print("\n\n\n"); + } + + private JSFUITraceOptions() + { + // no instantiation + } +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.ui/src/org/eclipse/jst/jsf/ui/internal/component/ComponentInstanceDetailsForm.java b/jsf/plugins/org.eclipse.jst.jsf.ui/src/org/eclipse/jst/jsf/ui/internal/component/ComponentInstanceDetailsForm.java index d58b9cc87..c629e5a20 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.ui/src/org/eclipse/jst/jsf/ui/internal/component/ComponentInstanceDetailsForm.java +++ b/jsf/plugins/org.eclipse.jst.jsf.ui/src/org/eclipse/jst/jsf/ui/internal/component/ComponentInstanceDetailsForm.java @@ -44,16 +44,15 @@ import org.eclipse.swt.widgets.Composite; private static final String COMPONENT_SECTION_KEY = "componentSection"; private final static String COMPONENT_TYPE_SECTION_KEY = "componentTypeSection"; private static final String COMPONENT_INTERFACES_KEY = "componentInterfacesSection"; - private static final String COMPONENT_DECORATORS_KEY = "componentDecorators"; - private static final String COMPONENT_PROPERTIES_KEY = "componentProperties"; - private final LabelProvider _labelProvider = new MyLabelProvider(); + private static final String COMPONENT_DECORATORS_KEY = "componentDecorators"; + private static final String COMPONENT_PROPERTIES_KEY = "componentProperties"; + private final LabelProvider _labelProvider = new MyLabelProvider(); private XMLTextSection _componentTypeSection; private XMLTextSection _componentSection; private XMLTextSection _componentInterfacesSection; private XMLTextSection _componentDecoratorsSection; - private XMLTextSection _componentPropertiesSection; - + private XMLTextSection _componentPropertiesSection; @Override protected void doUpdateSelection(final Object newSelection) @@ -68,7 +67,7 @@ import org.eclipse.swt.widgets.Composite; if (typeInfo != null) { updateComponentTypeSection(typeInfo); - updateComponentInterfacesSection(compInfo,typeInfo); + updateComponentInterfacesSection(compInfo, typeInfo); } } } @@ -83,46 +82,46 @@ import org.eclipse.swt.widgets.Composite; values.add(new TitleValuePair("Name", className != null ? Signature .getSimpleName(className) : "")); values.add(new TitleValuePair("Id", id != null ? id : "<i>none</i>")); - values - .add(new TitleValuePair("Parent Id", (parent != null && parent.getId() != null) - ? parent.getId() - : "<i>none</i>")); + values.add(new TitleValuePair("Parent Id", (parent != null && parent + .getId() != null) ? parent.getId() : "<i>none</i>")); - _componentSection.setText(String - .format(formatText, ViewObjectPresenter.createLines(values)), true, false); + _componentSection.setText(String.format(formatText, ViewObjectPresenter + .createLines(values)), true, false); _componentSection.refresh(); } private void updateComponentTypeSection(final ComponentTypeInfo typeInfo) { - _componentTypeSection.setText(ViewObjectPresenter.present(typeInfo), true, false); + _componentTypeSection.setText(ViewObjectPresenter.present(typeInfo), + true, false); _componentTypeSection.refresh(); } private void updateComponentInterfacesSection(final ComponentInfo compInfo, final ComponentTypeInfo typeInfo) { - _componentInterfacesSection.setText( - ViewObjectPresenter.presentCompInterfaces(typeInfo,compInfo), true, false); + _componentInterfacesSection.setText(ViewObjectPresenter + .presentCompInterfaces(typeInfo, compInfo), true, false); _componentInterfacesSection.refresh(); } - + private void updateComponentDecoratorsSection(final ComponentInfo compInfo) { - List<String> decoratorLines = new ArrayList<String>(); + List<TitleValuePair> decoratorLines = new ArrayList<TitleValuePair>(); String text = ""; - for (final ComponentDecorator decorator : (List<ComponentDecorator>)compInfo.getAllDecorators()) + for (final ComponentDecorator decorator : (List<ComponentDecorator>) compInfo + .getAllDecorators()) { String labelText = _labelProvider.getText(decorator); - + if (labelText != null) { - text += ViewObjectPresenter.createLine(null, labelText); + //text += ViewObjectPresenter.createLine(null, labelText); + decoratorLines.add(new TitleValuePair(null, labelText)); } } Collections.sort(decoratorLines); - - + text = ViewObjectPresenter.createLines(decoratorLines); _componentDecoratorsSection.setText(String.format("<form>%s</form>", text), true, false); _componentDecoratorsSection.refresh(); @@ -130,29 +129,31 @@ import org.eclipse.swt.widgets.Composite; private void updateComponentPropertiesSection(final ComponentInfo compInfo) { - List<String> decoratorLines = new ArrayList<String>(); + List<TitleValuePair> propertyLines = new ArrayList<TitleValuePair>(); String text = ""; - Set<String> propNames = compInfo.getAttributeNames(); - + Set<String> propNames = compInfo.getAttributeNames(); + for (final String propName : propNames) { - final ComponentBeanProperty propValue = compInfo.getAttribute(propName); + final ComponentBeanProperty propValue = compInfo + .getAttribute(propName); if (propValue != null) { Object value = propValue.getValue(); if (value != null) { - decoratorLines.add(ViewObjectPresenter.createLine(propName, - value.toString())); + propertyLines.add(new TitleValuePair(propName, value.toString())); } } } + Collections.sort(propertyLines); + text = ViewObjectPresenter.createLines(propertyLines); _componentPropertiesSection.setText(String.format("<form>%s</form>", text), true, false); _componentPropertiesSection.refresh(); - + } - + @Override protected Map<? extends Object, XMLTextSection> createXMLTextSections( final Composite parent) @@ -169,11 +170,11 @@ import org.eclipse.swt.widgets.Composite; _componentInterfacesSection = new XMLTextSection(getToolkit(), parent, "Interfaces"); sections.put(COMPONENT_INTERFACES_KEY, _componentInterfacesSection); - + _componentDecoratorsSection = new XMLTextSection(getToolkit(), parent, "Decorators"); sections.put(COMPONENT_DECORATORS_KEY, _componentDecoratorsSection); - + _componentPropertiesSection = new XMLTextSection(getToolkit(), parent, "Properties"); sections.put(COMPONENT_PROPERTIES_KEY, _componentPropertiesSection); @@ -188,8 +189,6 @@ import org.eclipse.swt.widgets.Composite; return Collections.singleton(_componentSection); } - - private static class MyLabelProvider extends LabelProvider { @Override @@ -197,29 +196,32 @@ import org.eclipse.swt.widgets.Composite; { if (element instanceof ComponentDecorator) { - if (element instanceof ConverterDecorator) + if (element instanceof ConverterDecorator) { final ConverterDecorator converter = (ConverterDecorator) element; - return "Converter: id=\""+ - converter.getTypeInfo().getConverterId() - +"\", converter-class="+converter.getTypeInfo().getClassName(); + return "Converter: id=\"" + + converter.getTypeInfo().getConverterId() + + "\", converter-class=" + + converter.getTypeInfo().getClassName(); } else if (element instanceof ValidatorDecorator) { final ValidatorDecorator validator = (ValidatorDecorator) element; - return "Validator: id=\""+ - validator.getTypeInfo().getValidatorId() - +"\", validator-class="+validator.getTypeInfo().getClassName(); + return "Validator: id=\"" + + validator.getTypeInfo().getValidatorId() + + "\", validator-class=" + + validator.getTypeInfo().getClassName(); } else if (element instanceof FacetDecorator) { final FacetDecorator decorator = (FacetDecorator) element; - return "Facet: "+decorator.getName()+", component="+decorator.getDecorates().getId(); + return "Facet: " + decorator.getName() + ", component=" + + decorator.getDecorates().getId(); } } - + return null; } - + } } diff --git a/jsf/plugins/org.eclipse.jst.jsf.ui/src/org/eclipse/jst/jsf/ui/internal/tagregistry/GenerateMetadataAction.java b/jsf/plugins/org.eclipse.jst.jsf.ui/src/org/eclipse/jst/jsf/ui/internal/tagregistry/GenerateMetadataAction.java new file mode 100644 index 000000000..bd4cb1d4e --- /dev/null +++ b/jsf/plugins/org.eclipse.jst.jsf.ui/src/org/eclipse/jst/jsf/ui/internal/tagregistry/GenerateMetadataAction.java @@ -0,0 +1,100 @@ +package org.eclipse.jst.jsf.ui.internal.tagregistry; + +import java.io.IOException; +import java.util.Collection; + +import org.eclipse.jface.action.Action; +import org.eclipse.jst.jsf.common.runtime.internal.model.types.ClassTypeInfo; +import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.IComponentTagElement; +import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.IConverterTagElement; +import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.ITagElement; +import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.IValidatorTagElement; +import org.eclipse.jst.jsf.common.runtime.internal.view.model.common.Namespace; +import org.eclipse.jst.jsf.designtime.internal.view.mapping.ViewMetadataGenerator; + +/** + * @author cbateman + * + */ +class GenerateMetadataAction extends Action +{ + private Namespace _ns; + + public GenerateMetadataAction() + { + super("Generate metadata"); + } + + public void setNamespace(final Namespace ns) + { + _ns = ns; + } + + @Override + public void run() + { + if (_ns != null) + { + // create resource set and resource + final ViewMetadataGenerator generator = new ViewMetadataGenerator(_ns + .getNSUri()); + for (final ITagElement element : (Collection<? extends ITagElement>) _ns + .getViewElements()) + { + final String tagName = element.getName(); + final ClassTypeInfo typeInfo = getTypeInfo(element); + if (typeInfo != null) + { + generator.addTagToViewObjectMapping(tagName, typeInfo, null, null); + } + } + + try + { + generator.save(System.out); + } + catch (final IOException e) + { + // TODO Auto-generated catch block + e.printStackTrace(); + } + // final IProject project = (IProject) _viewer.getInput(); + // final ITaglibDomainMetaDataModelContext modelContext = + // TaglibDomainMetaDataQueryHelper.createMetaDataModelContext(project, + // "http://java.sun.com/jsf/html"); + // final Entity entity = TaglibDomainMetaDataQueryHelper.getEntity( + // modelContext, "outputText"); + // if (entity != null) + // { + // final Trait trait = TaglibDomainMetaDataQueryHelper.getTrait( + // entity, "viewElementMapping"); + // if (trait != null) + // { + // final TagToViewObjectMapping tagConstraint = + // (TagToViewObjectMapping) trait.getValue(); + // System.err.println(tagConstraint.toString()); + // } + // } + + } + } + + private ClassTypeInfo getTypeInfo(final ITagElement element) + { + ClassTypeInfo typeInfo = null; + if (element instanceof IComponentTagElement) + { + typeInfo = ((IComponentTagElement) element).getComponent(); + } + else if (element instanceof IConverterTagElement) + { + typeInfo = ((IConverterTagElement) element).getConverter(); + } + else if (element instanceof IValidatorTagElement) + { + typeInfo = ((IValidatorTagElement) element).getValidator(); + } + + return typeInfo; + } +} diff --git a/jsf/plugins/org.eclipse.jst.jsf.ui/src/org/eclipse/jst/jsf/ui/internal/tagregistry/TagRegistryMasterForm.java b/jsf/plugins/org.eclipse.jst.jsf.ui/src/org/eclipse/jst/jsf/ui/internal/tagregistry/TagRegistryMasterForm.java index f1e8fb715..7ea7844b3 100644 --- a/jsf/plugins/org.eclipse.jst.jsf.ui/src/org/eclipse/jst/jsf/ui/internal/tagregistry/TagRegistryMasterForm.java +++ b/jsf/plugins/org.eclipse.jst.jsf.ui/src/org/eclipse/jst/jsf/ui/internal/tagregistry/TagRegistryMasterForm.java @@ -16,7 +16,10 @@ import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.jdt.ui.JavaUI; import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.IMenuListener; +import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.IToolBarManager; +import org.eclipse.jface.action.MenuManager; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.ComboViewer; @@ -38,6 +41,7 @@ import org.eclipse.jst.jsf.common.ui.internal.form.AbstractMasterForm; import org.eclipse.jst.jsf.common.ui.internal.utils.JSFSharedImages; import org.eclipse.jst.jsf.core.jsfappconfig.JSFAppConfigUtils; import org.eclipse.jst.jsf.designtime.internal.view.model.ITagRegistry; +import org.eclipse.jst.jsf.ui.internal.JSFUITraceOptions; import org.eclipse.jst.jsf.ui.internal.tagregistry.ProjectTracker.ProjectAdvisor; import org.eclipse.jst.jsf.ui.internal.tagregistry.ProjectTracker.ProjectTrackingListener; import org.eclipse.jst.jsf.ui.internal.tagregistry.TaglibContentProvider.TagRegistryInstance; @@ -48,6 +52,7 @@ import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.Tree; import org.eclipse.ui.ISharedImages; import org.eclipse.ui.PlatformUI; @@ -73,6 +78,7 @@ public class TagRegistryMasterForm extends AbstractMasterForm private final ProjectTracker _projectTracker; private final ProjectAdvisor _advisor; + private GenerateMetadataAction _generateMetadataAction; /** * @param toolkit @@ -149,9 +155,11 @@ public class TagRegistryMasterForm extends AbstractMasterForm final SelectionChangedEvent event) { getListener().selectionChanged(event); + updateActions(event.getSelection()); } }); makeActions(); + createContextMenuManager(_registryTreeViewer.getControl()); return tree; } @@ -249,8 +257,63 @@ public class TagRegistryMasterForm extends AbstractMasterForm _refreshAction.setToolTipText("Refresh Registry"); _refreshAction.setImageDescriptor(JSFUICommonPlugin.getDefault() .getImageDescriptor("refresh_nav_16.gif")); + + if (JSFUITraceOptions.TRACE_METADATAGEN) + { + _generateMetadataAction = new GenerateMetadataAction(); + } } + private void createContextMenuManager(final Control control) + { + // Create menu manager. + MenuManager menuMgr = new MenuManager(); + menuMgr.setRemoveAllWhenShown(true); + menuMgr.addMenuListener(new IMenuListener() { + public void menuAboutToShow(IMenuManager mgr) { + fillContextMenu(mgr); + } + }); + + // Create menu. + Menu menu = menuMgr.createContextMenu(control); + control.setMenu(menu); + + // Register menu for extension. + //getSite().registerContextMenu(menuMgr, viewer); + } + + private void fillContextMenu(IMenuManager mgr) + { + if (JSFUITraceOptions.TRACE_METADATAGEN) + { + mgr.add(_generateMetadataAction); + } + } + + private void updateActions(final ISelection selection) + { + if (JSFUITraceOptions.TRACE_METADATAGEN) + { + updateMetadataGenAction(selection); + } + } + + private void updateMetadataGenAction(final ISelection selection) + { + if (selection instanceof IStructuredSelection) + { + if (((IStructuredSelection)selection).getFirstElement() instanceof Namespace) + { + Namespace ns = (Namespace) ((IStructuredSelection)selection).getFirstElement(); + _generateMetadataAction.setNamespace(ns); + _generateMetadataAction.setEnabled(true); + return; + } + } + _generateMetadataAction.setEnabled(false); + } + private static class RefreshAction extends Action { private final StructuredViewer _viewer; @@ -312,7 +375,6 @@ public class TagRegistryMasterForm extends AbstractMasterForm registry.refresh(nullRunnable, flushCaches); } } - } private Object getSelected(ISelection selection) |