Author: DartPeng
Date: 2009-04-08 06:33:40 -0400 (Wed, 08 Apr 2009)
New Revision: 14598
Added:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/icons/full/ctool16/CreateGroovy_param_ParamType.gif
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/icons/full/obj16/Groovy.gif
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/model/groovy-1.1.xsd
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/model/groovy.ecore
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/model/groovy.genmodel
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/DocumentRootItemProvider.java
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyEditPlugin.java
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProvider.java
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProviderAdapterFactory.java
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/DocumentRoot.java
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/Groovy.java
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/GroovyFactory.java
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/GroovyPackage.java
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/DocumentRootImpl.java
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyFactoryImpl.java
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyImpl.java
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyPackageImpl.java
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyAdapterFactory.java
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyResourceFactoryImpl.java
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyResourceImpl.java
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovySwitch.java
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyXMLProcessor.java
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java
Modified:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/plugin.properties
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/plugin.xml
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/common/provider/AbstractAnyTypeItemProvider.java
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/javabean/provider/ValueTypeItemProvider.java
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/SmooksResourceListTypeItemProvider.java
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/IPropertyUICreator.java
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreatorManager.java
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksActionBarContributor.java
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMasterDetailBlock.java
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksStuffPropertyDetailPage.java
Log:
Added:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/icons/full/ctool16/CreateGroovy_param_ParamType.gif
===================================================================
(Binary files differ)
Property changes on:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/icons/full/ctool16/CreateGroovy_param_ParamType.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/icons/full/obj16/Groovy.gif
===================================================================
(Binary files differ)
Property changes on:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/icons/full/obj16/Groovy.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/model/groovy-1.1.xsd
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/model/groovy-1.1.xsd
(rev 0)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/model/groovy-1.1.xsd 2009-04-08
10:33:40 UTC (rev 14598)
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema
targetNamespace="http://www.milyn.org/xsd/smooks/groovy-1.1.xsd"
elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:smooks="http://www.milyn.org/xsd/smooks-1.1.xsd"
xmlns:smooks-groovy="http://www.milyn.org/xsd/smooks/groovy-1.1.xsd&...
+
+ <xs:import
namespace="http://www.milyn.org/xsd/smooks-1.1.xsd"/>
+
+ <xs:annotation>
+ <xs:documentation xml:lang="en">Groovy Scripting
Configuration</xs:documentation>
+ </xs:annotation>
+
+ <xs:element name="groovy" type="smooks-groovy:groovy"
substitutionGroup="smooks:abstract-resource-config">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+ Groovy Script.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+
+ <xs:complexType name="groovy">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+ Groovy Script.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="smooks:element-visitor">
+ <xs:sequence>
+ <xs:element name="imports" type="xs:string"
minOccurs="0"/>
+ <xs:element name="script"
type="xs:string"/>
+ <xs:element ref="smooks:param" minOccurs="0"
maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="executeOnElement"
type="xs:string" use="required">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+ The name of the element on which to execute the script.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="executeOnElementNS"
type="xs:anyURI" use="optional">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+ The namespace of the element on which to execute the script.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="executeBefore"
type="xs:boolean" use="optional" default="false">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+ Execute the script before visiting the elements child
content. Default is 'false'.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
Property changes on:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/model/groovy-1.1.xsd
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/model/groovy.ecore
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/model/groovy.ecore
(rev 0)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/model/groovy.ecore 2009-04-08
10:33:40 UTC (rev 14598)
@@ -0,0 +1,112 @@
+<?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="groovy"
+
nsURI="http://www.milyn.org/xsd/smooks/groovy-1.1.xsd"
nsPrefix="g">
+ <eAnnotations
source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Groovy Scripting
Configuration"/>
+ </eAnnotations>
+ <eClassifiers xsi:type="ecore:EClass" name="DocumentRoot">
+ <eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="name" value=""/>
+ <details key="kind" value="mixed"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="mixed"
unique="false" upperBound="-1"
+ eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
+ <eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="elementWildcard"/>
+ <details key="name" value=":mixed"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference"
name="xMLNSPrefixMap" upperBound="-1"
+ eType="ecore:EClass
http://www.eclipse.org/emf/2002/Ecore#//EStringToStringMapEntry"
+ transient="true" containment="true"
resolveProxies="false">
+ <eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="xmlns:prefix"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference"
name="xSISchemaLocation" upperBound="-1"
+ eType="ecore:EClass
http://www.eclipse.org/emf/2002/Ecore#//EStringToStringMapEntry"
+ transient="true" containment="true"
resolveProxies="false">
+ <eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="xsi:schemaLocation"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="groovy"
upperBound="-2"
+ eType="#//Groovy" volatile="true" transient="true"
derived="true" containment="true"
+ resolveProxies="false">
+ <eAnnotations
source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="

Groovy Script.
 "/>
+ </eAnnotations>
+ <eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="groovy"/>
+ <details key="namespace" value="##targetNamespace"/>
+ <details key="affiliation"
value="http://www.milyn.org/xsd/smooks-1.1.xsd#abstract-resource-con...
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Groovy"
eSuperTypes="smooks-1.1.ecore#//ElementVisitor">
+ <eAnnotations
source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="

Groovy Script.
 "/>
+ </eAnnotations>
+ <eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="name" value="groovy"/>
+ <details key="kind" value="elementOnly"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute"
name="imports" eType="ecore:EDataType
http://www.eclipse.org/emf/2003/XMLType#//String">
+ <eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="imports"/>
+ <details key="namespace" value="##targetNamespace"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="script"
lowerBound="1"
+ eType="ecore:EDataType
http://www.eclipse.org/emf/2003/XMLType#//String">
+ <eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="script"/>
+ <details key="namespace" value="##targetNamespace"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="param"
upperBound="-1"
+ eType="ecore:EClass smooks-1.1.ecore#//ParamType"
containment="true" resolveProxies="false">
+ <eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="param"/>
+ <details key="namespace"
value="http://www.milyn.org/xsd/smooks-1.1.xsd"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute"
name="executeBefore" eType="ecore:EDataType
http://www.eclipse.org/emf/2003/XMLType#//Boolean"
+ defaultValueLiteral="false" unsettable="true">
+ <eAnnotations
source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="

Execute the script before visiting the elements child content. Default is
'false'.
 "/>
+ </eAnnotations>
+ <eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="executeBefore"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute"
name="executeOnElement" lowerBound="1"
+ eType="ecore:EDataType
http://www.eclipse.org/emf/2003/XMLType#//String">
+ <eAnnotations
source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="

The name of the element on which to execute the script.

"/>
+ </eAnnotations>
+ <eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="executeOnElement"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute"
name="executeOnElementNS" eType="ecore:EDataType
http://www.eclipse.org/emf/2003/XMLType#//AnyURI">
+ <eAnnotations
source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="

The namespace of the element on which to execute the script.

"/>
+ </eAnnotations>
+ <eAnnotations
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="executeOnElementNS"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+</ecore:EPackage>
Property changes on:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/model/groovy.ecore
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/model/groovy.genmodel
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/model/groovy.genmodel
(rev 0)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/model/groovy.genmodel 2009-04-08
10:33:40 UTC (rev 14598)
@@ -0,0 +1,145 @@
+<?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="/groovymodel/src"
+ modelPluginID="groovymodel" modelName="Groovy"
importerID="org.eclipse.emf.importer.ecore"
+ complianceLevel="6.0" copyrightFields="false">
+ <foreignModel>groovy.ecore</foreignModel>
+ <genPackages prefix="Groovy" resource="XML"
disposableProviderFactory="true" ecorePackage="groovy.ecore#/">
+ <genClasses ecoreClass="groovy.ecore#//DocumentRoot">
+ <genFeatures property="None" notify="false"
createChild="false" ecoreFeature="ecore:EAttribute
groovy.ecore#//DocumentRoot/mixed"/>
+ <genFeatures property="None" notify="false"
createChild="false" ecoreFeature="ecore:EReference
groovy.ecore#//DocumentRoot/xMLNSPrefixMap"/>
+ <genFeatures property="None" notify="false"
createChild="false" ecoreFeature="ecore:EReference
groovy.ecore#//DocumentRoot/xSISchemaLocation"/>
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
groovy.ecore#//DocumentRoot/groovy"/>
+ </genClasses>
+ <genClasses ecoreClass="groovy.ecore#//Groovy">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
groovy.ecore#//Groovy/imports"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
groovy.ecore#//Groovy/script"/>
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
groovy.ecore#//Groovy/param"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
groovy.ecore#//Groovy/executeBefore"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
groovy.ecore#//Groovy/executeOnElement"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
groovy.ecore#//Groovy/executeOnElementNS"/>
+ </genClasses>
+ </genPackages>
+ <genPackages prefix="Smooks" resource="XML"
disposableProviderFactory="true"
ecorePackage="smooks-1.1.ecore#/">
+ <genClasses image="false"
ecoreClass="smooks-1.1.ecore#//AbstractReader">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
smooks-1.1.ecore#//AbstractReader/targetProfile"/>
+ </genClasses>
+ <genClasses image="false"
ecoreClass="smooks-1.1.ecore#//AbstractResourceConfig"/>
+ <genClasses ecoreClass="smooks-1.1.ecore#//ConditionsType">
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//ConditionsType/condition"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//ConditionType">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
smooks-1.1.ecore#//ConditionType/value"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
smooks-1.1.ecore#//ConditionType/evaluator"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
smooks-1.1.ecore#//ConditionType/id"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
smooks-1.1.ecore#//ConditionType/idRef"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//DocumentRoot">
+ <genFeatures property="None" notify="false"
createChild="false" ecoreFeature="ecore:EAttribute
smooks-1.1.ecore#//DocumentRoot/mixed"/>
+ <genFeatures property="None" notify="false"
createChild="false" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//DocumentRoot/xMLNSPrefixMap"/>
+ <genFeatures property="None" notify="false"
createChild="false" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//DocumentRoot/xSISchemaLocation"/>
+ <genFeatures property="None" children="true"
createChild="false" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//DocumentRoot/abstractReader"/>
+ <genFeatures property="None" children="true"
createChild="false" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//DocumentRoot/abstractResourceConfig"/>
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//DocumentRoot/condition"/>
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//DocumentRoot/conditions"/>
+ <genFeatures property="None" children="true"
createChild="false" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//DocumentRoot/elementVisitor"/>
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//DocumentRoot/features"/>
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//DocumentRoot/handler"/>
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//DocumentRoot/handlers"/>
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//DocumentRoot/import"/>
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//DocumentRoot/param"/>
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//DocumentRoot/params"/>
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//DocumentRoot/profile"/>
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//DocumentRoot/profiles"/>
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//DocumentRoot/reader"/>
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//DocumentRoot/resource"/>
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//DocumentRoot/resourceConfig"/>
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//DocumentRoot/setOff"/>
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//DocumentRoot/setOn"/>
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//DocumentRoot/smooksResourceList"/>
+ </genClasses>
+ <genClasses image="false"
ecoreClass="smooks-1.1.ecore#//ElementVisitor">
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//ElementVisitor/condition"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
smooks-1.1.ecore#//ElementVisitor/targetProfile"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//FeaturesType">
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//FeaturesType/setOn"/>
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//FeaturesType/setOff"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//HandlersType">
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//HandlersType/handler"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//HandlerType">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
smooks-1.1.ecore#//HandlerType/class"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//ImportType">
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//ImportType/param"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
smooks-1.1.ecore#//ImportType/file"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//ParamsType">
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//ParamsType/param"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//ParamType">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
smooks-1.1.ecore#//ParamType/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
smooks-1.1.ecore#//ParamType/type"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//ProfilesType">
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//ProfilesType/profile"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//ProfileType">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
smooks-1.1.ecore#//ProfileType/value"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
smooks-1.1.ecore#//ProfileType/baseProfile"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
smooks-1.1.ecore#//ProfileType/subProfiles"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//ReaderType">
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//ReaderType/handlers"/>
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//ReaderType/features"/>
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//ReaderType/params"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
smooks-1.1.ecore#//ReaderType/class"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//ResourceConfigType">
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//ResourceConfigType/resource"/>
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//ResourceConfigType/condition"/>
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//ResourceConfigType/param"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
smooks-1.1.ecore#//ResourceConfigType/selector"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
smooks-1.1.ecore#//ResourceConfigType/selectorNamespace"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
smooks-1.1.ecore#//ResourceConfigType/targetProfile"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//ResourceType">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
smooks-1.1.ecore#//ResourceType/value"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
smooks-1.1.ecore#//ResourceType/type"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//SetOffType">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
smooks-1.1.ecore#//SetOffType/feature"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//SetOnType">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
smooks-1.1.ecore#//SetOnType/feature"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//SmooksResourceListType">
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//SmooksResourceListType/params"/>
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//SmooksResourceListType/conditions"/>
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//SmooksResourceListType/profiles"/>
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EAttribute
smooks-1.1.ecore#//SmooksResourceListType/abstractReaderGroup"/>
+ <genFeatures property="None" notify="false"
createChild="false" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//SmooksResourceListType/abstractReader"/>
+ <genFeatures property="None" children="true"
createChild="true" ecoreFeature="ecore:EAttribute
smooks-1.1.ecore#//SmooksResourceListType/abstractResourceConfigGroup"/>
+ <genFeatures property="None" notify="false"
createChild="false" ecoreFeature="ecore:EReference
smooks-1.1.ecore#//SmooksResourceListType/abstractResourceConfig"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
smooks-1.1.ecore#//SmooksResourceListType/defaultConditionRef"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
smooks-1.1.ecore#//SmooksResourceListType/defaultSelector"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
smooks-1.1.ecore#//SmooksResourceListType/defaultSelectorNamespace"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute
smooks-1.1.ecore#//SmooksResourceListType/defaultTargetProfile"/>
+ </genClasses>
+ </genPackages>
+ <genPackages prefix="Common" resource="XML"
disposableProviderFactory="true" ecorePackage="common.ecore#/">
+ <genClasses image="false"
ecoreClass="common.ecore#//AbstractAnyType">
+ <genOperations
ecoreOperation="common.ecore#//AbstractAnyType/getCDATA"/>
+ <genOperations
ecoreOperation="common.ecore#//AbstractAnyType/setCDATA">
+ <genParameters
ecoreParameter="common.ecore#//AbstractAnyType/setCDATA/cdata"/>
+ </genOperations>
+ <genOperations
ecoreOperation="common.ecore#//AbstractAnyType/getStringValue"/>
+ <genOperations
ecoreOperation="common.ecore#//AbstractAnyType/setStringValue">
+ <genParameters
ecoreParameter="common.ecore#//AbstractAnyType/setStringValue/stringValue"/>
+ </genOperations>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
Property changes on:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/model/groovy.genmodel
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/plugin.properties
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/plugin.properties 2009-04-08
10:28:23 UTC (rev 14597)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/plugin.properties 2009-04-08
10:33:40 UTC (rev 14598)
@@ -28,7 +28,14 @@
_UI_Unknown_type = Object
_UI_Unknown_datatype= Value
-
+_UI_Groovy_type = Groovy
+_UI_DocumentRoot_groovy_feature = Groovy
+_UI_Groovy_imports_feature = Imports
+_UI_Groovy_script_feature = Script
+_UI_Groovy_param_feature = Param
+_UI_Groovy_executeBefore_feature = Execute Before
+_UI_Groovy_executeOnElement_feature = Execute On Element
+_UI_Groovy_executeOnElementNS_feature = Execute On Element NS
_UI_Component_subComponent_feature = Sub Component
_UI_Component_required_feature = Required
_UI_Component_truncatable_feature = Truncatable
@@ -70,23 +77,23 @@
_UI_Use_type = Use
_UI_AbstractReader_type = Abstract Reader
_UI_AbstractResourceConfig_type = Abstract Resource Config
-_UI_ConditionsType_type = Conditions Type
-_UI_ConditionType_type = Condition Type
+_UI_ConditionsType_type = Conditions
+_UI_ConditionType_type = Condition
_UI_ElementVisitor_type = Element Visitor
-_UI_FeaturesType_type = Features Type
-_UI_HandlersType_type = Handlers Type
-_UI_HandlerType_type = Handler Type
-_UI_ImportType_type = Import Type
-_UI_ParamsType_type = Params Type
-_UI_ParamType_type = Param Type
-_UI_ProfilesType_type = Profiles Type
-_UI_ProfileType_type = Profile Type
-_UI_ReaderType_type = Reader Type
-_UI_ResourceConfigType_type = Resource Config Type
-_UI_ResourceType_type = Resource Type
-_UI_SetOffType_type = Set Off Type
-_UI_SetOnType_type = Set On Type
-_UI_SmooksResourceListType_type = Resource List Type
+_UI_FeaturesType_type = Features
+_UI_HandlersType_type = Handlers
+_UI_HandlerType_type = Handler
+_UI_ImportType_type = Import
+_UI_ParamsType_type = Params
+_UI_ParamType_type = Param
+_UI_ProfilesType_type = Profiles
+_UI_ProfileType_type = Profile
+_UI_ReaderType_type = Reader
+_UI_ResourceConfigType_type = Resource Config
+_UI_ResourceType_type = Resource
+_UI_SetOffType_type = Set Off
+_UI_SetOnType_type = Set On
+_UI_SmooksResourceListType_type = Resource List
_UI_BindTo_id_feature = Id
_UI_DocumentRoot_freemarker_feature = Freemarker
_UI_Freemarker_template_feature = Template
@@ -171,11 +178,11 @@
_UI_InlineDirective_replace_literal = replace
_UI_InlineDirective_insertbefore_literal = insertbefore
_UI_InlineDirective_insertafter_literal = insertafter
-_UI_BindingsType_type = Bindings Type
-_UI_DecodeParamType_type = Decode Param Type
-_UI_ExpressionType_type = Expression Type
-_UI_ValueType_type = Value Type
-_UI_WiringType_type = Wiring Type
+_UI_BindingsType_type = Bindings
+_UI_DecodeParamType_type = Decode Param
+_UI_ExpressionType_type = Expression
+_UI_ValueType_type = Value
+_UI_WiringType_type = Wiring
_UI_BindingsType_group_feature = Group
_UI_BindingsType_value_feature = Value
_UI_BindingsType_wiring_feature = Wiring
Modified:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/plugin.xml
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/plugin.xml 2009-04-08
10:28:23 UTC (rev 14597)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/plugin.xml 2009-04-08
10:33:40 UTC (rev 14598)
@@ -28,22 +28,20 @@
org.eclipse.emf.edit.provider.IItemPropertySource"/>
</extension>
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+
uri="http://www.milyn.org/xsd/smooks/groovy-1.1.xsd"
+ class="org.jboss.tools.smooks.model.groovy.GroovyPackage"
+ genModel="model/groovy.genmodel"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.ecore.extension_parser">
+ <parser
+ type="groovy"
+
class="org.jboss.tools.smooks.model.groovy.util.GroovyResourceFactoryImpl"/>
+ </extension>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
<extension point="org.eclipse.emf.ecore.generated_package">
<package
uri="http://www.milyn.org/xsd/smooks/freemarker-1.1.xsd"
Modified:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/common/provider/AbstractAnyTypeItemProvider.java
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/common/provider/AbstractAnyTypeItemProvider.java 2009-04-08
10:28:23 UTC (rev 14597)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/common/provider/AbstractAnyTypeItemProvider.java 2009-04-08
10:33:40 UTC (rev 14598)
@@ -145,17 +145,17 @@
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors,
Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT,
- "")));
-
// newChildDescriptors.add
// (createChildParameter
// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
// FeatureMapUtil.createEntry
+// (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT,
+// "")));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
// (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
// "")));
//
Added:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/DocumentRootItemProvider.java
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/DocumentRootItemProvider.java
(rev 0)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/DocumentRootItemProvider.java 2009-04-08
10:33:40 UTC (rev 14598)
@@ -0,0 +1,171 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.edit.groovy.provider;
+
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.jboss.tools.smooks.model.groovy.DocumentRoot;
+import org.jboss.tools.smooks.model.groovy.GroovyFactory;
+import org.jboss.tools.smooks.model.groovy.GroovyPackage;
+
+/**
+ * This is the item provider adapter for a {@link
org.jboss.tools.smooks.model.groovy.DocumentRoot} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class DocumentRootItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DocumentRootItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an
appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link
org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
{
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(GroovyPackage.Literals.DOCUMENT_ROOT__GROOVY);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use
for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns DocumentRoot.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object,
getResourceLocator().getImage("full/obj16/DocumentRoot"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_DocumentRoot_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any
cached
+ * children and by creating a viewer notification, which it passes to {@link
#fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(DocumentRoot.class)) {
+ case GroovyPackage.DOCUMENT_ROOT__GROOVY:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(),
true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the
children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors,
Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (GroovyPackage.Literals.DOCUMENT_ROOT__GROOVY,
+ GroovyFactory.eINSTANCE.createGroovy()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return GroovyEditPlugin.INSTANCE;
+ }
+
+}
Property changes on:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/DocumentRootItemProvider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyEditPlugin.java
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyEditPlugin.java
(rev 0)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyEditPlugin.java 2009-04-08
10:33:40 UTC (rev 14598)
@@ -0,0 +1,93 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.edit.groovy.provider;
+
+import org.eclipse.emf.common.EMFPlugin;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * This is the central singleton for the Groovy edit plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class GroovyEditPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final GroovyEditPlugin INSTANCE = new GroovyEditPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GroovyEditPlugin() {
+ super
+ (new ResourceLocator [] {
+ });
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
Property changes on:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyEditPlugin.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProvider.java
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProvider.java
(rev 0)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProvider.java 2009-04-08
10:33:40 UTC (rev 14598)
@@ -0,0 +1,295 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.edit.groovy.provider;
+
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.jboss.tools.smooks.edit.smooks.provider.ElementVisitorItemProvider;
+import org.jboss.tools.smooks.model.groovy.Groovy;
+import org.jboss.tools.smooks.model.groovy.GroovyPackage;
+import org.jboss.tools.smooks.model.smooks.SmooksFactory;
+
+/**
+ * This is the item provider adapter for a {@link
org.jboss.tools.smooks.model.groovy.Groovy} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GroovyItemProvider
+ extends ElementVisitorItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GroovyItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addImportsPropertyDescriptor(object);
+ addScriptPropertyDescriptor(object);
+ addExecuteBeforePropertyDescriptor(object);
+ addExecuteOnElementPropertyDescriptor(object);
+ addExecuteOnElementNSPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Imports feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addImportsPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Groovy_imports_feature"),
+ getString("_UI_PropertyDescriptor_description",
"_UI_Groovy_imports_feature", "_UI_Groovy_type"),
+ GroovyPackage.Literals.GROOVY__IMPORTS,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Script feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addScriptPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Groovy_script_feature"),
+ getString("_UI_PropertyDescriptor_description",
"_UI_Groovy_script_feature", "_UI_Groovy_type"),
+ GroovyPackage.Literals.GROOVY__SCRIPT,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Execute Before feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addExecuteBeforePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Groovy_executeBefore_feature"),
+ getString("_UI_PropertyDescriptor_description",
"_UI_Groovy_executeBefore_feature", "_UI_Groovy_type"),
+ GroovyPackage.Literals.GROOVY__EXECUTE_BEFORE,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Execute On Element feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addExecuteOnElementPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Groovy_executeOnElement_feature"),
+ getString("_UI_PropertyDescriptor_description",
"_UI_Groovy_executeOnElement_feature", "_UI_Groovy_type"),
+ GroovyPackage.Literals.GROOVY__EXECUTE_ON_ELEMENT,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Execute On Element NS feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addExecuteOnElementNSPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Groovy_executeOnElementNS_feature"),
+ getString("_UI_PropertyDescriptor_description",
"_UI_Groovy_executeOnElementNS_feature", "_UI_Groovy_type"),
+ GroovyPackage.Literals.GROOVY__EXECUTE_ON_ELEMENT_NS,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an
appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link
org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
{
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(GroovyPackage.Literals.GROOVY__PARAM);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use
for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns Groovy.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object,
getResourceLocator().getImage("full/obj16/Groovy"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((Groovy)object).getTargetProfile();
+ return label == null || label.length() == 0 ?
+ getString("_UI_Groovy_type") :
+ getString("_UI_Groovy_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any
cached
+ * children and by creating a viewer notification, which it passes to {@link
#fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Groovy.class)) {
+ case GroovyPackage.GROOVY__IMPORTS:
+ case GroovyPackage.GROOVY__SCRIPT:
+ case GroovyPackage.GROOVY__EXECUTE_BEFORE:
+ case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT:
+ case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT_NS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(),
false, true));
+ return;
+ case GroovyPackage.GROOVY__PARAM:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(),
true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the
children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors,
Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (GroovyPackage.Literals.GROOVY__PARAM,
+ SmooksFactory.eINSTANCE.createParamType()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return GroovyEditPlugin.INSTANCE;
+ }
+
+}
Property changes on:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProvider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProviderAdapterFactory.java
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProviderAdapterFactory.java
(rev 0)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProviderAdapterFactory.java 2009-04-08
10:33:40 UTC (rev 14598)
@@ -0,0 +1,227 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.edit.groovy.provider;
+
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.jboss.tools.smooks.model.groovy.util.GroovyAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to
{@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GroovyItemProviderAdapterFactory extends GroovyAdapterFactory implements
ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType
isFactoryForType}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GroovyItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link
org.jboss.tools.smooks.model.groovy.DocumentRoot} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DocumentRootItemProvider documentRootItemProvider;
+
+ /**
+ * This creates an adapter for a {@link
org.jboss.tools.smooks.model.groovy.DocumentRoot}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createDocumentRootAdapter() {
+ if (documentRootItemProvider == null) {
+ documentRootItemProvider = new DocumentRootItemProvider(this);
+ }
+
+ return documentRootItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link
org.jboss.tools.smooks.model.groovy.Groovy} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GroovyItemProvider groovyItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.jboss.tools.smooks.model.groovy.Groovy}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createGroovyAdapter() {
+ if (groovyItemProvider == null) {
+ groovyItemProvider = new GroovyItemProvider(this);
+ }
+
+ return groovyItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this :
parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class) || (((Class<?>)type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void dispose() {
+ if (documentRootItemProvider != null) documentRootItemProvider.dispose();
+ if (groovyItemProvider != null) groovyItemProvider.dispose();
+ }
+
+}
Property changes on:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProviderAdapterFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/javabean/provider/ValueTypeItemProvider.java
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/javabean/provider/ValueTypeItemProvider.java 2009-04-08
10:28:23 UTC (rev 14597)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/javabean/provider/ValueTypeItemProvider.java 2009-04-08
10:33:40 UTC (rev 14598)
@@ -256,6 +256,9 @@
@Override
public String getText(Object object) {
String label = ((ValueType)object).getData();
+ if(label.length() > 12){
+ label = label.substring(0, 12) + "...";
+ }
return label == null || label.length() == 0 ?
getString("_UI_ValueType_type") :
getString("_UI_ValueType_type") + " " + label;
Modified:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/SmooksResourceListTypeItemProvider.java
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/SmooksResourceListTypeItemProvider.java 2009-04-08
10:28:23 UTC (rev 14597)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/SmooksResourceListTypeItemProvider.java 2009-04-08
10:33:40 UTC (rev 14598)
@@ -26,6 +26,10 @@
import org.eclipse.emf.edit.provider.ViewerNotification;
import org.jboss.tools.smooks.edit.common.provider.AbstractAnyTypeItemProvider;
import org.jboss.tools.smooks.edit.xsl.provider.Xsl1EditPlugin;
+import org.jboss.tools.smooks.model.freemarker.FreemarkerFactory;
+import org.jboss.tools.smooks.model.freemarker.FreemarkerPackage;
+import org.jboss.tools.smooks.model.javabean.JavabeanFactory;
+import org.jboss.tools.smooks.model.javabean.JavabeanPackage;
import org.jboss.tools.smooks.model.smooks.SmooksFactory;
import org.jboss.tools.smooks.model.smooks.SmooksPackage;
import org.jboss.tools.smooks.model.smooks.SmooksResourceListType;
@@ -285,13 +289,27 @@
FeatureMapUtil.createEntry
(SmooksPackage.Literals.DOCUMENT_ROOT__READER,
SmooksFactory.eINSTANCE.createReaderType())));
-
+
newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_RESOURCE_CONFIG_GROUP,
- FeatureMapUtil.createEntry
- (XslPackage.Literals.DOCUMENT_ROOT__XSL,
- XslFactory.eINSTANCE.createXsl())));
+ (createChildParameter
+ (SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_RESOURCE_CONFIG_GROUP,
+ FeatureMapUtil.createEntry
+ (JavabeanPackage.Literals.DOCUMENT_ROOT__BINDINGS,
+ JavabeanFactory.eINSTANCE.createBindingsType())));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_RESOURCE_CONFIG_GROUP,
+ FeatureMapUtil.createEntry
+ (XslPackage.Literals.DOCUMENT_ROOT__XSL,
+ XslFactory.eINSTANCE.createXsl())));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_RESOURCE_CONFIG_GROUP,
+ FeatureMapUtil.createEntry
+ (FreemarkerPackage.Literals.DOCUMENT_ROOT__FREEMARKER,
+ FreemarkerFactory.eINSTANCE.createFreemarker())));
newChildDescriptors.add
(createChildParameter
Added:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/DocumentRoot.java
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/DocumentRoot.java
(rev 0)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/DocumentRoot.java 2009-04-08
10:33:40 UTC (rev 14598)
@@ -0,0 +1,116 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.groovy;
+
+import org.eclipse.emf.common.util.EMap;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.emf.ecore.util.FeatureMap;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Document
Root</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.jboss.tools.smooks.model.groovy.DocumentRoot#getMixed
<em>Mixed</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.groovy.DocumentRoot#getXMLNSPrefixMap
<em>XMLNS Prefix Map</em>}</li>
+ * <li>{@link
org.jboss.tools.smooks.model.groovy.DocumentRoot#getXSISchemaLocation <em>XSI Schema
Location</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.groovy.DocumentRoot#getGroovy
<em>Groovy</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.jboss.tools.smooks.model.groovy.GroovyPackage#getDocumentRoot()
+ * @model extendedMetaData="name='' kind='mixed'"
+ * @generated
+ */
+public interface DocumentRoot extends EObject {
+ /**
+ * Returns the value of the '<em><b>Mixed</b></em>'
attribute list.
+ * The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Mixed</em>' attribute list isn't
clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Mixed</em>' attribute list.
+ * @see org.jboss.tools.smooks.model.groovy.GroovyPackage#getDocumentRoot_Mixed()
+ * @model unique="false"
dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true"
+ * extendedMetaData="kind='elementWildcard'
name=':mixed'"
+ * @generated
+ */
+ FeatureMap getMixed();
+
+ /**
+ * Returns the value of the '<em><b>XMLNS Prefix
Map</b></em>' map.
+ * The key is of type {@link java.lang.String},
+ * and the value is of type {@link java.lang.String},
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>XMLNS Prefix Map</em>' map isn't
clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>XMLNS Prefix Map</em>' map.
+ * @see
org.jboss.tools.smooks.model.groovy.GroovyPackage#getDocumentRoot_XMLNSPrefixMap()
+ * @model
mapType="org.eclipse.emf.ecore.EStringToStringMapEntry<org.eclipse.emf.ecore.EString,
org.eclipse.emf.ecore.EString>" transient="true"
+ * extendedMetaData="kind='attribute'
name='xmlns:prefix'"
+ * @generated
+ */
+ EMap<String, String> getXMLNSPrefixMap();
+
+ /**
+ * Returns the value of the '<em><b>XSI Schema
Location</b></em>' map.
+ * The key is of type {@link java.lang.String},
+ * and the value is of type {@link java.lang.String},
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>XSI Schema Location</em>' map
isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>XSI Schema Location</em>' map.
+ * @see
org.jboss.tools.smooks.model.groovy.GroovyPackage#getDocumentRoot_XSISchemaLocation()
+ * @model
mapType="org.eclipse.emf.ecore.EStringToStringMapEntry<org.eclipse.emf.ecore.EString,
org.eclipse.emf.ecore.EString>" transient="true"
+ * extendedMetaData="kind='attribute'
name='xsi:schemaLocation'"
+ * @generated
+ */
+ EMap<String, String> getXSISchemaLocation();
+
+ /**
+ * Returns the value of the '<em><b>Groovy</b></em>'
containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ *
+ * Groovy Script.
+ *
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Groovy</em>' containment
reference.
+ * @see #setGroovy(Groovy)
+ * @see org.jboss.tools.smooks.model.groovy.GroovyPackage#getDocumentRoot_Groovy()
+ * @model containment="true" upper="-2" transient="true"
volatile="true" derived="true"
+ * extendedMetaData="kind='element' name='groovy'
namespace='##targetNamespace'
affiliation='http://www.milyn.org/xsd/smooks-1.1.xsd#abstract-resourc...
+ * @generated
+ */
+ Groovy getGroovy();
+
+ /**
+ * Sets the value of the '{@link
org.jboss.tools.smooks.model.groovy.DocumentRoot#getGroovy
<em>Groovy</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Groovy</em>' containment
reference.
+ * @see #getGroovy()
+ * @generated
+ */
+ void setGroovy(Groovy value);
+
+} // DocumentRoot
Property changes on:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/DocumentRoot.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/Groovy.java
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/Groovy.java
(rev 0)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/Groovy.java 2009-04-08
10:33:40 UTC (rev 14598)
@@ -0,0 +1,224 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.groovy;
+
+import org.eclipse.emf.common.util.EList;
+import org.jboss.tools.smooks.model.smooks.ElementVisitor;
+import org.jboss.tools.smooks.model.smooks.ParamType;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object
'<em><b>Groovy</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ *
+ * Groovy Script.
+ *
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.jboss.tools.smooks.model.groovy.Groovy#getImports
<em>Imports</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.groovy.Groovy#getScript
<em>Script</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.groovy.Groovy#getParam
<em>Param</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.groovy.Groovy#isExecuteBefore
<em>Execute Before</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.groovy.Groovy#getExecuteOnElement
<em>Execute On Element</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.groovy.Groovy#getExecuteOnElementNS
<em>Execute On Element NS</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.jboss.tools.smooks.model.groovy.GroovyPackage#getGroovy()
+ * @model extendedMetaData="name='groovy' kind='elementOnly'"
+ * @generated
+ */
+public interface Groovy extends ElementVisitor {
+ /**
+ * Returns the value of the '<em><b>Imports</b></em>'
attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Imports</em>' attribute isn't
clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Imports</em>' attribute.
+ * @see #setImports(String)
+ * @see org.jboss.tools.smooks.model.groovy.GroovyPackage#getGroovy_Imports()
+ * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+ * extendedMetaData="kind='element' name='imports'
namespace='##targetNamespace'"
+ * @generated
+ */
+ String getImports();
+
+ /**
+ * Sets the value of the '{@link
org.jboss.tools.smooks.model.groovy.Groovy#getImports <em>Imports</em>}'
attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Imports</em>' attribute.
+ * @see #getImports()
+ * @generated
+ */
+ void setImports(String value);
+
+ /**
+ * Returns the value of the '<em><b>Script</b></em>'
attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Script</em>' attribute isn't
clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Script</em>' attribute.
+ * @see #setScript(String)
+ * @see org.jboss.tools.smooks.model.groovy.GroovyPackage#getGroovy_Script()
+ * @model dataType="org.eclipse.emf.ecore.xml.type.String"
required="true"
+ * extendedMetaData="kind='element' name='script'
namespace='##targetNamespace'"
+ * @generated
+ */
+ String getScript();
+
+ /**
+ * Sets the value of the '{@link
org.jboss.tools.smooks.model.groovy.Groovy#getScript <em>Script</em>}'
attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Script</em>' attribute.
+ * @see #getScript()
+ * @generated
+ */
+ void setScript(String value);
+
+ /**
+ * Returns the value of the '<em><b>Param</b></em>'
containment reference list.
+ * The list contents are of type {@link smooks.ParamType}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Param</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>Param</em>' containment reference
list.
+ * @see org.jboss.tools.smooks.model.groovy.GroovyPackage#getGroovy_Param()
+ * @model containment="true"
+ * extendedMetaData="kind='element' name='param'
namespace='http://www.milyn.org/xsd/smooks-1.1.xsd'"
+ * @generated
+ */
+ EList<ParamType> getParam();
+
+ /**
+ * Returns the value of the '<em><b>Execute
Before</b></em>' attribute.
+ * The default value is <code>"false"</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ *
+ * Execute the script before visiting the elements child
content. Default is 'false'.
+ *
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Execute Before</em>' attribute.
+ * @see #isSetExecuteBefore()
+ * @see #unsetExecuteBefore()
+ * @see #setExecuteBefore(boolean)
+ * @see org.jboss.tools.smooks.model.groovy.GroovyPackage#getGroovy_ExecuteBefore()
+ * @model default="false" unsettable="true"
dataType="org.eclipse.emf.ecore.xml.type.Boolean"
+ * extendedMetaData="kind='attribute'
name='executeBefore'"
+ * @generated
+ */
+ boolean isExecuteBefore();
+
+ /**
+ * Sets the value of the '{@link
org.jboss.tools.smooks.model.groovy.Groovy#isExecuteBefore <em>Execute
Before</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Execute Before</em>'
attribute.
+ * @see #isSetExecuteBefore()
+ * @see #unsetExecuteBefore()
+ * @see #isExecuteBefore()
+ * @generated
+ */
+ void setExecuteBefore(boolean value);
+
+ /**
+ * Unsets the value of the '{@link
org.jboss.tools.smooks.model.groovy.Groovy#isExecuteBefore <em>Execute
Before</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetExecuteBefore()
+ * @see #isExecuteBefore()
+ * @see #setExecuteBefore(boolean)
+ * @generated
+ */
+ void unsetExecuteBefore();
+
+ /**
+ * Returns whether the value of the '{@link
org.jboss.tools.smooks.model.groovy.Groovy#isExecuteBefore <em>Execute
Before</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Execute Before</em>'
attribute is set.
+ * @see #unsetExecuteBefore()
+ * @see #isExecuteBefore()
+ * @see #setExecuteBefore(boolean)
+ * @generated
+ */
+ boolean isSetExecuteBefore();
+
+ /**
+ * Returns the value of the '<em><b>Execute On
Element</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ *
+ * The name of the element on which to execute the script.
+ *
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Execute On Element</em>'
attribute.
+ * @see #setExecuteOnElement(String)
+ * @see org.jboss.tools.smooks.model.groovy.GroovyPackage#getGroovy_ExecuteOnElement()
+ * @model dataType="org.eclipse.emf.ecore.xml.type.String"
required="true"
+ * extendedMetaData="kind='attribute'
name='executeOnElement'"
+ * @generated
+ */
+ String getExecuteOnElement();
+
+ /**
+ * Sets the value of the '{@link
org.jboss.tools.smooks.model.groovy.Groovy#getExecuteOnElement <em>Execute On
Element</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Execute On Element</em>'
attribute.
+ * @see #getExecuteOnElement()
+ * @generated
+ */
+ void setExecuteOnElement(String value);
+
+ /**
+ * Returns the value of the '<em><b>Execute On Element
NS</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ *
+ * The namespace of the element on which to execute the
script.
+ *
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Execute On Element NS</em>'
attribute.
+ * @see #setExecuteOnElementNS(String)
+ * @see
org.jboss.tools.smooks.model.groovy.GroovyPackage#getGroovy_ExecuteOnElementNS()
+ * @model dataType="org.eclipse.emf.ecore.xml.type.AnyURI"
+ * extendedMetaData="kind='attribute'
name='executeOnElementNS'"
+ * @generated
+ */
+ String getExecuteOnElementNS();
+
+ /**
+ * Sets the value of the '{@link
org.jboss.tools.smooks.model.groovy.Groovy#getExecuteOnElementNS <em>Execute On
Element NS</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Execute On Element
NS</em>' attribute.
+ * @see #getExecuteOnElementNS()
+ * @generated
+ */
+ void setExecuteOnElementNS(String value);
+
+} // Groovy
Property changes on:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/Groovy.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/GroovyFactory.java
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/GroovyFactory.java
(rev 0)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/GroovyFactory.java 2009-04-08
10:33:40 UTC (rev 14598)
@@ -0,0 +1,55 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.groovy;
+
+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.jboss.tools.smooks.model.groovy.GroovyPackage
+ * @generated
+ */
+public interface GroovyFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ GroovyFactory eINSTANCE =
org.jboss.tools.smooks.model.groovy.impl.GroovyFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Document Root</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Document Root</em>'.
+ * @generated
+ */
+ DocumentRoot createDocumentRoot();
+
+ /**
+ * Returns a new object of class '<em>Groovy</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Groovy</em>'.
+ * @generated
+ */
+ Groovy createGroovy();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ GroovyPackage getGroovyPackage();
+
+} //GroovyFactory
Property changes on:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/GroovyFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/GroovyPackage.java
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/GroovyPackage.java
(rev 0)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/GroovyPackage.java 2009-04-08
10:33:40 UTC (rev 14598)
@@ -0,0 +1,494 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.groovy;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.jboss.tools.smooks.model.smooks.SmooksPackage;
+
+/**
+ * <!-- 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 -->
+ * <!-- begin-model-doc -->
+ * Groovy Scripting Configuration
+ * <!-- end-model-doc -->
+ * @see org.jboss.tools.smooks.model.groovy.GroovyFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface GroovyPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "groovy";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.milyn.org/xsd/smooks/groovy-1.1.xsd";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "g";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ GroovyPackage eINSTANCE =
org.jboss.tools.smooks.model.groovy.impl.GroovyPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link
org.jboss.tools.smooks.model.groovy.impl.DocumentRootImpl <em>Document
Root</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.jboss.tools.smooks.model.groovy.impl.DocumentRootImpl
+ * @see org.jboss.tools.smooks.model.groovy.impl.GroovyPackageImpl#getDocumentRoot()
+ * @generated
+ */
+ int DOCUMENT_ROOT = 0;
+
+ /**
+ * The feature id for the '<em><b>Mixed</b></em>'
attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOCUMENT_ROOT__MIXED = 0;
+
+ /**
+ * The feature id for the '<em><b>XMLNS Prefix
Map</b></em>' map.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOCUMENT_ROOT__XMLNS_PREFIX_MAP = 1;
+
+ /**
+ * The feature id for the '<em><b>XSI Schema
Location</b></em>' map.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOCUMENT_ROOT__XSI_SCHEMA_LOCATION = 2;
+
+ /**
+ * The feature id for the '<em><b>Groovy</b></em>'
containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOCUMENT_ROOT__GROOVY = 3;
+
+ /**
+ * The number of structural features of the '<em>Document Root</em>'
class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOCUMENT_ROOT_FEATURE_COUNT = 4;
+
+ /**
+ * The meta object id for the '{@link
org.jboss.tools.smooks.model.groovy.impl.GroovyImpl <em>Groovy</em>}'
class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.jboss.tools.smooks.model.groovy.impl.GroovyImpl
+ * @see org.jboss.tools.smooks.model.groovy.impl.GroovyPackageImpl#getGroovy()
+ * @generated
+ */
+ int GROOVY = 1;
+
+ /**
+ * The feature id for the '<em><b>Mixed</b></em>'
attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROOVY__MIXED = SmooksPackage.ELEMENT_VISITOR__MIXED;
+
+ /**
+ * The feature id for the '<em><b>Any</b></em>'
attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROOVY__ANY = SmooksPackage.ELEMENT_VISITOR__ANY;
+
+ /**
+ * The feature id for the '<em><b>Any
Attribute</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROOVY__ANY_ATTRIBUTE = SmooksPackage.ELEMENT_VISITOR__ANY_ATTRIBUTE;
+
+ /**
+ * The feature id for the '<em><b>Condition</b></em>'
containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROOVY__CONDITION = SmooksPackage.ELEMENT_VISITOR__CONDITION;
+
+ /**
+ * The feature id for the '<em><b>Target
Profile</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROOVY__TARGET_PROFILE = SmooksPackage.ELEMENT_VISITOR__TARGET_PROFILE;
+
+ /**
+ * The feature id for the '<em><b>Imports</b></em>'
attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROOVY__IMPORTS = SmooksPackage.ELEMENT_VISITOR_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Script</b></em>'
attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROOVY__SCRIPT = SmooksPackage.ELEMENT_VISITOR_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Param</b></em>'
containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROOVY__PARAM = SmooksPackage.ELEMENT_VISITOR_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Execute
Before</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROOVY__EXECUTE_BEFORE = SmooksPackage.ELEMENT_VISITOR_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Execute On
Element</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROOVY__EXECUTE_ON_ELEMENT = SmooksPackage.ELEMENT_VISITOR_FEATURE_COUNT + 4;
+
+ /**
+ * The feature id for the '<em><b>Execute On Element
NS</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROOVY__EXECUTE_ON_ELEMENT_NS = SmooksPackage.ELEMENT_VISITOR_FEATURE_COUNT + 5;
+
+ /**
+ * The number of structural features of the '<em>Groovy</em>'
class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROOVY_FEATURE_COUNT = SmooksPackage.ELEMENT_VISITOR_FEATURE_COUNT + 6;
+
+
+ /**
+ * Returns the meta object for class '{@link
org.jboss.tools.smooks.model.groovy.DocumentRoot <em>Document
Root</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Document Root</em>'.
+ * @see org.jboss.tools.smooks.model.groovy.DocumentRoot
+ * @generated
+ */
+ EClass getDocumentRoot();
+
+ /**
+ * Returns the meta object for the attribute list '{@link
org.jboss.tools.smooks.model.groovy.DocumentRoot#getMixed
<em>Mixed</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute list '<em>Mixed</em>'.
+ * @see org.jboss.tools.smooks.model.groovy.DocumentRoot#getMixed()
+ * @see #getDocumentRoot()
+ * @generated
+ */
+ EAttribute getDocumentRoot_Mixed();
+
+ /**
+ * Returns the meta object for the map '{@link
org.jboss.tools.smooks.model.groovy.DocumentRoot#getXMLNSPrefixMap <em>XMLNS Prefix
Map</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the map '<em>XMLNS Prefix Map</em>'.
+ * @see org.jboss.tools.smooks.model.groovy.DocumentRoot#getXMLNSPrefixMap()
+ * @see #getDocumentRoot()
+ * @generated
+ */
+ EReference getDocumentRoot_XMLNSPrefixMap();
+
+ /**
+ * Returns the meta object for the map '{@link
org.jboss.tools.smooks.model.groovy.DocumentRoot#getXSISchemaLocation <em>XSI Schema
Location</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the map '<em>XSI Schema
Location</em>'.
+ * @see org.jboss.tools.smooks.model.groovy.DocumentRoot#getXSISchemaLocation()
+ * @see #getDocumentRoot()
+ * @generated
+ */
+ EReference getDocumentRoot_XSISchemaLocation();
+
+ /**
+ * Returns the meta object for the containment reference '{@link
org.jboss.tools.smooks.model.groovy.DocumentRoot#getGroovy
<em>Groovy</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference
'<em>Groovy</em>'.
+ * @see org.jboss.tools.smooks.model.groovy.DocumentRoot#getGroovy()
+ * @see #getDocumentRoot()
+ * @generated
+ */
+ EReference getDocumentRoot_Groovy();
+
+ /**
+ * Returns the meta object for class '{@link
org.jboss.tools.smooks.model.groovy.Groovy <em>Groovy</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Groovy</em>'.
+ * @see org.jboss.tools.smooks.model.groovy.Groovy
+ * @generated
+ */
+ EClass getGroovy();
+
+ /**
+ * Returns the meta object for the attribute '{@link
org.jboss.tools.smooks.model.groovy.Groovy#getImports <em>Imports</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Imports</em>'.
+ * @see org.jboss.tools.smooks.model.groovy.Groovy#getImports()
+ * @see #getGroovy()
+ * @generated
+ */
+ EAttribute getGroovy_Imports();
+
+ /**
+ * Returns the meta object for the attribute '{@link
org.jboss.tools.smooks.model.groovy.Groovy#getScript <em>Script</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Script</em>'.
+ * @see org.jboss.tools.smooks.model.groovy.Groovy#getScript()
+ * @see #getGroovy()
+ * @generated
+ */
+ EAttribute getGroovy_Script();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link
org.jboss.tools.smooks.model.groovy.Groovy#getParam <em>Param</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list
'<em>Param</em>'.
+ * @see org.jboss.tools.smooks.model.groovy.Groovy#getParam()
+ * @see #getGroovy()
+ * @generated
+ */
+ EReference getGroovy_Param();
+
+ /**
+ * Returns the meta object for the attribute '{@link
org.jboss.tools.smooks.model.groovy.Groovy#isExecuteBefore <em>Execute
Before</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Execute
Before</em>'.
+ * @see org.jboss.tools.smooks.model.groovy.Groovy#isExecuteBefore()
+ * @see #getGroovy()
+ * @generated
+ */
+ EAttribute getGroovy_ExecuteBefore();
+
+ /**
+ * Returns the meta object for the attribute '{@link
org.jboss.tools.smooks.model.groovy.Groovy#getExecuteOnElement <em>Execute On
Element</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Execute On
Element</em>'.
+ * @see org.jboss.tools.smooks.model.groovy.Groovy#getExecuteOnElement()
+ * @see #getGroovy()
+ * @generated
+ */
+ EAttribute getGroovy_ExecuteOnElement();
+
+ /**
+ * Returns the meta object for the attribute '{@link
org.jboss.tools.smooks.model.groovy.Groovy#getExecuteOnElementNS <em>Execute On
Element NS</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Execute On Element
NS</em>'.
+ * @see org.jboss.tools.smooks.model.groovy.Groovy#getExecuteOnElementNS()
+ * @see #getGroovy()
+ * @generated
+ */
+ EAttribute getGroovy_ExecuteOnElementNS();
+
+ /**
+ * 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
+ */
+ GroovyFactory getGroovyFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link
org.jboss.tools.smooks.model.groovy.impl.DocumentRootImpl <em>Document
Root</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.jboss.tools.smooks.model.groovy.impl.DocumentRootImpl
+ * @see org.jboss.tools.smooks.model.groovy.impl.GroovyPackageImpl#getDocumentRoot()
+ * @generated
+ */
+ EClass DOCUMENT_ROOT = eINSTANCE.getDocumentRoot();
+
+ /**
+ * The meta object literal for the
'<em><b>Mixed</b></em>' attribute list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute DOCUMENT_ROOT__MIXED = eINSTANCE.getDocumentRoot_Mixed();
+
+ /**
+ * The meta object literal for the '<em><b>XMLNS Prefix
Map</b></em>' map feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DOCUMENT_ROOT__XMLNS_PREFIX_MAP =
eINSTANCE.getDocumentRoot_XMLNSPrefixMap();
+
+ /**
+ * The meta object literal for the '<em><b>XSI Schema
Location</b></em>' map feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DOCUMENT_ROOT__XSI_SCHEMA_LOCATION =
eINSTANCE.getDocumentRoot_XSISchemaLocation();
+
+ /**
+ * The meta object literal for the
'<em><b>Groovy</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DOCUMENT_ROOT__GROOVY = eINSTANCE.getDocumentRoot_Groovy();
+
+ /**
+ * The meta object literal for the '{@link
org.jboss.tools.smooks.model.groovy.impl.GroovyImpl <em>Groovy</em>}'
class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.jboss.tools.smooks.model.groovy.impl.GroovyImpl
+ * @see org.jboss.tools.smooks.model.groovy.impl.GroovyPackageImpl#getGroovy()
+ * @generated
+ */
+ EClass GROOVY = eINSTANCE.getGroovy();
+
+ /**
+ * The meta object literal for the
'<em><b>Imports</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute GROOVY__IMPORTS = eINSTANCE.getGroovy_Imports();
+
+ /**
+ * The meta object literal for the
'<em><b>Script</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute GROOVY__SCRIPT = eINSTANCE.getGroovy_Script();
+
+ /**
+ * The meta object literal for the
'<em><b>Param</b></em>' containment reference list
feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference GROOVY__PARAM = eINSTANCE.getGroovy_Param();
+
+ /**
+ * The meta object literal for the '<em><b>Execute
Before</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute GROOVY__EXECUTE_BEFORE = eINSTANCE.getGroovy_ExecuteBefore();
+
+ /**
+ * The meta object literal for the '<em><b>Execute On
Element</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute GROOVY__EXECUTE_ON_ELEMENT = eINSTANCE.getGroovy_ExecuteOnElement();
+
+ /**
+ * The meta object literal for the '<em><b>Execute On Element
NS</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute GROOVY__EXECUTE_ON_ELEMENT_NS = eINSTANCE.getGroovy_ExecuteOnElementNS();
+
+ }
+
+} //GroovyPackage
Property changes on:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/GroovyPackage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/DocumentRootImpl.java
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/DocumentRootImpl.java
(rev 0)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/DocumentRootImpl.java 2009-04-08
10:33:40 UTC (rev 14598)
@@ -0,0 +1,286 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.groovy.impl;
+
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EMap;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.eclipse.emf.ecore.impl.EStringToStringMapEntryImpl;
+
+import org.eclipse.emf.ecore.util.BasicFeatureMap;
+import org.eclipse.emf.ecore.util.EcoreEMap;
+import org.eclipse.emf.ecore.util.FeatureMap;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.jboss.tools.smooks.model.groovy.DocumentRoot;
+import org.jboss.tools.smooks.model.groovy.Groovy;
+import org.jboss.tools.smooks.model.groovy.GroovyPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Document
Root</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.jboss.tools.smooks.model.groovy.impl.DocumentRootImpl#getMixed
<em>Mixed</em>}</li>
+ * <li>{@link
org.jboss.tools.smooks.model.groovy.impl.DocumentRootImpl#getXMLNSPrefixMap
<em>XMLNS Prefix Map</em>}</li>
+ * <li>{@link
org.jboss.tools.smooks.model.groovy.impl.DocumentRootImpl#getXSISchemaLocation
<em>XSI Schema Location</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.groovy.impl.DocumentRootImpl#getGroovy
<em>Groovy</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class DocumentRootImpl extends EObjectImpl implements DocumentRoot {
+ /**
+ * The cached value of the '{@link #getMixed() <em>Mixed</em>}'
attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMixed()
+ * @generated
+ * @ordered
+ */
+ protected FeatureMap mixed;
+
+ /**
+ * The cached value of the '{@link #getXMLNSPrefixMap() <em>XMLNS Prefix
Map</em>}' map.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getXMLNSPrefixMap()
+ * @generated
+ * @ordered
+ */
+ protected EMap<String, String> xMLNSPrefixMap;
+
+ /**
+ * The cached value of the '{@link #getXSISchemaLocation() <em>XSI Schema
Location</em>}' map.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getXSISchemaLocation()
+ * @generated
+ * @ordered
+ */
+ protected EMap<String, String> xSISchemaLocation;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DocumentRootImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GroovyPackage.Literals.DOCUMENT_ROOT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FeatureMap getMixed() {
+ if (mixed == null) {
+ mixed = new BasicFeatureMap(this, GroovyPackage.DOCUMENT_ROOT__MIXED);
+ }
+ return mixed;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EMap<String, String> getXMLNSPrefixMap() {
+ if (xMLNSPrefixMap == null) {
+ xMLNSPrefixMap = new
EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY,
EStringToStringMapEntryImpl.class, this, GroovyPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP);
+ }
+ return xMLNSPrefixMap;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EMap<String, String> getXSISchemaLocation() {
+ if (xSISchemaLocation == null) {
+ xSISchemaLocation = new
EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY,
EStringToStringMapEntryImpl.class, this,
GroovyPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
+ }
+ return xSISchemaLocation;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Groovy getGroovy() {
+ return (Groovy)getMixed().get(GroovyPackage.Literals.DOCUMENT_ROOT__GROOVY, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetGroovy(Groovy newGroovy, NotificationChain msgs) {
+ return
((FeatureMap.Internal)getMixed()).basicAdd(GroovyPackage.Literals.DOCUMENT_ROOT__GROOVY,
newGroovy, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setGroovy(Groovy newGroovy) {
+ ((FeatureMap.Internal)getMixed()).set(GroovyPackage.Literals.DOCUMENT_ROOT__GROOVY,
newGroovy);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID,
NotificationChain msgs) {
+ switch (featureID) {
+ case GroovyPackage.DOCUMENT_ROOT__MIXED:
+ return ((InternalEList<?>)getMixed()).basicRemove(otherEnd, msgs);
+ case GroovyPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ return ((InternalEList<?>)getXMLNSPrefixMap()).basicRemove(otherEnd, msgs);
+ case GroovyPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ return ((InternalEList<?>)getXSISchemaLocation()).basicRemove(otherEnd, msgs);
+ case GroovyPackage.DOCUMENT_ROOT__GROOVY:
+ return basicSetGroovy(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 GroovyPackage.DOCUMENT_ROOT__MIXED:
+ if (coreType) return getMixed();
+ return ((FeatureMap.Internal)getMixed()).getWrapper();
+ case GroovyPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ if (coreType) return getXMLNSPrefixMap();
+ else return getXMLNSPrefixMap().map();
+ case GroovyPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ if (coreType) return getXSISchemaLocation();
+ else return getXSISchemaLocation().map();
+ case GroovyPackage.DOCUMENT_ROOT__GROOVY:
+ return getGroovy();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GroovyPackage.DOCUMENT_ROOT__MIXED:
+ ((FeatureMap.Internal)getMixed()).set(newValue);
+ return;
+ case GroovyPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ ((EStructuralFeature.Setting)getXMLNSPrefixMap()).set(newValue);
+ return;
+ case GroovyPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ ((EStructuralFeature.Setting)getXSISchemaLocation()).set(newValue);
+ return;
+ case GroovyPackage.DOCUMENT_ROOT__GROOVY:
+ setGroovy((Groovy)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GroovyPackage.DOCUMENT_ROOT__MIXED:
+ getMixed().clear();
+ return;
+ case GroovyPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ getXMLNSPrefixMap().clear();
+ return;
+ case GroovyPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ getXSISchemaLocation().clear();
+ return;
+ case GroovyPackage.DOCUMENT_ROOT__GROOVY:
+ setGroovy((Groovy)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GroovyPackage.DOCUMENT_ROOT__MIXED:
+ return mixed != null && !mixed.isEmpty();
+ case GroovyPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ return xMLNSPrefixMap != null && !xMLNSPrefixMap.isEmpty();
+ case GroovyPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ return xSISchemaLocation != null && !xSISchemaLocation.isEmpty();
+ case GroovyPackage.DOCUMENT_ROOT__GROOVY:
+ return getGroovy() != null;
+ }
+ 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(" (mixed: ");
+ result.append(mixed);
+ result.append(')');
+ return result.toString();
+ }
+
+} //DocumentRootImpl
Property changes on:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/DocumentRootImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyFactoryImpl.java
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyFactoryImpl.java
(rev 0)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyFactoryImpl.java 2009-04-08
10:33:40 UTC (rev 14598)
@@ -0,0 +1,110 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.groovy.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.jboss.tools.smooks.model.groovy.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GroovyFactoryImpl extends EFactoryImpl implements GroovyFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static GroovyFactory init() {
+ try {
+ GroovyFactory theGroovyFactory =
(
GroovyFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.mil...);
+ if (theGroovyFactory != null) {
+ return theGroovyFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new GroovyFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GroovyFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case GroovyPackage.DOCUMENT_ROOT: return createDocumentRoot();
+ case GroovyPackage.GROOVY: return createGroovy();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() +
"' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DocumentRoot createDocumentRoot() {
+ DocumentRootImpl documentRoot = new DocumentRootImpl();
+ return documentRoot;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Groovy createGroovy() {
+ GroovyImpl groovy = new GroovyImpl();
+ return groovy;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GroovyPackage getGroovyPackage() {
+ return (GroovyPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static GroovyPackage getPackage() {
+ return GroovyPackage.eINSTANCE;
+ }
+
+} //GroovyFactoryImpl
Property changes on:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyFactoryImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyImpl.java
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyImpl.java
(rev 0)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyImpl.java 2009-04-08
10:33:40 UTC (rev 14598)
@@ -0,0 +1,472 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.groovy.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.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.jboss.tools.smooks.model.groovy.Groovy;
+import org.jboss.tools.smooks.model.groovy.GroovyPackage;
+import org.jboss.tools.smooks.model.smooks.ParamType;
+import org.jboss.tools.smooks.model.smooks.impl.ElementVisitorImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object
'<em><b>Groovy</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.jboss.tools.smooks.model.groovy.impl.GroovyImpl#getImports
<em>Imports</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.groovy.impl.GroovyImpl#getScript
<em>Script</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.groovy.impl.GroovyImpl#getParam
<em>Param</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.groovy.impl.GroovyImpl#isExecuteBefore
<em>Execute Before</em>}</li>
+ * <li>{@link
org.jboss.tools.smooks.model.groovy.impl.GroovyImpl#getExecuteOnElement <em>Execute
On Element</em>}</li>
+ * <li>{@link
org.jboss.tools.smooks.model.groovy.impl.GroovyImpl#getExecuteOnElementNS
<em>Execute On Element NS</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class GroovyImpl extends ElementVisitorImpl implements Groovy {
+ /**
+ * The default value of the '{@link #getImports() <em>Imports</em>}'
attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getImports()
+ * @generated
+ * @ordered
+ */
+ protected static final String IMPORTS_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getImports() <em>Imports</em>}'
attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getImports()
+ * @generated
+ * @ordered
+ */
+ protected String imports = IMPORTS_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getScript() <em>Script</em>}'
attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getScript()
+ * @generated
+ * @ordered
+ */
+ protected static final String SCRIPT_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getScript() <em>Script</em>}'
attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getScript()
+ * @generated
+ * @ordered
+ */
+ protected String script = SCRIPT_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getParam() <em>Param</em>}'
containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getParam()
+ * @generated
+ * @ordered
+ */
+ protected EList<ParamType> param;
+
+ /**
+ * The default value of the '{@link #isExecuteBefore() <em>Execute
Before</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isExecuteBefore()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean EXECUTE_BEFORE_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isExecuteBefore() <em>Execute
Before</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isExecuteBefore()
+ * @generated
+ * @ordered
+ */
+ protected boolean executeBefore = EXECUTE_BEFORE_EDEFAULT;
+
+ /**
+ * This is true if the Execute Before attribute has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean executeBeforeESet;
+
+ /**
+ * The default value of the '{@link #getExecuteOnElement() <em>Execute On
Element</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getExecuteOnElement()
+ * @generated
+ * @ordered
+ */
+ protected static final String EXECUTE_ON_ELEMENT_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getExecuteOnElement() <em>Execute On
Element</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getExecuteOnElement()
+ * @generated
+ * @ordered
+ */
+ protected String executeOnElement = EXECUTE_ON_ELEMENT_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getExecuteOnElementNS() <em>Execute On
Element NS</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getExecuteOnElementNS()
+ * @generated
+ * @ordered
+ */
+ protected static final String EXECUTE_ON_ELEMENT_NS_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getExecuteOnElementNS() <em>Execute On
Element NS</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getExecuteOnElementNS()
+ * @generated
+ * @ordered
+ */
+ protected String executeOnElementNS = EXECUTE_ON_ELEMENT_NS_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GroovyImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GroovyPackage.Literals.GROOVY;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getImports() {
+ return imports;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setImports(String newImports) {
+ String oldImports = imports;
+ imports = newImports;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GroovyPackage.GROOVY__IMPORTS,
oldImports, imports));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getScript() {
+ return script;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setScript(String newScript) {
+ String oldScript = script;
+ script = newScript;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GroovyPackage.GROOVY__SCRIPT,
oldScript, script));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ParamType> getParam() {
+ if (param == null) {
+ param = new EObjectContainmentEList<ParamType>(ParamType.class, this,
GroovyPackage.GROOVY__PARAM);
+ }
+ return param;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isExecuteBefore() {
+ return executeBefore;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setExecuteBefore(boolean newExecuteBefore) {
+ boolean oldExecuteBefore = executeBefore;
+ executeBefore = newExecuteBefore;
+ boolean oldExecuteBeforeESet = executeBeforeESet;
+ executeBeforeESet = true;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET,
GroovyPackage.GROOVY__EXECUTE_BEFORE, oldExecuteBefore, executeBefore,
!oldExecuteBeforeESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetExecuteBefore() {
+ boolean oldExecuteBefore = executeBefore;
+ boolean oldExecuteBeforeESet = executeBeforeESet;
+ executeBefore = EXECUTE_BEFORE_EDEFAULT;
+ executeBeforeESet = false;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.UNSET,
GroovyPackage.GROOVY__EXECUTE_BEFORE, oldExecuteBefore, EXECUTE_BEFORE_EDEFAULT,
oldExecuteBeforeESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetExecuteBefore() {
+ return executeBeforeESet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getExecuteOnElement() {
+ return executeOnElement;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setExecuteOnElement(String newExecuteOnElement) {
+ String oldExecuteOnElement = executeOnElement;
+ executeOnElement = newExecuteOnElement;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET,
GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT, oldExecuteOnElement, executeOnElement));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getExecuteOnElementNS() {
+ return executeOnElementNS;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setExecuteOnElementNS(String newExecuteOnElementNS) {
+ String oldExecuteOnElementNS = executeOnElementNS;
+ executeOnElementNS = newExecuteOnElementNS;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET,
GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT_NS, oldExecuteOnElementNS, executeOnElementNS));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID,
NotificationChain msgs) {
+ switch (featureID) {
+ case GroovyPackage.GROOVY__PARAM:
+ return ((InternalEList<?>)getParam()).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 GroovyPackage.GROOVY__IMPORTS:
+ return getImports();
+ case GroovyPackage.GROOVY__SCRIPT:
+ return getScript();
+ case GroovyPackage.GROOVY__PARAM:
+ return getParam();
+ case GroovyPackage.GROOVY__EXECUTE_BEFORE:
+ return isExecuteBefore() ? Boolean.TRUE : Boolean.FALSE;
+ case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT:
+ return getExecuteOnElement();
+ case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT_NS:
+ return getExecuteOnElementNS();
+ }
+ 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 GroovyPackage.GROOVY__IMPORTS:
+ setImports((String)newValue);
+ return;
+ case GroovyPackage.GROOVY__SCRIPT:
+ setScript((String)newValue);
+ return;
+ case GroovyPackage.GROOVY__PARAM:
+ getParam().clear();
+ getParam().addAll((Collection<? extends ParamType>)newValue);
+ return;
+ case GroovyPackage.GROOVY__EXECUTE_BEFORE:
+ setExecuteBefore(((Boolean)newValue).booleanValue());
+ return;
+ case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT:
+ setExecuteOnElement((String)newValue);
+ return;
+ case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT_NS:
+ setExecuteOnElementNS((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GroovyPackage.GROOVY__IMPORTS:
+ setImports(IMPORTS_EDEFAULT);
+ return;
+ case GroovyPackage.GROOVY__SCRIPT:
+ setScript(SCRIPT_EDEFAULT);
+ return;
+ case GroovyPackage.GROOVY__PARAM:
+ getParam().clear();
+ return;
+ case GroovyPackage.GROOVY__EXECUTE_BEFORE:
+ unsetExecuteBefore();
+ return;
+ case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT:
+ setExecuteOnElement(EXECUTE_ON_ELEMENT_EDEFAULT);
+ return;
+ case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT_NS:
+ setExecuteOnElementNS(EXECUTE_ON_ELEMENT_NS_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GroovyPackage.GROOVY__IMPORTS:
+ return IMPORTS_EDEFAULT == null ? imports != null :
!IMPORTS_EDEFAULT.equals(imports);
+ case GroovyPackage.GROOVY__SCRIPT:
+ return SCRIPT_EDEFAULT == null ? script != null : !SCRIPT_EDEFAULT.equals(script);
+ case GroovyPackage.GROOVY__PARAM:
+ return param != null && !param.isEmpty();
+ case GroovyPackage.GROOVY__EXECUTE_BEFORE:
+ return isSetExecuteBefore();
+ case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT:
+ return EXECUTE_ON_ELEMENT_EDEFAULT == null ? executeOnElement != null :
!EXECUTE_ON_ELEMENT_EDEFAULT.equals(executeOnElement);
+ case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT_NS:
+ return EXECUTE_ON_ELEMENT_NS_EDEFAULT == null ? executeOnElementNS != null :
!EXECUTE_ON_ELEMENT_NS_EDEFAULT.equals(executeOnElementNS);
+ }
+ 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(" (imports: ");
+ result.append(imports);
+ result.append(", script: ");
+ result.append(script);
+ result.append(", executeBefore: ");
+ if (executeBeforeESet) result.append(executeBefore); else
result.append("<unset>");
+ result.append(", executeOnElement: ");
+ result.append(executeOnElement);
+ result.append(", executeOnElementNS: ");
+ result.append(executeOnElementNS);
+ result.append(')');
+ return result.toString();
+ }
+
+} //GroovyImpl
Property changes on:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyPackageImpl.java
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyPackageImpl.java
(rev 0)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyPackageImpl.java 2009-04-08
10:33:40 UTC (rev 14598)
@@ -0,0 +1,432 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.groovy.impl;
+
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
+import org.jboss.tools.smooks.model.common.CommonPackage;
+import org.jboss.tools.smooks.model.common.impl.CommonPackageImpl;
+import org.jboss.tools.smooks.model.groovy.DocumentRoot;
+import org.jboss.tools.smooks.model.groovy.Groovy;
+import org.jboss.tools.smooks.model.groovy.GroovyFactory;
+import org.jboss.tools.smooks.model.groovy.GroovyPackage;
+import org.jboss.tools.smooks.model.smooks.SmooksPackage;
+import org.jboss.tools.smooks.model.smooks.impl.SmooksPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GroovyPackageImpl extends EPackageImpl implements GroovyPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass documentRootEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass groovyEClass = 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.jboss.tools.smooks.model.groovy.GroovyPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private GroovyPackageImpl() {
+ super(eNS_URI, GroovyFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this
+ * model, and for any others upon which it depends. Simple
+ * dependencies are satisfied by calling this method on all
+ * dependent packages before doing anything else. This method drives
+ * initialization for interdependent packages directly, in parallel
+ * with this package, itself.
+ * <p>Of this package and its interdependencies, all packages which
+ * have not yet been registered by their URI values are first created
+ * and registered. The packages are then initialized in two steps:
+ * meta-model objects for all of the packages are created before any
+ * are initialized, since one package's meta-model objects may refer to
+ * those of another.
+ * <p>Invocation of this method will not affect any packages that have
+ * already been initialized.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static GroovyPackage init() {
+ if (isInited) return
(GroovyPackage)EPackage.Registry.INSTANCE.getEPackage(GroovyPackage.eNS_URI);
+
+ // Obtain or create and register package
+ GroovyPackageImpl theGroovyPackage =
(GroovyPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof
GroovyPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new
GroovyPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ XMLTypePackage.eINSTANCE.eClass();
+
+ // Obtain or create and register interdependencies
+ SmooksPackageImpl theSmooksPackage =
(SmooksPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SmooksPackage.eNS_URI)
instanceof SmooksPackageImpl ?
EPackage.Registry.INSTANCE.getEPackage(SmooksPackage.eNS_URI) : SmooksPackage.eINSTANCE);
+ CommonPackageImpl theCommonPackage =
(CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI)
instanceof CommonPackageImpl ?
EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE);
+
+ // Create package meta-data objects
+ theGroovyPackage.createPackageContents();
+ theSmooksPackage.createPackageContents();
+ theCommonPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theGroovyPackage.initializePackageContents();
+ theSmooksPackage.initializePackageContents();
+ theCommonPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theGroovyPackage.freeze();
+
+ return theGroovyPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getDocumentRoot() {
+ return documentRootEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getDocumentRoot_Mixed() {
+ return (EAttribute)documentRootEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDocumentRoot_XMLNSPrefixMap() {
+ return (EReference)documentRootEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDocumentRoot_XSISchemaLocation() {
+ return (EReference)documentRootEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDocumentRoot_Groovy() {
+ return (EReference)documentRootEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getGroovy() {
+ return groovyEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getGroovy_Imports() {
+ return (EAttribute)groovyEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getGroovy_Script() {
+ return (EAttribute)groovyEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getGroovy_Param() {
+ return (EReference)groovyEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getGroovy_ExecuteBefore() {
+ return (EAttribute)groovyEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getGroovy_ExecuteOnElement() {
+ return (EAttribute)groovyEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getGroovy_ExecuteOnElementNS() {
+ return (EAttribute)groovyEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GroovyFactory getGroovyFactory() {
+ return (GroovyFactory)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
+ documentRootEClass = createEClass(DOCUMENT_ROOT);
+ createEAttribute(documentRootEClass, DOCUMENT_ROOT__MIXED);
+ createEReference(documentRootEClass, DOCUMENT_ROOT__XMLNS_PREFIX_MAP);
+ createEReference(documentRootEClass, DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
+ createEReference(documentRootEClass, DOCUMENT_ROOT__GROOVY);
+
+ groovyEClass = createEClass(GROOVY);
+ createEAttribute(groovyEClass, GROOVY__IMPORTS);
+ createEAttribute(groovyEClass, GROOVY__SCRIPT);
+ createEReference(groovyEClass, GROOVY__PARAM);
+ createEAttribute(groovyEClass, GROOVY__EXECUTE_BEFORE);
+ createEAttribute(groovyEClass, GROOVY__EXECUTE_ON_ELEMENT);
+ createEAttribute(groovyEClass, GROOVY__EXECUTE_ON_ELEMENT_NS);
+ }
+
+ /**
+ * <!-- 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);
+
+ // Obtain other dependent packages
+ SmooksPackage theSmooksPackage =
(SmooksPackage)EPackage.Registry.INSTANCE.getEPackage(SmooksPackage.eNS_URI);
+ XMLTypePackage theXMLTypePackage =
(XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ groovyEClass.getESuperTypes().add(theSmooksPackage.getElementVisitor());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(documentRootEClass, DocumentRoot.class, "DocumentRoot",
!IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getDocumentRoot_Mixed(), ecorePackage.getEFeatureMapEntry(),
"mixed", null, 0, -1, null, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE,
!IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDocumentRoot_XMLNSPrefixMap(),
ecorePackage.getEStringToStringMapEntry(), null, "xMLNSPrefixMap", null, 0, -1,
null, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDocumentRoot_XSISchemaLocation(),
ecorePackage.getEStringToStringMapEntry(), null, "xSISchemaLocation", null, 0,
-1, null, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
!IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDocumentRoot_Groovy(), this.getGroovy(), null, "groovy",
null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE,
!IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+
+ initEClass(groovyEClass, Groovy.class, "Groovy", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getGroovy_Imports(), theXMLTypePackage.getString(), "imports",
null, 0, 1, Groovy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE,
!IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getGroovy_Script(), theXMLTypePackage.getString(), "script",
null, 1, 1, Groovy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE,
!IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getGroovy_Param(), theSmooksPackage.getParamType(), null,
"param", null, 0, -1, Groovy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE,
IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getGroovy_ExecuteBefore(), theXMLTypePackage.getBoolean(),
"executeBefore", "false", 0, 1, Groovy.class, !IS_TRANSIENT,
!IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getGroovy_ExecuteOnElement(), theXMLTypePackage.getString(),
"executeOnElement", null, 1, 1, Groovy.class, !IS_TRANSIENT, !IS_VOLATILE,
IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getGroovy_ExecuteOnElementNS(), theXMLTypePackage.getAnyURI(),
"executeOnElementNS", null, 0, 1, Groovy.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
+ (documentRootEClass,
+ source,
+ new String[] {
+ "name", "",
+ "kind", "mixed"
+ });
+ addAnnotation
+ (getDocumentRoot_Mixed(),
+ source,
+ new String[] {
+ "kind", "elementWildcard",
+ "name", ":mixed"
+ });
+ addAnnotation
+ (getDocumentRoot_XMLNSPrefixMap(),
+ source,
+ new String[] {
+ "kind", "attribute",
+ "name", "xmlns:prefix"
+ });
+ addAnnotation
+ (getDocumentRoot_XSISchemaLocation(),
+ source,
+ new String[] {
+ "kind", "attribute",
+ "name", "xsi:schemaLocation"
+ });
+ addAnnotation
+ (getDocumentRoot_Groovy(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "groovy",
+ "namespace", "##targetNamespace",
+ "affiliation",
"http://www.milyn.org/xsd/smooks-1.1.xsd#abstract-resource-config"
+ });
+ addAnnotation
+ (groovyEClass,
+ source,
+ new String[] {
+ "name", "groovy",
+ "kind", "elementOnly"
+ });
+ addAnnotation
+ (getGroovy_Imports(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "imports",
+ "namespace", "##targetNamespace"
+ });
+ addAnnotation
+ (getGroovy_Script(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "script",
+ "namespace", "##targetNamespace"
+ });
+ addAnnotation
+ (getGroovy_Param(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "param",
+ "namespace", "http://www.milyn.org/xsd/smooks-1.1.xsd"
+ });
+ addAnnotation
+ (getGroovy_ExecuteBefore(),
+ source,
+ new String[] {
+ "kind", "attribute",
+ "name", "executeBefore"
+ });
+ addAnnotation
+ (getGroovy_ExecuteOnElement(),
+ source,
+ new String[] {
+ "kind", "attribute",
+ "name", "executeOnElement"
+ });
+ addAnnotation
+ (getGroovy_ExecuteOnElementNS(),
+ source,
+ new String[] {
+ "kind", "attribute",
+ "name", "executeOnElementNS"
+ });
+ }
+
+} //GroovyPackageImpl
Property changes on:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyPackageImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyAdapterFactory.java
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyAdapterFactory.java
(rev 0)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyAdapterFactory.java 2009-04-08
10:33:40 UTC (rev 14598)
@@ -0,0 +1,218 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.groovy.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.emf.ecore.xml.type.AnyType;
+import org.jboss.tools.smooks.model.common.AbstractAnyType;
+import org.jboss.tools.smooks.model.groovy.DocumentRoot;
+import org.jboss.tools.smooks.model.groovy.Groovy;
+import org.jboss.tools.smooks.model.groovy.GroovyPackage;
+import org.jboss.tools.smooks.model.smooks.AbstractResourceConfig;
+import org.jboss.tools.smooks.model.smooks.ElementVisitor;
+
+/**
+ * <!-- 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.jboss.tools.smooks.model.groovy.GroovyPackage
+ * @generated
+ */
+public class GroovyAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static GroovyPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GroovyAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = GroovyPackage.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 GroovySwitch<Adapter> modelSwitch =
+ new GroovySwitch<Adapter>() {
+ @Override
+ public Adapter caseDocumentRoot(DocumentRoot object) {
+ return createDocumentRootAdapter();
+ }
+ @Override
+ public Adapter caseGroovy(Groovy object) {
+ return createGroovyAdapter();
+ }
+ @Override
+ public Adapter caseAnyType(AnyType object) {
+ return createAnyTypeAdapter();
+ }
+ @Override
+ public Adapter caseAbstractAnyType(AbstractAnyType object) {
+ return createAbstractAnyTypeAdapter();
+ }
+ @Override
+ public Adapter caseAbstractResourceConfig(AbstractResourceConfig object) {
+ return createAbstractResourceConfigAdapter();
+ }
+ @Override
+ public Adapter caseElementVisitor(ElementVisitor object) {
+ return createElementVisitorAdapter();
+ }
+ @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.jboss.tools.smooks.model.groovy.DocumentRoot <em>Document
Root</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.jboss.tools.smooks.model.groovy.DocumentRoot
+ * @generated
+ */
+ public Adapter createDocumentRootAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link
org.jboss.tools.smooks.model.groovy.Groovy <em>Groovy</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.jboss.tools.smooks.model.groovy.Groovy
+ * @generated
+ */
+ public Adapter createGroovyAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link
org.eclipse.emf.ecore.xml.type.AnyType <em>Any Type</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.emf.ecore.xml.type.AnyType
+ * @generated
+ */
+ public Adapter createAnyTypeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link common.AbstractAnyType
<em>Abstract Any Type</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 common.AbstractAnyType
+ * @generated
+ */
+ public Adapter createAbstractAnyTypeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link
smooks.AbstractResourceConfig <em>Abstract Resource Config</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 smooks.AbstractResourceConfig
+ * @generated
+ */
+ public Adapter createAbstractResourceConfigAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link smooks.ElementVisitor
<em>Element Visitor</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 smooks.ElementVisitor
+ * @generated
+ */
+ public Adapter createElementVisitorAdapter() {
+ 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;
+ }
+
+} //GroovyAdapterFactory
Property changes on:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyAdapterFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyResourceFactoryImpl.java
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyResourceFactoryImpl.java
(rev 0)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyResourceFactoryImpl.java 2009-04-08
10:33:40 UTC (rev 14598)
@@ -0,0 +1,56 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.groovy.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.jboss.tools.smooks.model.groovy.util.GroovyResourceImpl
+ * @generated
+ */
+public class GroovyResourceFactoryImpl extends ResourceFactoryImpl {
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GroovyResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ XMLResource result = new GroovyResourceImpl(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;
+ }
+
+} //GroovyResourceFactoryImpl
Property changes on:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyResourceFactoryImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyResourceImpl.java
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyResourceImpl.java
(rev 0)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyResourceImpl.java 2009-04-08
10:33:40 UTC (rev 14598)
@@ -0,0 +1,32 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.groovy.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.jboss.tools.smooks.model.groovy.util.GroovyResourceFactoryImpl
+ * @generated
+ */
+public class GroovyResourceImpl extends XMLResourceImpl {
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param uri the URI of the new resource.
+ * @generated
+ */
+ public GroovyResourceImpl(URI uri) {
+ super(uri);
+ }
+
+} //GroovyResourceImpl
Property changes on:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyResourceImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovySwitch.java
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovySwitch.java
(rev 0)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovySwitch.java 2009-04-08
10:33:40 UTC (rev 14598)
@@ -0,0 +1,221 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.groovy.util;
+
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.xml.type.AnyType;
+import org.jboss.tools.smooks.model.common.AbstractAnyType;
+import org.jboss.tools.smooks.model.groovy.DocumentRoot;
+import org.jboss.tools.smooks.model.groovy.Groovy;
+import org.jboss.tools.smooks.model.groovy.GroovyPackage;
+import org.jboss.tools.smooks.model.smooks.AbstractResourceConfig;
+import org.jboss.tools.smooks.model.smooks.ElementVisitor;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.jboss.tools.smooks.model.groovy.GroovyPackage
+ * @generated
+ */
+public class GroovySwitch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static GroovyPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GroovySwitch() {
+ if (modelPackage == null) {
+ modelPackage = GroovyPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns
a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code>
call.
+ * @generated
+ */
+ public 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 -->
+ * <!-- 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);
+ }
+ else {
+ 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 -->
+ * <!-- 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 GroovyPackage.DOCUMENT_ROOT: {
+ DocumentRoot documentRoot = (DocumentRoot)theEObject;
+ T result = caseDocumentRoot(documentRoot);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case GroovyPackage.GROOVY: {
+ Groovy groovy = (Groovy)theEObject;
+ T result = caseGroovy(groovy);
+ if (result == null) result = caseElementVisitor(groovy);
+ if (result == null) result = caseAbstractResourceConfig(groovy);
+ if (result == null) result = caseAbstractAnyType(groovy);
+ if (result == null) result = caseAnyType(groovy);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of
'<em>Document Root</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>Document Root</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDocumentRoot(DocumentRoot object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of
'<em>Groovy</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>Groovy</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseGroovy(Groovy object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Any
Type</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>Any
Type</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAnyType(AnyType object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of
'<em>Abstract Any Type</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>Abstract Any Type</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAbstractAnyType(AbstractAnyType object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of
'<em>Abstract Resource Config</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>Abstract Resource Config</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAbstractResourceConfig(AbstractResourceConfig object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of
'<em>Element Visitor</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of
'<em>Element Visitor</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseElementVisitor(ElementVisitor 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;
+ }
+
+} //GroovySwitch
Property changes on:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovySwitch.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyXMLProcessor.java
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyXMLProcessor.java
(rev 0)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyXMLProcessor.java 2009-04-08
10:33:40 UTC (rev 14598)
@@ -0,0 +1,54 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.groovy.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.jboss.tools.smooks.model.groovy.GroovyPackage;
+
+/**
+ * This class contains helper methods to serialize and deserialize XML documents
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GroovyXMLProcessor extends XMLProcessor {
+
+ /**
+ * Public constructor to instantiate the helper.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GroovyXMLProcessor() {
+ super((EPackage.Registry.INSTANCE));
+ GroovyPackage.eINSTANCE.eClass();
+ }
+
+ /**
+ * Register for "*" and "xml" file extensions the
GroovyResourceFactoryImpl 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 GroovyResourceFactoryImpl());
+ registrations.put(STAR_EXTENSION, new GroovyResourceFactoryImpl());
+ }
+ return registrations;
+ }
+
+} //GroovyXMLProcessor
Property changes on:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyXMLProcessor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF 2009-04-08
10:28:23 UTC (rev 14597)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF 2009-04-08
10:33:40 UTC (rev 14598)
@@ -16,7 +16,9 @@
org.eclipse.wst.sse.ui,
org.eclipse.emf;bundle-version="2.4.0",
org.eclipse.emf.edit;bundle-version="2.4.2",
- org.eclipse.emf.edit.ui;bundle-version="2.4.2"
+ org.eclipse.emf.edit.ui;bundle-version="2.4.2",
+ org.eclipse.jdt.core;bundle-version="3.4.4",
+ org.eclipse.jdt.ui;bundle-version="3.4.2"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: %providerName
Modified:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/IPropertyUICreator.java
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/IPropertyUICreator.java 2009-04-08
10:28:23 UTC (rev 14597)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/IPropertyUICreator.java 2009-04-08
10:33:40 UTC (rev 14598)
@@ -23,4 +23,6 @@
public interface IPropertyUICreator {
public void createPropertyUI(FormToolkit toolkit, Composite parent,
IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature);
+
+ public boolean canCreate(IItemPropertyDescriptor itemPropertyDescriptor, Object model,
EAttribute feature);
}
Modified:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreatorManager.java
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreatorManager.java 2009-04-08
10:28:23 UTC (rev 14597)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreatorManager.java 2009-04-08
10:33:40 UTC (rev 14598)
@@ -13,6 +13,9 @@
import java.util.HashMap;
import java.util.Map;
+import org.jboss.tools.smooks.configuration.editors.javabean.BindingsPropertyUICreator;
+import org.jboss.tools.smooks.model.javabean.impl.BindingsTypeImpl;
+
/**
* @author Dart (dpeng(a)redhat.com)<p>
* Apr 7, 2009
@@ -24,8 +27,13 @@
private PropertyUICreatorManager(){
map = new HashMap<Class<?>,IPropertyUICreator>();
+ init();
}
+ private void init() {
+ map.put(BindingsTypeImpl.class, new BindingsPropertyUICreator());
+ }
+
public void registePropertyUICreator(Class<?> key,IPropertyUICreator creator){
map.put(key, creator);
}
Modified:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksActionBarContributor.java
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksActionBarContributor.java 2009-04-08
10:28:23 UTC (rev 14597)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksActionBarContributor.java 2009-04-08
10:33:40 UTC (rev 14598)
@@ -10,6 +10,7 @@
import java.util.Collection;
import org.eclipse.emf.common.ui.viewer.IViewerProvider;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.emf.edit.domain.IEditingDomainProvider;
import org.eclipse.emf.edit.ui.action.ControlAction;
@@ -264,7 +265,7 @@
ISelection selection = event.getSelection();
if (selection instanceof IStructuredSelection &&
((IStructuredSelection)selection).size() == 1) {
Object object = ((IStructuredSelection)selection).getFirstElement();
-
+ object = AdapterFactoryEditingDomain.unwrap(object);
EditingDomain domain = ((IEditingDomainProvider)activeEditorPart).getEditingDomain();
newChildDescriptors = domain.getNewChildDescriptors(object, null);
Modified:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMasterDetailBlock.java
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMasterDetailBlock.java 2009-04-08
10:28:23 UTC (rev 14597)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMasterDetailBlock.java 2009-04-08
10:33:40 UTC (rev 14598)
@@ -137,9 +137,7 @@
fillLayout.marginHeight = 1;
fillLayout.marginWidth = 1;
tableComposite.setLayout(fillLayout);
- smooksTreeViewer = new TreeViewer(tableComposite, SWT.NONE) {
-
- };
+ smooksTreeViewer = new TreeViewer(tableComposite, SWT.NONE);
smooksTreeViewer.addSelectionChangedListener(this);
smooksTreeViewer.setContentProvider(new AdapterFactoryContentProvider(editingDomain
.getAdapterFactory()));
@@ -147,7 +145,7 @@
smooksTreeViewer.setFilters(new ViewerFilter[] { new TextEObjectModelFilter() });
Object smooksModel = ((SmooksMultiFormEditor) this.formEditor).getSmooksModel();
if (smooksModel != null) {
- smooksTreeViewer.setInput(editingDomain.getResourceSet());
+ smooksTreeViewer.setInput(smooksModel);
}
createMenuForViewer(smooksTreeViewer);
formEditor.getSite().setSelectionProvider(smooksTreeViewer);
Modified:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java 2009-04-08
10:28:23 UTC (rev 14597)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java 2009-04-08
10:33:40 UTC (rev 14598)
@@ -57,6 +57,9 @@
import org.eclipse.wst.sse.ui.StructuredTextEditor;
import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
import org.jboss.tools.smooks.edit.common.provider.CommonItemProviderAdapterFactory;
+import org.jboss.tools.smooks.edit.edi.provider.EdiItemProviderAdapterFactory;
+import
org.jboss.tools.smooks.edit.freemarker.provider.FreemarkerItemProviderAdapterFactory;
+import org.jboss.tools.smooks.edit.javabean.provider.JavabeanItemProviderAdapterFactory;
import org.jboss.tools.smooks.edit.smooks.provider.SmooksItemProviderAdapterFactory;
import org.jboss.tools.smooks.edit.xsl.provider.XslItemProviderAdapterFactory;
import org.jboss.tools.smooks10.model.smooks.util.SmooksResourceFactoryImpl;
@@ -160,8 +163,11 @@
adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new XslItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new FreemarkerItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new JavabeanItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new CommonItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new SmooksItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new EdiItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
BasicCommandStack commandStack = new BasicCommandStack();
handleCommandStack(commandStack);
Modified:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksStuffPropertyDetailPage.java
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksStuffPropertyDetailPage.java 2009-04-08
10:28:23 UTC (rev 14597)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksStuffPropertyDetailPage.java 2009-04-08
10:33:40 UTC (rev 14598)
@@ -10,11 +10,15 @@
******************************************************************************/
package org.jboss.tools.smooks.configuration.editors;
+import java.lang.reflect.Method;
import java.util.Iterator;
import java.util.List;
+import org.eclipse.emf.common.util.Enumerator;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EEnumLiteral;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
@@ -24,18 +28,24 @@
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CCombo;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Spinner;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.forms.IDetailsPage;
import org.eclipse.ui.forms.IFormPart;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;
+import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
/**
*
@@ -44,7 +54,7 @@
* Apr 7, 2009
*/
public class SmooksStuffPropertyDetailPage implements IDetailsPage {
- FormToolkit formToolKit = null;
+ FormToolkit formToolkit = null;
private IManagedForm managedForm;
private ISelection selection;
private IFormPart formPart;
@@ -69,9 +79,9 @@
public void createContents(Composite parent) {
parent.setLayout(new FillLayout());
- section = formToolKit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR);
+ section = formToolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR);
- Composite client = formToolKit.createComposite(section);
+ Composite client = formToolkit.createComposite(section);
section.setLayout(new FillLayout());
section.setClient(client);
createSectionContents(client);
@@ -97,45 +107,33 @@
getModel());
List<IItemPropertyDescriptor> propertyDes =
itemPropertySource.getPropertyDescriptors(getModel());
for (Iterator<IItemPropertyDescriptor> iterator = propertyDes.iterator();
iterator.hasNext();) {
- final IItemPropertyDescriptor itemPropertyDescriptor = (IItemPropertyDescriptor)
iterator.next();
+ final IItemPropertyDescriptor itemPropertyDescriptor = (IItemPropertyDescriptor)
iterator
+ .next();
EAttribute feature = (EAttribute) itemPropertyDescriptor.getFeature(getModel());
- if (creator != null) {
- creator.createPropertyUI(formToolKit, propertyComposite, itemPropertyDescriptor,
+ if (creator != null && creator.canCreate(itemPropertyDescriptor,
+ getModel(), feature)) {
+ creator.createPropertyUI(formToolkit, propertyComposite, itemPropertyDescriptor,
getModel(), feature);
} else {
- String displayName = itemPropertyDescriptor.getDisplayName(getModel());
- formToolKit.createLabel(propertyComposite, displayName + " :");
EClassifier typeClazz = feature.getEType();
+ if (typeClazz instanceof EEnum) {
+ createEnumFieldEditor(propertyComposite, (EEnum) typeClazz, formToolkit,
+ itemPropertyDescriptor);
+ }
if (typeClazz.getInstanceClass() == String.class) {
- final Text text = formToolKit.createText(propertyComposite, "",
SWT.NONE);
- final Object value = itemPropertyDescriptor.getPropertyValue(getModel());
- if (value != null && value instanceof PropertyValueWrapper) {
- Object editValue = ((PropertyValueWrapper) value).getEditableValue(getModel());
- if (editValue != null)
- text.setText(editValue.toString());
- }
- text.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- if (value != null && value instanceof PropertyValueWrapper) {
- Object editValue = ((PropertyValueWrapper) value).getEditableValue(getModel());
- if (editValue != null){
- if(!editValue.equals(text.getText())){
- itemPropertyDescriptor.setPropertyValue(getModel(), text.getText());
- }
- }else{
- itemPropertyDescriptor.setPropertyValue(getModel(), text.getText());
- }
- }else{
- itemPropertyDescriptor.setPropertyValue(getModel(), text.getText());
- }
- }
- });
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- text.setLayoutData(gd);
+ createStringFieldEditor(propertyComposite, formToolkit, itemPropertyDescriptor);
}
+ if (typeClazz.getInstanceClass() == Boolean.class
+ || typeClazz.getInstanceClass() == boolean.class) {
+ createBooleanFieldEditor(propertyComposite, formToolkit, itemPropertyDescriptor);
+ }
+ if (typeClazz.getInstanceClass() == Integer.class
+ || typeClazz.getInstanceClass() == int.class) {
+ createIntegerFieldEditor(propertyComposite, formToolkit, itemPropertyDescriptor);
+ }
}
}
- formToolKit.paintBordersFor(propertyComposite);
+ formToolkit.paintBordersFor(propertyComposite);
propertyComposite.pack();
propertyMainComposite.layout();
} catch (Exception e) {
@@ -143,6 +141,144 @@
}
}
+ protected void createEnumFieldEditor(Composite propertyComposite, final EEnum
typeClass,
+ FormToolkit formToolKit, final IItemPropertyDescriptor itemPropertyDescriptor) {
+ String displayName = itemPropertyDescriptor.getDisplayName(getModel());
+ formToolKit.createLabel(propertyComposite, displayName + " :");
+ final CCombo combo = new CCombo(propertyComposite, SWT.NONE);
+ List<EEnumLiteral> literalList = typeClass.getELiterals();
+ for (Iterator<EEnumLiteral> iterator = literalList.iterator();
iterator.hasNext();) {
+ EEnumLiteral enumLiteral = (EEnumLiteral) iterator.next();
+ combo.add(enumLiteral.getName());
+ }
+ Object value = itemPropertyDescriptor.getPropertyValue(getModel());
+ if (value != null && value instanceof PropertyValueWrapper) {
+ Object editValue = ((PropertyValueWrapper) value).getEditableValue(getModel());
+ if (editValue != null && editValue instanceof Enumerator) {
+ String[] strings = combo.getItems();
+ for (int i = 0; i < strings.length; i++) {
+ String item = strings[i];
+ if (item.equals(((Enumerator) editValue).getName())) {
+ combo.select(i);
+ break;
+ }
+ }
+ }
+ }
+ combo.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ try {
+ Object value = itemPropertyDescriptor.getPropertyValue(getModel());
+ Method method = typeClass.getInstanceClass().getMethod("get", new
Class<?>[]{String.class});
+ // it's static method
+ Object v = method.invoke(null, combo.getText());
+ if (value != null && value instanceof PropertyValueWrapper) {
+ Object editValue = ((PropertyValueWrapper) value).getEditableValue(getModel());
+ if (editValue != null) {
+
+ if (!editValue.equals(v)) {
+ itemPropertyDescriptor.setPropertyValue(getModel(),v);
+ }
+ } else {
+ itemPropertyDescriptor.setPropertyValue(getModel(),v);
+ }
+ } else {
+ itemPropertyDescriptor.setPropertyValue(getModel(),v);
+ }
+ } catch (Throwable t) {
+ SmooksConfigurationActivator.getDefault().log(t);
+ }
+ }
+ });
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ combo.setLayoutData(gd);
+ }
+
+ protected void createBooleanFieldEditor(final Composite propertyComposite, FormToolkit
formToolkit,
+ final IItemPropertyDescriptor itemPropertyDescriptor) {
+ String displayName = itemPropertyDescriptor.getDisplayName(getModel());
+ Object value = itemPropertyDescriptor.getPropertyValue(getModel());
+ final Button checkButton = formToolkit.createButton(propertyComposite, displayName,
SWT.CHECK);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ checkButton.setLayoutData(gd);
+ Object editValue = null;
+ if (value != null && value instanceof PropertyValueWrapper) {
+ editValue = ((PropertyValueWrapper) value).getEditableValue(getModel());
+ if (editValue != null && editValue instanceof Boolean)
+ checkButton.setSelection((Boolean) editValue);
+ }
+ checkButton.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ itemPropertyDescriptor.setPropertyValue(getModel(), checkButton.getSelection());
+ }
+ });
+ }
+
+ protected void createStringFieldEditor(final Composite propertyComposite, FormToolkit
formToolKit,
+ final IItemPropertyDescriptor itemPropertyDescriptor) {
+ String displayName = itemPropertyDescriptor.getDisplayName(getModel());
+ formToolKit.createLabel(propertyComposite, displayName + " :");
+ final Text text = formToolKit.createText(propertyComposite, "", SWT.NONE);
+ Object value = itemPropertyDescriptor.getPropertyValue(getModel());
+ if (value != null && value instanceof PropertyValueWrapper) {
+ Object editValue = ((PropertyValueWrapper) value).getEditableValue(getModel());
+ if (editValue != null)
+ text.setText(editValue.toString());
+ }
+ text.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ Object value = itemPropertyDescriptor.getPropertyValue(getModel());
+ if (value != null && value instanceof PropertyValueWrapper) {
+ Object editValue = ((PropertyValueWrapper) value).getEditableValue(getModel());
+ if (editValue != null) {
+ if (!editValue.equals(text.getText())) {
+ itemPropertyDescriptor.setPropertyValue(getModel(), text.getText());
+ }
+ } else {
+ itemPropertyDescriptor.setPropertyValue(getModel(), text.getText());
+ }
+ } else {
+ itemPropertyDescriptor.setPropertyValue(getModel(), text.getText());
+ }
+ }
+ });
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ text.setLayoutData(gd);
+ }
+
+ protected void createIntegerFieldEditor(final Composite propertyComposite, FormToolkit
formToolKit,
+ final IItemPropertyDescriptor itemPropertyDescriptor) {
+ String displayName = itemPropertyDescriptor.getDisplayName(getModel());
+ formToolKit.createLabel(propertyComposite, displayName + " :");
+ final Spinner spinner = new Spinner(propertyComposite, SWT.NONE);
+ Object value = itemPropertyDescriptor.getPropertyValue(getModel());
+ if (value != null && value instanceof PropertyValueWrapper) {
+ Object editValue = ((PropertyValueWrapper) value).getEditableValue(getModel());
+ if (editValue != null && editValue instanceof Integer)
+ spinner.setSelection((Integer) editValue);
+ }
+ spinner.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ Object value = itemPropertyDescriptor.getPropertyValue(getModel());
+ if (value != null && value instanceof PropertyValueWrapper) {
+ Object editValue = ((PropertyValueWrapper) value).getEditableValue(getModel());
+ if (editValue != null) {
+ if (!editValue.equals(spinner.getSelection())) {
+ itemPropertyDescriptor.setPropertyValue(getModel(), spinner.getSelection());
+ }
+ } else {
+ itemPropertyDescriptor.setPropertyValue(getModel(), spinner.getSelection());
+ }
+ } else {
+ itemPropertyDescriptor.setPropertyValue(getModel(), spinner.getSelection());
+ }
+ }
+ });
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ spinner.setLayoutData(gd);
+ }
+
/*
* (non-Javadoc)
*
@@ -166,15 +302,6 @@
}
createPropertyComposite(propertyComposite);
}
-// if ((getModel() != null && getOldModel() != null)) {
-// if ((getModel().getClass() != getOldModel().getClass())) {
-// if (propertyComposite != null) {
-// propertyComposite.dispose();
-// propertyComposite = new Composite(propertyMainComposite, SWT.NONE);
-// }
-// createPropertyComposite(propertyComposite);
-// }
-// }
refreshWhenSelectionChanged();
}
@@ -193,7 +320,7 @@
public void initialize(IManagedForm form) {
this.managedForm = form;
if (managedForm != null) {
- formToolKit = managedForm.getToolkit();
+ formToolkit = managedForm.getToolkit();
}
}
Added:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java
===================================================================
---
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java
(rev 0)
+++
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java 2009-04-08
10:33:40 UTC (rev 14598)
@@ -0,0 +1,209 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.javabean;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor.PropertyValueWrapper;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.search.IJavaSearchScope;
+import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
+import org.eclipse.jdt.internal.ui.search.JavaSearchScopeFactory;
+import org.eclipse.jdt.ui.IJavaElementSearchConstants;
+import org.eclipse.jdt.ui.JavaUI;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.SelectionDialog;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
+import org.jboss.tools.smooks.configuration.editors.IPropertyUICreator;
+import org.jboss.tools.smooks.model.javabean.JavabeanPackage;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ * <p>
+ * Apr 8, 2009
+ */
+public class BindingsPropertyUICreator implements IPropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.IPropertyUICreator#canCreate
+ * (org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public boolean canCreate(IItemPropertyDescriptor itemPropertyDescriptor, Object model,
EAttribute feature) {
+ if (feature == JavabeanPackage.eINSTANCE.getBindingsType_Class()) {
+ return true;
+ }
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public void createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ String displayName = propertyDescriptor.getDisplayName(model);
+ toolkit.createLabel(parent, displayName + " :");
+ createBeanClassTextWithButton(parent, toolkit, propertyDescriptor, model);
+ }
+
+ protected void createBeanClassTextWithButton(Composite composite, FormToolkit toolkit,
+ final IItemPropertyDescriptor propertyDescriptor, final Object model) {
+ final Resource resource = ((EObject) model).eResource();
+ final Composite classTextComposite = toolkit.createComposite(composite);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ classTextComposite.setLayoutData(gd);
+ GridLayout gl = new GridLayout();
+ gl.marginWidth = 2;
+ gl.numColumns = 2;
+ gl.makeColumnsEqualWidth = false;
+ gl.marginHeight = 2;
+ classTextComposite.setLayout(gl);
+
+ final Text text = toolkit.createText(classTextComposite, "");
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.grabExcessHorizontalSpace = true;
+ text.setLayoutData(gd);
+ Object value = propertyDescriptor.getPropertyValue(model);
+ if (value != null && value instanceof PropertyValueWrapper) {
+ Object editValue = ((PropertyValueWrapper) value).getEditableValue(model);
+ if (editValue != null) {
+ text.setText(editValue.toString());
+ }
+ }
+ text.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ Object value = propertyDescriptor.getPropertyValue(model);
+ if (value != null && value instanceof PropertyValueWrapper) {
+ Object editValue = ((PropertyValueWrapper) value).getEditableValue(model);
+ if (editValue != null) {
+ if (!editValue.equals(text.getText())) {
+ propertyDescriptor.setPropertyValue(model, text.getText());
+ }
+ } else {
+ propertyDescriptor.setPropertyValue(model, text.getText());
+ }
+ } else {
+ propertyDescriptor.setPropertyValue(model, text.getText());
+ }
+ }
+ });
+ Button search = toolkit.createButton(classTextComposite, "Search",
SWT.NONE);
+ search.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+
+ if (resource != null && resource.getURI() != null) {
+ URI uri = resource.getURI();
+ if (uri.isPlatformResource()) {
+ String path = uri.toPlatformString(true);
+ IResource workspaceResource = ResourcesPlugin.getWorkspace().getRoot().findMember(
+ new Path(path));
+ if (workspaceResource != null && workspaceResource instanceof IFile) {
+ IProject project = ((IFile) workspaceResource).getProject();
+ IJavaProject jp = JavaCore.create(project);
+ if (jp != null) {
+ String className = openJavaTypeDialog(classTextComposite.getShell(), jp);
+ if (className != null) {
+ text.setText(className);
+ }
+ return;
+ }
+ }
+ }
+ }
+ MessageDialog.openInformation(classTextComposite.getShell(), "Can't open
dialog",
+ "Can't open java type search dialog.");
+ }
+ });
+ gd = new GridData(GridData.END);
+ search.setLayoutData(gd);
+ toolkit.paintBordersFor(classTextComposite);
+ }
+
+ protected String openJavaTypeDialog(Shell shell, IJavaProject javaProject) {
+ IJavaSearchScope scope = null;
+ String className = null;
+ if (javaProject == null) {
+ scope = JavaSearchScopeFactory.getInstance().createWorkspaceScope(true);
+ } else {
+ String[] requiredProjects = null;
+ try {
+ requiredProjects = javaProject.getRequiredProjectNames();
+ } catch (Exception e) {
+ }
+ if (requiredProjects == null) {
+ requiredProjects = new String[] { javaProject.getElementName() };
+ } else {
+ String[] temp = new String[requiredProjects.length + 1];
+ temp[0] = javaProject.getElementName();
+ System.arraycopy(requiredProjects, 0, temp, 1, requiredProjects.length);
+ requiredProjects = temp;
+ }
+ scope =
JavaSearchScopeFactory.getInstance().createJavaProjectSearchScope(requiredProjects,
true);
+ }
+ SelectionDialog dialog;
+ try {
+ dialog = JavaUI.createTypeDialog(shell,
SmooksConfigurationActivator.getDefault().getWorkbench()
+ .getActiveWorkbenchWindow(), scope,
+ IJavaElementSearchConstants.CONSIDER_CLASSES_AND_INTERFACES, false);
+ dialog.setMessage("Search Java Type");
+ dialog.setTitle("Search Java Type");
+ if (dialog.open() == Window.OK) {
+ Object[] results = dialog.getResult();
+ if (results.length > 0) {
+ Object result = results[0];
+ String packageFullName = JavaModelUtil.getTypeContainerName((IType) result);
+ if (packageFullName == null || packageFullName.length() <= 0) {
+ className = ((IType) result).getElementName();
+ } else {
+ className = packageFullName + "." //$NON-NLS-1$
+ + ((IType) result).getElementName();
+ }
+ return className;
+ }
+ }
+ } catch (Throwable t) {
+ SmooksConfigurationActivator.getDefault().log(t);
+ }
+ return className;
+ }
+}
Property changes on:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain