JBoss Tools SVN: r14693 - in trunk/smooks/plugins: org.jboss.tools.smooks.core/model and 7 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-04-12 06:57:04 -0400 (Sun, 12 Apr 2009)
New Revision: 14693
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.core/model/ext.ecore
trunk/smooks/plugins/org.jboss.tools.smooks.core/model/smooks-graphics-ext.genmodel
trunk/smooks/plugins/org.jboss.tools.smooks.core/model/smooks-graphics-ext.xsd
trunk/smooks/plugins/org.jboss.tools.smooks.core/model/test.xml
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/DocumentRoot.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/InputType.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/ParamType.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/SmooksGraphicsExtFactory.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/SmooksGraphicsExtPackage.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/SmooksGraphicsExtType.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/DocumentRootImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/InputTypeImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/ParamTypeImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/SmooksGraphicsExtFactoryImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/SmooksGraphicsExtPackageImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/SmooksGraphicsExtTypeImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/util/
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/util/SmooksGraphicsExtAdapterFactory.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/util/SmooksGraphicsExtResourceFactoryImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/util/SmooksGraphicsExtResourceImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/util/SmooksGraphicsExtSwitch.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/util/SmooksGraphicsExtXMLProcessor.java
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.xml
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksModelUtils.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/plugin.xml
Log:
Add new feature for smooks-configuration-editor:
1.Add input data path
2.Show editor to select input data and transform the data to "selector"
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/model/ext.ecore
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/model/ext.ecore (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/model/ext.ecore 2009-04-12 10:57:04 UTC (rev 14693)
@@ -0,0 +1,135 @@
+<?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="ext"
+ nsURI="http://www.jboss.org/jbosstools/smooks/smooks-graphics-ext.xsd" nsPrefix="ext">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Smooks Graphics
			Editor Extention File Schema
"/>
+ </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="input" upperBound="-2"
+ eType="#//InputType" volatile="true" transient="true" derived="true" containment="true"
+ resolveProxies="false">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="input"/>
+ <details key="namespace" value="##targetNamespace"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="param" upperBound="-2"
+ eType="#//ParamType" volatile="true" transient="true" derived="true" 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="##targetNamespace"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="smooksGraphicsExt" upperBound="-2"
+ eType="#//SmooksGraphicsExtType" volatile="true" transient="true" derived="true"
+ containment="true" resolveProxies="false">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="smooks-graphics-ext"/>
+ <details key="namespace" value="##targetNamespace"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="InputType">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="name" value="input_._type"/>
+ <details key="kind" value="elementOnly"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="param" upperBound="-1"
+ eType="#//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="##targetNamespace"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="type"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ParamType">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="name" value="param_._type"/>
+ <details key="kind" value="simple"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="name" value=":0"/>
+ <details key="kind" value="simple"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="name"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="type"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="SmooksGraphicsExtType">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="name" value="smooks-graphics-ext_._type"/>
+ <details key="kind" value="elementOnly"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="input" upperBound="-1"
+ eType="#//InputType" containment="true" resolveProxies="false">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="input"/>
+ <details key="namespace" value="##targetNamespace"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="inputType" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="inputType"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="outputType" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="outputType"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+</ecore:EPackage>
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/model/ext.ecore
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/model/smooks-graphics-ext.genmodel
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/model/smooks-graphics-ext.genmodel (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/model/smooks-graphics-ext.genmodel 2009-04-12 10:57:04 UTC (rev 14693)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.jboss.tools.smooks.core/src"
+ modelPluginID="org.jboss.tools.smooks.core" modelName="SmooksGraphicsExtention"
+ importerID="org.eclipse.xsd.ecore.importer" complianceLevel="5.0" copyrightFields="false">
+ <foreignModel>smooks-graphics-ext.xsd</foreignModel>
+ <genPackages prefix="SmooksGraphicsExt" basePackage="org.jboss.tools.smooks.model.graphics"
+ resource="XML" disposableProviderFactory="true" ecorePackage="ext.ecore#/">
+ <genClasses ecoreClass="ext.ecore#//DocumentRoot">
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EAttribute ext.ecore#//DocumentRoot/mixed"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference ext.ecore#//DocumentRoot/xMLNSPrefixMap"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference ext.ecore#//DocumentRoot/xSISchemaLocation"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference ext.ecore#//DocumentRoot/input"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference ext.ecore#//DocumentRoot/param"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference ext.ecore#//DocumentRoot/smooksGraphicsExt"/>
+ </genClasses>
+ <genClasses ecoreClass="ext.ecore#//InputType">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference ext.ecore#//InputType/param"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute ext.ecore#//InputType/type"/>
+ </genClasses>
+ <genClasses ecoreClass="ext.ecore#//ParamType">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute ext.ecore#//ParamType/value"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute ext.ecore#//ParamType/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute ext.ecore#//ParamType/type"/>
+ </genClasses>
+ <genClasses ecoreClass="ext.ecore#//SmooksGraphicsExtType">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference ext.ecore#//SmooksGraphicsExtType/input"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute ext.ecore#//SmooksGraphicsExtType/inputType"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute ext.ecore#//SmooksGraphicsExtType/outputType"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/model/smooks-graphics-ext.genmodel
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/model/smooks-graphics-ext.xsd
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/model/smooks-graphics-ext.xsd (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/model/smooks-graphics-ext.xsd 2009-04-12 10:57:04 UTC (rev 14693)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema
+ targetNamespace="http://www.jboss.org/jbosstools/smooks/smooks-graphics-ext.xsd"
+ elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:ext="http://www.jboss.org/jbosstools/smooks/smooks-graphics-ext.xsd">
+
+
+ <xs:annotation>
+ <xs:documentation xml:lang="en">Smooks Graphics
+ Editor Extention File Schema
+</xs:documentation>
+ </xs:annotation>
+
+ <xs:element name="smooks-graphics-ext">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="ext:input" minOccurs="0" maxOccurs="unbounded">
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="inputType" type="xs:string"></xs:attribute>
+ <xs:attribute name="outputType" type="xs:string"></xs:attribute>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="input">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="ext:param" minOccurs="0"
+ maxOccurs="unbounded">
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="type" type="xs:string"></xs:attribute>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="param">
+
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="type" type="xs:string" />
+ <xs:attribute name="name" type="xs:string">
+ </xs:attribute>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
\ No newline at end of file
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/model/smooks-graphics-ext.xsd
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/model/test.xml
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/model/test.xml (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/model/test.xml 2009-04-12 10:57:04 UTC (rev 14693)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<smooks-graphics-ext
+ xmlns="http://www.jboss.org/jbosstools/smooks/smooks-graphics-ext.xsd">
+ <input type="java">
+ <param name="class">com.test.Clazz</param>
+ </input>
+ <input type="xml">
+ <param name="path">
+ /test/path/test.xml
+ </param>
+ </input>
+</smooks-graphics-ext>
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/model/test.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.xml
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.xml 2009-04-12 10:55:55 UTC (rev 14692)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.xml 2009-04-12 10:57:04 UTC (rev 14693)
@@ -133,5 +133,18 @@
class="org.jboss.tools.smooks.model.fileRouting.util.FileRoutingResourceFactoryImpl"/>
</extension>
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri="http://www.jboss.org/jbosstools/smooks/smooks-graphics-ext.xsd"
+ class="org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtPackage"
+ genModel="model/smooks-graphics-ext.genmodel"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.ecore.extension_parser">
+ <parser
+ type="filerouting"
+ class="org.jboss.tools.smooks.model.graphics.ext.util.SmooksGraphicsExtResourceFactoryImpl"/>
+ </extension>
+
</plugin>
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/DocumentRoot.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/DocumentRoot.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/DocumentRoot.java 2009-04-12 10:57:04 UTC (rev 14693)
@@ -0,0 +1,171 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.graphics.ext;
+
+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.graphics.ext.DocumentRoot#getMixed <em>Mixed</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.graphics.ext.DocumentRoot#getXMLNSPrefixMap <em>XMLNS Prefix Map</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.graphics.ext.DocumentRoot#getXSISchemaLocation <em>XSI Schema Location</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.graphics.ext.DocumentRoot#getInput <em>Input</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.graphics.ext.DocumentRoot#getParam <em>Param</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.graphics.ext.DocumentRoot#getSmooksGraphicsExt <em>Smooks Graphics Ext</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtPackage#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.graphics.ext.SmooksGraphicsExtPackage#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.graphics.ext.SmooksGraphicsExtPackage#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.graphics.ext.SmooksGraphicsExtPackage#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>Input</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Input</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Input</em>' containment reference.
+ * @see #setInput(InputType)
+ * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtPackage#getDocumentRoot_Input()
+ * @model containment="true" upper="-2" transient="true" volatile="true" derived="true"
+ * extendedMetaData="kind='element' name='input' namespace='##targetNamespace'"
+ * @generated
+ */
+ InputType getInput();
+
+ /**
+ * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.DocumentRoot#getInput <em>Input</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Input</em>' containment reference.
+ * @see #getInput()
+ * @generated
+ */
+ void setInput(InputType value);
+
+ /**
+ * Returns the value of the '<em><b>Param</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Param</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Param</em>' containment reference.
+ * @see #setParam(ParamType)
+ * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtPackage#getDocumentRoot_Param()
+ * @model containment="true" upper="-2" transient="true" volatile="true" derived="true"
+ * extendedMetaData="kind='element' name='param' namespace='##targetNamespace'"
+ * @generated
+ */
+ ParamType getParam();
+
+ /**
+ * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.DocumentRoot#getParam <em>Param</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Param</em>' containment reference.
+ * @see #getParam()
+ * @generated
+ */
+ void setParam(ParamType value);
+
+ /**
+ * Returns the value of the '<em><b>Smooks Graphics Ext</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Smooks Graphics Ext</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Smooks Graphics Ext</em>' containment reference.
+ * @see #setSmooksGraphicsExt(SmooksGraphicsExtType)
+ * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtPackage#getDocumentRoot_SmooksGraphicsExt()
+ * @model containment="true" upper="-2" transient="true" volatile="true" derived="true"
+ * extendedMetaData="kind='element' name='smooks-graphics-ext' namespace='##targetNamespace'"
+ * @generated
+ */
+ SmooksGraphicsExtType getSmooksGraphicsExt();
+
+ /**
+ * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.DocumentRoot#getSmooksGraphicsExt <em>Smooks Graphics Ext</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Smooks Graphics Ext</em>' containment reference.
+ * @see #getSmooksGraphicsExt()
+ * @generated
+ */
+ void setSmooksGraphicsExt(SmooksGraphicsExtType value);
+
+} // DocumentRoot
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/DocumentRoot.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/InputType.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/InputType.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/InputType.java 2009-04-12 10:57:04 UTC (rev 14693)
@@ -0,0 +1,75 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.graphics.ext;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Input Type</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.jboss.tools.smooks.model.graphics.ext.InputType#getParam <em>Param</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.graphics.ext.InputType#getType <em>Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtPackage#getInputType()
+ * @model extendedMetaData="name='input_._type' kind='elementOnly'"
+ * @generated
+ */
+public interface InputType extends EObject {
+ /**
+ * Returns the value of the '<em><b>Param</b></em>' containment reference list.
+ * The list contents are of type {@link org.jboss.tools.smooks.model.graphics.ext.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.graphics.ext.SmooksGraphicsExtPackage#getInputType_Param()
+ * @model containment="true"
+ * extendedMetaData="kind='element' name='param' namespace='##targetNamespace'"
+ * @generated
+ */
+ EList<ParamType> getParam();
+
+ /**
+ * Returns the value of the '<em><b>Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Type</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Type</em>' attribute.
+ * @see #setType(String)
+ * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtPackage#getInputType_Type()
+ * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+ * extendedMetaData="kind='attribute' name='type'"
+ * @generated
+ */
+ String getType();
+
+ /**
+ * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.InputType#getType <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Type</em>' attribute.
+ * @see #getType()
+ * @generated
+ */
+ void setType(String value);
+
+} // InputType
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/InputType.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/ParamType.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/ParamType.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/ParamType.java 2009-04-12 10:57:04 UTC (rev 14693)
@@ -0,0 +1,111 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.graphics.ext;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Param Type</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.jboss.tools.smooks.model.graphics.ext.ParamType#getValue <em>Value</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.graphics.ext.ParamType#getName <em>Name</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.graphics.ext.ParamType#getType <em>Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtPackage#getParamType()
+ * @model extendedMetaData="name='param_._type' kind='simple'"
+ * @generated
+ */
+public interface ParamType extends EObject {
+ /**
+ * Returns the value of the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Value</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Value</em>' attribute.
+ * @see #setValue(String)
+ * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtPackage#getParamType_Value()
+ * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+ * extendedMetaData="name=':0' kind='simple'"
+ * @generated
+ */
+ String getValue();
+
+ /**
+ * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.ParamType#getValue <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Value</em>' attribute.
+ * @see #getValue()
+ * @generated
+ */
+ void setValue(String value);
+
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtPackage#getParamType_Name()
+ * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+ * extendedMetaData="kind='attribute' name='name'"
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.ParamType#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Type</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Type</em>' attribute.
+ * @see #setType(String)
+ * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtPackage#getParamType_Type()
+ * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+ * extendedMetaData="kind='attribute' name='type'"
+ * @generated
+ */
+ String getType();
+
+ /**
+ * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.ParamType#getType <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Type</em>' attribute.
+ * @see #getType()
+ * @generated
+ */
+ void setType(String value);
+
+} // ParamType
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/ParamType.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/SmooksGraphicsExtFactory.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/SmooksGraphicsExtFactory.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/SmooksGraphicsExtFactory.java 2009-04-12 10:57:04 UTC (rev 14693)
@@ -0,0 +1,73 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.graphics.ext;
+
+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.graphics.ext.SmooksGraphicsExtPackage
+ * @generated
+ */
+public interface SmooksGraphicsExtFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ SmooksGraphicsExtFactory eINSTANCE = org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtFactoryImpl.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>Input Type</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Input Type</em>'.
+ * @generated
+ */
+ InputType createInputType();
+
+ /**
+ * Returns a new object of class '<em>Param Type</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Param Type</em>'.
+ * @generated
+ */
+ ParamType createParamType();
+
+ /**
+ * Returns a new object of class '<em>Type</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Type</em>'.
+ * @generated
+ */
+ SmooksGraphicsExtType createSmooksGraphicsExtType();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ SmooksGraphicsExtPackage getSmooksGraphicsExtPackage();
+
+} //SmooksGraphicsExtFactory
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/SmooksGraphicsExtFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/SmooksGraphicsExtPackage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/SmooksGraphicsExtPackage.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/SmooksGraphicsExtPackage.java 2009-04-12 10:57:04 UTC (rev 14693)
@@ -0,0 +1,640 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.graphics.ext;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * Smooks Graphics
+ * Editor Extention File Schema
+ *
+ * <!-- end-model-doc -->
+ * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface SmooksGraphicsExtPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "ext";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.jboss.org/jbosstools/smooks/smooks-graphics-ext.xsd";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "ext";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ SmooksGraphicsExtPackage eINSTANCE = org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.jboss.tools.smooks.model.graphics.ext.impl.DocumentRootImpl <em>Document Root</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.jboss.tools.smooks.model.graphics.ext.impl.DocumentRootImpl
+ * @see org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtPackageImpl#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>Input</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOCUMENT_ROOT__INPUT = 3;
+
+ /**
+ * The feature id for the '<em><b>Param</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOCUMENT_ROOT__PARAM = 4;
+
+ /**
+ * The feature id for the '<em><b>Smooks Graphics Ext</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOCUMENT_ROOT__SMOOKS_GRAPHICS_EXT = 5;
+
+ /**
+ * 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 = 6;
+
+ /**
+ * The meta object id for the '{@link org.jboss.tools.smooks.model.graphics.ext.impl.InputTypeImpl <em>Input Type</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.jboss.tools.smooks.model.graphics.ext.impl.InputTypeImpl
+ * @see org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtPackageImpl#getInputType()
+ * @generated
+ */
+ int INPUT_TYPE = 1;
+
+ /**
+ * The feature id for the '<em><b>Param</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INPUT_TYPE__PARAM = 0;
+
+ /**
+ * The feature id for the '<em><b>Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INPUT_TYPE__TYPE = 1;
+
+ /**
+ * The number of structural features of the '<em>Input Type</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INPUT_TYPE_FEATURE_COUNT = 2;
+
+ /**
+ * The meta object id for the '{@link org.jboss.tools.smooks.model.graphics.ext.impl.ParamTypeImpl <em>Param Type</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.jboss.tools.smooks.model.graphics.ext.impl.ParamTypeImpl
+ * @see org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtPackageImpl#getParamType()
+ * @generated
+ */
+ int PARAM_TYPE = 2;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PARAM_TYPE__VALUE = 0;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PARAM_TYPE__NAME = 1;
+
+ /**
+ * The feature id for the '<em><b>Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PARAM_TYPE__TYPE = 2;
+
+ /**
+ * The number of structural features of the '<em>Param Type</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PARAM_TYPE_FEATURE_COUNT = 3;
+
+ /**
+ * The meta object id for the '{@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtTypeImpl <em>Type</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtTypeImpl
+ * @see org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtPackageImpl#getSmooksGraphicsExtType()
+ * @generated
+ */
+ int SMOOKS_GRAPHICS_EXT_TYPE = 3;
+
+ /**
+ * The feature id for the '<em><b>Input</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SMOOKS_GRAPHICS_EXT_TYPE__INPUT = 0;
+
+ /**
+ * The feature id for the '<em><b>Input Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SMOOKS_GRAPHICS_EXT_TYPE__INPUT_TYPE = 1;
+
+ /**
+ * The feature id for the '<em><b>Output Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SMOOKS_GRAPHICS_EXT_TYPE__OUTPUT_TYPE = 2;
+
+ /**
+ * The number of structural features of the '<em>Type</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SMOOKS_GRAPHICS_EXT_TYPE_FEATURE_COUNT = 3;
+
+
+ /**
+ * Returns the meta object for class '{@link org.jboss.tools.smooks.model.graphics.ext.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.graphics.ext.DocumentRoot
+ * @generated
+ */
+ EClass getDocumentRoot();
+
+ /**
+ * Returns the meta object for the attribute list '{@link org.jboss.tools.smooks.model.graphics.ext.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.graphics.ext.DocumentRoot#getMixed()
+ * @see #getDocumentRoot()
+ * @generated
+ */
+ EAttribute getDocumentRoot_Mixed();
+
+ /**
+ * Returns the meta object for the map '{@link org.jboss.tools.smooks.model.graphics.ext.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.graphics.ext.DocumentRoot#getXMLNSPrefixMap()
+ * @see #getDocumentRoot()
+ * @generated
+ */
+ EReference getDocumentRoot_XMLNSPrefixMap();
+
+ /**
+ * Returns the meta object for the map '{@link org.jboss.tools.smooks.model.graphics.ext.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.graphics.ext.DocumentRoot#getXSISchemaLocation()
+ * @see #getDocumentRoot()
+ * @generated
+ */
+ EReference getDocumentRoot_XSISchemaLocation();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks.model.graphics.ext.DocumentRoot#getInput <em>Input</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Input</em>'.
+ * @see org.jboss.tools.smooks.model.graphics.ext.DocumentRoot#getInput()
+ * @see #getDocumentRoot()
+ * @generated
+ */
+ EReference getDocumentRoot_Input();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks.model.graphics.ext.DocumentRoot#getParam <em>Param</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Param</em>'.
+ * @see org.jboss.tools.smooks.model.graphics.ext.DocumentRoot#getParam()
+ * @see #getDocumentRoot()
+ * @generated
+ */
+ EReference getDocumentRoot_Param();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks.model.graphics.ext.DocumentRoot#getSmooksGraphicsExt <em>Smooks Graphics Ext</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Smooks Graphics Ext</em>'.
+ * @see org.jboss.tools.smooks.model.graphics.ext.DocumentRoot#getSmooksGraphicsExt()
+ * @see #getDocumentRoot()
+ * @generated
+ */
+ EReference getDocumentRoot_SmooksGraphicsExt();
+
+ /**
+ * Returns the meta object for class '{@link org.jboss.tools.smooks.model.graphics.ext.InputType <em>Input Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Input Type</em>'.
+ * @see org.jboss.tools.smooks.model.graphics.ext.InputType
+ * @generated
+ */
+ EClass getInputType();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.jboss.tools.smooks.model.graphics.ext.InputType#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.graphics.ext.InputType#getParam()
+ * @see #getInputType()
+ * @generated
+ */
+ EReference getInputType_Param();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.InputType#getType <em>Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Type</em>'.
+ * @see org.jboss.tools.smooks.model.graphics.ext.InputType#getType()
+ * @see #getInputType()
+ * @generated
+ */
+ EAttribute getInputType_Type();
+
+ /**
+ * Returns the meta object for class '{@link org.jboss.tools.smooks.model.graphics.ext.ParamType <em>Param Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Param Type</em>'.
+ * @see org.jboss.tools.smooks.model.graphics.ext.ParamType
+ * @generated
+ */
+ EClass getParamType();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.ParamType#getValue <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Value</em>'.
+ * @see org.jboss.tools.smooks.model.graphics.ext.ParamType#getValue()
+ * @see #getParamType()
+ * @generated
+ */
+ EAttribute getParamType_Value();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.ParamType#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.jboss.tools.smooks.model.graphics.ext.ParamType#getName()
+ * @see #getParamType()
+ * @generated
+ */
+ EAttribute getParamType_Name();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.ParamType#getType <em>Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Type</em>'.
+ * @see org.jboss.tools.smooks.model.graphics.ext.ParamType#getType()
+ * @see #getParamType()
+ * @generated
+ */
+ EAttribute getParamType_Type();
+
+ /**
+ * Returns the meta object for class '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType <em>Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Type</em>'.
+ * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType
+ * @generated
+ */
+ EClass getSmooksGraphicsExtType();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getInput <em>Input</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Input</em>'.
+ * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getInput()
+ * @see #getSmooksGraphicsExtType()
+ * @generated
+ */
+ EReference getSmooksGraphicsExtType_Input();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getInputType <em>Input Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Input Type</em>'.
+ * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getInputType()
+ * @see #getSmooksGraphicsExtType()
+ * @generated
+ */
+ EAttribute getSmooksGraphicsExtType_InputType();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getOutputType <em>Output Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Output Type</em>'.
+ * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getOutputType()
+ * @see #getSmooksGraphicsExtType()
+ * @generated
+ */
+ EAttribute getSmooksGraphicsExtType_OutputType();
+
+ /**
+ * 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
+ */
+ SmooksGraphicsExtFactory getSmooksGraphicsExtFactory();
+
+ /**
+ * <!-- 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.graphics.ext.impl.DocumentRootImpl <em>Document Root</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.jboss.tools.smooks.model.graphics.ext.impl.DocumentRootImpl
+ * @see org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtPackageImpl#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>Input</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DOCUMENT_ROOT__INPUT = eINSTANCE.getDocumentRoot_Input();
+
+ /**
+ * The meta object literal for the '<em><b>Param</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DOCUMENT_ROOT__PARAM = eINSTANCE.getDocumentRoot_Param();
+
+ /**
+ * The meta object literal for the '<em><b>Smooks Graphics Ext</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DOCUMENT_ROOT__SMOOKS_GRAPHICS_EXT = eINSTANCE.getDocumentRoot_SmooksGraphicsExt();
+
+ /**
+ * The meta object literal for the '{@link org.jboss.tools.smooks.model.graphics.ext.impl.InputTypeImpl <em>Input Type</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.jboss.tools.smooks.model.graphics.ext.impl.InputTypeImpl
+ * @see org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtPackageImpl#getInputType()
+ * @generated
+ */
+ EClass INPUT_TYPE = eINSTANCE.getInputType();
+
+ /**
+ * The meta object literal for the '<em><b>Param</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference INPUT_TYPE__PARAM = eINSTANCE.getInputType_Param();
+
+ /**
+ * The meta object literal for the '<em><b>Type</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute INPUT_TYPE__TYPE = eINSTANCE.getInputType_Type();
+
+ /**
+ * The meta object literal for the '{@link org.jboss.tools.smooks.model.graphics.ext.impl.ParamTypeImpl <em>Param Type</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.jboss.tools.smooks.model.graphics.ext.impl.ParamTypeImpl
+ * @see org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtPackageImpl#getParamType()
+ * @generated
+ */
+ EClass PARAM_TYPE = eINSTANCE.getParamType();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PARAM_TYPE__VALUE = eINSTANCE.getParamType_Value();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PARAM_TYPE__NAME = eINSTANCE.getParamType_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Type</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PARAM_TYPE__TYPE = eINSTANCE.getParamType_Type();
+
+ /**
+ * The meta object literal for the '{@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtTypeImpl <em>Type</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtTypeImpl
+ * @see org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtPackageImpl#getSmooksGraphicsExtType()
+ * @generated
+ */
+ EClass SMOOKS_GRAPHICS_EXT_TYPE = eINSTANCE.getSmooksGraphicsExtType();
+
+ /**
+ * The meta object literal for the '<em><b>Input</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference SMOOKS_GRAPHICS_EXT_TYPE__INPUT = eINSTANCE.getSmooksGraphicsExtType_Input();
+
+ /**
+ * The meta object literal for the '<em><b>Input Type</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute SMOOKS_GRAPHICS_EXT_TYPE__INPUT_TYPE = eINSTANCE.getSmooksGraphicsExtType_InputType();
+
+ /**
+ * The meta object literal for the '<em><b>Output Type</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute SMOOKS_GRAPHICS_EXT_TYPE__OUTPUT_TYPE = eINSTANCE.getSmooksGraphicsExtType_OutputType();
+
+ }
+
+} //SmooksGraphicsExtPackage
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/SmooksGraphicsExtPackage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/SmooksGraphicsExtType.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/SmooksGraphicsExtType.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/SmooksGraphicsExtType.java 2009-04-12 10:57:04 UTC (rev 14693)
@@ -0,0 +1,103 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.graphics.ext;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getInput <em>Input</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getInputType <em>Input Type</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getOutputType <em>Output Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtPackage#getSmooksGraphicsExtType()
+ * @model extendedMetaData="name='smooks-graphics-ext_._type' kind='elementOnly'"
+ * @generated
+ */
+public interface SmooksGraphicsExtType extends EObject {
+ /**
+ * Returns the value of the '<em><b>Input</b></em>' containment reference list.
+ * The list contents are of type {@link org.jboss.tools.smooks.model.graphics.ext.InputType}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Input</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>Input</em>' containment reference list.
+ * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtPackage#getSmooksGraphicsExtType_Input()
+ * @model containment="true"
+ * extendedMetaData="kind='element' name='input' namespace='##targetNamespace'"
+ * @generated
+ */
+ EList<InputType> getInput();
+
+ /**
+ * Returns the value of the '<em><b>Input Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Input Type</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Input Type</em>' attribute.
+ * @see #setInputType(String)
+ * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtPackage#getSmooksGraphicsExtType_InputType()
+ * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+ * extendedMetaData="kind='attribute' name='inputType'"
+ * @generated
+ */
+ String getInputType();
+
+ /**
+ * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getInputType <em>Input Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Input Type</em>' attribute.
+ * @see #getInputType()
+ * @generated
+ */
+ void setInputType(String value);
+
+ /**
+ * Returns the value of the '<em><b>Output Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Output Type</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Output Type</em>' attribute.
+ * @see #setOutputType(String)
+ * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtPackage#getSmooksGraphicsExtType_OutputType()
+ * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+ * extendedMetaData="kind='attribute' name='outputType'"
+ * @generated
+ */
+ String getOutputType();
+
+ /**
+ * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getOutputType <em>Output Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Output Type</em>' attribute.
+ * @see #getOutputType()
+ * @generated
+ */
+ void setOutputType(String value);
+
+} // SmooksGraphicsExtType
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/SmooksGraphicsExtType.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/DocumentRootImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/DocumentRootImpl.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/DocumentRootImpl.java 2009-04-12 10:57:04 UTC (rev 14693)
@@ -0,0 +1,368 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.graphics.ext.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.graphics.ext.DocumentRoot;
+import org.jboss.tools.smooks.model.graphics.ext.InputType;
+import org.jboss.tools.smooks.model.graphics.ext.ParamType;
+import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtPackage;
+import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
+
+/**
+ * <!-- 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.graphics.ext.impl.DocumentRootImpl#getMixed <em>Mixed</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.graphics.ext.impl.DocumentRootImpl#getXMLNSPrefixMap <em>XMLNS Prefix Map</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.graphics.ext.impl.DocumentRootImpl#getXSISchemaLocation <em>XSI Schema Location</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.graphics.ext.impl.DocumentRootImpl#getInput <em>Input</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.graphics.ext.impl.DocumentRootImpl#getParam <em>Param</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.graphics.ext.impl.DocumentRootImpl#getSmooksGraphicsExt <em>Smooks Graphics Ext</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 SmooksGraphicsExtPackage.Literals.DOCUMENT_ROOT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FeatureMap getMixed() {
+ if (mixed == null) {
+ mixed = new BasicFeatureMap(this, SmooksGraphicsExtPackage.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, SmooksGraphicsExtPackage.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, SmooksGraphicsExtPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
+ }
+ return xSISchemaLocation;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public InputType getInput() {
+ return (InputType)getMixed().get(SmooksGraphicsExtPackage.Literals.DOCUMENT_ROOT__INPUT, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetInput(InputType newInput, NotificationChain msgs) {
+ return ((FeatureMap.Internal)getMixed()).basicAdd(SmooksGraphicsExtPackage.Literals.DOCUMENT_ROOT__INPUT, newInput, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setInput(InputType newInput) {
+ ((FeatureMap.Internal)getMixed()).set(SmooksGraphicsExtPackage.Literals.DOCUMENT_ROOT__INPUT, newInput);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ParamType getParam() {
+ return (ParamType)getMixed().get(SmooksGraphicsExtPackage.Literals.DOCUMENT_ROOT__PARAM, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetParam(ParamType newParam, NotificationChain msgs) {
+ return ((FeatureMap.Internal)getMixed()).basicAdd(SmooksGraphicsExtPackage.Literals.DOCUMENT_ROOT__PARAM, newParam, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParam(ParamType newParam) {
+ ((FeatureMap.Internal)getMixed()).set(SmooksGraphicsExtPackage.Literals.DOCUMENT_ROOT__PARAM, newParam);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SmooksGraphicsExtType getSmooksGraphicsExt() {
+ return (SmooksGraphicsExtType)getMixed().get(SmooksGraphicsExtPackage.Literals.DOCUMENT_ROOT__SMOOKS_GRAPHICS_EXT, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetSmooksGraphicsExt(SmooksGraphicsExtType newSmooksGraphicsExt, NotificationChain msgs) {
+ return ((FeatureMap.Internal)getMixed()).basicAdd(SmooksGraphicsExtPackage.Literals.DOCUMENT_ROOT__SMOOKS_GRAPHICS_EXT, newSmooksGraphicsExt, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSmooksGraphicsExt(SmooksGraphicsExtType newSmooksGraphicsExt) {
+ ((FeatureMap.Internal)getMixed()).set(SmooksGraphicsExtPackage.Literals.DOCUMENT_ROOT__SMOOKS_GRAPHICS_EXT, newSmooksGraphicsExt);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__MIXED:
+ return ((InternalEList<?>)getMixed()).basicRemove(otherEnd, msgs);
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ return ((InternalEList<?>)getXMLNSPrefixMap()).basicRemove(otherEnd, msgs);
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ return ((InternalEList<?>)getXSISchemaLocation()).basicRemove(otherEnd, msgs);
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__INPUT:
+ return basicSetInput(null, msgs);
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__PARAM:
+ return basicSetParam(null, msgs);
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__SMOOKS_GRAPHICS_EXT:
+ return basicSetSmooksGraphicsExt(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 SmooksGraphicsExtPackage.DOCUMENT_ROOT__MIXED:
+ if (coreType) return getMixed();
+ return ((FeatureMap.Internal)getMixed()).getWrapper();
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ if (coreType) return getXMLNSPrefixMap();
+ else return getXMLNSPrefixMap().map();
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ if (coreType) return getXSISchemaLocation();
+ else return getXSISchemaLocation().map();
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__INPUT:
+ return getInput();
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__PARAM:
+ return getParam();
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__SMOOKS_GRAPHICS_EXT:
+ return getSmooksGraphicsExt();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__MIXED:
+ ((FeatureMap.Internal)getMixed()).set(newValue);
+ return;
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ ((EStructuralFeature.Setting)getXMLNSPrefixMap()).set(newValue);
+ return;
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ ((EStructuralFeature.Setting)getXSISchemaLocation()).set(newValue);
+ return;
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__INPUT:
+ setInput((InputType)newValue);
+ return;
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__PARAM:
+ setParam((ParamType)newValue);
+ return;
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__SMOOKS_GRAPHICS_EXT:
+ setSmooksGraphicsExt((SmooksGraphicsExtType)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__MIXED:
+ getMixed().clear();
+ return;
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ getXMLNSPrefixMap().clear();
+ return;
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ getXSISchemaLocation().clear();
+ return;
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__INPUT:
+ setInput((InputType)null);
+ return;
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__PARAM:
+ setParam((ParamType)null);
+ return;
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__SMOOKS_GRAPHICS_EXT:
+ setSmooksGraphicsExt((SmooksGraphicsExtType)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__MIXED:
+ return mixed != null && !mixed.isEmpty();
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ return xMLNSPrefixMap != null && !xMLNSPrefixMap.isEmpty();
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ return xSISchemaLocation != null && !xSISchemaLocation.isEmpty();
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__INPUT:
+ return getInput() != null;
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__PARAM:
+ return getParam() != null;
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT__SMOOKS_GRAPHICS_EXT:
+ return getSmooksGraphicsExt() != 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: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/DocumentRootImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/InputTypeImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/InputTypeImpl.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/InputTypeImpl.java 2009-04-12 10:57:04 UTC (rev 14693)
@@ -0,0 +1,225 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.graphics.ext.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.jboss.tools.smooks.model.graphics.ext.InputType;
+import org.jboss.tools.smooks.model.graphics.ext.ParamType;
+import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Input Type</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.jboss.tools.smooks.model.graphics.ext.impl.InputTypeImpl#getParam <em>Param</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.graphics.ext.impl.InputTypeImpl#getType <em>Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class InputTypeImpl extends EObjectImpl implements InputType {
+ /**
+ * 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 #getType() <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getType()
+ * @generated
+ * @ordered
+ */
+ protected static final String TYPE_EDEFAULT = null;
+ /**
+ * The cached value of the '{@link #getType() <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getType()
+ * @generated
+ * @ordered
+ */
+ protected String type = TYPE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected InputTypeImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return SmooksGraphicsExtPackage.Literals.INPUT_TYPE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ParamType> getParam() {
+ if (param == null) {
+ param = new EObjectContainmentEList<ParamType>(ParamType.class, this, SmooksGraphicsExtPackage.INPUT_TYPE__PARAM);
+ }
+ return param;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setType(String newType) {
+ String oldType = type;
+ type = newType;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, SmooksGraphicsExtPackage.INPUT_TYPE__TYPE, oldType, type));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case SmooksGraphicsExtPackage.INPUT_TYPE__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 SmooksGraphicsExtPackage.INPUT_TYPE__PARAM:
+ return getParam();
+ case SmooksGraphicsExtPackage.INPUT_TYPE__TYPE:
+ return getType();
+ }
+ 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 SmooksGraphicsExtPackage.INPUT_TYPE__PARAM:
+ getParam().clear();
+ getParam().addAll((Collection<? extends ParamType>)newValue);
+ return;
+ case SmooksGraphicsExtPackage.INPUT_TYPE__TYPE:
+ setType((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case SmooksGraphicsExtPackage.INPUT_TYPE__PARAM:
+ getParam().clear();
+ return;
+ case SmooksGraphicsExtPackage.INPUT_TYPE__TYPE:
+ setType(TYPE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case SmooksGraphicsExtPackage.INPUT_TYPE__PARAM:
+ return param != null && !param.isEmpty();
+ case SmooksGraphicsExtPackage.INPUT_TYPE__TYPE:
+ return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type);
+ }
+ 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(" (type: ");
+ result.append(type);
+ result.append(')');
+ return result.toString();
+ }
+
+} //InputTypeImpl
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/InputTypeImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/ParamTypeImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/ParamTypeImpl.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/ParamTypeImpl.java 2009-04-12 10:57:04 UTC (rev 14693)
@@ -0,0 +1,275 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.graphics.ext.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.jboss.tools.smooks.model.graphics.ext.ParamType;
+import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Param Type</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.jboss.tools.smooks.model.graphics.ext.impl.ParamTypeImpl#getValue <em>Value</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.graphics.ext.impl.ParamTypeImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.graphics.ext.impl.ParamTypeImpl#getType <em>Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ParamTypeImpl extends EObjectImpl implements ParamType {
+ /**
+ * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected static final String VALUE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected String value = VALUE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getType() <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getType()
+ * @generated
+ * @ordered
+ */
+ protected static final String TYPE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getType() <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getType()
+ * @generated
+ * @ordered
+ */
+ protected String type = TYPE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ParamTypeImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return SmooksGraphicsExtPackage.Literals.PARAM_TYPE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setValue(String newValue) {
+ String oldValue = value;
+ value = newValue;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, SmooksGraphicsExtPackage.PARAM_TYPE__VALUE, oldValue, value));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, SmooksGraphicsExtPackage.PARAM_TYPE__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setType(String newType) {
+ String oldType = type;
+ type = newType;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, SmooksGraphicsExtPackage.PARAM_TYPE__TYPE, oldType, type));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case SmooksGraphicsExtPackage.PARAM_TYPE__VALUE:
+ return getValue();
+ case SmooksGraphicsExtPackage.PARAM_TYPE__NAME:
+ return getName();
+ case SmooksGraphicsExtPackage.PARAM_TYPE__TYPE:
+ return getType();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case SmooksGraphicsExtPackage.PARAM_TYPE__VALUE:
+ setValue((String)newValue);
+ return;
+ case SmooksGraphicsExtPackage.PARAM_TYPE__NAME:
+ setName((String)newValue);
+ return;
+ case SmooksGraphicsExtPackage.PARAM_TYPE__TYPE:
+ setType((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case SmooksGraphicsExtPackage.PARAM_TYPE__VALUE:
+ setValue(VALUE_EDEFAULT);
+ return;
+ case SmooksGraphicsExtPackage.PARAM_TYPE__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case SmooksGraphicsExtPackage.PARAM_TYPE__TYPE:
+ setType(TYPE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case SmooksGraphicsExtPackage.PARAM_TYPE__VALUE:
+ return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+ case SmooksGraphicsExtPackage.PARAM_TYPE__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case SmooksGraphicsExtPackage.PARAM_TYPE__TYPE:
+ return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type);
+ }
+ 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(" (value: ");
+ result.append(value);
+ result.append(", name: ");
+ result.append(name);
+ result.append(", type: ");
+ result.append(type);
+ result.append(')');
+ return result.toString();
+ }
+
+} //ParamTypeImpl
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/ParamTypeImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/SmooksGraphicsExtFactoryImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/SmooksGraphicsExtFactoryImpl.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/SmooksGraphicsExtFactoryImpl.java 2009-04-12 10:57:04 UTC (rev 14693)
@@ -0,0 +1,132 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.graphics.ext.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.graphics.ext.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SmooksGraphicsExtFactoryImpl extends EFactoryImpl implements SmooksGraphicsExtFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static SmooksGraphicsExtFactory init() {
+ try {
+ SmooksGraphicsExtFactory theSmooksGraphicsExtFactory = (SmooksGraphicsExtFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.jboss.org/jbosstools/smooks/smooks-graphics-ext.xsd");
+ if (theSmooksGraphicsExtFactory != null) {
+ return theSmooksGraphicsExtFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new SmooksGraphicsExtFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SmooksGraphicsExtFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case SmooksGraphicsExtPackage.DOCUMENT_ROOT: return createDocumentRoot();
+ case SmooksGraphicsExtPackage.INPUT_TYPE: return createInputType();
+ case SmooksGraphicsExtPackage.PARAM_TYPE: return createParamType();
+ case SmooksGraphicsExtPackage.SMOOKS_GRAPHICS_EXT_TYPE: return createSmooksGraphicsExtType();
+ 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 InputType createInputType() {
+ InputTypeImpl inputType = new InputTypeImpl();
+ return inputType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ParamType createParamType() {
+ ParamTypeImpl paramType = new ParamTypeImpl();
+ return paramType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SmooksGraphicsExtType createSmooksGraphicsExtType() {
+ SmooksGraphicsExtTypeImpl smooksGraphicsExtType = new SmooksGraphicsExtTypeImpl();
+ return smooksGraphicsExtType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SmooksGraphicsExtPackage getSmooksGraphicsExtPackage() {
+ return (SmooksGraphicsExtPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static SmooksGraphicsExtPackage getPackage() {
+ return SmooksGraphicsExtPackage.eINSTANCE;
+ }
+
+} //SmooksGraphicsExtFactoryImpl
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/SmooksGraphicsExtFactoryImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/SmooksGraphicsExtPackageImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/SmooksGraphicsExtPackageImpl.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/SmooksGraphicsExtPackageImpl.java 2009-04-12 10:57:04 UTC (rev 14693)
@@ -0,0 +1,548 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.graphics.ext.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.graphics.ext.DocumentRoot;
+import org.jboss.tools.smooks.model.graphics.ext.InputType;
+import org.jboss.tools.smooks.model.graphics.ext.ParamType;
+import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtFactory;
+import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtPackage;
+import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SmooksGraphicsExtPackageImpl extends EPackageImpl implements SmooksGraphicsExtPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass documentRootEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass inputTypeEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass paramTypeEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass smooksGraphicsExtTypeEClass = 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.graphics.ext.SmooksGraphicsExtPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private SmooksGraphicsExtPackageImpl() {
+ super(eNS_URI, SmooksGraphicsExtFactory.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 SmooksGraphicsExtPackage init() {
+ if (isInited) return (SmooksGraphicsExtPackage)EPackage.Registry.INSTANCE.getEPackage(SmooksGraphicsExtPackage.eNS_URI);
+
+ // Obtain or create and register package
+ SmooksGraphicsExtPackageImpl theSmooksGraphicsExtPackage = (SmooksGraphicsExtPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof SmooksGraphicsExtPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new SmooksGraphicsExtPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ XMLTypePackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theSmooksGraphicsExtPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theSmooksGraphicsExtPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theSmooksGraphicsExtPackage.freeze();
+
+ return theSmooksGraphicsExtPackage;
+ }
+
+ /**
+ * <!-- 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_Input() {
+ return (EReference)documentRootEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDocumentRoot_Param() {
+ return (EReference)documentRootEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDocumentRoot_SmooksGraphicsExt() {
+ return (EReference)documentRootEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getInputType() {
+ return inputTypeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getInputType_Param() {
+ return (EReference)inputTypeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getInputType_Type() {
+ return (EAttribute)inputTypeEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getParamType() {
+ return paramTypeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getParamType_Value() {
+ return (EAttribute)paramTypeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getParamType_Name() {
+ return (EAttribute)paramTypeEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getParamType_Type() {
+ return (EAttribute)paramTypeEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getSmooksGraphicsExtType() {
+ return smooksGraphicsExtTypeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getSmooksGraphicsExtType_Input() {
+ return (EReference)smooksGraphicsExtTypeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getSmooksGraphicsExtType_InputType() {
+ return (EAttribute)smooksGraphicsExtTypeEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getSmooksGraphicsExtType_OutputType() {
+ return (EAttribute)smooksGraphicsExtTypeEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SmooksGraphicsExtFactory getSmooksGraphicsExtFactory() {
+ return (SmooksGraphicsExtFactory)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__INPUT);
+ createEReference(documentRootEClass, DOCUMENT_ROOT__PARAM);
+ createEReference(documentRootEClass, DOCUMENT_ROOT__SMOOKS_GRAPHICS_EXT);
+
+ inputTypeEClass = createEClass(INPUT_TYPE);
+ createEReference(inputTypeEClass, INPUT_TYPE__PARAM);
+ createEAttribute(inputTypeEClass, INPUT_TYPE__TYPE);
+
+ paramTypeEClass = createEClass(PARAM_TYPE);
+ createEAttribute(paramTypeEClass, PARAM_TYPE__VALUE);
+ createEAttribute(paramTypeEClass, PARAM_TYPE__NAME);
+ createEAttribute(paramTypeEClass, PARAM_TYPE__TYPE);
+
+ smooksGraphicsExtTypeEClass = createEClass(SMOOKS_GRAPHICS_EXT_TYPE);
+ createEReference(smooksGraphicsExtTypeEClass, SMOOKS_GRAPHICS_EXT_TYPE__INPUT);
+ createEAttribute(smooksGraphicsExtTypeEClass, SMOOKS_GRAPHICS_EXT_TYPE__INPUT_TYPE);
+ createEAttribute(smooksGraphicsExtTypeEClass, SMOOKS_GRAPHICS_EXT_TYPE__OUTPUT_TYPE);
+ }
+
+ /**
+ * <!-- 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
+ XMLTypePackage theXMLTypePackage = (XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+
+ // 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_Input(), this.getInputType(), null, "input", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+ initEReference(getDocumentRoot_Param(), this.getParamType(), null, "param", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+ initEReference(getDocumentRoot_SmooksGraphicsExt(), this.getSmooksGraphicsExtType(), null, "smooksGraphicsExt", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+
+ initEClass(inputTypeEClass, InputType.class, "InputType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getInputType_Param(), this.getParamType(), null, "param", null, 0, -1, InputType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getInputType_Type(), theXMLTypePackage.getString(), "type", null, 0, 1, InputType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(paramTypeEClass, ParamType.class, "ParamType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getParamType_Value(), theXMLTypePackage.getString(), "value", null, 0, 1, ParamType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getParamType_Name(), theXMLTypePackage.getString(), "name", null, 0, 1, ParamType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getParamType_Type(), theXMLTypePackage.getString(), "type", null, 0, 1, ParamType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(smooksGraphicsExtTypeEClass, SmooksGraphicsExtType.class, "SmooksGraphicsExtType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getSmooksGraphicsExtType_Input(), this.getInputType(), null, "input", null, 0, -1, SmooksGraphicsExtType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getSmooksGraphicsExtType_InputType(), theXMLTypePackage.getString(), "inputType", null, 0, 1, SmooksGraphicsExtType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getSmooksGraphicsExtType_OutputType(), theXMLTypePackage.getString(), "outputType", null, 0, 1, SmooksGraphicsExtType.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_Input(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "input",
+ "namespace", "##targetNamespace"
+ });
+ addAnnotation
+ (getDocumentRoot_Param(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "param",
+ "namespace", "##targetNamespace"
+ });
+ addAnnotation
+ (getDocumentRoot_SmooksGraphicsExt(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "smooks-graphics-ext",
+ "namespace", "##targetNamespace"
+ });
+ addAnnotation
+ (inputTypeEClass,
+ source,
+ new String[] {
+ "name", "input_._type",
+ "kind", "elementOnly"
+ });
+ addAnnotation
+ (getInputType_Param(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "param",
+ "namespace", "##targetNamespace"
+ });
+ addAnnotation
+ (getInputType_Type(),
+ source,
+ new String[] {
+ "kind", "attribute",
+ "name", "type"
+ });
+ addAnnotation
+ (paramTypeEClass,
+ source,
+ new String[] {
+ "name", "param_._type",
+ "kind", "simple"
+ });
+ addAnnotation
+ (getParamType_Value(),
+ source,
+ new String[] {
+ "name", ":0",
+ "kind", "simple"
+ });
+ addAnnotation
+ (getParamType_Name(),
+ source,
+ new String[] {
+ "kind", "attribute",
+ "name", "name"
+ });
+ addAnnotation
+ (getParamType_Type(),
+ source,
+ new String[] {
+ "kind", "attribute",
+ "name", "type"
+ });
+ addAnnotation
+ (smooksGraphicsExtTypeEClass,
+ source,
+ new String[] {
+ "name", "smooks-graphics-ext_._type",
+ "kind", "elementOnly"
+ });
+ addAnnotation
+ (getSmooksGraphicsExtType_Input(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "input",
+ "namespace", "##targetNamespace"
+ });
+ addAnnotation
+ (getSmooksGraphicsExtType_InputType(),
+ source,
+ new String[] {
+ "kind", "attribute",
+ "name", "inputType"
+ });
+ addAnnotation
+ (getSmooksGraphicsExtType_OutputType(),
+ source,
+ new String[] {
+ "kind", "attribute",
+ "name", "outputType"
+ });
+ }
+
+} //SmooksGraphicsExtPackageImpl
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/SmooksGraphicsExtPackageImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/SmooksGraphicsExtTypeImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/SmooksGraphicsExtTypeImpl.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/SmooksGraphicsExtTypeImpl.java 2009-04-12 10:57:04 UTC (rev 14693)
@@ -0,0 +1,280 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.graphics.ext.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.jboss.tools.smooks.model.graphics.ext.InputType;
+import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtPackage;
+import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtTypeImpl#getInput <em>Input</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtTypeImpl#getInputType <em>Input Type</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtTypeImpl#getOutputType <em>Output Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class SmooksGraphicsExtTypeImpl extends EObjectImpl implements SmooksGraphicsExtType {
+ /**
+ * The cached value of the '{@link #getInput() <em>Input</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getInput()
+ * @generated
+ * @ordered
+ */
+ protected EList<InputType> input;
+
+ /**
+ * The default value of the '{@link #getInputType() <em>Input Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getInputType()
+ * @generated
+ * @ordered
+ */
+ protected static final String INPUT_TYPE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getInputType() <em>Input Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getInputType()
+ * @generated
+ * @ordered
+ */
+ protected String inputType = INPUT_TYPE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getOutputType() <em>Output Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getOutputType()
+ * @generated
+ * @ordered
+ */
+ protected static final String OUTPUT_TYPE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getOutputType() <em>Output Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getOutputType()
+ * @generated
+ * @ordered
+ */
+ protected String outputType = OUTPUT_TYPE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected SmooksGraphicsExtTypeImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return SmooksGraphicsExtPackage.Literals.SMOOKS_GRAPHICS_EXT_TYPE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<InputType> getInput() {
+ if (input == null) {
+ input = new EObjectContainmentEList<InputType>(InputType.class, this, SmooksGraphicsExtPackage.SMOOKS_GRAPHICS_EXT_TYPE__INPUT);
+ }
+ return input;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getInputType() {
+ return inputType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setInputType(String newInputType) {
+ String oldInputType = inputType;
+ inputType = newInputType;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, SmooksGraphicsExtPackage.SMOOKS_GRAPHICS_EXT_TYPE__INPUT_TYPE, oldInputType, inputType));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getOutputType() {
+ return outputType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setOutputType(String newOutputType) {
+ String oldOutputType = outputType;
+ outputType = newOutputType;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, SmooksGraphicsExtPackage.SMOOKS_GRAPHICS_EXT_TYPE__OUTPUT_TYPE, oldOutputType, outputType));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case SmooksGraphicsExtPackage.SMOOKS_GRAPHICS_EXT_TYPE__INPUT:
+ return ((InternalEList<?>)getInput()).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 SmooksGraphicsExtPackage.SMOOKS_GRAPHICS_EXT_TYPE__INPUT:
+ return getInput();
+ case SmooksGraphicsExtPackage.SMOOKS_GRAPHICS_EXT_TYPE__INPUT_TYPE:
+ return getInputType();
+ case SmooksGraphicsExtPackage.SMOOKS_GRAPHICS_EXT_TYPE__OUTPUT_TYPE:
+ return getOutputType();
+ }
+ 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 SmooksGraphicsExtPackage.SMOOKS_GRAPHICS_EXT_TYPE__INPUT:
+ getInput().clear();
+ getInput().addAll((Collection<? extends InputType>)newValue);
+ return;
+ case SmooksGraphicsExtPackage.SMOOKS_GRAPHICS_EXT_TYPE__INPUT_TYPE:
+ setInputType((String)newValue);
+ return;
+ case SmooksGraphicsExtPackage.SMOOKS_GRAPHICS_EXT_TYPE__OUTPUT_TYPE:
+ setOutputType((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case SmooksGraphicsExtPackage.SMOOKS_GRAPHICS_EXT_TYPE__INPUT:
+ getInput().clear();
+ return;
+ case SmooksGraphicsExtPackage.SMOOKS_GRAPHICS_EXT_TYPE__INPUT_TYPE:
+ setInputType(INPUT_TYPE_EDEFAULT);
+ return;
+ case SmooksGraphicsExtPackage.SMOOKS_GRAPHICS_EXT_TYPE__OUTPUT_TYPE:
+ setOutputType(OUTPUT_TYPE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case SmooksGraphicsExtPackage.SMOOKS_GRAPHICS_EXT_TYPE__INPUT:
+ return input != null && !input.isEmpty();
+ case SmooksGraphicsExtPackage.SMOOKS_GRAPHICS_EXT_TYPE__INPUT_TYPE:
+ return INPUT_TYPE_EDEFAULT == null ? inputType != null : !INPUT_TYPE_EDEFAULT.equals(inputType);
+ case SmooksGraphicsExtPackage.SMOOKS_GRAPHICS_EXT_TYPE__OUTPUT_TYPE:
+ return OUTPUT_TYPE_EDEFAULT == null ? outputType != null : !OUTPUT_TYPE_EDEFAULT.equals(outputType);
+ }
+ 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(" (inputType: ");
+ result.append(inputType);
+ result.append(", outputType: ");
+ result.append(outputType);
+ result.append(')');
+ return result.toString();
+ }
+
+} //SmooksGraphicsExtTypeImpl
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/impl/SmooksGraphicsExtTypeImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/util/SmooksGraphicsExtAdapterFactory.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/util/SmooksGraphicsExtAdapterFactory.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/util/SmooksGraphicsExtAdapterFactory.java 2009-04-12 10:57:04 UTC (rev 14693)
@@ -0,0 +1,178 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.graphics.ext.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.jboss.tools.smooks.model.graphics.ext.*;
+
+/**
+ * <!-- 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.graphics.ext.SmooksGraphicsExtPackage
+ * @generated
+ */
+public class SmooksGraphicsExtAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static SmooksGraphicsExtPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SmooksGraphicsExtAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = SmooksGraphicsExtPackage.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 SmooksGraphicsExtSwitch<Adapter> modelSwitch =
+ new SmooksGraphicsExtSwitch<Adapter>() {
+ @Override
+ public Adapter caseDocumentRoot(DocumentRoot object) {
+ return createDocumentRootAdapter();
+ }
+ @Override
+ public Adapter caseInputType(InputType object) {
+ return createInputTypeAdapter();
+ }
+ @Override
+ public Adapter caseParamType(ParamType object) {
+ return createParamTypeAdapter();
+ }
+ @Override
+ public Adapter caseSmooksGraphicsExtType(SmooksGraphicsExtType object) {
+ return createSmooksGraphicsExtTypeAdapter();
+ }
+ @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.graphics.ext.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.graphics.ext.DocumentRoot
+ * @generated
+ */
+ public Adapter createDocumentRootAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks.model.graphics.ext.InputType <em>Input 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.jboss.tools.smooks.model.graphics.ext.InputType
+ * @generated
+ */
+ public Adapter createInputTypeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks.model.graphics.ext.ParamType <em>Param 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.jboss.tools.smooks.model.graphics.ext.ParamType
+ * @generated
+ */
+ public Adapter createParamTypeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType <em>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.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType
+ * @generated
+ */
+ public Adapter createSmooksGraphicsExtTypeAdapter() {
+ 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;
+ }
+
+} //SmooksGraphicsExtAdapterFactory
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/util/SmooksGraphicsExtAdapterFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/util/SmooksGraphicsExtResourceFactoryImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/util/SmooksGraphicsExtResourceFactoryImpl.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/util/SmooksGraphicsExtResourceFactoryImpl.java 2009-04-12 10:57:04 UTC (rev 14693)
@@ -0,0 +1,56 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.graphics.ext.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.graphics.ext.util.SmooksGraphicsExtResourceImpl
+ * @generated
+ */
+public class SmooksGraphicsExtResourceFactoryImpl extends ResourceFactoryImpl {
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SmooksGraphicsExtResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ XMLResource result = new SmooksGraphicsExtResourceImpl(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;
+ }
+
+} //SmooksGraphicsExtResourceFactoryImpl
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/util/SmooksGraphicsExtResourceFactoryImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/util/SmooksGraphicsExtResourceImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/util/SmooksGraphicsExtResourceImpl.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/util/SmooksGraphicsExtResourceImpl.java 2009-04-12 10:57:04 UTC (rev 14693)
@@ -0,0 +1,32 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.graphics.ext.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.graphics.ext.util.SmooksGraphicsExtResourceFactoryImpl
+ * @generated
+ */
+public class SmooksGraphicsExtResourceImpl extends XMLResourceImpl {
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param uri the URI of the new resource.
+ * @generated
+ */
+ public SmooksGraphicsExtResourceImpl(URI uri) {
+ super(uri);
+ }
+
+} //SmooksGraphicsExtResourceImpl
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/util/SmooksGraphicsExtResourceImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/util/SmooksGraphicsExtSwitch.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/util/SmooksGraphicsExtSwitch.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/util/SmooksGraphicsExtSwitch.java 2009-04-12 10:57:04 UTC (rev 14693)
@@ -0,0 +1,193 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.graphics.ext.util;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.jboss.tools.smooks.model.graphics.ext.*;
+
+/**
+ * <!-- 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.graphics.ext.SmooksGraphicsExtPackage
+ * @generated
+ */
+public class SmooksGraphicsExtSwitch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static SmooksGraphicsExtPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SmooksGraphicsExtSwitch() {
+ if (modelPackage == null) {
+ modelPackage = SmooksGraphicsExtPackage.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 SmooksGraphicsExtPackage.DOCUMENT_ROOT: {
+ DocumentRoot documentRoot = (DocumentRoot)theEObject;
+ T result = caseDocumentRoot(documentRoot);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case SmooksGraphicsExtPackage.INPUT_TYPE: {
+ InputType inputType = (InputType)theEObject;
+ T result = caseInputType(inputType);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case SmooksGraphicsExtPackage.PARAM_TYPE: {
+ ParamType paramType = (ParamType)theEObject;
+ T result = caseParamType(paramType);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case SmooksGraphicsExtPackage.SMOOKS_GRAPHICS_EXT_TYPE: {
+ SmooksGraphicsExtType smooksGraphicsExtType = (SmooksGraphicsExtType)theEObject;
+ T result = caseSmooksGraphicsExtType(smooksGraphicsExtType);
+ 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>Input 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>Input Type</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseInputType(InputType object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Param 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>Param Type</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseParamType(ParamType object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>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>Type</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseSmooksGraphicsExtType(SmooksGraphicsExtType 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;
+ }
+
+} //SmooksGraphicsExtSwitch
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/util/SmooksGraphicsExtSwitch.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/util/SmooksGraphicsExtXMLProcessor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/util/SmooksGraphicsExtXMLProcessor.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/util/SmooksGraphicsExtXMLProcessor.java 2009-04-12 10:57:04 UTC (rev 14693)
@@ -0,0 +1,54 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.graphics.ext.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.graphics.ext.SmooksGraphicsExtPackage;
+
+/**
+ * This class contains helper methods to serialize and deserialize XML documents
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SmooksGraphicsExtXMLProcessor extends XMLProcessor {
+
+ /**
+ * Public constructor to instantiate the helper.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SmooksGraphicsExtXMLProcessor() {
+ super((EPackage.Registry.INSTANCE));
+ SmooksGraphicsExtPackage.eINSTANCE.eClass();
+ }
+
+ /**
+ * Register for "*" and "xml" file extensions the SmooksGraphicsExtResourceFactoryImpl 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 SmooksGraphicsExtResourceFactoryImpl());
+ registrations.put(STAR_EXTENSION, new SmooksGraphicsExtResourceFactoryImpl());
+ }
+ return registrations;
+ }
+
+} //SmooksGraphicsExtXMLProcessor
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/graphics/ext/util/SmooksGraphicsExtXMLProcessor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksModelUtils.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksModelUtils.java 2009-04-12 10:55:55 UTC (rev 14692)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksModelUtils.java 2009-04-12 10:57:04 UTC (rev 14693)
@@ -28,6 +28,9 @@
import org.eclipse.emf.edit.command.CommandParameter;
import org.eclipse.emf.edit.command.RemoveCommand;
import org.eclipse.emf.edit.domain.EditingDomain;
+import org.jboss.tools.smooks.model.graphics.ext.InputType;
+import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtFactory;
+import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
import org.jboss.tools.smooks10.model.smooks.ParamType;
import org.jboss.tools.smooks10.model.smooks.ResourceConfigType;
import org.jboss.tools.smooks10.model.smooks.ResourceType;
@@ -41,6 +44,16 @@
public class SmooksModelUtils {
+ public static final String INPUT_TYPE_JAVA = "java";
+
+ public static final String PARAM_NAME_CLASS = "class";
+
+ public static final String PARAM_NAME_PATH = "path";
+
+ public static final String INPUT_TYPE_XML = "xml";
+
+ public static final String INPUT_TYPE_XSD = "xsd";
+
public static final String TYPE_XSL = "xsl";
public static final String[] TEMPLATE_TYPES = new String[] { "xsl", "ftl" };
@@ -51,34 +64,34 @@
public static final String BINDINGS = "bindings";
- public static EStructuralFeature ATTRIBUTE_PROPERTY = ExtendedMetaData.INSTANCE.demandFeature(
- null, "property", false);
+ public static EStructuralFeature ATTRIBUTE_PROPERTY = ExtendedMetaData.INSTANCE.demandFeature(null,
+ "property", false);
- public static EStructuralFeature ATTRIBUTE_SELECTOR = ExtendedMetaData.INSTANCE.demandFeature(
- null, "selector", false);
+ public static EStructuralFeature ATTRIBUTE_SELECTOR = ExtendedMetaData.INSTANCE.demandFeature(null,
+ "selector", false);
- public static EStructuralFeature ATTRIBUTE_TYPE = ExtendedMetaData.INSTANCE.demandFeature(null,
- "type", false);
+ public static EStructuralFeature ATTRIBUTE_TYPE = ExtendedMetaData.INSTANCE.demandFeature(null, "type",
+ false);
public static EStructuralFeature ELEMENT_BINDING = ExtendedMetaData.INSTANCE.demandFeature(
- "http://www.milyn.org/xsd/smooks-1.0.xsd", "binding", true);
+ "http://www.milyn.org/xsd/smooks-1.0.xsd", "binding", true);
- public static AnyType addBindingTypeToParamType(ParamType param, String property,
- String selector, String type, String uri) {
+ public static AnyType addBindingTypeToParamType(ParamType param, String property, String selector,
+ String type, String uri) {
AnyType binding = createBindingType(property, selector, type, uri);
param.getMixed().add(ELEMENT_BINDING, binding);
return binding;
}
- public static List<Object> getBindingListFromResourceConfigType(
- ResourceConfigType resourceConfig) {
+ public static List<Object> getBindingListFromResourceConfigType(ResourceConfigType resourceConfig) {
List<ParamType> paramList = resourceConfig.getParam();
for (Iterator<ParamType> iterator = paramList.iterator(); iterator.hasNext();) {
ParamType param = iterator.next();
if ("bindings".equals(param.getName())) {
- if (param.eContents().isEmpty()) continue;
+ if (param.eContents().isEmpty())
+ continue;
List<Object> bindingList = (List<Object>) param.getMixed().get(
- SmooksModelUtils.ELEMENT_BINDING, false);
+ SmooksModelUtils.ELEMENT_BINDING, false);
return bindingList;
}
}
@@ -87,17 +100,18 @@
public static boolean isBeanPopulatorResource(ResourceConfigType type) {
ResourceType resource = type.getResource();
- if (resource == null) return false;
+ if (resource == null)
+ return false;
String value = resource.getStringValue();
- if (value != null) value = value.trim();
+ if (value != null)
+ value = value.trim();
if (SmooksModelConstants.BEAN_POPULATOR.equals(value)) {
return true;
}
return false;
}
- public static void setPropertyValueToAnyType(Object value, EStructuralFeature attribute,
- AnyType anyType) {
+ public static void setPropertyValueToAnyType(Object value, EStructuralFeature attribute, AnyType anyType) {
anyType.getAnyAttribute().set(attribute, value);
}
@@ -106,7 +120,8 @@
for (Iterator iterator = bindingList.iterator(); iterator.hasNext();) {
AnyType binding = (AnyType) iterator.next();
String pro = getAttributeValueFromAnyType(binding, ATTRIBUTE_PROPERTY);
- if (pro != null) pro = pro.trim();
+ if (pro != null)
+ pro = pro.trim();
if (property.equals(pro)) {
return binding;
}
@@ -116,21 +131,26 @@
public static boolean isInnerFileContents(ResourceConfigType resourceConfig) {
ResourceType resource = resourceConfig.getResource();
- if (resource == null) return false;
+ if (resource == null)
+ return false;
String type = resource.getType();
- if (type != null) type = type.trim();
+ if (type != null)
+ type = type.trim();
for (int i = 0; i < TEMPLATE_TYPES.length; i++) {
String type1 = TEMPLATE_TYPES[i];
- if (type1.equalsIgnoreCase(type)) return true;
+ if (type1.equalsIgnoreCase(type))
+ return true;
}
return false;
}
public static boolean isDateTypeSelector(ResourceConfigType type) {
ResourceType resource = type.getResource();
- if (resource == null) return false;
+ if (resource == null)
+ return false;
String value = resource.getStringValue();
- if (value != null) value = value.trim();
+ if (value != null)
+ value = value.trim();
for (int i = 0; i < SmooksModelConstants.DECODER_CLASSES.length; i++) {
String decoderClass = SmooksModelConstants.DECODER_CLASSES[i];
if (decoderClass.equals(value)) {
@@ -142,13 +162,15 @@
public static String getTransformType(ResourceConfigType resourceConfig) {
ParamType typeParam = null;
- if (resourceConfig == null) return "";
+ if (resourceConfig == null)
+ return "";
if (isTransformTypeResourceConfig(resourceConfig)) {
List paramList = resourceConfig.getParam();
for (Iterator iterator = paramList.iterator(); iterator.hasNext();) {
ParamType param = (ParamType) iterator.next();
String name = param.getName();
- if (name != null) name = name.trim();
+ if (name != null)
+ name = name.trim();
if (SmooksModelConstants.STREAM_FILTER_TYPE.equals(name)) {
typeParam = param;
break;
@@ -162,7 +184,8 @@
}
public static void setTransformType(ResourceConfigType resourceConfig, String type) {
- if (type == null) type = "";
+ if (type == null)
+ type = "";
if (isTransformTypeResourceConfig(resourceConfig)) {
List paramList = resourceConfig.getParam();
for (Iterator iterator = paramList.iterator(); iterator.hasNext();) {
@@ -193,7 +216,8 @@
public static boolean isTransformTypeResourceConfig(ResourceConfigType resourceConfig) {
String selector = resourceConfig.getSelector();
- if (selector != null) selector = selector.trim();
+ if (selector != null)
+ selector = selector.trim();
if (!SmooksModelConstants.GLOBAL_PARAMETERS.equals(selector)) {
return false;
}
@@ -205,7 +229,8 @@
for (Iterator iterator = paramList.iterator(); iterator.hasNext();) {
ParamType p = (ParamType) iterator.next();
String paramName = p.getName();
- if (paramName != null) paramName = paramName.trim();
+ if (paramName != null)
+ paramName = paramName.trim();
if (SmooksModelConstants.STREAM_FILTER_TYPE.equals(paramName)) {
return true;
}
@@ -214,14 +239,14 @@
}
}
- public static void setParamText(String paramName, String value,
- ResourceConfigType resourceConfigType) {
+ public static void setParamText(String paramName, String value, ResourceConfigType resourceConfigType) {
List<ParamType> list = resourceConfigType.getParam();
ParamType param = null;
for (Iterator<ParamType> iterator = list.iterator(); iterator.hasNext();) {
ParamType paramType = (ParamType) iterator.next();
String n = paramType.getName();
- if (n == null) continue;
+ if (n == null)
+ continue;
n = n.trim();
if (n.equalsIgnoreCase(paramName)) {
param = paramType;
@@ -241,7 +266,8 @@
for (Iterator iterator = plist.iterator(); iterator.hasNext();) {
ParamType p = (ParamType) iterator.next();
String n = p.getName();
- if (n == null) continue;
+ if (n == null)
+ continue;
n = n.trim();
if (paramName.equalsIgnoreCase(n)) {
return getAnyTypeText(p);
@@ -256,8 +282,7 @@
}
public static String getAnyTypeText(AnyType anyType) {
- Object value = anyType.getMixed().get(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
- true);
+ Object value = anyType.getMixed().get(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, true);
if (value != null) {
if (value instanceof List && !((List) value).isEmpty()) {
return ((List) value).get(0).toString().trim();
@@ -268,8 +293,7 @@
}
public static String getAnyTypeCDATA(AnyType anyType) {
- Object value = anyType.getMixed().get(
- XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA, true);
+ Object value = anyType.getMixed().get(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA, true);
if (value != null) {
if (value instanceof List && !((List) value).isEmpty()) {
return ((List) value).get(0).toString().trim();
@@ -279,8 +303,7 @@
return null;
}
- public static AnyType createBindingType(String property, String selector, String type,
- String uri) {
+ public static AnyType createBindingType(String property, String selector, String type, String uri) {
if (uri == null) {
uri = SmooksPackage.eNS_URI;
}
@@ -303,23 +326,21 @@
smooksModel.getMixed().add(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, text);
}
- public static void setTextToSmooksType(EditingDomain editingDomain, AnyType smooksModel,
- String text) {
+ public static void setTextToSmooksType(EditingDomain editingDomain, AnyType smooksModel, String text) {
CompoundCommand ccommand = new CompoundCommand();
List<String> listValue = new ArrayList<String>();
listValue.add(text);
Command addCommand = AddCommand.create(editingDomain, smooksModel,
- XMLTypePackage.Literals.ANY_TYPE__MIXED, FeatureMapUtil.createEntry(
- XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, text));
+ XMLTypePackage.Literals.ANY_TYPE__MIXED, FeatureMapUtil.createEntry(
+ XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, text));
Object removeValue = (smooksModel.getMixed().get(
- XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, true));
+ XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, true));
if (removeValue != null && removeValue instanceof Collection<?>) {
List<Object> rList = new ArrayList<Object>();
- for (Iterator<?> iterator = ((Collection<?>) removeValue).iterator(); iterator
- .hasNext();) {
+ for (Iterator<?> iterator = ((Collection<?>) removeValue).iterator(); iterator.hasNext();) {
Object string = (Object) iterator.next();
- rList.add(FeatureMapUtil.createEntry(
- XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, string));
+ rList.add(FeatureMapUtil.createEntry(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
+ string));
}
Command cc = RemoveCommand.create(editingDomain, smooksModel, null, rList);
if (cc != null && cc.canExecute()) {
@@ -331,24 +352,22 @@
}
editingDomain.getCommandStack().execute(ccommand);
}
-
- public static void setCDATAToSmooksType(EditingDomain editingDomain, AnyType smooksModel,
- String cdata) {
+
+ public static void setCDATAToSmooksType(EditingDomain editingDomain, AnyType smooksModel, String cdata) {
CompoundCommand ccommand = new CompoundCommand();
List<String> listValue = new ArrayList<String>();
listValue.add(cdata);
Command addCommand = AddCommand.create(editingDomain, smooksModel,
- XMLTypePackage.Literals.ANY_TYPE__MIXED, FeatureMapUtil.createEntry(
- XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA, cdata));
+ XMLTypePackage.Literals.ANY_TYPE__MIXED, FeatureMapUtil.createEntry(
+ XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA, cdata));
Object removeValue = (smooksModel.getMixed().get(
- XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA, true));
+ XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA, true));
if (removeValue != null && removeValue instanceof Collection<?>) {
List<Object> rList = new ArrayList<Object>();
- for (Iterator<?> iterator = ((Collection<?>) removeValue).iterator(); iterator
- .hasNext();) {
+ for (Iterator<?> iterator = ((Collection<?>) removeValue).iterator(); iterator.hasNext();) {
Object string = (Object) iterator.next();
- rList.add(FeatureMapUtil.createEntry(
- XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA, string));
+ rList.add(FeatureMapUtil.createEntry(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA,
+ string));
}
Command cc = RemoveCommand.create(editingDomain, smooksModel, null, rList);
if (cc != null && cc.canExecute()) {
@@ -376,16 +395,14 @@
}
public static void cleanTextToSmooksType(AnyType smooksModel) {
- Object obj = smooksModel.getMixed().get(
- XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, true);
+ Object obj = smooksModel.getMixed().get(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, true);
if (obj instanceof List) {
((List) obj).clear();
}
}
public static void cleanCDATAToSmooksType(AnyType smooksModel) {
- Object obj = smooksModel.getMixed().get(
- XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA, true);
+ Object obj = smooksModel.getMixed().get(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA, true);
if (obj instanceof List) {
((List) obj).clear();
}
@@ -393,11 +410,40 @@
public static CommandParameter createTextCommandParamter(Object owner, String value) {
return createChildParameter(owner, XMLTypePackage.Literals.ANY_TYPE__MIXED, FeatureMapUtil
- .createEntry(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, value));
+ .createEntry(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, value));
}
public static CommandParameter createChildParameter(Object owner, Object feature, Object child) {
return new CommandParameter(owner, feature, child);
}
+ public static void addJavaInput(SmooksGraphicsExtType ext, String className) {
+ InputType javaInput = SmooksGraphicsExtFactory.eINSTANCE.createInputType();
+ javaInput.setType(INPUT_TYPE_JAVA);
+ org.jboss.tools.smooks.model.graphics.ext.ParamType p = SmooksGraphicsExtFactory.eINSTANCE
+ .createParamType();
+ p.setName(PARAM_NAME_CLASS);
+ p.setValue(className);
+ javaInput.getParam().add(p);
+ ext.getInput().add(javaInput);
+ }
+
+ public static String getInputPath(InputType input) {
+ List<org.jboss.tools.smooks.model.graphics.ext.ParamType> list = input.getParam();
+ if (INPUT_TYPE_JAVA.equals(input.getType()) || INPUT_TYPE_XML.equals(input.getType())
+ || INPUT_TYPE_XSD.equals(input.getType())) {
+ for (Iterator<?> iterator = list.iterator(); iterator.hasNext();) {
+ org.jboss.tools.smooks.model.graphics.ext.ParamType paramType = (org.jboss.tools.smooks.model.graphics.ext.ParamType) iterator
+ .next();
+ if ("path".equals(paramType.getName())) {
+ String value = paramType.getValue();
+ if (value != null)
+ value = value.trim();
+ return value;
+ }
+ }
+ }
+ return null;
+ }
+
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/plugin.xml
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/plugin.xml 2009-04-12 10:55:55 UTC (rev 14692)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/plugin.xml 2009-04-12 10:57:04 UTC (rev 14693)
@@ -38,5 +38,11 @@
priority="low">
</content-type>
</extension>
+ <extension
+ point="org.eclipse.ui.startup">
+ <startup
+ class="org.jboss.tools.smooks.configuration.editors.SmooksToolsStartup">
+ </startup>
+ </extension>
</plugin>
15 years, 8 months
JBoss Tools SVN: r14692 - in trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration: editors and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-04-12 06:55:55 -0400 (Sun, 12 Apr 2009)
New Revision: 14692
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/CompoundStructuredDataContentProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/CompoundStructuredDataLabelProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/ExtentionInputContentProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/ExtentionInputLabelProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/IXMLStructuredObject.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/InputStructuredDataSelectionDialog.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SelectorAttributes.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksResourceChangeListener.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksToolsStartup.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/StructuredDataSelectionWizardDailog.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/IJavaBeanSelectionListener.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanConfigWizardPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanList.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanModel.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanModelFactory.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanModelLoadComposite.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanContentProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanStrucutredDataWizard.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanlabelProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/BaseViewerInitor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/IStructuredDataSelectionWizard.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/IViewerInitor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/StructuredDataSelectionWizard.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/TransformDataWizardSelectionPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/TransformSelectWizardNode.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/ViewerInitorStore.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksConfigurationActivator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksConstants.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Codegenerator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/GraphicsConstants.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/IPropertyUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigurationFormPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMasterDetailBlock.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksStuffPropertyDetailPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Template.txt
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanWiringUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/PropertiesAndSetterMethodSearchFieldEditorCreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ConditionTypeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ImportTypeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ParamTypeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ResourceConfigTypeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ResourceTypeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/BindToUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/OutputToUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/TemplateUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/XslUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/SmooksConfigurationFileNewWizard.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/SmooksFileContainerSelectionPage.java
Log:
Add new feature for smooks-configuration-editor:
1.Add input data path
2.Show editor to select input data and transform the data to "selector"
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksConfigurationActivator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksConfigurationActivator.java 2009-04-10 16:56:24 UTC (rev 14691)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksConfigurationActivator.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -66,6 +66,37 @@
super.initializeImageRegistry(reg);
reg.put(GraphicsConstants.JAVA_PROPERTY_ICON,
getImageDescriptor(GraphicsConstants.JAVA_PROPERTY_ICON_PATH));
+
+ reg.put(GraphicsConstants.IMAGE_EMPTY, getImageDescriptor(GraphicsConstants.IMAGE_PATH_BLANK));
+ reg.put(GraphicsConstants.IMAGE_ERROR, getImageDescriptor(GraphicsConstants.IMAGE_PATH_ERROR));
+ reg.put(GraphicsConstants.IMAGE_WARNING, getImageDescriptor(GraphicsConstants.IMAGE_PATH_WARNING));
+
+ // regist java images
+ reg.put(GraphicsConstants.IMAGE_JAVA_INTERFACE, imageDescriptorFromPlugin(PLUGIN_ID,
+ GraphicsConstants.IMAGE_JAVA_INTERFACE));
+ reg.put(GraphicsConstants.IMAGE_JAVA_ATTRIBUTE, imageDescriptorFromPlugin(PLUGIN_ID,
+ GraphicsConstants.IMAGE_JAVA_ATTRIBUTE));
+ reg.put(GraphicsConstants.IMAGE_CHECKBOX_CHECK, imageDescriptorFromPlugin(PLUGIN_ID,
+ GraphicsConstants.IMAGE_CHECKBOX_CHECK));
+ reg.put(GraphicsConstants.IMAGE_CHECKBOX_UNCHECK, imageDescriptorFromPlugin(PLUGIN_ID,
+ GraphicsConstants.IMAGE_CHECKBOX_UNCHECK));
+ reg.put(GraphicsConstants.IMAGE_JAVA_OBJECT, imageDescriptorFromPlugin(PLUGIN_ID,
+ "icons/full/obj16/class_obj.gif"));
+ reg.put(GraphicsConstants.IMAGE_JAVA_ARRAY, imageDescriptorFromPlugin(PLUGIN_ID,
+ GraphicsConstants.IMAGE_JAVA_ARRAY));
+ reg.put(GraphicsConstants.IMAGE_JAVA_COLLECTION, imageDescriptorFromPlugin(PLUGIN_ID,
+ GraphicsConstants.IMAGE_JAVA_COLLECTION));
+
+ // for the xml2xml line
+ reg.put(GraphicsConstants.IMAGE_BINDING_LINE, imageDescriptorFromPlugin(PLUGIN_ID,
+ GraphicsConstants.IMAGE_BINDING_LINE));
+
+ reg.put(GraphicsConstants.IMAGE_MAPPING_LINE, imageDescriptorFromPlugin(PLUGIN_ID,
+ GraphicsConstants.IMAGE_MAPPING_LINE));
+ reg.put(GraphicsConstants.IMAGE_XML_ATTRIBUTE, imageDescriptorFromPlugin(PLUGIN_ID,
+ "icons/full/obj16/attribute_obj.gif"));
+ reg.put(GraphicsConstants.IMAGE_XML_ELEMENT, imageDescriptorFromPlugin(PLUGIN_ID,
+ "icons/full/obj16/element_obj.gif"));
}
/**
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksConstants.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksConstants.java 2009-04-10 16:56:24 UTC (rev 14691)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksConstants.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -16,6 +16,17 @@
*/
public class SmooksConstants {
public static final String SMOOKS_EXTENTION_NAME = "xml";
+
+ public static final String SMOOKS_GRAPHICSEXT_EXTENTION_NAME = "ext";
+
+ public static final String SMOOKS_EXTENTION_NAME_WITHDOT = "." + SMOOKS_EXTENTION_NAME;
+
+ public static final String SMOOKS_GRAPHICSEXT_EXTENTION_NAME_WITHDOT = "." + SMOOKS_GRAPHICSEXT_EXTENTION_NAME;
+
+
public static final String VERSION_1_0 = "1.0";
- public static final String VERSION_1_1_1 = "1.1.1";
+
+ public static final String VERSION_1_1 = "1.1";
+
+ public static final String[] SMOOKS_VERSIONS = new String[]{VERSION_1_0,VERSION_1_1};
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Codegenerator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Codegenerator.java 2009-04-10 16:56:24 UTC (rev 14691)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Codegenerator.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -13,7 +13,7 @@
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
-import org.jboss.tools.smooks.model.xsl.XslPackage;
+import org.jboss.tools.smooks.model.smooks.SmooksPackage;
public class Codegenerator {
String basePath = "/home/Dart/Works/eclipse_wtp.3.0.4/eclipse/workspace/jbosstools/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/";
@@ -23,7 +23,7 @@
try {
FileReader reader = new FileReader(
new File(
- "/home/Dart/Works/eclipse_wtp.3.0.4/eclipse/workspace/jbosstools/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Template.txt"));
+ "/home/DartPeng/Work/eclipse/new-smooks-editor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Template.txt"));
BufferedReader r = new BufferedReader(reader);
String line = r.readLine();
while (line != null) {
@@ -43,7 +43,7 @@
public static void main(String[] args) {
Codegenerator g = new Codegenerator();
try {
- g.generateCodes(XslPackage.eINSTANCE);
+ g.generateCodes(SmooksPackage.eINSTANCE);
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
@@ -95,7 +95,7 @@
String allepName = epName + ".eINSTANCE.get" + eClass.getName();
List<EAttribute> alist = eClass.getEAllAttributes();
String attributeMethod = "";
- for (Iterator iterator = alist.iterator(); iterator.hasNext();) {
+ for (Iterator<?> iterator = alist.iterator(); iterator.hasNext();) {
EAttribute attribute = (EAttribute) iterator.next();
String atn = attribute.getName();
String firstC = new String(new char[]{ atn.toCharArray()[0] });
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/CompoundStructuredDataContentProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/CompoundStructuredDataContentProvider.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/CompoundStructuredDataContentProvider.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * 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;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.jboss.tools.smooks.configuration.editors.wizard.IViewerInitor;
+import org.jboss.tools.smooks.configuration.editors.wizard.ViewerInitorStore;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ * <p>
+ * Apr 12, 2009
+ */
+public class CompoundStructuredDataContentProvider implements ITreeContentProvider {
+
+ private List<ITreeContentProvider> contentProviderList = new ArrayList<ITreeContentProvider>();
+
+ public CompoundStructuredDataContentProvider() {
+ Collection<IViewerInitor> lists = ViewerInitorStore.getInstance().getViewerInitorCollection();
+ for (Iterator<IViewerInitor> iterator = lists.iterator(); iterator.hasNext();) {
+ IViewerInitor viewerInitor = (IViewerInitor) iterator.next();
+ contentProviderList.add(viewerInitor.getTreeContentProvider());
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.
+ * Object)
+ */
+ public Object[] getChildren(Object parentElement) {
+ for (Iterator<?> iterator = contentProviderList.iterator(); iterator.hasNext();) {
+ ITreeContentProvider provider = (ITreeContentProvider) iterator.next();
+ Object[] objs = provider.getChildren(parentElement);
+ if (objs == null || objs.length == 0) {
+ continue;
+ }
+ return objs;
+ }
+ return new Object[] {};
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object
+ * )
+ */
+ public Object getParent(Object element) {
+ for (Iterator<?> iterator = contentProviderList.iterator(); iterator.hasNext();) {
+ ITreeContentProvider provider = (ITreeContentProvider) iterator.next();
+ Object parent = provider.getParent(element);
+ if (parent == null) {
+ continue;
+ }
+ return parent;
+ }
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.
+ * Object)
+ */
+ public boolean hasChildren(Object element) {
+ for (Iterator<?> iterator = contentProviderList.iterator(); iterator.hasNext();) {
+ ITreeContentProvider provider = (ITreeContentProvider) iterator.next();
+ boolean parent = provider.hasChildren(element);
+ if (!parent) {
+ continue;
+ }
+ return parent;
+ }
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java
+ * .lang.Object)
+ */
+ public Object[] getElements(Object inputElement) {
+ if(inputElement instanceof List<?>){
+ return ((List<?>)inputElement).toArray();
+ }
+ for (Iterator<?> iterator = contentProviderList.iterator(); iterator.hasNext();) {
+ ITreeContentProvider provider = (ITreeContentProvider) iterator.next();
+ Object[] objs = provider.getElements(inputElement);
+ if (objs == null || objs.length == 0) {
+ continue;
+ }
+ return objs;
+ }
+ return new Object[] {};
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+ public void dispose() {
+ for (Iterator<?> iterator = contentProviderList.iterator(); iterator.hasNext();) {
+ ITreeContentProvider provider = (ITreeContentProvider) iterator.next();
+ provider.dispose();
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface
+ * .viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/CompoundStructuredDataContentProvider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/CompoundStructuredDataLabelProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/CompoundStructuredDataLabelProvider.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/CompoundStructuredDataLabelProvider.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * 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;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.jboss.tools.smooks.configuration.editors.wizard.IViewerInitor;
+import org.jboss.tools.smooks.configuration.editors.wizard.ViewerInitorStore;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)<p>
+ * Apr 12, 2009
+ */
+public class CompoundStructuredDataLabelProvider extends LabelProvider {
+ private List<ILabelProvider> labelProviderList = new ArrayList<ILabelProvider>();
+
+ public CompoundStructuredDataLabelProvider() {
+ Collection<IViewerInitor> lists = ViewerInitorStore.getInstance().getViewerInitorCollection();
+ for (Iterator<IViewerInitor> iterator = lists.iterator(); iterator.hasNext();) {
+ IViewerInitor viewerInitor = (IViewerInitor) iterator.next();
+ labelProviderList.add(viewerInitor.getLabelProvider());
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
+ */
+ @Override
+ public Image getImage(Object element) {
+ for (Iterator<?> iterator = labelProviderList.iterator(); iterator.hasNext();) {
+ ILabelProvider provider = (ILabelProvider) iterator.next();
+ Image img = provider.getImage(element);
+ if (img == null) {
+ continue;
+ }
+ return img;
+ }
+ return super.getImage(element);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+ */
+ @Override
+ public String getText(Object element) {
+ for (Iterator<?> iterator = labelProviderList.iterator(); iterator.hasNext();) {
+ ILabelProvider provider = (ILabelProvider) iterator.next();
+ String text = provider.getText(element);
+ if (text == null || text.length() == 0) {
+ continue;
+ }
+ return text;
+ }
+ return super.getText(element);
+ }
+
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/CompoundStructuredDataLabelProvider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/ExtentionInputContentProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/ExtentionInputContentProvider.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/ExtentionInputContentProvider.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * 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;
+
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)<p>
+ * Apr 12, 2009
+ */
+public class ExtentionInputContentProvider implements IStructuredContentProvider {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+ */
+ public Object[] getElements(Object inputElement) {
+ if(inputElement instanceof SmooksGraphicsExtType){
+ return ((SmooksGraphicsExtType)inputElement).getInput().toArray();
+ }
+ return new Object[]{};
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+ public void dispose() {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/ExtentionInputContentProvider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/ExtentionInputLabelProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/ExtentionInputLabelProvider.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/ExtentionInputLabelProvider.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * 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;
+
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
+import org.jboss.tools.smooks.model.graphics.ext.InputType;
+import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ * <p>
+ * Apr 12, 2009
+ */
+public class ExtentionInputLabelProvider extends LabelProvider implements ITableLabelProvider {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang
+ * .Object, int)
+ */
+ public Image getColumnImage(Object element, int columnIndex) {
+ if (element instanceof InputType) {
+ String type = ((InputType) element).getType();
+ switch (columnIndex) {
+ case 0:
+ if (SmooksModelUtils.INPUT_TYPE_JAVA.equals(type)) {
+ return SmooksConfigurationActivator.getDefault().getImageRegistry().get(
+ GraphicsConstants.IMAGE_JAVA_OBJECT);
+ }
+ if (SmooksModelUtils.INPUT_TYPE_XML.equals(type)) {
+ return SmooksConfigurationActivator.getDefault().getImageRegistry().get(
+ GraphicsConstants.IMAGE_XML_ELEMENT);
+ }
+ }
+ }
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang
+ * .Object, int)
+ */
+ public String getColumnText(Object element, int columnIndex) {
+ if (element instanceof InputType) {
+ String value = SmooksModelUtils.getInputPath((InputType) element);
+ if (value == null)
+ value = "";
+ switch (columnIndex) {
+ case 0:
+ return ((InputType) element).getType();
+ case 1:
+ return value;
+ }
+ }
+ return "";
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/ExtentionInputLabelProvider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/GraphicsConstants.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/GraphicsConstants.java 2009-04-10 16:56:24 UTC (rev 14691)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/GraphicsConstants.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -1,6 +1,46 @@
package org.jboss.tools.smooks.configuration.editors;
+import org.eclipse.swt.graphics.Color;
+
public final class GraphicsConstants {
- public static final String JAVA_PROPERTY_ICON_PATH = "icons/full/obj16/att_obj.gif";
+
+ public static final Color BORDER_CORLOER = new Color(null,128,128,128);
+
+ public static final String IMAGE_JAVA_ATTRIBUTE = "icons/full/obj16/att_obj.gif";
+
+ public static final String IMAGE_JAVA_OBJECT = "java_object";
+
+ public static final String IMAGE_JAVA_INTERFACE = "icons/full/obj16/int_obj.gif";
+
+ public static final String IMAGE_JAVA_COLLECTION = "icons/full/obj16/javalistmodel.gif";
+
+ public static final String IMAGE_JAVA_ARRAY = "icons/full/obj16/javaarraymodel.gif";
+
+ public static final String IMAGE_CHECKBOX_CHECK = "icons/full/obj16/checkbox_checked.gif";
+
+ public static final String IMAGE_CHECKBOX_UNCHECK = "icons/full/obj16/checkbox_uncheck.gif";
+
+ public static final String JAVA_PROPERTY_ICON_PATH = IMAGE_JAVA_ATTRIBUTE;
+
public static final String JAVA_PROPERTY_ICON = JAVA_PROPERTY_ICON_PATH;
+
+ public static final String IMAGE_PATH_ERROR = "icons/full/obj16/error_obj.gif";
+
+ public static final String IMAGE_PATH_WARNING = "icons/full/obj16/warning_obj.gif";
+
+ public static final String IMAGE_PATH_BLANK = "icons/full/obj16/blank.gif";
+
+ public static final String IMAGE_WARNING = IMAGE_PATH_WARNING;
+
+ public static final String IMAGE_ERROR = IMAGE_PATH_ERROR;
+
+ public static final String IMAGE_EMPTY = IMAGE_PATH_BLANK;
+
+ public static final String IMAGE_XML_ELEMENT = "xml_element";
+
+ public static final String IMAGE_XML_ATTRIBUTE = "xml_attribute";
+
+ public static final String IMAGE_MAPPING_LINE = "icons/full/obj16/mapping_line.gif";
+
+ public static final String IMAGE_BINDING_LINE = "icons/full/obj16/binding_line.gif";
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/IPropertyUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/IPropertyUICreator.java 2009-04-10 16:56:24 UTC (rev 14691)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/IPropertyUICreator.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -23,7 +23,11 @@
*/
public interface IPropertyUICreator {
public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
- IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature);
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor);
+
+ public void createExtendUI(AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit,
+ Composite parent, Object model, SmooksMultiFormEditor formEditor);
- public void createExtendUI(AdapterFactoryEditingDomain editingdomain,FormToolkit toolkit, Composite parent,Object model );
+ public boolean ignoreProperty(EAttribute feature);
}
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/IXMLStructuredObject.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/IXMLStructuredObject.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/IXMLStructuredObject.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -0,0 +1,25 @@
+/**
+ *
+ */
+package org.jboss.tools.smooks.configuration.editors;
+
+import java.util.List;
+
+/**
+ * @author Dart
+ *
+ */
+public interface IXMLStructuredObject {
+
+ public String getNodeName();
+
+ public List<IXMLStructuredObject> getChildren();
+
+ public IXMLStructuredObject getParent();
+
+ public Object getID();
+
+ public boolean isRootNode();
+
+ public boolean isAttribute();
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/IXMLStructuredObject.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/InputStructuredDataSelectionDialog.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/InputStructuredDataSelectionDialog.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/InputStructuredDataSelectionDialog.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -0,0 +1,137 @@
+/*******************************************************************************
+ * 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;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.window.IShellProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
+import org.jboss.tools.smooks.configuration.editors.javabean.JavaBeanModel;
+import org.jboss.tools.smooks.configuration.editors.javabean.JavaBeanModelFactory;
+import org.jboss.tools.smooks.configuration.editors.uitls.ProjectClassLoader;
+import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.graphics.ext.InputType;
+import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
+import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ * <p>
+ * Apr 12, 2009
+ */
+public class InputStructuredDataSelectionDialog extends Dialog {
+
+ private SmooksGraphicsExtType graphicsExt;
+ private TreeViewer viewer;
+ private Object currentSelection;
+
+ public InputStructuredDataSelectionDialog(IShellProvider parentShell) {
+ super(parentShell);
+ // TODO Auto-generated constructor stub
+ }
+
+ public InputStructuredDataSelectionDialog(Shell parentShell, SmooksGraphicsExtType graphicsExt) {
+ super(parentShell);
+ this.graphicsExt = graphicsExt;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets
+ * .Composite)
+ */
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ Composite composite = (Composite) super.createDialogArea(parent);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ gd.heightHint = 400;
+ gd.widthHint = 400;
+ composite.setLayoutData(gd);
+ composite.setLayout(new FillLayout());
+ viewer = new TreeViewer(composite, SWT.BORDER);
+ viewer.setContentProvider(new CompoundStructuredDataContentProvider());
+ viewer.setLabelProvider(new CompoundStructuredDataLabelProvider());
+ viewer.setInput(generateInputData());
+ viewer.addDoubleClickListener(new IDoubleClickListener() {
+ public void doubleClick(DoubleClickEvent event) {
+ okPressed();
+ }
+ });
+ viewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ currentSelection = ((IStructuredSelection) event.getSelection()).getFirstElement();
+ }
+ });
+ getShell().setText("Input Datas");
+ return composite;
+ }
+
+ protected List<?> generateInputData() {
+ List<Object> list = new ArrayList<Object>();
+ if (this.graphicsExt != null) {
+ IJavaProject project = SmooksUIUtils.getJavaProject(graphicsExt);
+ try {
+ ProjectClassLoader classLoader = new ProjectClassLoader(project);
+ List<InputType> inputLists = graphicsExt.getInput();
+ for (Iterator<?> iterator = inputLists.iterator(); iterator.hasNext();) {
+ InputType inputType = (InputType) iterator.next();
+ String type = inputType.getType();
+ String path = SmooksModelUtils.getInputPath(inputType);
+ if (type != null && path != null) {
+ path = path.trim();
+ if (SmooksModelUtils.INPUT_TYPE_JAVA.equals(type)) {
+ try {
+ JavaBeanModel model = JavaBeanModelFactory
+ .getJavaBeanModelWithLazyLoad(classLoader.loadClass(path));
+ if (model != null) {
+ list.add(model);
+ }
+ } finally {
+
+ }
+ }
+ if (SmooksModelUtils.INPUT_TYPE_XML.equals(type)) {
+
+ }
+ }
+ }
+ } catch (Exception e) {
+ SmooksConfigurationActivator.getDefault().log(e);
+ }
+ }
+ return list;
+ }
+
+ /**
+ * @return the currentSelection
+ */
+ public Object getCurrentSelection() {
+ return currentSelection;
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/InputStructuredDataSelectionDialog.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreator.java 2009-04-10 16:56:24 UTC (rev 14691)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreator.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -38,7 +38,7 @@
* org.eclipse.emf.ecore.EAttribute)
*/
public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
- IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,SmooksMultiFormEditor formEditor) {
if(feature == SmooksPackage.eINSTANCE.getAbstractReader_TargetProfile()){
}
@@ -54,9 +54,13 @@
}
public void createExtendUI(AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit,
- Composite parent, Object model) {
+ Composite parent, Object model,SmooksMultiFormEditor formEditor) {
}
+ public boolean ignoreProperty(EAttribute feature) {
+ return false;
+ }
+
}
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SelectorAttributes.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SelectorAttributes.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SelectorAttributes.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -0,0 +1,35 @@
+/**
+ *
+ */
+package org.jboss.tools.smooks.configuration.editors;
+
+
+/**
+ * @author Dart
+ *
+ */
+public class SelectorAttributes {
+ public static final String ONLY_NAME = "only_name";
+
+ public static final String FULL_PATH = "full_path";
+
+ public static final String IGNORE_ROOT = "ignore_root";
+
+ public static final String INCLUDE_PARENT = "include_parent";
+ private String selectorSperator = " ";
+ private String selectorPolicy = SelectorAttributes.FULL_PATH;
+ public String getSelectorSperator() {
+ return selectorSperator;
+ }
+ public void setSelectorSperator(String selectorSperator) {
+ this.selectorSperator = selectorSperator;
+ }
+ public String getSelectorPolicy() {
+ return selectorPolicy;
+ }
+ public void setSelectorPolicy(String selectorPolicy) {
+ this.selectorPolicy = selectorPolicy;
+ }
+
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SelectorAttributes.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigurationFormPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigurationFormPage.java 2009-04-10 16:56:24 UTC (rev 14691)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigurationFormPage.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -10,17 +10,43 @@
******************************************************************************/
package org.jboss.tools.smooks.configuration.editors;
+import java.io.IOException;
+import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Properties;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.SWT;
+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.TableColumn;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.editor.FormEditor;
import org.eclipse.ui.forms.editor.FormPage;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
+import org.jboss.tools.smooks.configuration.editors.wizard.IStructuredDataSelectionWizard;
+import org.jboss.tools.smooks.configuration.editors.wizard.StructuredDataSelectionWizard;
+import org.jboss.tools.smooks.model.graphics.ext.InputType;
+import org.jboss.tools.smooks.model.graphics.ext.ParamType;
+import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtFactory;
+import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
+import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils;
/**
* @author Dart Peng (dpeng(a)redhat.com) Date Apr 1, 2009
@@ -28,6 +54,7 @@
public class SmooksConfigurationFormPage extends FormPage {
private SmooksMasterDetailBlock masterDetailBlock = null;
+ private TableViewer inputDataViewer;
public SmooksConfigurationFormPage(FormEditor editor, String id, String title) {
super(editor, id, title);
@@ -39,25 +66,182 @@
@Override
protected void createFormContent(IManagedForm managedForm) {
- masterDetailBlock = new SmooksMasterDetailBlock(getEditor(),
- (AdapterFactoryEditingDomain) ((SmooksMultiFormEditor) getEditor()).getEditingDomain());
final ScrolledForm form = managedForm.getForm();
FormToolkit toolkit = managedForm.getToolkit();
toolkit.decorateFormHeading(form.getForm());
form.setText(getTitle());
- masterDetailBlock.createContent(managedForm);
-
+ // create master details UI
+ createMasterDetailBlock(managedForm);
GridLayout gridLayout = new GridLayout();
gridLayout.marginHeight = 13;
+ // gridLayout.numColumns = 2;
+ // gridLayout.makeColumnsEqualWidth = true;
form.getBody().setLayout(gridLayout);
+ // create extention UI for add/remove extention data
+ createExtentionArea(managedForm);
}
-
- public void setSmooksModel(Object model){
+
+ protected void createMasterDetailBlock(IManagedForm managedForm) {
+ masterDetailBlock = new SmooksMasterDetailBlock(getEditor(),
+ (AdapterFactoryEditingDomain) ((SmooksMultiFormEditor) getEditor()).getEditingDomain());
+ masterDetailBlock.createContent(managedForm);
+ }
+
+ protected void createExtentionArea(IManagedForm managedForm) {
+ FormToolkit toolkit = managedForm.getToolkit();
+ final ScrolledForm form = managedForm.getForm();
+ Section section = toolkit.createSection(form.getBody(), Section.TITLE_BAR | Section.TWISTIE);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ section.setLayoutData(gd);
+ section.setText("Input Data");
+ FillLayout flayout = new FillLayout();
+ section.setLayout(flayout);
+
+ Composite mainComposite = toolkit.createComposite(section, SWT.NONE);
+ GridLayout gl = new GridLayout();
+ gl.numColumns = 2;
+ mainComposite.setLayout(gl);
+ section.setClient(mainComposite);
+
+ Composite tableComposite = toolkit.createComposite(mainComposite, SWT.NONE);
+ FillLayout fillLayout = new FillLayout();
+ fillLayout.marginHeight = 1;
+ fillLayout.marginWidth = 1;
+ gd = new GridData(GridData.FILL_BOTH);
+ tableComposite.setLayoutData(gd);
+ tableComposite.setBackground(GraphicsConstants.BORDER_CORLOER);
+ tableComposite.setLayout(fillLayout);
+
+ inputDataViewer = new TableViewer(tableComposite, SWT.MULTI);
+ TableColumn header = new TableColumn(inputDataViewer.getTable(), SWT.NONE);
+ header.setText("Type");
+ header.setWidth(100);
+ TableColumn pathColumn = new TableColumn(inputDataViewer.getTable(), SWT.NONE);
+ pathColumn.setText("Path");
+ pathColumn.setWidth(300);
+ inputDataViewer.setContentProvider(new ExtentionInputContentProvider());
+ inputDataViewer.setLabelProvider(new ExtentionInputLabelProvider());
+ inputDataViewer.getTable().setHeaderVisible(true);
+ inputDataViewer.getTable().setLinesVisible(true);
+ SmooksGraphicsExtType extType = getSmooksGraphicsExtType();
+ if (extType != null) {
+ inputDataViewer.setInput(extType);
+ }
+ Composite buttonComposite = toolkit.createComposite(mainComposite, SWT.NONE);
+ gd = new GridData(GridData.FILL_VERTICAL);
+ buttonComposite.setLayoutData(gd);
+ GridLayout l = new GridLayout();
+ buttonComposite.setLayout(l);
+
+ Button addButton = toolkit.createButton(buttonComposite, "Add", SWT.FLAT);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ addButton.setLayoutData(gd);
+ addButton.addSelectionListener(new SelectionAdapter() {
+
+ public void widgetSelected(SelectionEvent e) {
+ showInputDataWizard();
+ }
+
+ });
+
+ Button removeButton = toolkit.createButton(buttonComposite, "Delete", SWT.FLAT);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ removeButton.setLayoutData(gd);
+ removeButton.addSelectionListener(new SelectionAdapter() {
+
+ public void widgetSelected(SelectionEvent e) {
+ IStructuredSelection selection = (IStructuredSelection) inputDataViewer.getSelection();
+ if (selection != null) {
+ SmooksGraphicsExtType extType = getSmooksGraphicsExtType();
+ if (extType != null) {
+ boolean canSave = false;
+ Object[] objs = selection.toArray();
+ for (int i = 0; i < objs.length; i++) {
+ Object obj = objs[i];
+ if (obj instanceof InputType) {
+ extType.getInput().remove(obj);
+ canSave = true;
+ }
+ }
+ if (!canSave)
+ return;
+ try {
+ extType.eResource().save(Collections.emptyMap());
+ inputDataViewer.refresh();
+ } catch (IOException t) {
+ SmooksConfigurationActivator.getDefault().log(t);
+ }
+ }
+ }
+ }
+ });
+ }
+
+ private SmooksGraphicsExtType getSmooksGraphicsExtType() {
+ SmooksGraphicsExtType extType = ((SmooksMultiFormEditor) getEditor()).getSmooksGraphicsExt();
+ return extType;
+ }
+
+ public void setSmooksModel(Object model) {
masterDetailBlock.setSmooksModel(model);
}
-
- public void setSelectionToViewer(final Collection<?> collection){
- if(masterDetailBlock != null && masterDetailBlock.getSmooksTreeViewer() != null){
+
+ protected void showInputDataWizard() {
+ StructuredDataSelectionWizard wizard = new StructuredDataSelectionWizard();
+ wizard.setInput(getEditorInput());
+ wizard.setSite(getEditorSite());
+ wizard.setForcePreviousAndNextButtons(true);
+ StructuredDataSelectionWizardDailog dialog = new StructuredDataSelectionWizardDailog(getEditorSite()
+ .getShell(), wizard);
+ if (dialog.open() == WizardDialog.OK) {
+ IStructuredDataSelectionWizard wizard1 = dialog.getCurrentCreationWizard();
+ String type = wizard1.getInputDataTypeID();
+ String path = wizard1.getStructuredDataSourcePath();
+ SmooksGraphicsExtType extType = getSmooksGraphicsExtType();
+ if (type != null && path != null && extType != null) {
+ String[] values = path.split(";");
+ for (int i = 0; i < values.length; i++) {
+ String value = values[i];
+ value = value.trim();
+ if (value.length() == 0)
+ continue;
+ InputType input = SmooksGraphicsExtFactory.eINSTANCE.createInputType();
+ input.setType(type);
+ ParamType param = SmooksGraphicsExtFactory.eINSTANCE.createParamType();
+ param.setValue(value);
+ param.setName(SmooksModelUtils.PARAM_NAME_PATH);
+ input.getParam().add(param);
+ List<ParamType> params = generateExtParams(type, path, wizard1.getProperties());
+ input.getParam().addAll(params);
+ extType.getInput().add(input);
+ }
+ try {
+ extType.eResource().save(Collections.emptyMap());
+ inputDataViewer.refresh();
+ } catch (IOException e) {
+ SmooksConfigurationActivator.getDefault().log(e);
+ }
+ }
+ }
+ }
+
+ private List<ParamType> generateExtParams(String type, String path, Properties properties) {
+ List<ParamType> lists = new ArrayList<ParamType>();
+ if (properties != null) {
+ Enumeration<?> enumerations = properties.keys();
+ while (enumerations.hasMoreElements()) {
+ Object key = (Object) enumerations.nextElement();
+ ParamType param = SmooksGraphicsExtFactory.eINSTANCE.createParamType();
+ param.setValue(properties.getProperty(key.toString()));
+ param.setName(key.toString());
+ lists.add(param);
+ }
+ }
+ return lists;
+ }
+
+ public void setSelectionToViewer(final Collection<?> collection) {
+ if (masterDetailBlock != null && masterDetailBlock.getSmooksTreeViewer() != null) {
// I don't know if this should be run this deferred
// because we might have to give the editor a chance to process the
// viewer update events
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMasterDetailBlock.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMasterDetailBlock.java 2009-04-10 16:56:24 UTC (rev 14691)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMasterDetailBlock.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -94,6 +94,16 @@
createSmooksTreeViewer(tool, managedForm, parent);
}
+
+
+ @Override
+ public void createContent(IManagedForm managedForm) {
+ super.createContent(managedForm);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ gd.horizontalSpan = 2;
+ sashForm.setLayoutData(gd);
+ }
+
/*
* (non-Javadoc)
*
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java 2009-04-10 16:56:24 UTC (rev 14691)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -24,9 +24,11 @@
import java.util.Timer;
import java.util.TimerTask;
+import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
import org.eclipse.emf.common.command.BasicCommandStack;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.command.CommandStack;
@@ -56,16 +58,18 @@
import org.eclipse.ui.views.properties.PropertySheetPage;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
+import org.jboss.tools.smooks.configuration.SmooksConstants;
+import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.configuration.wizards.SmooksConfigurationFileNewWizard;
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.smooks.model.graphics.ext.SmooksGraphicsExtType;
import org.jboss.tools.smooks10.model.smooks.util.SmooksResourceFactoryImpl;
-
-
/**
*
* @author Dart Peng (dpeng(a)redhat.com) Date Apr 1, 2009
@@ -84,6 +88,8 @@
private PropertySheetPage propertySheetPage = null;
+ private SmooksGraphicsExtType smooksGraphicsExt = null;
+
private EObject smooksModel;
private boolean handleEMFModelChange;
@@ -149,7 +155,6 @@
return ((BasicCommandStack) editingDomain.getCommandStack()).isSaveNeeded() || super.isDirty();
}
-
public EObject getSmooksModel() {
return smooksModel;
}
@@ -181,8 +186,8 @@
List<Object> newList = new ArrayList<Object>();
for (Iterator<?> iterator = theSelection.iterator(); iterator.hasNext();) {
Object object = (Object) iterator.next();
- if(object instanceof IWrapperItemProvider){
- newList.add(((IWrapperItemProvider)object).getValue());
+ if (object instanceof IWrapperItemProvider) {
+ newList.add(((IWrapperItemProvider) object).getValue());
}
}
configurationPage.setSelectionToViewer(newList);
@@ -212,9 +217,18 @@
e.printStackTrace();
}
}
+
+
+ /**
+ * @return the smooksGraphicsExt
+ */
+ public SmooksGraphicsExtType getSmooksGraphicsExt() {
+ return smooksGraphicsExt;
+ }
+
protected StructuredTextEditor createTextEditor() {
- SmooksXMLEditor xmlEditor = new SmooksXMLEditor(){
+ SmooksXMLEditor xmlEditor = new SmooksXMLEditor() {
public void createPartControl(Composite parent) {
super.createPartControl(parent);
@@ -260,7 +274,7 @@
});
}
-
+
};
return xmlEditor;
}
@@ -297,7 +311,7 @@
@Override
public void doSave(IProgressMonitor monitor) {
IEditorPart activeEditor = getActiveEditor();
- if(activeEditor != null && activeEditor == textEditor){
+ if (activeEditor != null && activeEditor == textEditor) {
textEditor.doSave(monitor);
((BasicCommandStack) editingDomain.getCommandStack()).saveIsDone();
firePropertyChange(PROP_DIRTY);
@@ -339,11 +353,27 @@
}
editingDomain.getResourceSet().getResources().add(smooksResource);
super.init(site, input);
- // try {
- // file.move(getNewPath(file), true, true, null);
- // } catch (CoreException e) {
- // e.printStackTrace();
- // }
+ // if success to open editor , check if there isn't ext file and create
+ // a new one
+ String extFileName = file.getName() + SmooksConstants.SMOOKS_GRAPHICSEXT_EXTENTION_NAME_WITHDOT;
+ IContainer container = file.getParent();
+ if (container != null && container.exists()) {
+ IFile extFile = container.getFile(new Path(extFileName));
+ if (extFile != null && !extFile.exists()) {
+ try {
+ SmooksConfigurationFileNewWizard.createExtentionFile(extFile, null);
+ } catch (Throwable t) {
+ // ignore
+ }
+ }
+ if (extFile != null && extFile.exists()) {
+ try {
+ smooksGraphicsExt = SmooksUIUtils.loadSmooksGraphicsExt(extFile);
+ } catch (IOException e) {
+ SmooksConfigurationActivator.getDefault().log(e);
+ }
+ }
+ }
}
public IPath getNewPath(IFile file) {
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksResourceChangeListener.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksResourceChangeListener.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksResourceChangeListener.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -0,0 +1,171 @@
+/*******************************************************************************
+ * 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;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectNature;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.resources.WorkspaceJob;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.jboss.tools.smooks.configuration.SmooksConstants;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ * <p>
+ * Apr 12, 2009
+ */
+public class SmooksResourceChangeListener implements IResourceChangeListener {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org
+ * .eclipse.core.resources.IResourceChangeEvent)
+ */
+ public void resourceChanged(IResourceChangeEvent event) {
+ try {
+ switch (event.getType()) {
+ case IResourceChangeEvent.POST_CHANGE:
+ event.getDelta().accept(new DeltaPrinter());
+ break;
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ private void deleteFile(IPath path) {
+ final IPath path1 = path;
+ WorkspaceJob job = new WorkspaceJob("Delete file") { //$NON-NLS-1$
+
+ public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path1);
+ if (file.exists()) {
+ file.delete(true, monitor);
+ }
+ return Status.OK_STATUS;
+ }
+ };
+ job.schedule();
+ }
+
+ private void newFile(IPath path, IPath newPath) {
+ final IPath path1 = path;
+ final IPath newPath1 = newPath;
+ WorkspaceJob job = new WorkspaceJob("New file and delete old file") { //$NON-NLS-1$
+ public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path1);
+ if (file.exists()) {
+ IFile newFile = ResourcesPlugin.getWorkspace().getRoot().getFile(newPath1);
+ if (newFile.exists()) {
+ if (MessageDialog.openQuestion(new Shell(Display.getDefault()),
+ "Cover File?", "Do you want to cover " //$NON-NLS-1$ //$NON-NLS-2$
+ + newFile.getFullPath())) { //$NON-NLS-1$
+ newFile.setContents(file.getContents(), true, true, monitor);
+ }
+ } else {
+ newFile.create(file.getContents(), true, monitor);
+ }
+ file.delete(true, monitor);
+ }
+ return Status.OK_STATUS;
+ }
+
+ };
+ job.schedule();
+ }
+
+ class DeltaPrinter implements IResourceDeltaVisitor {
+
+ int count = 0;
+
+ public boolean visit(IResourceDelta delta) {
+ IResource res = delta.getResource();
+ String fileExtension = res.getFileExtension();
+ if (!SmooksConstants.SMOOKS_EXTENTION_NAME.equals(fileExtension)) { //$NON-NLS-1$
+ return true;
+ }
+ int flags = delta.getFlags();
+ switch (delta.getKind()) {
+ case IResourceDelta.ADDED:
+ if (flags == IResourceDelta.MOVED_FROM) {
+ IPath path = delta.getMovedFromPath();
+ String fileName = ""; //$NON-NLS-1$
+ if (path != null) {
+ fileName = path.lastSegment();
+ int dotIndex = fileName.lastIndexOf("."); //$NON-NLS-1$
+ if (dotIndex != -1) {
+ fileExtension = fileName.substring(dotIndex + 1, fileName.length());
+ }
+ if (!SmooksConstants.SMOOKS_EXTENTION_NAME.equals(fileExtension)) { //$NON-NLS-1$
+ return true;
+ }
+ fileName += SmooksConstants.SMOOKS_GRAPHICSEXT_EXTENTION_NAME_WITHDOT; //$NON-NLS-1$
+ path = path.removeLastSegments(1);
+ path = path.append(fileName);
+ }
+
+ IPath newPath = res.getFullPath();
+ fileName = newPath.lastSegment();
+ fileName += SmooksConstants.SMOOKS_GRAPHICSEXT_EXTENTION_NAME_WITHDOT; //$NON-NLS-1$
+ newPath = newPath.removeLastSegments(1).append(fileName);
+ newFile(path, newPath);
+ }
+ break;
+ case IResourceDelta.REMOVED:
+ if (flags == IResourceDelta.MOVED_TO) {
+ break;
+ }
+ IProject project = res.getProject();
+ try {
+ if (project.isOpen()) {
+ IProjectNature nature = project.getNature(JavaCore.NATURE_ID);
+ if (nature != null) {
+ IJavaProject javaProject = JavaCore.create(project);
+ IPath outPut = javaProject.getOutputLocation();
+ IPath removeRes = res.getFullPath();
+ if (outPut.isPrefixOf(removeRes)) {
+ break;
+ }
+ }
+ }
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ IPath path = res.getFullPath();
+ String fileName = path.lastSegment();
+ fileName += SmooksConstants.SMOOKS_GRAPHICSEXT_EXTENTION_NAME_WITHDOT; //$NON-NLS-1$
+ path = path.removeLastSegments(1).append(fileName);
+ deleteFile(path);
+ break;
+ }
+ return true; // visit the children
+ }
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksResourceChangeListener.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksStuffPropertyDetailPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksStuffPropertyDetailPage.java 2009-04-10 16:56:24 UTC (rev 14691)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksStuffPropertyDetailPage.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -103,19 +103,20 @@
GridLayout layout = new GridLayout();
layout.numColumns = 2;
detailsComposite.setLayout(layout);
- IPropertyUICreator creator = PropertyUICreatorManager.getInstance()
- .getPropertyUICreator(getModel());
- List<IItemPropertyDescriptor> propertyDes = itemPropertySource
- .getPropertyDescriptors(getModel());
- for (Iterator<IItemPropertyDescriptor> iterator = propertyDes.iterator(); iterator
- .hasNext();) {
+ IPropertyUICreator creator = PropertyUICreatorManager.getInstance().getPropertyUICreator(
+ getModel());
+ List<IItemPropertyDescriptor> propertyDes = itemPropertySource.getPropertyDescriptors(getModel());
+ for (Iterator<IItemPropertyDescriptor> iterator = propertyDes.iterator(); iterator.hasNext();) {
final IItemPropertyDescriptor itemPropertyDescriptor = (IItemPropertyDescriptor) iterator
- .next();
+ .next();
EAttribute feature = (EAttribute) itemPropertyDescriptor.getFeature(getModel());
boolean createDefault = true;
if (creator != null) {
+ if(creator.ignoreProperty(feature)){
+ continue;
+ }
Composite composite = creator.createPropertyUI(formToolkit, detailsComposite,
- itemPropertyDescriptor, getModel(), feature);
+ itemPropertyDescriptor, getModel(), feature, getFormEditor());
if (composite != null) {
createDefault = false;
}
@@ -124,27 +125,24 @@
EClassifier typeClazz = feature.getEType();
if (typeClazz instanceof EEnum) {
createEnumFieldEditor(detailsComposite, (EEnum) typeClazz, formToolkit,
- itemPropertyDescriptor);
+ itemPropertyDescriptor);
}
if (typeClazz.getInstanceClass() == String.class) {
- createStringFieldEditor(detailsComposite, formToolkit,
- itemPropertyDescriptor);
+ createStringFieldEditor(detailsComposite, formToolkit, itemPropertyDescriptor);
}
if (typeClazz.getInstanceClass() == Boolean.class
- || typeClazz.getInstanceClass() == boolean.class) {
- createBooleanFieldEditor(detailsComposite, formToolkit,
- itemPropertyDescriptor);
+ || typeClazz.getInstanceClass() == boolean.class) {
+ createBooleanFieldEditor(detailsComposite, formToolkit, itemPropertyDescriptor);
}
if (typeClazz.getInstanceClass() == Integer.class
- || typeClazz.getInstanceClass() == int.class) {
- createIntegerFieldEditor(detailsComposite, formToolkit,
- itemPropertyDescriptor);
+ || typeClazz.getInstanceClass() == int.class) {
+ createIntegerFieldEditor(detailsComposite, formToolkit, itemPropertyDescriptor);
}
}
}
if (creator != null) {
creator.createExtendUI((AdapterFactoryEditingDomain) formEditor.getEditingDomain(),
- formToolkit, detailsComposite, getModel());
+ formToolkit, detailsComposite, getModel(), getFormEditor());
}
formToolkit.paintBordersFor(detailsComposite);
detailsComposite.pack();
@@ -155,7 +153,7 @@
}
protected void createEnumFieldEditor(Composite propertyComposite, final EEnum typeClass,
- FormToolkit formToolKit, final IItemPropertyDescriptor itemPropertyDescriptor) {
+ FormToolkit formToolKit, final IItemPropertyDescriptor itemPropertyDescriptor) {
String displayName = itemPropertyDescriptor.getDisplayName(getModel());
formToolKit.createLabel(propertyComposite, displayName + " :");
final CCombo combo = new CCombo(propertyComposite, SWT.NONE);
@@ -183,12 +181,11 @@
try {
Object value = itemPropertyDescriptor.getPropertyValue(getModel());
Method method = typeClass.getInstanceClass().getMethod("get",
- new Class<?>[] { String.class });
+ 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());
+ Object editValue = ((PropertyValueWrapper) value).getEditableValue(getModel());
if (editValue != null) {
if (!editValue.equals(v)) {
@@ -209,20 +206,19 @@
combo.setLayoutData(gd);
}
- protected void createBooleanFieldEditor(final Composite propertyComposite,
- FormToolkit formToolkit, final IItemPropertyDescriptor itemPropertyDescriptor) {
+ 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);
+ 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);
+ if (editValue != null && editValue instanceof Boolean)
+ checkButton.setSelection((Boolean) editValue);
}
checkButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
@@ -231,15 +227,16 @@
});
}
- protected void createStringFieldEditor(final Composite propertyComposite,
- FormToolkit formToolKit, final IItemPropertyDescriptor itemPropertyDescriptor) {
+ 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());
+ if (editValue != null)
+ text.setText(editValue.toString());
}
text.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
@@ -262,16 +259,16 @@
text.setLayoutData(gd);
}
- protected void createIntegerFieldEditor(final Composite propertyComposite,
- FormToolkit formToolKit, final IItemPropertyDescriptor itemPropertyDescriptor) {
+ 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.BORDER);
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);
+ if (editValue != null && editValue instanceof Integer)
+ spinner.setSelection((Integer) editValue);
}
spinner.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
@@ -280,8 +277,7 @@
Object editValue = ((PropertyValueWrapper) value).getEditableValue(getModel());
if (editValue != null) {
if (!editValue.equals(spinner.getSelection())) {
- itemPropertyDescriptor.setPropertyValue(getModel(), spinner
- .getSelection());
+ itemPropertyDescriptor.setPropertyValue(getModel(), spinner.getSelection());
}
} else {
itemPropertyDescriptor.setPropertyValue(getModel(), spinner.getSelection());
@@ -307,9 +303,10 @@
setOldModel(oldModel);
this.selection = selection;
this.formPart = part;
- this.itemPropertySource = (IItemPropertySource) editingDomain.getAdapterFactory().adapt(
- getModel(), IItemPropertySource.class);
- if (getOldModel() == getModel()) return;
+ this.itemPropertySource = (IItemPropertySource) editingDomain.getAdapterFactory().adapt(getModel(),
+ IItemPropertySource.class);
+ if (getOldModel() == getModel())
+ return;
if (getOldModel() != getModel()) {
if (propertyComposite != null) {
propertyComposite.dispose();
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksToolsStartup.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksToolsStartup.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksToolsStartup.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * 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;
+
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.ui.IStartup;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)<p>
+ * Apr 12, 2009
+ */
+public class SmooksToolsStartup implements IStartup {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IStartup#earlyStartup()
+ */
+ public void earlyStartup() {
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(new SmooksResourceChangeListener());
+ }
+
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksToolsStartup.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/StructuredDataSelectionWizardDailog.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/StructuredDataSelectionWizardDailog.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/StructuredDataSelectionWizardDailog.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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;
+
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.jboss.tools.smooks.configuration.editors.wizard.IStructuredDataSelectionWizard;
+
+/**
+ * @author Dart Peng
+ * @Date Aug 6, 2008
+ */
+public class StructuredDataSelectionWizardDailog extends WizardDialog {
+
+ public StructuredDataSelectionWizardDailog(Shell parentShell,
+ IWizard newWizard) {
+ super(parentShell, newWizard);
+ }
+
+ public IStructuredDataSelectionWizard getCurrentCreationWizard(){
+ IWizard w = getWizard();
+ if(w != null && w instanceof IStructuredDataSelectionWizard){
+ return (IStructuredDataSelectionWizard)w;
+ }
+ return null;
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/StructuredDataSelectionWizardDailog.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Template.txt
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Template.txt 2009-04-10 16:56:24 UTC (rev 14691)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Template.txt 2009-04-12 10:55:55 UTC (rev 14692)
@@ -18,6 +18,7 @@
import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
import org.jboss.tools.smooks.model.javabean.BindingsType;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
/**
* @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
@@ -34,7 +35,7 @@
* org.eclipse.emf.ecore.EAttribute)
*/
public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
- IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature ,SmooksMultiFormEditor formEditor) {
${attributeMethod}
return null;
}
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/IJavaBeanSelectionListener.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/IJavaBeanSelectionListener.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/IJavaBeanSelectionListener.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -0,0 +1,12 @@
+/**
+ *
+ */
+package org.jboss.tools.smooks.configuration.editors.javabean;
+
+/**
+ * @author Dart
+ *
+ */
+public interface IJavaBeanSelectionListener {
+ public void exceptionOccur(Exception e);
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/IJavaBeanSelectionListener.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanConfigWizardPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanConfigWizardPage.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanConfigWizardPage.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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 java.util.Collections;
+import java.util.List;
+
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * @author Dart Peng
+ *
+ * @CreateTime Jul 21, 2008
+ */
+public class JavaBeanConfigWizardPage extends WizardPage implements
+ SelectionListener ,IJavaBeanSelectionListener {
+
+ TreeViewer treeViewer;
+
+ Text classText = null;
+
+ Button classBrowseButton = null;
+
+ IJavaProject project = null;
+
+ private JavaBeanModelLoadComposite javaPropertySelectComposite;
+
+
+ public List<JavaBeanModel> getJavaBeanModelList() {
+ if(javaPropertySelectComposite == null) return Collections.emptyList();
+ return javaPropertySelectComposite.getJavabeanList();
+ }
+
+ public JavaBeanConfigWizardPage(IJavaProject selection) {
+ super("beansearchwizardpage"); //$NON-NLS-1$
+ this.project = selection;
+ setPageComplete(true);
+ setTitle("Select Javabean"); //$NON-NLS-1$
+ setDescription("Select Javabean model"); //$NON-NLS-1$
+ }
+
+ protected void initilize() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.ecSclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt
+ * .widgets.Composite)
+ */
+ public void createControl(Composite parent) {
+ initilize();
+ try {
+ javaPropertySelectComposite = new JavaBeanModelLoadComposite(
+ parent, SWT.NONE, getContainer(), project);
+ javaPropertySelectComposite.addJavaBeanSelectionListener(this);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ this.setControl(javaPropertySelectComposite);
+ this.updatePage();
+ }
+
+ protected void updatePage() {
+ String error = null;
+ if (project == null) {
+ error = "Must select java project"; //$NON-NLS-1$
+ }
+ setPageComplete(error == null);
+ this.setErrorMessage(error);
+ }
+
+// public JavaBeanConfigWizardPage(String pageName, String title,
+// ImageDescriptor titleImage) {
+// super(pageName, title, titleImage);
+// }
+
+ public JavaBeanConfigWizardPage(String pageName) {
+ super(pageName);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent arg0) {
+ widgetSelected(arg0);
+ }
+
+ public void widgetSelected(SelectionEvent arg0) {
+
+ }
+
+ public void exceptionOccur(Exception e) {
+ String error = null;
+ if(e != null) error = e.toString();
+ this.setErrorMessage(error);
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanConfigWizardPage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanList.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanList.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanList.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -0,0 +1,117 @@
+/**
+ *
+ */
+package org.jboss.tools.smooks.configuration.editors.javabean;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import org.jboss.tools.smooks.configuration.editors.IXMLStructuredObject;
+
+
+/**
+ * @author Dart
+ *
+ */
+public class JavaBeanList extends JavaBeanModel implements IXMLStructuredObject{
+
+
+ private List<IXMLStructuredObject> children = null;
+
+ public List<IXMLStructuredObject> getChildren() {
+ if(children == null){
+ children = new ArrayList<IXMLStructuredObject>();
+ }
+ return children;
+ }
+
+ public JavaBeanList(){
+ super(null);
+ }
+
+ @Override
+ public boolean isPrimitive() {
+ return false;
+ }
+
+ public String getJavaBeanName(JavaBeanModel javaBean){
+ List<?> children = getChildren();
+ int sameNameBean = 0;
+ for (Iterator<?> iterator = children.iterator(); iterator.hasNext();) {
+ JavaBeanModel child = (JavaBeanModel) iterator.next();
+ if(child.getBeanClass().getName().equals(javaBean.getBeanClass().getName())){
+ sameNameBean++;
+ }
+ }
+ if(sameNameBean > 0){
+ String name = javaBean.getName() + String.valueOf(sameNameBean);
+ while(hasSameNameBean(name,javaBean.getBeanClass())){
+ sameNameBean++;
+ name = javaBean.getName() + String.valueOf(sameNameBean);
+ }
+ return name;
+ }
+ return javaBean.getName();
+ }
+
+ private boolean hasSameNameBean(String name , Class<?> clazz){
+ for (Iterator<?> iterator = children.iterator(); iterator.hasNext();) {
+ JavaBeanModel child = (JavaBeanModel) iterator.next();
+ if(child.getBeanClass().getName().equals(clazz.getName())){
+ if(name.equals(child.getName())){
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+
+ public void addJavaBean(JavaBeanModel javaBean){
+ if(javaBean == null) return;
+ String name = javaBean.getName();
+ String n1 = getJavaBeanName(javaBean);
+ if(!name.equals(n1)){
+ javaBean.setName(n1);
+ }
+ javaBean.setParent(this);
+ this.getChildren().add(javaBean);
+ }
+
+ public void removeJavaBean(JavaBeanModel javaBean){
+ this.getChildren().remove(javaBean);
+ javaBean.setParent(null);
+ }
+
+ @Override
+ public List<?> getProperties() {
+ return Collections.EMPTY_LIST;
+ }
+
+ public Object getID() {
+ return this;
+ }
+
+ public String getNodeName() {
+ return null;
+ }
+
+ public JavaBeanModel getParent() {
+ return null;
+ }
+
+ public boolean isAttribute() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean isRootNode() {
+ return true;
+ }
+
+
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanList.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanModel.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanModel.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanModel.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -0,0 +1,549 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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 java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.Method;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+
+import org.jboss.tools.smooks.configuration.editors.IXMLStructuredObject;
+import org.jboss.tools.smooks.configuration.editors.uitls.JavaPropertyUtils;
+
+/**
+ * @author Dart Peng
+ *
+ */
+public class JavaBeanModel implements IXMLStructuredObject, Cloneable {
+
+ private boolean flat = false;
+
+ private Properties extendProperties = new Properties();
+
+ protected PropertyChangeSupport support = new PropertyChangeSupport(this);
+
+ private String beanClassString = null;
+
+ public void setBeanClassString(String beanClassString) {
+ this.beanClassString = beanClassString;
+ }
+
+ private Object waring = null;
+
+ private Object error = null;
+
+ private String name = ""; //$NON-NLS-1$
+
+ private Class typeRef = null;
+
+ private boolean many = false;
+
+ private boolean collection = false;
+
+ private boolean isPrimitive = false;
+
+ private boolean hasGenericType = false;
+
+ private Class<? extends Object> beanClass = null;
+
+ private JavaBeanModel parent = null;
+
+ public Class getBeanClass() {
+ return beanClass;
+ }
+
+ private Class parentClass = null;
+
+ // private boolean isRoot = false;
+
+ private boolean isRootClassModel = false;
+
+ /**
+ * @return the isRootClassModel
+ */
+ public boolean isRootClassModel() {
+ return isRootClassModel || getParent() == null;
+ }
+
+ public boolean isFlat() {
+ return flat;
+ }
+
+ public void setFlat(boolean flat) {
+ this.flat = flat;
+ }
+
+ /**
+ * @param isRootClassModel
+ * the isRootClassModel to set
+ */
+ public void setRootClassModel(boolean isRootClassModel) {
+ this.isRootClassModel = isRootClassModel;
+ }
+
+ public void addNodePropetyChangeListener(PropertyChangeListener listener) {
+ PropertyChangeListener[] array = support.getPropertyChangeListeners();
+ for (int i = 0; i < array.length; i++) {
+ if (listener == array[i])
+ return;
+ }
+ support.addPropertyChangeListener(listener);
+ }
+
+ public void removeNodePropetyChangeListener(PropertyChangeListener listener) {
+ support.removePropertyChangeListener(listener);
+ }
+
+ public void cleanAllNodePropertyChangeListeners() {
+ PropertyChangeListener[] ps = support.getPropertyChangeListeners();
+ for (int i = 0; i < ps.length; i++) {
+ PropertyChangeListener p = ps[i];
+ support.removePropertyChangeListener(p);
+ }
+ }
+
+ // /**
+ // * @return the isRoot
+ // */
+ // public boolean isRoot() {
+ // return isRoot;
+ // }
+
+ public String getBeanClassString() {
+ if (beanClassString != null && beanClassString.length() != 0) {
+ return this.beanClassString;
+ }
+ Class clazz = this.getBeanClass();
+ if (clazz == null)
+ return "<null>"; //$NON-NLS-1$
+
+ if (clazz.isArray()) {
+ String s = clazz.getComponentType().getName();
+ return s + "[]"; //$NON-NLS-1$
+ }
+
+ return clazz.getName();
+ }
+
+ public String getBeanClassStringWithList() {
+ String s = getBeanClassString();
+ if (this.isList()) {
+ Class genericType = getGenericType();
+ if (genericType != null)
+ s += "<" + genericType.getName() + ">";
+ }
+ return s;
+ }
+
+ /**
+ * @param isRoot
+ * the isRoot to set
+ */
+ // public void setRoot(boolean isRoot) {ois
+ private boolean isList = false;
+
+ private Class componentClass = null;
+
+ private boolean lazyLoadProperties = true;
+
+ public boolean isList() {
+ if (beanClass == null)
+ return false;
+ if (Collection.class.isAssignableFrom(beanClass)) {
+ if (this.propertyDescriptor != null) {
+ Method rmethod = propertyDescriptor.getReadMethod();
+ if (rmethod != null) {
+ Type returnType = rmethod.getGenericReturnType();
+ if (returnType instanceof ParameterizedType) {
+ Type gtype = ((ParameterizedType) returnType).getActualTypeArguments()[0];
+ Class beanType = (Class) gtype;
+ componentClass = beanType;
+ setGenericType(true);
+ }
+ }
+ }
+ setList(true);
+ }
+ return isList;
+ }
+
+ public void setList(boolean isList) {
+ this.isList = isList;
+ }
+
+ private PropertyDescriptor propertyDescriptor;
+
+ public PropertyDescriptor getPropertyDescriptor() {
+ return propertyDescriptor;
+ }
+
+ public void setPropertyDescriptor(PropertyDescriptor propertyDescriptor) {
+ this.propertyDescriptor = propertyDescriptor;
+ }
+
+ JavaBeanModel(Class beanClass, String beanName, PropertyDescriptor propertyDescriptor, Class parentClass,
+ boolean lazyLoadProperties) {
+ this.lazyLoadProperties = lazyLoadProperties;
+ this.beanClass = beanClass;
+ this.name = beanName;
+ if (beanClass == null)
+ return;
+ if (this.name == null) {
+ this.name = beanClass.getSimpleName();
+ }
+ if (propertyDescriptor == null)
+ setRootClassModel(true);
+ this.propertyDescriptor = propertyDescriptor;
+ Class beanType = beanClass;
+ if (beanClass.isArray()) {
+ beanType = beanClass.getComponentType();
+ setMany(true);
+ componentClass = beanType;
+ }
+
+ if (Collection.class.isAssignableFrom(beanClass)) {
+ if (this.propertyDescriptor != null) {
+ Method rmethod = propertyDescriptor.getReadMethod();
+ if (rmethod != null) {
+ Type returnType = rmethod.getGenericReturnType();
+ if (returnType instanceof ParameterizedType) {
+ Type gtype = ((ParameterizedType) returnType).getActualTypeArguments()[0];
+ if (gtype instanceof Class) {
+ beanType = (Class) gtype;
+ componentClass = beanType;
+ }
+ }
+ }
+ }
+ setList(true);
+ }
+
+ if (beanType.isPrimitive() || JavaBeanModelFactory.isPrimitiveObject(beanType)) {
+ this.parentClass = parentClass;
+ if (!isArray() && !isList())
+ setPrimitive(true);
+ return;
+ }
+ this.parentClass = parentClass;
+
+ if (!lazyLoadProperties)
+ this.getProperties();
+ }
+
+ JavaBeanModel(Class beanClass, String beanName, PropertyDescriptor propertyDescriptor) {
+ this(beanClass, beanName, propertyDescriptor, null, true);
+ }
+
+ public JavaBeanModel(Class beanClass) {
+ this(beanClass, null, null, null, true);
+ }
+
+ public JavaBeanModel(Class beanClass, String name) {
+ this(beanClass, name, null, null, true);
+ }
+
+ JavaBeanModel(Class beanClass, boolean lazyLoadProperties) {
+ this(beanClass, null, null, null, lazyLoadProperties);
+ }
+
+ public boolean isPrimitive() {
+ Class beanType = getBeanClass();
+ if (beanType == null)
+ return false;
+ if (beanType.isPrimitive() || JavaBeanModelFactory.isPrimitiveObject(beanType)) {
+ if (!isArray() && !isList())
+ setPrimitive(true);
+ }
+ return isPrimitive;
+ }
+
+ public void setPrimitive(boolean isPrimitive) {
+ this.isPrimitive = isPrimitive;
+ }
+
+ public boolean isArray() {
+ if (beanClass == null)
+ return false;
+ if (beanClass.isArray()) {
+ Class beanType = beanClass.getComponentType();
+ setMany(true);
+ componentClass = beanType;
+ setGenericType(true);
+ }
+ return many;
+ }
+
+ public Class getGenericType() {
+ return componentClass;
+ }
+
+ public void setMany(boolean many) {
+ this.many = many;
+ }
+
+ // public boolean isCollection() {
+ // return collection;
+ // }
+ //
+ // public void setCollection(boolean collection) {
+ // this.collection = collection;
+ // }
+
+ // public Class getTypeRef() {
+ // return typeRef;
+ // }
+ //
+ // public void setTypeRef(Class typeRef) {
+ // this.typeRef = typeRef;
+ // }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void addProperty(JavaBeanModel property) {
+ if (properties != null) {
+ properties.add(property);
+ property.setParent(this);
+ }
+ }
+
+ protected void createArrayChildren(Class<Object> clazz, String name, PropertyDescriptor pd,
+ Class<? extends Object> parentClass, boolean lazyLoad) {
+ JavaBeanModel proxyModel = newChildJavaBean(clazz, name, pd, parentClass, lazyLoad);
+ addProperty(proxyModel);
+ }
+
+ protected void createListChildren(Class<Object> clazz, String name, PropertyDescriptor pd,
+ Class<? extends Object> parentClass, boolean lazyLoad) {
+ JavaBeanModel proxyModel = newChildJavaBean(clazz, name, pd, parentClass, lazyLoad);
+ addProperty(proxyModel);
+ }
+
+ private List properties;
+
+ public List getProperties() {
+ JavaBeanModel parent = this.getParent();
+ if (parent != null) {
+ if (parent.isFlat())
+ return Collections.emptyList();
+ }
+ if (properties == null) {
+ properties = new ArrayList();
+ if (isPrimitive())
+ return properties;
+
+ Class beanType = beanClass;
+ if (isArray() || isList()) {
+ if (componentClass != null) {
+ createArrayChildren(componentClass, componentClass.getSimpleName(), null, beanClass,
+ this.lazyLoadProperties);
+ beanType = componentClass;
+ } else {
+ createListChildren(Object.class, "object", null, beanClass, this.lazyLoadProperties);
+ beanType = componentClass;
+ }
+ return properties;
+ }
+ if (beanType == null)
+ return Collections.EMPTY_LIST;
+ PropertyDescriptor[] pds = JavaPropertyUtils.getPropertyDescriptor(beanType);
+ for (int i = 0; i < pds.length; i++) {
+ PropertyDescriptor pd = pds[i];
+ if ("class".equals(pd.getName())) //$NON-NLS-1$
+ continue;
+ if (pd.getPropertyType() == null)
+ continue;
+ if (Collection.class.isAssignableFrom(pd.getPropertyType())) {
+ Method rmethod = pd.getReadMethod();
+ if (rmethod != null) {
+ Type returnType = rmethod.getGenericReturnType();
+ if (returnType instanceof ParameterizedType) {
+ Type[] types = ((ParameterizedType) returnType).getActualTypeArguments();
+ if (types == null || types.length == 0) {
+ continue;
+ }
+ } else {
+ continue;
+ }
+ }
+ }
+ JavaBeanModel jbm = newChildJavaBean(pd.getPropertyType(), pd.getName(), pd, beanClass,
+ this.lazyLoadProperties);
+ addProperty(jbm);
+ }
+ }
+ return properties;
+ }
+
+ protected JavaBeanModel newChildJavaBean(Class clazz, String name, PropertyDescriptor pd,
+ Class parentClass, boolean lazyLoading) {
+ return new JavaBeanModel(clazz, name, pd, parentClass, lazyLoading);
+ }
+
+ public void setProperties(List properties) {
+ this.properties = properties;
+ }
+
+ public boolean propertiesHasBeenLoaded() {
+ return properties != null;
+ }
+
+ /**
+ * @return the parent
+ */
+ public JavaBeanModel getParent() {
+ return parent;
+ }
+
+ /**
+ * @param parent
+ * the parent to set
+ */
+ public void setParent(JavaBeanModel parent) {
+ this.parent = parent;
+ }
+
+ public Object getWarning() {
+ return waring;
+ }
+
+ public void setWarning(Object waring) {
+ this.waring = waring;
+ }
+
+ public Object getError() {
+ return error;
+ }
+
+ public void setError(Object error) {
+ this.error = error;
+ }
+
+ public JavaBeanModel getRootParent() {
+ JavaBeanModel parent = this.getParent();
+ if (parent == null)
+ return this;
+ JavaBeanModel temp = parent;
+ while (temp != null) {
+ parent = temp;
+ temp = temp.getParent();
+ }
+ return parent;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ StringBuffer buffer = new StringBuffer("JavaName : " + name); //$NON-NLS-1$
+ if (beanClass != null)
+ buffer.append("BeanClass : " + this.beanClass.getName()); //$NON-NLS-1$
+ if (this.properties != null) {
+ buffer.append("\n"); //$NON-NLS-1$
+ for (Iterator<?> iterator = properties.iterator(); iterator.hasNext();) {
+ JavaBeanModel child = (JavaBeanModel) iterator.next();
+ buffer.append("\t"); //$NON-NLS-1$
+ buffer.append(child.toString());
+ buffer.append("\n"); //$NON-NLS-1$
+ }
+ }
+ return buffer.toString();
+ }
+
+ public String getSelectorString() {
+ if (parent == null) {
+ return getBeanClassString();
+ }
+ if (parent.getClass() == JavaBeanList.class) {
+ return getBeanClassString();
+ }
+
+ if (parent.isArray() || parent.isList()) {
+ return getBeanClassString();
+ }
+ return getName();
+
+ }
+
+ public boolean hasGenericType() {
+ return hasGenericType;
+ }
+
+ public void setGenericType(boolean hasGenericType) {
+ this.hasGenericType = hasGenericType;
+ }
+
+ public boolean isAttribute() {
+ return false;
+ }
+
+ public List<IXMLStructuredObject> getChildren() {
+ List ps = getProperties();
+ if (ps != null) {
+ return ps;
+ }
+ return null;
+ }
+
+ public Object getID() {
+ return getBeanClass();
+ }
+
+ public String getNodeName() {
+ return getSelectorString();
+ }
+
+ public boolean isRootNode() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void setComponentClass(Class clazz) {
+ componentClass = clazz;
+ }
+
+ public Class getComponentClass() {
+ return componentClass;
+ }
+
+ public void addExtendProperty(String name, String value) {
+ extendProperties.setProperty(name, value);
+ }
+
+ public String getExtendProperty(String name) {
+ return extendProperties.getProperty(name);
+ }
+
+ public Object clone() {
+ if (isList()) {
+ JavaBeanModel model = JavaBeanModelFactory.getJavaBeanModelWithLazyLoad(ArrayList.class);
+ model.setComponentClass(componentClass);
+ return model;
+ }
+ return JavaBeanModelFactory.getJavaBeanModelWithLazyLoad(this.getBeanClass());
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanModel.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanModelFactory.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanModelFactory.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanModelFactory.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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 java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * @author Dart Peng
+ *
+ */
+public class JavaBeanModelFactory {
+
+ private static final List<Object> PRIMITIVE_CLASSES = new ArrayList<Object>();
+ static{
+ PRIMITIVE_CLASSES.add(Integer.class);
+ PRIMITIVE_CLASSES.add(Double.class);
+ PRIMITIVE_CLASSES.add(Float.class);
+ PRIMITIVE_CLASSES.add(String.class);
+ PRIMITIVE_CLASSES.add(Long.class);
+ PRIMITIVE_CLASSES.add(java.util.Date.class);
+ PRIMITIVE_CLASSES.add(Character.class);
+ PRIMITIVE_CLASSES.add(BigInteger.class);
+ PRIMITIVE_CLASSES.add(BigDecimal.class);
+ PRIMITIVE_CLASSES.add(Boolean.class);
+ PRIMITIVE_CLASSES.add(Byte.class);
+ PRIMITIVE_CLASSES.add(java.util.Calendar.class);
+ }
+
+ /**
+ * @param beanClass
+ * @param modelName
+ * @return
+ */
+ public synchronized static JavaBeanModel getJavaBeanModelWithLazyLoad(Class<?> beanClass ) {
+ JavaBeanModel m = new JavaBeanModel(beanClass,true);
+ m.setRootClassModel(true);
+ return m;
+ }
+
+ public synchronized static JavaBeanModel getJavaBeanModel(Class<?> beanClass ) {
+ JavaBeanModel m = new JavaBeanModel(beanClass,false);
+ m.setRootClassModel(true);
+ return m;
+ }
+
+ public static boolean isPrimitiveObject(Class<?> clazz) {
+ return (PRIMITIVE_CLASSES.indexOf(clazz) != -1);
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanModelFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanModelLoadComposite.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanModelLoadComposite.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanModelLoadComposite.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -0,0 +1,431 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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 java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IType;
+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.operation.IRunnableContext;
+import org.eclipse.jface.viewers.ICellModifier;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerCell;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+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.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.SelectionDialog;
+import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
+import org.jboss.tools.smooks.configuration.editors.GraphicsConstants;
+import org.jboss.tools.smooks.configuration.editors.uitls.ProjectClassLoader;
+
+/**
+ * @author Dart Peng
+ *
+ * @CreateTime Jul 22, 2008
+ */
+public class JavaBeanModelLoadComposite extends Composite implements SelectionListener {
+
+ private List<JavaBeanModel> javabeanList = new ArrayList<JavaBeanModel>();
+ protected Text classText;
+// private Button classBrowseButton;
+ protected String classFullName;
+ protected boolean loadAtomic;
+ protected IJavaProject javaProject;
+ protected IRunnableContext runnableContext;
+ protected JavaBeanModel currentRootJavaBeanModel = null;
+ protected JavaBeanModel returnJavaBeanModel = null;
+
+ private List<IJavaBeanSelectionListener> selectionListenerList = new ArrayList<IJavaBeanSelectionListener>();
+
+ protected ProjectClassLoader loader = null;
+ private TableViewer listViewer;
+
+ public JavaBeanModelLoadComposite(Composite parent, int style, IRunnableContext runnableContext,
+ IJavaProject project, boolean loadJavapropertiesAtomic) throws Exception {
+ super(parent, style);
+ loadAtomic = loadJavapropertiesAtomic;
+ this.runnableContext = runnableContext;
+ if (this.runnableContext == null) {
+ this.runnableContext = SmooksConfigurationActivator.getDefault().getWorkbench()
+ .getActiveWorkbenchWindow();
+ // this.runnableContext = new
+ // ProgressMonitorDialog(parent.getShell());
+ if (this.runnableContext == null)
+ throw new Exception("Init error"); //$NON-NLS-1$
+ }
+
+ if (project != null) {
+ javaProject = project;
+ loader = new ProjectClassLoader(javaProject);
+ }
+
+ createCompositeContent();
+ }
+
+ public JavaBeanModelLoadComposite(Composite parent, int style, IRunnableContext runnableContext,
+ IJavaProject project) throws Exception {
+ this(parent, style, runnableContext, project, true);
+ }
+
+ public List<JavaBeanModel> getJavabeanList() {
+ return javabeanList;
+ }
+
+ public void addJavaBeanSelectionListener(IJavaBeanSelectionListener listener) {
+ this.selectionListenerList.add(listener);
+ }
+
+ public void removeJavaBeanSelectionListener(IJavaBeanSelectionListener listener) {
+ this.selectionListenerList.remove(listener);
+ }
+
+ public void setJavabeanList(List<JavaBeanModel> javabeanList) {
+ this.javabeanList = javabeanList;
+ }
+
+ protected Control createCompositeContent() {
+ Composite parent = this;
+ parent.setLayout(new FillLayout());
+ Composite com = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ com.setLayout(layout);
+
+ Label classLabel = new Label(com, SWT.NULL);
+ classLabel.setText("Class : "); //$NON-NLS-1$
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ classLabel.setLayoutData(gd);
+
+ Composite listViewerComposite = new Composite(com, SWT.NONE);
+ GridLayout listLayout = new GridLayout();
+ listLayout.numColumns = 2;
+ listViewerComposite.setLayout(listLayout);
+ gd = new GridData(GridData.FILL_BOTH);
+ gd.horizontalSpan = 2;
+ listViewerComposite.setLayoutData(gd);
+
+ listViewer = new TableViewer(listViewerComposite, SWT.BORDER);
+ TableColumn nameColumn = new TableColumn(listViewer.getTable(), SWT.NONE);
+ nameColumn.setText("Class");
+ TableColumn isArrayColumn = new TableColumn(listViewer.getTable(), SWT.NONE);
+ isArrayColumn.setText("Array");
+ TableColumn isListColumn = new TableColumn(listViewer.getTable(), SWT.NONE);
+ isListColumn.setText("List");
+
+ nameColumn.setWidth(400);
+ isArrayColumn.setWidth(60);
+ isListColumn.setWidth(60);
+
+ listViewer.getTable().setHeaderVisible(true);
+
+ gd = new GridData(GridData.FILL_BOTH);
+ listViewer.getTable().addMouseListener(new ColumnSelectionListener());
+ listViewer.getControl().setLayoutData(gd);
+ listViewer.setContentProvider(new IStructuredContentProvider() {
+
+ public Object[] getElements(Object inputElement) {
+ if (inputElement instanceof List) {
+ return ((List<?>) inputElement).toArray();
+ }
+ return new Object[] {};
+ }
+
+ public void dispose() {
+
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+
+ }
+
+ });
+ listViewer.setLabelProvider(new BeanViewerLabelProvider());
+ listViewer.setInput(javabeanList);
+
+ Composite buttonArea = new Composite(listViewerComposite, SWT.NONE);
+ gd = new GridData(GridData.FILL_VERTICAL);
+ buttonArea.setLayoutData(gd);
+
+ GridLayout buttonAreaLayout = new GridLayout();
+ buttonArea.setLayout(buttonAreaLayout);
+
+ Button addButton = new Button(buttonArea, SWT.NONE);
+ addButton.setText("Add");
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ addButton.setLayoutData(gd);
+ addButton.addSelectionListener(this);
+
+ Button removeButton = new Button(buttonArea, SWT.NONE);
+ removeButton.setText("Remove");
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ removeButton.setLayoutData(gd);
+ removeButton.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ IStructuredSelection selection = (IStructuredSelection) listViewer.getSelection();
+ if (selection.isEmpty())
+ return;
+ javabeanList.removeAll(selection.toList());
+ listViewer.refresh();
+ }
+
+ });
+ return com;
+ }
+
+ public ProjectClassLoader getProjectClassLoader() {
+ if (loader == null) {
+ try {
+ loader = new ProjectClassLoader(javaProject);
+ } catch (Exception e) {
+ }
+ }
+ return loader;
+ }
+
+ public void widgetDefaultSelected(SelectionEvent arg0) {
+ this.widgetSelected(arg0);
+
+ }
+
+ public void widgetSelected(SelectionEvent arg0) {
+
+ IJavaSearchScope scope = 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;
+ Throwable exception = null;
+ try {
+ dialog = JavaUI.createTypeDialog(this.getShell(), runnableContext, scope,
+ IJavaElementSearchConstants.CONSIDER_CLASSES_AND_INTERFACES, false);
+ dialog.setMessage("Search Java Class"); //$NON-NLS-1$
+ dialog.setTitle("Search"); //$NON-NLS-1$
+
+ if (dialog.open() == Window.OK) {
+ Object[] results = dialog.getResult();
+ if (results.length > 0) {
+ Object result = results[0];
+ String packageFullName = JavaModelUtil.getTypeContainerName((IType) result);
+ String className = null;
+ if (packageFullName == null || packageFullName.length() <= 0) {
+ className = ((IType) result).getElementName();
+ } else {
+ className = packageFullName + "." //$NON-NLS-1$
+ + ((IType) result).getElementName();
+ }
+ if (className != null) {
+ ClassLoader l = this.getProjectClassLoader();
+ if (l != null) {
+ Class clazz = l.loadClass(className);
+ if (clazz != null) {
+ JavaBeanModel model = JavaBeanModelFactory
+ .getJavaBeanModelWithLazyLoad(clazz);
+ javabeanList.add(model);
+ listViewer.refresh();
+ }
+ }
+
+ }
+ }
+ }
+ } catch (Throwable e) {
+ exception = e;
+ }
+
+ for (Iterator<IJavaBeanSelectionListener> iterator = this.selectionListenerList.iterator(); iterator
+ .hasNext();) {
+ IJavaBeanSelectionListener l = (IJavaBeanSelectionListener) iterator.next();
+ if (exception != null) {
+ l.exceptionOccur(new Exception(exception));
+ } else {
+ l.exceptionOccur(null);
+ }
+ }
+
+ }
+
+ private class BeanViewerCellModifyer implements ICellModifier {
+
+ public boolean canModify(Object element, String property) {
+ if (property.equals("name"))
+ return false;
+ return true;
+ }
+
+ public Object getValue(Object element, String property) {
+ if (element instanceof JavaBeanModel) {
+ if (property.equals("array")) {
+ return ((JavaBeanModel) element).isArray();
+ }
+ if (property.equals("list")) {
+ return ((JavaBeanModel) element).isList();
+ }
+ }
+ return Boolean.TRUE;
+ }
+
+ public void modify(Object element, String property, Object value) {
+
+ }
+
+ }
+
+ private class BeanViewerLabelProvider extends LabelProvider implements ITableLabelProvider {
+
+ public Image getColumnImage(Object element, int columnIndex) {
+
+ if (element instanceof JavaBeanModel) {
+ boolean isArray = "array".equals(((JavaBeanModel) element).getExtendProperty("many"));
+ boolean isList = "list".equals(((JavaBeanModel) element).getExtendProperty("many"));
+ switch (columnIndex) {
+ case 0:
+ if (isArray) {
+ return SmooksConfigurationActivator.getDefault().getImageRegistry().get(
+ GraphicsConstants.IMAGE_JAVA_ARRAY);
+ }
+ if (isList) {
+ return SmooksConfigurationActivator.getDefault().getImageRegistry().get(
+ GraphicsConstants.IMAGE_JAVA_COLLECTION);
+ }
+ return SmooksConfigurationActivator.getDefault().getImageRegistry().get(
+ GraphicsConstants.IMAGE_JAVA_OBJECT);
+ case 1:
+ if (isArray) {
+ return SmooksConfigurationActivator.getDefault().getImageRegistry().get(
+ GraphicsConstants.IMAGE_CHECKBOX_CHECK);
+ } else {
+ return SmooksConfigurationActivator.getDefault().getImageRegistry().get(
+ GraphicsConstants.IMAGE_CHECKBOX_UNCHECK);
+ }
+ case 2:
+ if (isList) {
+ return SmooksConfigurationActivator.getDefault().getImageRegistry().get(
+ GraphicsConstants.IMAGE_CHECKBOX_CHECK);
+ } else {
+ return SmooksConfigurationActivator.getDefault().getImageRegistry().get(
+ GraphicsConstants.IMAGE_CHECKBOX_UNCHECK);
+ }
+ }
+ }
+ return null;
+ }
+
+ public String getColumnText(Object element, int columnIndex) {
+ if (element instanceof JavaBeanModel) {
+ switch (columnIndex) {
+ case 0:
+ return ((JavaBeanModel) element).getBeanClassString();
+ case 1:
+ return null;
+ case 2:
+ return null;
+ }
+ }
+ return null;
+ }
+
+ }
+
+ public class ColumnSelectionListener implements MouseListener {
+
+ public void widgetSelected(SelectionEvent e) {
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+
+ }
+
+ public void mouseDoubleClick(MouseEvent e) {
+
+ }
+
+ public void mouseDown(MouseEvent e) {
+ if (!(e.button == 1))
+ return;
+ ViewerCell cell = listViewer.getCell(new Point(e.x, e.y));
+ if (cell != null) {
+ Object element = cell.getElement();
+ if (element instanceof JavaBeanModel) {
+ if (cell.getColumnIndex() == 1) {
+ String many = ((JavaBeanModel) element).getExtendProperty("many");
+ if ("array".equals(many)) {
+ ((JavaBeanModel) element).addExtendProperty("many", "");
+ } else {
+ ((JavaBeanModel) element).addExtendProperty("many", "array");
+ }
+ }
+ if (cell.getColumnIndex() == 2) {
+ String many = ((JavaBeanModel) element).getExtendProperty("many");
+ if ("list".equals(many)) {
+ ((JavaBeanModel) element).addExtendProperty("many", "");
+ } else {
+ ((JavaBeanModel) element).addExtendProperty("many", "list");
+ }
+ }
+ try {
+ listViewer.refresh(element);
+ } catch (Exception e1) {
+ }
+ }
+ }
+ }
+
+ public void mouseUp(MouseEvent e) {
+
+ }
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanModelLoadComposite.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanContentProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanContentProvider.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanContentProvider.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -0,0 +1,51 @@
+package org.jboss.tools.smooks.configuration.editors.javabean;
+
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.jboss.tools.smooks.configuration.editors.IXMLStructuredObject;
+/**
+ *
+ * @author Dart Peng
+ *
+ */
+public class JavabeanContentProvider implements ITreeContentProvider,
+ IStructuredContentProvider {
+
+ public Object[] getChildren(Object arg0) {
+ if (arg0 instanceof IXMLStructuredObject) {
+ return ((IXMLStructuredObject) arg0).getChildren().toArray();
+ }
+ return new Object[] {};
+ }
+
+ public Object getParent(Object arg0) {
+ if(arg0 instanceof JavaBeanModel){
+ return ((JavaBeanModel)arg0).getParent();
+ }
+ return null;
+ }
+
+ public boolean hasChildren(Object bean) {
+ if (bean instanceof JavaBeanModel) {
+ return !((JavaBeanModel) bean).isPrimitive();
+ }
+ return false;
+ }
+
+ public Object[] getElements(Object arg0) {
+ if (arg0 instanceof JavaBeanList) {
+ return ((JavaBeanList) arg0).getChildren().toArray();
+ }
+ return new Object[]{};
+ }
+
+ public void dispose() {
+
+ }
+
+ public void inputChanged(Viewer arg0, Object arg1, Object arg2) {
+
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanContentProvider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanStrucutredDataWizard.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanStrucutredDataWizard.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanStrucutredDataWizard.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -0,0 +1,177 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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 java.lang.reflect.Array;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.internal.core.JavaProject;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+import org.jboss.tools.smooks.configuration.editors.wizard.IStructuredDataSelectionWizard;
+import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils;
+
+/**
+ * @author Dart Peng
+ * @Date Aug 5, 2008
+ */
+public class JavabeanStrucutredDataWizard extends Wizard implements
+ IStructuredDataSelectionWizard, INewWizard {
+ JavaBeanConfigWizardPage page = null;
+ IJavaProject project = null;
+ public IJavaProject getProject() {
+ return project;
+ }
+
+ public void setProject(IJavaProject project) {
+ this.project = project;
+ }
+
+ Object result = null;
+ Properties properties = new Properties();
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.wizard.Wizard#addPages()
+ */
+ @Override
+ public void addPages() {
+ super.addPages();
+ if (page == null) {
+ page = new JavaBeanConfigWizardPage(project);
+ this.addPage(page);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.wizard.Wizard#performFinish()
+ */
+ @Override
+ public boolean performFinish() {
+ result = page.getJavaBeanModelList();
+ return true;
+ }
+
+ public JavaBeanList getJavaBeanList() {
+ JavaBeanList list = new JavaBeanList();
+ if (result != null && result instanceof List) {
+ for (Iterator<?> iterator = ((List<?>) result).iterator(); iterator
+ .hasNext();) {
+ JavaBeanModel javabean = (JavaBeanModel) iterator.next();
+ boolean isArray = "array".equals(javabean
+ .getExtendProperty("many"));
+ boolean isList = "list".equals(javabean
+ .getExtendProperty("many"));
+ if (isArray) {
+ Object arrayInstance = Array.newInstance(javabean
+ .getBeanClass(), 0);
+ JavaBeanModel model = JavaBeanModelFactory
+ .getJavaBeanModelWithLazyLoad(arrayInstance
+ .getClass());
+ list.addJavaBean(model);
+ continue;
+ }
+ if(isList){
+ JavaBeanModel model = JavaBeanModelFactory
+ .getJavaBeanModelWithLazyLoad(ArrayList.class);
+ model.setComponentClass(javabean.getBeanClass());
+ list.addJavaBean(model);
+ continue;
+ }
+ list.addJavaBean(javabean);
+ }
+ }
+ if (list.getChildren().size() <= 0) {
+ return null;
+ }
+ return list;
+ }
+
+ public Object getResult() {
+ return result;
+ }
+
+ public Object getReturnData() {
+ return getJavaBeanList();
+ }
+
+ public void init(IEditorSite site, IEditorInput input) {
+ if (input != null && input instanceof IFileEditorInput) {
+ IFileEditorInput fi = (IFileEditorInput) input;
+ IProject project = fi.getFile().getProject();
+ if (project instanceof IJavaProject) {
+ this.project = (IJavaProject) project;
+ } else {
+ this.project = JavaCore.create(project);
+ }
+ }
+ }
+
+ public String getInputDataTypeID() {
+ return SmooksModelUtils.INPUT_TYPE_JAVA;
+ }
+
+ public Properties getProperties() {
+ return this.properties;
+ }
+
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ if (selection != null) {
+ Object obj = selection.getFirstElement();
+ if (obj instanceof JavaProject) {
+ this.project = (JavaProject) obj;
+ }
+ if (obj instanceof IResource) {
+ IProject project = ((IResource) obj).getProject();
+ this.project = JavaCore.create(project);
+ }
+
+ if (project == null) {
+ if (obj instanceof IAdaptable) {
+ IResource relateResource = (IResource) ((IAdaptable) obj)
+ .getAdapter(IResource.class);
+ IProject project = relateResource.getProject();
+ this.project = JavaCore.create(project);
+ }
+ }
+ }
+ }
+
+ public String getStructuredDataSourcePath() {
+ List<JavaBeanModel> list = page.getJavaBeanModelList();
+ StringBuffer buffer = new StringBuffer();
+ for (Iterator<JavaBeanModel> iterator = list.iterator(); iterator
+ .hasNext(); buffer.append(";")) {
+ JavaBeanModel javaBeanModel = (JavaBeanModel) iterator.next();
+ Class<?> clazz = javaBeanModel.getBeanClass();
+ if (clazz != null) {
+ buffer.append(clazz.getName());
+ }
+ }
+ return buffer.toString();
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanStrucutredDataWizard.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanWiringUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanWiringUICreator.java 2009-04-10 16:56:24 UTC (rev 14691)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanWiringUICreator.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -24,6 +24,7 @@
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
import org.jboss.tools.smooks.model.javabean.BindingsType;
import org.jboss.tools.smooks.model.javabean.JavabeanPackage;
@@ -42,29 +43,26 @@
}
return false;
}
-
-
@Override
protected boolean canCreateMethodsSearchFieldEditor(EAttribute feature) {
- if(feature == JavabeanPackage.eINSTANCE.getWiringType_SetterMethod()){
+ if (feature == JavabeanPackage.eINSTANCE.getWiringType_SetterMethod()) {
return true;
}
return super.canCreateMethodsSearchFieldEditor(feature);
}
-
-
@Override
public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
- IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
if (feature == JavabeanPackage.eINSTANCE.getWiringType_BeanIdRef()) {
- if(model instanceof EObject){
- SmooksResourceListType smooksResourceList = getSmooksResourceList((EObject)model);
- if(smooksResourceList != null){
+ if (model instanceof EObject) {
+ SmooksResourceListType smooksResourceList = getSmooksResourceList((EObject) model);
+ if (smooksResourceList != null) {
String displayName = propertyDescriptor.getDisplayName(model);
toolkit.createLabel(parent, displayName + " :");
- final CCombo combo = new CCombo(parent,SWT.BORDER);
+ final CCombo combo = new CCombo(parent, SWT.BORDER);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
combo.setLayoutData(gd);
Object editValue = SmooksUIUtils.getEditValue(propertyDescriptor, model);
@@ -77,15 +75,15 @@
combo.add(beanId);
}
int selectIndex = list.indexOf(editValue);
- if(selectIndex != -1){
+ if (selectIndex != -1) {
combo.select(selectIndex);
}
final IItemPropertyDescriptor ip = propertyDescriptor;
final Object cmodel = model;
- combo.addModifyListener(new ModifyListener(){
+ combo.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
Object editValue = SmooksUIUtils.getEditValue(ip, cmodel);
- if(combo.getText().equals(editValue)){
+ if (combo.getText().equals(editValue)) {
return;
}
ip.setPropertyValue(cmodel, combo.getText());
@@ -95,18 +93,18 @@
}
}
}
- return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature);
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature,formEditor);
}
-
- protected List<String> getBeanIdList(SmooksResourceListType resourceList){
+
+ protected List<String> getBeanIdList(SmooksResourceListType resourceList) {
List<AbstractResourceConfig> rlist = resourceList.getAbstractResourceConfig();
List<String> beanIdList = new ArrayList<String>();
for (Iterator<?> iterator = rlist.iterator(); iterator.hasNext();) {
- AbstractResourceConfig abstractResourceConfig = (AbstractResourceConfig) iterator
- .next();
- if(abstractResourceConfig instanceof BindingsType){
- String beanId = ((BindingsType)abstractResourceConfig).getBeanId();
- if(beanId == null) continue;
+ AbstractResourceConfig abstractResourceConfig = (AbstractResourceConfig) iterator.next();
+ if (abstractResourceConfig instanceof BindingsType) {
+ String beanId = ((BindingsType) abstractResourceConfig).getBeanId();
+ if (beanId == null)
+ continue;
beanIdList.add(beanId);
}
}
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanlabelProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanlabelProvider.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanlabelProvider.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -0,0 +1,84 @@
+package org.jboss.tools.smooks.configuration.editors.javabean;
+
+import java.util.Collection;
+
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
+import org.jboss.tools.smooks.configuration.editors.GraphicsConstants;
+
+public class JavabeanlabelProvider extends LabelProvider {
+
+ public Image getJavaObjectImage() {
+ return SmooksConfigurationActivator.getDefault().getImageRegistry().get(
+ GraphicsConstants.IMAGE_JAVA_OBJECT);
+ }
+
+ public Image getJavaAttributeImage() {
+ return SmooksConfigurationActivator.getDefault().getImageRegistry().get(
+ GraphicsConstants.IMAGE_JAVA_ATTRIBUTE);
+ }
+
+ public String getText(Object element) {
+ if (element instanceof JavaBeanModel) {
+ String name = ((JavaBeanModel) element).getName();
+ if (name == null)
+ name = "<nonamed>";
+
+ Object error = ((JavaBeanModel) element).getError();
+ if (error != null) {
+ name = name + " " + "<" + error.toString() + ">";
+ return name;
+ }
+
+ Class<?> typeRef = ((JavaBeanModel) element).getBeanClass();
+ String typeStr = "";
+ if (typeRef != null) {
+ if (typeRef.isArray()) {
+ typeRef = typeRef.getComponentType();
+ typeStr = typeRef.getName() + "[]";
+ } else {
+ typeStr = typeRef.getName();
+ }
+ }
+ if (!typeStr.equals("")) {
+ name = name + " " + typeStr;
+ }
+
+ return name;
+ }
+ return super.getText(element);
+ }
+
+ @Override
+ public Image getImage(Object element) {
+ if (element instanceof JavaBeanModel) {
+ Object error = ((JavaBeanModel) element).getError();
+ if (error != null) {
+ return SmooksConfigurationActivator.getDefault().getImageRegistry().get(
+ GraphicsConstants.IMAGE_ERROR);
+ }
+ if (((JavaBeanModel) element).isPrimitive()) {
+ return this.getJavaAttributeImage();
+ } else {
+ Class<?> typeRef = ((JavaBeanModel) element).getBeanClass();
+ if (typeRef != null) {
+ if (typeRef.isArray()) {
+ return SmooksConfigurationActivator.getDefault().getImageRegistry().get(
+ GraphicsConstants.IMAGE_JAVA_ARRAY);
+ }
+ if (Collection.class.isAssignableFrom(typeRef)) {
+ return SmooksConfigurationActivator.getDefault().getImageRegistry().get(
+ GraphicsConstants.IMAGE_JAVA_COLLECTION);
+ }
+ if (typeRef.isInterface()) {
+ return SmooksConfigurationActivator.getDefault().getImageRegistry().get(
+ GraphicsConstants.IMAGE_JAVA_INTERFACE);
+ }
+ }
+ return this.getJavaObjectImage();
+ }
+ }
+ return super.getImage(element);
+ }
+}
\ No newline at end of file
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanlabelProvider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/PropertiesAndSetterMethodSearchFieldEditorCreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/PropertiesAndSetterMethodSearchFieldEditorCreator.java 2009-04-10 16:56:24 UTC (rev 14691)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/PropertiesAndSetterMethodSearchFieldEditorCreator.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -16,6 +16,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
import org.jboss.tools.smooks.model.javabean.BindingsType;
@@ -26,7 +27,7 @@
@Override
public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
- IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,SmooksMultiFormEditor formEditor) {
if(canCreatePropertiesSearchFieldEditor(feature)){
return createPropertiesSearchFieldEditor(toolkit, parent, propertyDescriptor, model);
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ConditionTypeUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ConditionTypeUICreator.java 2009-04-10 16:56:24 UTC (rev 14691)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ConditionTypeUICreator.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -16,6 +16,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
import org.jboss.tools.smooks.model.smooks.SmooksPackage;
@@ -34,7 +35,7 @@
* org.eclipse.emf.ecore.EAttribute)
*/
public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
- IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,SmooksMultiFormEditor formEditor) {
if (feature == SmooksPackage.eINSTANCE.getConditionType_Value()) {
}
if (feature == SmooksPackage.eINSTANCE.getConditionType_Evaluator()) {
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ImportTypeUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ImportTypeUICreator.java 2009-04-10 16:56:24 UTC (rev 14691)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ImportTypeUICreator.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -15,6 +15,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
import org.jboss.tools.smooks.model.smooks.SmooksPackage;
/**
@@ -32,7 +33,7 @@
* org.eclipse.emf.ecore.EAttribute)
*/
public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
- IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,SmooksMultiFormEditor formEditor) {
if (feature == SmooksPackage.eINSTANCE.getImportType_File()) {
}
return null;
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ParamTypeUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ParamTypeUICreator.java 2009-04-10 16:56:24 UTC (rev 14691)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ParamTypeUICreator.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -16,6 +16,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
import org.jboss.tools.smooks.model.smooks.SmooksPackage;
@@ -34,7 +35,7 @@
* org.eclipse.emf.ecore.EAttribute)
*/
public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
- IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,SmooksMultiFormEditor formEditor) {
if (feature == SmooksPackage.eINSTANCE.getParamType_Name()) {
}
if (feature == SmooksPackage.eINSTANCE.getParamType_Type()) {
@@ -44,7 +45,7 @@
@Override
public void createExtendUI(AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit,
- Composite parent, Object model) {
+ Composite parent, Object model, SmooksMultiFormEditor formEditor) {
SmooksUIUtils.createTextFieldEditor("Value", editingdomain, toolkit, parent, model);
SmooksUIUtils.createCDATAFieldEditor("CDATA", editingdomain, toolkit, parent, model);
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ResourceConfigTypeUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ResourceConfigTypeUICreator.java 2009-04-10 16:56:24 UTC (rev 14691)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ResourceConfigTypeUICreator.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -15,6 +15,9 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
+import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
import org.jboss.tools.smooks.model.smooks.SmooksPackage;
/**
@@ -32,15 +35,19 @@
* org.eclipse.emf.ecore.EAttribute)
*/
public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
- IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
-
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
if (feature == SmooksPackage.eINSTANCE.getResourceConfigType_Selector()) {
+ SmooksGraphicsExtType ext = formEditor.getSmooksGraphicsExt();
+ if (ext != null) {
+ return SmooksUIUtils.createSelectorFieldEditor(toolkit, parent, propertyDescriptor, model,
+ ext);
+ }
}
if (feature == SmooksPackage.eINSTANCE.getResourceConfigType_SelectorNamespace()) {
}
if (feature == SmooksPackage.eINSTANCE.getResourceConfigType_TargetProfile()) {
}
-
return null;
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ResourceTypeUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ResourceTypeUICreator.java 2009-04-10 16:56:24 UTC (rev 14691)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ResourceTypeUICreator.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -16,6 +16,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
import org.jboss.tools.smooks.model.smooks.SmooksPackage;
@@ -34,14 +35,13 @@
* org.eclipse.emf.ecore.EAttribute)
*/
public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
- IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,SmooksMultiFormEditor formEditor) {
if (feature == SmooksPackage.eINSTANCE.getResourceType_Value()) {
return SmooksUIUtils.createJavaTypeSearchFieldEditor(parent, toolkit,
propertyDescriptor, (EObject) model);
}
if (feature == SmooksPackage.eINSTANCE.getResourceType_Type()) {
}
-
return null;
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java 2009-04-10 16:56:24 UTC (rev 14691)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -10,6 +10,12 @@
******************************************************************************/
package org.jboss.tools.smooks.configuration.editors.uitls;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
@@ -27,6 +33,7 @@
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.JavaUI;
+import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
@@ -36,6 +43,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.forms.events.HyperlinkEvent;
@@ -43,8 +51,14 @@
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Hyperlink;
import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
+import org.jboss.tools.smooks.configuration.editors.IXMLStructuredObject;
+import org.jboss.tools.smooks.configuration.editors.InputStructuredDataSelectionDialog;
+import org.jboss.tools.smooks.configuration.editors.SelectorAttributes;
import org.jboss.tools.smooks.configuration.editors.javabean.JavaMethodsSelectionDialog;
import org.jboss.tools.smooks.configuration.editors.javabean.JavaPropertiesSelectionDialog;
+import org.jboss.tools.smooks.model.graphics.ext.DocumentRoot;
+import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
+import org.jboss.tools.smooks.model.graphics.ext.util.SmooksGraphicsExtResourceFactoryImpl;
import org.jboss.tools.smooks.model.javabean.BindingsType;
import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils;
@@ -54,9 +68,8 @@
*/
public class SmooksUIUtils {
- public static void createTextFieldEditor(String label,
- AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit, Composite parent,
- Object model) {
+ public static void createTextFieldEditor(String label, AdapterFactoryEditingDomain editingdomain,
+ FormToolkit toolkit, Composite parent, Object model) {
toolkit.createLabel(parent, "Value :");
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
final Text valueText = toolkit.createText(parent, "", SWT.FLAT);
@@ -77,15 +90,48 @@
}
String text = SmooksModelUtils.getAnyTypeText((AnyType) fm);
if (!valueText.getText().equals(text)) {
- SmooksModelUtils.setTextToSmooksType(fEditingDomain,(AnyType) fm, valueText.getText());
+ SmooksModelUtils.setTextToSmooksType(fEditingDomain, (AnyType) fm, valueText.getText());
}
}
});
}
- public static void createCDATAFieldEditor(String label,
- AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit, Composite parent,
- Object model) {
+ public static Composite createSelectorFieldEditor(FormToolkit toolkit, Composite parent,
+ final IItemPropertyDescriptor propertyDescriptor, Object model,
+ final SmooksGraphicsExtType extType) {
+ return createDialogFieldEditor(parent, toolkit, propertyDescriptor, "Browse", new IFieldDialog() {
+ public Object open(Shell shell) {
+ InputStructuredDataSelectionDialog dialog = new InputStructuredDataSelectionDialog(shell,
+ extType);
+ if (dialog.open() == Dialog.OK) {
+ Object currentSelection = dialog.getCurrentSelection();
+ if (currentSelection instanceof IXMLStructuredObject) {
+ String s = SmooksUIUtils.generateFullPath((IXMLStructuredObject) currentSelection,
+ "/");
+ return s;
+ }
+ }
+ return null;
+ }
+
+ }, (EObject) model);
+ }
+
+ public static SmooksGraphicsExtType loadSmooksGraphicsExt(IFile file) throws IOException {
+ Resource resource = new SmooksGraphicsExtResourceFactoryImpl().createResource(URI
+ .createPlatformResourceURI(file.getFullPath().toPortableString(), false));
+ resource.load(Collections.emptyMap());
+ if (resource.getContents().size() > 0) {
+ Object obj = resource.getContents().get(0);
+ if (obj instanceof DocumentRoot) {
+ return ((DocumentRoot) obj).getSmooksGraphicsExt();
+ }
+ }
+ return null;
+ }
+
+ public static void createCDATAFieldEditor(String label, AdapterFactoryEditingDomain editingdomain,
+ FormToolkit toolkit, Composite parent, Object model) {
Label label1 = toolkit.createLabel(parent, label + " :");
GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
label1.setLayoutData(gd);
@@ -110,27 +156,26 @@
}
String text = SmooksModelUtils.getAnyTypeCDATA((AnyType) fm);
if (!cdataText.getText().equals(text)) {
- SmooksModelUtils.setCDATAToSmooksType(fEditingDomain,(AnyType) fm, cdataText.getText());
+ SmooksModelUtils.setCDATAToSmooksType(fEditingDomain, (AnyType) fm, cdataText.getText());
}
}
});
}
- public static void createCommentFieldEditor(String label, FormToolkit toolkit,
- Composite parent, Object model) {
+ public static void createCommentFieldEditor(String label, FormToolkit toolkit, Composite parent,
+ Object model) {
}
public static Composite createJavaTypeSearchFieldEditor(Composite parent, FormToolkit toolkit,
- final IItemPropertyDescriptor propertyDescriptor, final EObject model) {
+ final IItemPropertyDescriptor propertyDescriptor, final EObject model) {
if (model instanceof EObject) {
final Resource resource = ((EObject) model).eResource();
URI uri = resource.getURI();
IResource workspaceResource = null;
if (uri.isPlatformResource()) {
String path = uri.toPlatformString(true);
- workspaceResource = ResourcesPlugin.getWorkspace().getRoot().findMember(
- new Path(path));
+ workspaceResource = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(path));
JavaTypeFieldDialog dialog = new JavaTypeFieldDialog(workspaceResource);
String displayName = propertyDescriptor.getDisplayName(model);
Hyperlink link = toolkit.createHyperlink(parent, displayName + " :", SWT.NONE);
@@ -141,8 +186,8 @@
fillLayout.marginHeight = 0;
fillLayout.marginWidth = 0;
classTextComposite.setLayout(fillLayout);
- final SearchComposite searchComposite = new SearchComposite(classTextComposite,
- toolkit, "Search Class", dialog, SWT.NONE);
+ final SearchComposite searchComposite = new SearchComposite(classTextComposite, toolkit,
+ "Search Class", dialog, SWT.NONE);
Object editValue = getEditValue(propertyDescriptor, model);
if (editValue != null) {
searchComposite.getText().setText(editValue.toString());
@@ -151,20 +196,18 @@
public void modifyText(ModifyEvent e) {
Object value = propertyDescriptor.getPropertyValue(model);
if (value != null && value instanceof PropertyValueWrapper) {
- Object editValue = ((PropertyValueWrapper) value)
- .getEditableValue(model);
+ Object editValue = ((PropertyValueWrapper) value).getEditableValue(model);
if (editValue != null) {
if (!editValue.equals(searchComposite.getText().getText())) {
- propertyDescriptor.setPropertyValue(model, searchComposite
- .getText().getText());
+ propertyDescriptor.setPropertyValue(model, searchComposite.getText()
+ .getText());
}
} else {
- propertyDescriptor.setPropertyValue(model, searchComposite
- .getText().getText());
+ propertyDescriptor.setPropertyValue(model, searchComposite.getText()
+ .getText());
}
} else {
- propertyDescriptor.setPropertyValue(model, searchComposite.getText()
- .getText());
+ propertyDescriptor.setPropertyValue(model, searchComposite.getText().getText());
}
}
});
@@ -173,17 +216,18 @@
public void linkActivated(HyperlinkEvent e) {
try {
- if (fresource == null) return;
+ if (fresource == null)
+ return;
if (fresource.getProject().hasNature(JavaCore.NATURE_ID)) {
IJavaProject javaProject = JavaCore.create(fresource.getProject());
String typeName = searchComposite.getText().getText();
IJavaElement result = javaProject.findType(typeName);
- if (result != null) JavaUI.openInEditor(result);
+ if (result != null)
+ JavaUI.openInEditor(result);
else {
MessageDialog.openInformation(classTextComposite.getShell(),
- "Can't find type", "Can't find type \"" + typeName
- + "\" in \"" + javaProject.getProject().getName()
- + "\" project.");
+ "Can't find type", "Can't find type \"" + typeName + "\" in \""
+ + javaProject.getProject().getName() + "\" project.");
}
}
} catch (PartInitException ex) {
@@ -232,9 +276,9 @@
return null;
}
- public static Composite createJavaMethodSearchFieldEditor(BindingsType container,
- Composite parent, FormToolkit toolkit, final IItemPropertyDescriptor propertyDescriptor,
- String buttonName, final EObject model) {
+ public static Composite createJavaMethodSearchFieldEditor(BindingsType container, Composite parent,
+ FormToolkit toolkit, final IItemPropertyDescriptor propertyDescriptor, String buttonName,
+ final EObject model) {
String classString = ((BindingsType) container).getClass_();
IJavaProject project = getJavaProject(container);
try {
@@ -242,7 +286,7 @@
Class<?> clazz = classLoader.loadClass(classString);
JavaMethodsSelectionDialog dialog = new JavaMethodsSelectionDialog(project, clazz);
return SmooksUIUtils.createDialogFieldEditor(parent, toolkit, propertyDescriptor,
- "Select method", dialog, (EObject) model);
+ "Select method", dialog, (EObject) model);
} catch (JavaModelException e) {
// ignore
} catch (ClassNotFoundException e) {
@@ -251,9 +295,78 @@
return null;
}
- public static Composite createJavaPropertySearchFieldEditor(BindingsType container,
- Composite parent, FormToolkit toolkit, final IItemPropertyDescriptor propertyDescriptor,
- String buttonName, final EObject model) {
+ public static String generateFullPath(IXMLStructuredObject node, final String sperator) {
+ return generatePath(node, getRootParent(node), sperator, true);
+ }
+
+ public static IXMLStructuredObject getRootParent(IXMLStructuredObject child) {
+ IXMLStructuredObject parent = child.getParent();
+ if (child.isRootNode())
+ return child;
+ if (parent == null || parent.isRootNode())
+ return child;
+ IXMLStructuredObject temp = parent;
+ while (temp != null && !temp.isRootNode()) {
+ parent = temp;
+ temp = temp.getParent();
+ }
+ return parent;
+ }
+
+ public static String generatePath(IXMLStructuredObject node, SelectorAttributes selectorAttributes) {
+ String sperator = selectorAttributes.getSelectorSperator();
+ String policy = selectorAttributes.getSelectorPolicy();
+ if (sperator == null)
+ sperator = " ";
+ if (policy == null)
+ policy = SelectorAttributes.FULL_PATH;
+ if (policy.equals(SelectorAttributes.FULL_PATH)) {
+ return generateFullPath(node, sperator);
+ }
+ if (policy.equals(SelectorAttributes.INCLUDE_PARENT)) {
+ return generatePath(node, node.getParent(), sperator, true);
+ }
+ if (policy.equals(SelectorAttributes.IGNORE_ROOT)) {
+
+ }
+ if (policy.equals(SelectorAttributes.ONLY_NAME)) {
+ return node.getNodeName();
+ }
+ return generateFullPath(node, sperator);
+ }
+
+ public static String generatePath(IXMLStructuredObject startNode, IXMLStructuredObject stopNode,
+ final String sperator, boolean includeContext) {
+ String name = "";
+ if (startNode == stopNode) {
+ return startNode.getNodeName();
+ }
+ List<IXMLStructuredObject> nodeList = new ArrayList<IXMLStructuredObject>();
+ IXMLStructuredObject temp = startNode;
+ if (stopNode != null) {
+ while (temp != stopNode.getParent() && temp != null) {
+ nodeList.add(temp);
+ temp = temp.getParent();
+ }
+ }
+ int length = nodeList.size();
+ if (!includeContext) {
+ length--;
+ }
+ for (int i = 0; i < length; i++) {
+ IXMLStructuredObject n = nodeList.get(i);
+ String nodeName = n.getNodeName();
+ if (n.isAttribute()) {
+ nodeName = "@" + nodeName;
+ }
+ name = sperator + nodeName + name;
+ }
+ return name.trim();
+ }
+
+ public static Composite createJavaPropertySearchFieldEditor(BindingsType container, Composite parent,
+ FormToolkit toolkit, final IItemPropertyDescriptor propertyDescriptor, String buttonName,
+ final EObject model) {
String classString = ((BindingsType) container).getClass_();
IJavaProject project = getJavaProject(container);
try {
@@ -261,7 +374,7 @@
Class<?> clazz = classLoader.loadClass(classString);
JavaPropertiesSelectionDialog dialog = new JavaPropertiesSelectionDialog(project, clazz);
return SmooksUIUtils.createDialogFieldEditor(parent, toolkit, propertyDescriptor,
- "Select property", dialog, (EObject) model);
+ "Select property", dialog, (EObject) model);
} catch (JavaModelException e) {
// ignore
} catch (ClassNotFoundException e) {
@@ -280,8 +393,8 @@
}
public static Composite createDialogFieldEditor(Composite parent, FormToolkit toolkit,
- final IItemPropertyDescriptor propertyDescriptor, String buttonName, IFieldDialog dialog,
- final EObject model) {
+ final IItemPropertyDescriptor propertyDescriptor, String buttonName, IFieldDialog dialog,
+ final EObject model) {
String displayName = propertyDescriptor.getDisplayName(model);
toolkit.createLabel(parent, displayName + " :");
final Composite classTextComposite = toolkit.createComposite(parent);
@@ -291,8 +404,8 @@
fillLayout.marginHeight = 0;
fillLayout.marginWidth = 0;
classTextComposite.setLayout(fillLayout);
- final SearchComposite searchComposite = new SearchComposite(classTextComposite, toolkit,
- buttonName, dialog, SWT.NONE);
+ final SearchComposite searchComposite = new SearchComposite(classTextComposite, toolkit, buttonName,
+ dialog, SWT.NONE);
Object editValue = getEditValue(propertyDescriptor, model);
if (editValue != null) {
searchComposite.getText().setText(editValue.toString());
@@ -304,12 +417,10 @@
Object editValue = ((PropertyValueWrapper) value).getEditableValue(model);
if (editValue != null) {
if (!editValue.equals(searchComposite.getText().getText())) {
- propertyDescriptor.setPropertyValue(model, searchComposite.getText()
- .getText());
+ propertyDescriptor.setPropertyValue(model, searchComposite.getText().getText());
}
} else {
- propertyDescriptor.setPropertyValue(model, searchComposite.getText()
- .getText());
+ propertyDescriptor.setPropertyValue(model, searchComposite.getText().getText());
}
} else {
propertyDescriptor.setPropertyValue(model, searchComposite.getText().getText());
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/BaseViewerInitor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/BaseViewerInitor.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/BaseViewerInitor.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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.wizard;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+
+/**
+ * @author Dart Peng
+ * @Date Aug 6, 2008
+ */
+public class BaseViewerInitor implements IViewerInitor {
+ protected String typeID = null;
+ protected String name = "nonamed";
+ protected String wizardIconPath = null;
+ protected String description;
+ protected ITreeContentProvider treeContentProvider;
+ protected IStructuredDataSelectionWizard structuredDataLoadWizard;
+ protected ILabelProvider labelProvider;
+
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @param name
+ * the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+ /**
+ * @return the typeID
+ */
+ public String getTypeID() {
+ return typeID;
+ }
+
+ /**
+ * @param typeID
+ * the typeID to set
+ */
+ public void setTypeID(String typeID) {
+ this.typeID = typeID;
+ }
+
+
+ /**
+ * @return the wizardIconPath
+ */
+ public String getWizardIconPath() {
+ return wizardIconPath;
+ }
+
+ /**
+ * @param wizardIconPath
+ * the wizardIconPath to set
+ */
+ public void setWizardIconPath(String wizardIconPath) {
+ this.wizardIconPath = wizardIconPath;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ /**
+ * @return the treeContentProvider
+ */
+ public ITreeContentProvider getTreeContentProvider() {
+ return treeContentProvider;
+ }
+
+ /**
+ * @param treeContentProvider the treeContentProvider to set
+ */
+ public void setTreeContentProvider(ITreeContentProvider treeContentProvider) {
+ this.treeContentProvider = treeContentProvider;
+ }
+
+ /**
+ * @return the structuredDataLoadWizard
+ */
+ public IStructuredDataSelectionWizard getStructuredDataLoadWizard() {
+ return structuredDataLoadWizard;
+ }
+
+ /**
+ * @param structuredDataLoadWizard the structuredDataLoadWizard to set
+ */
+ public void setStructuredDataLoadWizard(IStructuredDataSelectionWizard structuredDataLoadWizard) {
+ this.structuredDataLoadWizard = structuredDataLoadWizard;
+ }
+
+ /**
+ * @return the labelProvider
+ */
+ public ILabelProvider getLabelProvider() {
+ return labelProvider;
+ }
+
+ /**
+ * @param labelProvider the labelProvider to set
+ */
+ public void setLabelProvider(ILabelProvider labelProvider) {
+ this.labelProvider = labelProvider;
+ }
+
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/BaseViewerInitor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/IStructuredDataSelectionWizard.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/IStructuredDataSelectionWizard.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/IStructuredDataSelectionWizard.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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.wizard;
+
+import java.util.Properties;
+
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+
+/**
+ * @author Dart Peng
+ * @Date Aug 5, 2008
+ */
+public interface IStructuredDataSelectionWizard extends IWizard {
+
+ public Object getReturnData();
+
+ public void init(IEditorSite site, IEditorInput input);
+
+ public String getInputDataTypeID();
+
+ public Properties getProperties();
+
+ public String getStructuredDataSourcePath();
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/IStructuredDataSelectionWizard.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/IViewerInitor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/IViewerInitor.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/IViewerInitor.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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.wizard;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+
+/**
+ * @author Dart Peng
+ * @Date Aug 5, 2008
+ */
+public interface IViewerInitor {
+
+ ILabelProvider getLabelProvider();
+
+ ITreeContentProvider getTreeContentProvider();
+
+ String getTypeID();
+
+ IStructuredDataSelectionWizard getStructuredDataLoadWizard();
+
+ String getName();
+
+ String getWizardIconPath();
+
+ String getDescription();
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/IViewerInitor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/StructuredDataSelectionWizard.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/StructuredDataSelectionWizard.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/StructuredDataSelectionWizard.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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.wizard;
+
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+
+/**
+ * @author Dart Peng
+ * @Date Jul 29, 2008
+ */
+public class StructuredDataSelectionWizard extends Wizard {
+
+ TransformDataWizardSelectionPage selectTypePage;
+
+ String activeTransformID= null;
+
+ IEditorSite site;
+
+ IEditorInput input;
+ /**
+ * @return the site
+ */
+ public IEditorSite getSite() {
+ return site;
+ }
+
+
+
+ /**
+ * @param site the site to set
+ */
+ public void setSite(IEditorSite site) {
+ this.site = site;
+ }
+
+
+
+ /**
+ * @return the input
+ */
+ public IEditorInput getInput() {
+ return input;
+ }
+
+
+
+ /**
+ * @param input the input to set
+ */
+ public void setInput(IEditorInput input) {
+ this.input = input;
+ }
+
+
+
+ @Override
+ public void addPages() {
+// super.addPages();
+ selectTypePage = new TransformDataWizardSelectionPage("Select type");
+ this.addPage(selectTypePage);
+ }
+
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.wizard.Wizard#performFinish()
+ */
+ @Override
+ public boolean performFinish() {
+ return false;
+ }
+
+ public Object getResultObject(){
+ return null;
+ }
+
+
+ public String getActiveTransformID() {
+ return activeTransformID;
+ }
+
+
+
+ public void setActiveTransformID(String activeTransformID) {
+ this.activeTransformID = activeTransformID;
+ }
+
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/StructuredDataSelectionWizard.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/TransformDataWizardSelectionPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/TransformDataWizardSelectionPage.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/TransformDataWizardSelectionPage.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -0,0 +1,229 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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.wizard;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.IWizardNode;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.WizardSelectionPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+/**
+ * @author Dart Peng
+ * @Date Jul 30, 2008
+ */
+public class TransformDataWizardSelectionPage extends WizardSelectionPage {
+
+ List<Object> registedWizard = new ArrayList<Object>();
+ TreeViewer viewer = null;
+ private Label desLabel;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets
+ * .Composite)
+ */
+ public void createControl(Composite parent) {
+ // parent.setLayout(new FillLayout());
+ Composite main = new Composite(parent, SWT.NONE);
+
+ GridLayout gridLayout = new GridLayout();
+ main.setLayout(gridLayout);
+
+ viewer = new TreeViewer(main, SWT.NONE);
+ viewer.setContentProvider(new WizardNodeContentProvider());
+ viewer.setLabelProvider(new WizardNodeLabelProvider());
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ viewer.getTree().setLayoutData(gd);
+ createAllExtentionWizard();
+
+ desLabel = new Label(main, SWT.NONE);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ desLabel.setLayoutData(gd);
+
+ viewer.setInput(registedWizard);
+ if (!registedWizard.isEmpty()) {
+ this.setSelectedNode((IWizardNode) registedWizard.get(0));
+ }
+ viewer.addSelectionChangedListener(new ISelectionChangedListener() {
+
+ public void selectionChanged(SelectionChangedEvent event) {
+ IStructuredSelection selection = (IStructuredSelection) event.getSelection();
+ IWizardNode node = (IWizardNode) selection.getFirstElement();
+ desLabel.setText(""); //$NON-NLS-1$
+ if (node != null) {
+ setSelectedNode(node);
+ if (node instanceof TransformSelectWizardNode) {
+ String des = ((TransformSelectWizardNode) node).getDescription();
+ desLabel.setText(des);
+ }
+ IStructuredDataSelectionWizard wizard = (IStructuredDataSelectionWizard) node.getWizard();
+ StructuredDataSelectionWizard pw = (StructuredDataSelectionWizard) getWizard();
+ wizard.init(pw.getSite(), pw.getInput());
+ }
+
+ }
+
+ });
+ viewer.addDoubleClickListener(new IDoubleClickListener() {
+
+ public void doubleClick(DoubleClickEvent event) {
+ getContainer().showPage(getNextPage());
+ }
+
+ });
+
+ // for (Iterator iterator = registedWizard.iterator();
+ // iterator.hasNext();) {
+ // IWizardNode node = (IWizardNode) iterator.next();
+ // node.
+ // }
+ this.setControl(main);
+ }
+
+ public IWizardPage getNextPage() {
+ if (this.getSelectedNode() == null) {
+ return null;
+ }
+
+ boolean isCreated = getSelectedNode().isContentCreated();
+
+ IWizard wizard = getSelectedNode().getWizard();
+
+ if (wizard == null) {
+ setSelectedNode(null);
+ return null;
+ }
+ if (!isCreated) {
+ wizard.addPages();
+ }
+ return wizard.getStartingPage();
+ }
+
+ protected void createAllExtentionWizard() {
+ Collection<IViewerInitor> viewers = ViewerInitorStore.getInstance().getViewerInitorCollection();
+ if (viewer == null)
+ return;
+ for (Iterator<IViewerInitor> iterator = viewers.iterator(); iterator.hasNext();) {
+ IViewerInitor viewerInitor = (IViewerInitor) iterator.next();
+ TransformSelectWizardNode wn = new TransformSelectWizardNode();
+ IStructuredDataSelectionWizard wizard = viewerInitor.getStructuredDataLoadWizard();
+ if (wizard == null)
+ continue;
+ wn.setWizard(wizard);
+ wn.setName(viewerInitor.getName());
+ wn.setIconPath(viewerInitor.getWizardIconPath());
+ wn.setDescription(viewerInitor.getDescription());
+ this.registedWizard.add(wn);
+ }
+ }
+
+ public TransformDataWizardSelectionPage(String pageName) {
+ super(pageName);
+ setDescription("Selection data type"); //$NON-NLS-1$
+ setTitle("Selection data type"); //$NON-NLS-1$
+
+ }
+
+ public void activeSelectionWizard() {
+
+ }
+
+ private class WizardNodeLabelProvider extends LabelProvider {
+
+ private HashMap<Object,Object> map = new HashMap<Object,Object>();
+
+ @Override
+ public Image getImage(Object element) {
+ if (element instanceof TransformSelectWizardNode) {
+ String path = ((TransformSelectWizardNode) element).getIconPath();
+ if (path != null) {
+ Image icon = (Image) map.get(path);
+ if (icon == null) {
+
+ }
+ }
+ }
+ return super.getImage(element);
+ }
+
+ @Override
+ public String getText(Object element) {
+ if (element instanceof TransformSelectWizardNode) {
+ return ((TransformSelectWizardNode) element).getName();
+ }
+ return super.getText(element);
+ }
+
+ @Override
+ public void dispose() {
+ super.dispose();
+ }
+ }
+
+ private class WizardNodeContentProvider implements ITreeContentProvider {
+
+ public Object[] getChildren(Object parentElement) {
+ // TODO Auto-generated method stub
+ return new Object[] {};
+ }
+
+ public Object getParent(Object element) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean hasChildren(Object element) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public Object[] getElements(Object inputElement) {
+ if (inputElement instanceof List) {
+ return ((List<?>) inputElement).toArray();
+ }
+ return new Object[] {};
+ }
+
+ public void dispose() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+
+ }
+
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/TransformDataWizardSelectionPage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/TransformSelectWizardNode.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/TransformSelectWizardNode.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/TransformSelectWizardNode.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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.wizard;
+
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.IWizardNode;
+import org.eclipse.swt.graphics.Point;
+
+/**
+ * @author Dart Peng
+ * @Date Jul 30, 2008
+ */
+public class TransformSelectWizardNode implements IWizardNode {
+ IWizard wizard = null;
+ String name = "";
+ String iconPath = null;
+ String pluginID = null;
+ String description = "";
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getPluginID() {
+ return pluginID;
+ }
+
+ public void setPluginID(String pluginID) {
+ this.pluginID = pluginID;
+ }
+
+ public String getIconPath() {
+ return iconPath;
+ }
+
+ public void setIconPath(String iconPath) {
+ this.iconPath = iconPath;
+ }
+
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void setWizard(IWizard wizard) {
+ this.wizard = wizard;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.wizard.IWizardNode#dispose()
+ */
+ public void dispose() {
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.wizard.IWizardNode#getExtent()
+ */
+ public Point getExtent() {
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.wizard.IWizardNode#getWizard()
+ */
+ public IWizard getWizard() {
+ return wizard;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.wizard.IWizardNode#isContentCreated()
+ */
+ public boolean isContentCreated() {
+ return wizard.getPageCount() > 0;
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/TransformSelectWizardNode.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/ViewerInitorStore.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/ViewerInitorStore.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/ViewerInitorStore.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -0,0 +1,139 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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.wizard;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.jboss.tools.smooks.configuration.editors.javabean.JavabeanContentProvider;
+import org.jboss.tools.smooks.configuration.editors.javabean.JavabeanlabelProvider;
+import org.jboss.tools.smooks.configuration.editors.javabean.JavabeanStrucutredDataWizard;
+import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils;
+
+/**
+ * @author Dart Peng
+ * @Date Aug 5, 2008
+ */
+public class ViewerInitorStore {
+ protected static ViewerInitorStore instance = null;
+
+ protected HashMap<String, IViewerInitor> initorMap = null;
+
+ protected ViewerInitorStore() {
+
+ }
+
+ public Collection<IViewerInitor> getViewerInitorCollection() {
+ Map<String, IViewerInitor> map = this.getInitorMap();
+ if (map != null) {
+ return map.values();
+ }
+ return null;
+ }
+
+ public IStructuredDataSelectionWizard getStructuredDataCreationWizard(String typeID) {
+ if (this.getInitorMap() == null)
+ return null;
+ IViewerInitor initor = this.getInitorMap().get(typeID);
+ if (initor == null)
+ return null;
+ return initor.getStructuredDataLoadWizard();
+ }
+
+ public ILabelProvider getLabelProvider(String typeID) {
+ if (this.getInitorMap() == null)
+ return null;
+ IViewerInitor initor = this.getInitorMap().get(typeID);
+ if (initor == null)
+ return null;
+ return initor.getLabelProvider();
+ }
+
+ public ITreeContentProvider getTreeCotentProvider(String typeID) {
+ if (this.getInitorMap() == null)
+ return null;
+ IViewerInitor initor = this.getInitorMap().get(typeID);
+ if (initor == null)
+ return null;
+ return initor.getTreeContentProvider();
+ }
+
+ public synchronized static ViewerInitorStore getInstance() {
+ if (instance == null) {
+ instance = new ViewerInitorStore();
+ }
+ return instance;
+ }
+
+ /**
+ * @return the initorMap
+ */
+ protected HashMap<String, IViewerInitor> getInitorMap() {
+ if (initorMap == null) {
+ initorMap = createNewInitorMap();
+ }
+ return initorMap;
+ }
+
+ // protected ILabelProvider createLabelProvider(BaseViewerInitor initor,
+ // IConfigurationElement element) {
+ // try {
+ // initor
+ // .setLabelProvider();
+ // } catch (CoreException e) {
+ // // ignore
+ // }
+ // return initor.getLabelProvider();
+ // }
+ //
+ // protected ILabelProvider createTreeContentProvider(BaseViewerInitor
+ // initor,
+ // IConfigurationElement element) {
+ // try {
+ // initor
+ // .setTreeContentProvider();
+ // } catch (CoreException e) {// ignore
+ // }
+ // return initor.getLabelProvider();
+ // }
+ //
+ // protected ILabelProvider createCreationWizard(BaseViewerInitor initor,
+ // IConfigurationElement element) {
+ // try {
+ // initor
+ // .setStructuredDataLoadWizard);
+ // } catch (CoreException e) {// ignore
+ // }
+ // return initor.getLabelProvider();
+ // }
+
+ protected HashMap<String, IViewerInitor> createNewInitorMap() {
+ HashMap<String, IViewerInitor> map = new HashMap<String, IViewerInitor>();
+ BaseViewerInitor javabeanViewerInitor = new BaseViewerInitor();
+ String name = "Java";
+ String description = "Java class";
+ String iconPath = null;
+ String typeID = SmooksModelUtils.INPUT_TYPE_JAVA;
+
+ javabeanViewerInitor.setName(name);
+ javabeanViewerInitor.setDescription(description);
+ javabeanViewerInitor.setWizardIconPath(iconPath);
+ javabeanViewerInitor.setTypeID(typeID);
+ javabeanViewerInitor.setLabelProvider(new JavabeanlabelProvider());
+ javabeanViewerInitor.setTreeContentProvider(new JavabeanContentProvider());
+ javabeanViewerInitor.setStructuredDataLoadWizard(new JavabeanStrucutredDataWizard());
+ map.put(typeID, javabeanViewerInitor);
+ return map;
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/ViewerInitorStore.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/BindToUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/BindToUICreator.java 2009-04-10 16:56:24 UTC (rev 14691)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/BindToUICreator.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -15,6 +15,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
import org.jboss.tools.smooks.model.xsl.XslPackage;
/**
@@ -32,7 +33,7 @@
* org.eclipse.emf.ecore.EAttribute)
*/
public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
- IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,SmooksMultiFormEditor formEditor) {
if (feature == XslPackage.eINSTANCE.getBindTo_Id()) {
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/OutputToUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/OutputToUICreator.java 2009-04-10 16:56:24 UTC (rev 14691)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/OutputToUICreator.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -15,6 +15,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
import org.jboss.tools.smooks.model.xsl.XslPackage;
/**
@@ -32,7 +33,7 @@
* org.eclipse.emf.ecore.EAttribute)
*/
public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
- IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,SmooksMultiFormEditor formEditor) {
if (feature == XslPackage.eINSTANCE.getOutputTo_OutputStreamResource()) {
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/TemplateUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/TemplateUICreator.java 2009-04-10 16:56:24 UTC (rev 14691)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/TemplateUICreator.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -16,6 +16,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
import org.jboss.tools.smooks.model.xsl.XslPackage;
@@ -34,7 +35,7 @@
* org.eclipse.emf.ecore.EAttribute)
*/
public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
- IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,SmooksMultiFormEditor formEditor) {
if (feature == XslPackage.eINSTANCE.getTemplate_Value()) {
}
if (feature == XslPackage.eINSTANCE.getTemplate_Encoding()) {
@@ -42,14 +43,27 @@
return null;
}
+
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.smooks.configuration.editors.PropertyUICreator#ignoreProperty(org.eclipse.emf.ecore.EAttribute)
+ */
@Override
+ public boolean ignoreProperty(EAttribute feature) {
+ if (feature == XslPackage.eINSTANCE.getTemplate_Value()) {
+ return true;
+ }
+ return super.ignoreProperty(feature);
+ }
+
+
+
+ @Override
public void createExtendUI(AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit,
- Composite parent, Object model) {
+ Composite parent, Object model, SmooksMultiFormEditor formEditor) {
SmooksUIUtils.createTextFieldEditor("Value", editingdomain, toolkit, parent, model);
SmooksUIUtils.createCDATAFieldEditor("Template Contents", editingdomain, toolkit, parent, model);
}
-
-
}
\ No newline at end of file
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/XslUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/XslUICreator.java 2009-04-10 16:56:24 UTC (rev 14691)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/XslUICreator.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -15,6 +15,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
import org.jboss.tools.smooks.model.xsl.XslPackage;
/**
@@ -32,7 +33,7 @@
* org.eclipse.emf.ecore.EAttribute)
*/
public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
- IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,SmooksMultiFormEditor formEditor) {
if (feature == XslPackage.eINSTANCE.getXsl_ApplyBefore()) {
}
if (feature == XslPackage.eINSTANCE.getXsl_ApplyOnElement()) {
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/SmooksConfigurationFileNewWizard.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/SmooksConfigurationFileNewWizard.java 2009-04-10 16:56:24 UTC (rev 14691)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/SmooksConfigurationFileNewWizard.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -14,6 +14,7 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.MessageDialog;
@@ -46,6 +47,7 @@
public SmooksConfigurationFileNewWizard() {
super();
setNeedsProgressMonitor(true);
+ setDefaultPageImageDescriptor(SmooksConfigurationActivator.getImageDescriptor("icons/smooks-wiz.gif"));
}
/**
@@ -54,7 +56,7 @@
public void addPages() {
containerSelectionPage = new SmooksFileContainerSelectionPage("Smooks Configuration File",
- (IStructuredSelection) selection);
+ (IStructuredSelection) selection);
addPage(containerSelectionPage);
}
@@ -95,8 +97,8 @@
* file.
*/
- private void doFinish(IPath containerPath, String fileName, IProgressMonitor monitor,
- String version) throws CoreException {
+ private void doFinish(IPath containerPath, String fileName, IProgressMonitor monitor, String version)
+ throws CoreException {
// create a sample file
monitor.beginTask("Creating " + fileName, 2);
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
@@ -105,17 +107,22 @@
if (resource.exists() && resource instanceof IContainer) {
container = (IContainer) resource;
}
- if (container == null) throwCoreException("Container \"" + containerPath.toPortableString()
- + "\" does not exist.");
- final IFile file = container.getFile(new Path(fileName));
+ if (container == null)
+ throwCoreException("Container \"" + containerPath.toPortableString() + "\" does not exist.");
+ final IFile configFile = container.getFile(new Path(fileName));
+ String extFileName = fileName + ".ext";
+ final IFile extFile = container.getFile(new Path(extFileName));
try {
+ // create config file
InputStream stream = openContentStream(version);
- if (file.exists()) {
- file.setContents(stream, true, true, monitor);
+ if (configFile.exists()) {
+ configFile.setContents(stream, true, true, monitor);
} else {
- file.create(stream, true, monitor);
+ configFile.create(stream, true, monitor);
}
stream.close();
+ // create ext file:
+ createExtentionFile(extFile, monitor);
} catch (IOException e) {
SmooksConfigurationActivator.getDefault().log(e);
}
@@ -123,9 +130,8 @@
monitor.setTaskName("Opening file with Smooks Editor.");
getShell().getDisplay().asyncExec(new Runnable() {
public void run() {
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
- .getActivePage();
- FileEditorInput editorInput = new FileEditorInput(file);
+ IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ FileEditorInput editorInput = new FileEditorInput(configFile);
try {
page.openEditor(editorInput, SmooksMultiFormEditor.EDITOR_ID, true);
} catch (PartInitException e) {
@@ -135,7 +141,26 @@
});
monitor.worked(1);
}
+
+ public static void createExtentionFile(IFile file , IProgressMonitor monitor) throws CoreException, IOException{
+ if(monitor == null){
+ monitor = new NullProgressMonitor();
+ }
+ InputStream stream1 = createExtContentStream();
+ if (file.exists()) {
+ file.setContents(stream1, true, true, monitor);
+ } else {
+ file.create(stream1, true, monitor);
+ }
+ stream1.close();
+ }
+ public static InputStream createExtContentStream() {
+ String contents = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+ + " <smooks-graphics-ext xmlns=\"http://www.jboss.org/jbosstools/smooks/smooks-graphics-ext.xsd\"/>";
+ return new ByteArrayInputStream(contents.getBytes());
+ }
+
/**
* We will initialize file contents with different smooks config file
* version.
@@ -145,26 +170,26 @@
String contents = "";
if (SmooksConstants.VERSION_1_0.equals(version)) {
contents = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" //$NON-NLS-1$
- + "<smooks-resource-list xmlns=\"http://www.milyn.org/xsd/smooks-1.0.xsd\">\n"//$NON-NLS-1$
- + " <resource-config selector=\"global-parameters\">\n"//$NON-NLS-1$
- + " <param name=\"stream.filter.type\">SAX</param>\n"//$NON-NLS-1$
- + " </resource-config>\n"//$NON-NLS-1$
- + "</smooks-resource-list>"; //$NON-NLS-1$
+ + "<smooks-resource-list xmlns=\"http://www.milyn.org/xsd/smooks-1.0.xsd\">\n"//$NON-NLS-1$
+ + " <resource-config selector=\"global-parameters\">\n"//$NON-NLS-1$
+ + " <param name=\"stream.filter.type\">SAX</param>\n"//$NON-NLS-1$
+ + " </resource-config>\n"//$NON-NLS-1$
+ + "</smooks-resource-list>"; //$NON-NLS-1$
}
- if (SmooksConstants.VERSION_1_1_1.equals(version)) {
+ if (SmooksConstants.VERSION_1_1.equals(version)) {
contents = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" //$NON-NLS-1$
- + "<smooks-resource-list xmlns=\"http://www.milyn.org/xsd/smooks-1.1.xsd\">\n"//$NON-NLS-1$
- + " <resource-config selector=\"global-parameters\">\n"//$NON-NLS-1$
- + " <param name=\"stream.filter.type\">SAX</param>\n"//$NON-NLS-1$
- + " </resource-config>\n"//$NON-NLS-1$
- + "</smooks-resource-list>"; //$NON-NLS-1$
+ + "<smooks-resource-list xmlns=\"http://www.milyn.org/xsd/smooks-1.1.xsd\">\n"//$NON-NLS-1$
+ + " <resource-config selector=\"global-parameters\">\n"//$NON-NLS-1$
+ + " <param name=\"stream.filter.type\">SAX</param>\n"//$NON-NLS-1$
+ + " </resource-config>\n"//$NON-NLS-1$
+ + "</smooks-resource-list>"; //$NON-NLS-1$
}
return new ByteArrayInputStream(contents.getBytes());
}
private void throwCoreException(String message) throws CoreException {
- IStatus status = new Status(IStatus.ERROR,SmooksConfigurationActivator.PLUGIN_ID,
- IStatus.OK, message, null);
+ IStatus status = new Status(IStatus.ERROR, SmooksConfigurationActivator.PLUGIN_ID, IStatus.OK,
+ message, null);
throw new CoreException(status);
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/SmooksFileContainerSelectionPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/SmooksFileContainerSelectionPage.java 2009-04-10 16:56:24 UTC (rev 14691)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/SmooksFileContainerSelectionPage.java 2009-04-12 10:55:55 UTC (rev 14692)
@@ -2,11 +2,11 @@
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
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.Label;
import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
@@ -18,13 +18,12 @@
*/
public class SmooksFileContainerSelectionPage extends WizardNewFileCreationPage {
- String version = SmooksConstants.VERSION_1_0;
+ String version = SmooksConstants.VERSION_1_1;
- private Button smook10Button;
- private Button smook11Button;
-
public SmooksFileContainerSelectionPage(String pageName, IStructuredSelection selection) {
super(pageName, selection);
+ setTitle("Smooks Configuration File Wizard Page");
+ setDescription("Create a new Smooks configuration file.");
}
@Override
@@ -38,20 +37,42 @@
buttonComposite.setLayout(layout);
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 2;
-// Label speator = new Label(buttonComposite, SWT.SEPARATOR | SWT.HORIZONTAL);
-// speator.setLayoutData(gd);
+ Label speator = new Label(buttonComposite, SWT.SEPARATOR|SWT.HORIZONTAL);
+ gd.widthHint = 10;
+ speator.setLayoutData(gd);
+
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
Label label = new Label(buttonComposite, SWT.NONE);
label.setText("Please select Smooks configuration file version");
- label.setLayoutData(gd);
- smook10Button = new Button(buttonComposite, SWT.RADIO);
- smook10Button.setText("Smooks 1.0");
- VersionButtonSelectionAdapter selectionAdapter = new VersionButtonSelectionAdapter();
- smook10Button.addSelectionListener(selectionAdapter);
- smook11Button = new Button(buttonComposite, SWT.RADIO);
- smook11Button.setText("Smooks 1.1.1");
- smook11Button.addSelectionListener(selectionAdapter);
- smook10Button.setSelection(true);
+
+ final CCombo combo = new CCombo(buttonComposite,SWT.BORDER);
+ combo.setEditable(false);
+
+ for(int i = 0 ; i < SmooksConstants.SMOOKS_VERSIONS.length ; i++){
+ combo.add(SmooksConstants.SMOOKS_VERSIONS[i]);
+ }
+
+ int defaultIndex = 0 ;
+ for(int i = 0 ; i < SmooksConstants.SMOOKS_VERSIONS.length ; i++){
+ if(SmooksConstants.SMOOKS_VERSIONS[i].equals(version)){
+ defaultIndex = i;
+ break;
+ }
+ }
+ combo.select(defaultIndex);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ combo.setLayoutData(gd);
+
+ combo.addModifyListener(new ModifyListener(){
+
+ public void modifyText(ModifyEvent e) {
+ version = combo.getText();
+ }
+
+ });
}
public String getVersion() {
@@ -61,18 +82,4 @@
public void setVersion(String version) {
this.version = version;
}
-
- private class VersionButtonSelectionAdapter extends SelectionAdapter {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (smook10Button.getSelection()) {
- version = SmooksConstants.VERSION_1_0;
- return;
- }
- if (smook11Button.getSelection()) {
- version = SmooksConstants.VERSION_1_1_1;
- return;
- }
- }
- }
}
\ No newline at end of file
15 years, 8 months
JBoss Tools SVN: r14691 - trunk/ws/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2009-04-10 12:56:24 -0400 (Fri, 10 Apr 2009)
New Revision: 14691
Modified:
trunk/ws/docs/reference/en/modules/topdown.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-398 - screenshots names updated to make them more clear for users
Modified: trunk/ws/docs/reference/en/modules/topdown.xml
===================================================================
--- trunk/ws/docs/reference/en/modules/topdown.xml 2009-04-10 16:55:05 UTC (rev 14690)
+++ trunk/ws/docs/reference/en/modules/topdown.xml 2009-04-10 16:56:24 UTC (rev 14691)
@@ -215,7 +215,7 @@
<para>In the Project Explorer view, select the bean that you created or imported into
the source folder of your Web project.</para>
<figure>
- <title>Create a new Bean Class</title>
+ <title>Select the Bean Created</title>
<mediaobject>
<imageobject>
<imagedata scale="80" fileref="images/topdown/jbossws_bottomup.png"/>
@@ -355,7 +355,7 @@
<listitem>
<para>If you selected to generate a WSDL file, you will get the file in your project's wsdl folder.</para>
<figure>
- <title>The generated WSDL file</title>
+ <title>The Generated HelloWorldService.wsdl File in the wsdl Folder</title>
<mediaobject>
<imageobject>
<imagedata scale="80" fileref="images/topdown/jbossws_bottomup_6.png"/>
15 years, 8 months
JBoss Tools SVN: r14689 - trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-04-10 11:00:23 -0400 (Fri, 10 Apr 2009)
New Revision: 14689
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/HQLJavaCompletionProposalComputer.java
Log:
JBIDE-4139 - code cleanup - add instanceof check to avoid potential type casting error
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/HQLJavaCompletionProposalComputer.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/HQLJavaCompletionProposalComputer.java 2009-04-10 14:57:27 UTC (rev 14688)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/HQLJavaCompletionProposalComputer.java 2009-04-10 15:00:23 UTC (rev 14689)
@@ -66,13 +66,17 @@
public List computeCompletionProposals(ContentAssistInvocationContext context, IProgressMonitor monitor) {
List proposals = new ArrayList();
errorMessage = null;
+
+ if (!(context instanceof JavaContentAssistInvocationContext)) {
+ return proposals;
+ }
JavaContentAssistInvocationContext ctx = (JavaContentAssistInvocationContext)context;
try {
ConsoleConfiguration consoleConfiguration = getConfiguration( ctx.getProject() );
if(consoleConfiguration!=null) {
- Configuration configuration = consoleConfiguration!=null?consoleConfiguration.getConfiguration():null;
+ Configuration configuration = consoleConfiguration.getConfiguration();
IHQLCodeAssist hqlEval = new HQLCodeAssist(configuration);
15 years, 8 months
JBoss Tools SVN: r14688 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/graph/layout.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-04-10 10:57:27 -0400 (Fri, 10 Apr 2009)
New Revision: 14688
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/graph/layout/GraphXYLayout.java
Log:
JBIDE-4139 - fix - in case of ( constraint != null ) and !( constraint instanceof null Rectangle) -> (Rectangle) constraint -> result the type casting error
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/graph/layout/GraphXYLayout.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/graph/layout/GraphXYLayout.java 2009-04-10 14:42:58 UTC (rev 14687)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/graph/layout/GraphXYLayout.java 2009-04-10 14:57:27 UTC (rev 14688)
@@ -47,7 +47,7 @@
public Object getConstraint(IFigure child) {
Object constraint = constraints.get( child );
- if ( constraint != null || constraint instanceof Rectangle ) {
+ if (constraint instanceof Rectangle) {
return (Rectangle) constraint;
}
else {
15 years, 8 months
JBoss Tools SVN: r14687 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-04-10 10:42:58 -0400 (Fri, 10 Apr 2009)
New Revision: 14687
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewReverseEngineeringFileWizard.java
Log:
JBIDE-4139 - change assignment order to assign new value to class member instead of function argument
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewReverseEngineeringFileWizard.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewReverseEngineeringFileWizard.java 2009-04-10 14:42:03 UTC (rev 14686)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewReverseEngineeringFileWizard.java 2009-04-10 14:42:58 UTC (rev 14687)
@@ -93,7 +93,9 @@
*/
public void addPages() {
- if (selection == null) selection = new StructuredSelection();
+ if (selection == null) {
+ selection = new StructuredSelection();
+ }
cPage = new ExtendedWizardNewFileCreationPage( "Ccfgxml", selection ); //$NON-NLS-1$
cPage.setTitle( HibernateConsoleMessages.NewReverseEngineeringFileWizard_create_hibernate_reverse_engineering_file );
cPage.setDescription( HibernateConsoleMessages.NewReverseEngineeringFileWizard_create_new_hibernate_reveng_xml );
@@ -226,8 +228,10 @@
* @see IWorkbenchWizard#init(IWorkbench, IStructuredSelection)
*/
public void init(IWorkbench workbench, IStructuredSelection selection) {
+ if (selection == null) {
+ selection = new StructuredSelection();
+ }
this.selection = selection;
- if (selection == null) selection = new StructuredSelection();
}
public IPath getCreatedFilePath() {
15 years, 8 months
JBoss Tools SVN: r14685 - trunk/ws/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2009-04-10 10:31:41 -0400 (Fri, 10 Apr 2009)
New Revision: 14685
Modified:
trunk/ws/docs/reference/en/modules/client.xml
trunk/ws/docs/reference/en/modules/preference.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-398 - corresponding folders are included into screenshots locations links
Modified: trunk/ws/docs/reference/en/modules/client.xml
===================================================================
--- trunk/ws/docs/reference/en/modules/client.xml 2009-04-10 14:08:21 UTC (rev 14684)
+++ trunk/ws/docs/reference/en/modules/client.xml 2009-04-10 14:31:41 UTC (rev 14685)
@@ -16,7 +16,7 @@
<title>New Web Service Client</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/jbossws_client.png"></imagedata>
+ <imagedata fileref="images/client/jbossws_client.png"></imagedata>
</imageobject>
</mediaobject>
</figure>
@@ -27,7 +27,7 @@
<title>Set Web Service Common values</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/jbossws_client_1.png"></imagedata>
+ <imagedata fileref="images/client/jbossws_client_1.png"></imagedata>
</imageobject>
</mediaobject>
</figure>
@@ -35,7 +35,7 @@
<title>Set Web Service values about WSDL file</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/jbossws_client_2.png"></imagedata>
+ <imagedata fileref="images/client/jbossws_client_2.png"></imagedata>
</imageobject>
</mediaobject>
</figure>
@@ -59,7 +59,7 @@
<title>Client Sample Class</title>
<mediaobject>
<imageobject>
- <imagedata scale="80" fileref="images/jbossws_client_3.png"></imagedata>
+ <imagedata scale="80" fileref="images/client/jbossws_client_3.png"></imagedata>
</imageobject>
</mediaobject>
</figure>
Modified: trunk/ws/docs/reference/en/modules/preference.xml
===================================================================
--- trunk/ws/docs/reference/en/modules/preference.xml 2009-04-10 14:08:21 UTC (rev 14684)
+++ trunk/ws/docs/reference/en/modules/preference.xml 2009-04-10 14:31:41 UTC (rev 14685)
@@ -19,7 +19,7 @@
<title>JBossWS Preferences Page</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/Jbossws_preference.png"/>
+ <imagedata fileref="images/preference/Jbossws_preference.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -37,7 +37,7 @@
<title>Edit JBossWS Runtime</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/Jbossws_preference_new.png"/>
+ <imagedata fileref="images/preference/Jbossws_preference_new.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -51,7 +51,7 @@
<title>Classpath Container: Java Source Attachment</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/jbossws_container1.png"/>
+ <imagedata fileref="images/preference/jbossws_container1.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -62,7 +62,7 @@
<title>Classpath Container: Javadoc Location</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/jbossws_container2.png"/>
+ <imagedata fileref="images/preference/jbossws_container2.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -86,7 +86,7 @@
<title/>
<mediaobject>
<imageobject>
- <imagedata fileref="images/jbossws_server_runtime.png"/>
+ <imagedata fileref="images/preference/jbossws_server_runtime.png"/>
</imageobject>
</mediaobject>
</figure>
15 years, 8 months
JBoss Tools SVN: r14684 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/navigator.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-04-10 10:08:21 -0400 (Fri, 10 Apr 2009)
New Revision: 14684
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/navigator/PendingNode.java
Log:
JBIDE-4139 - error fix with array values init
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/navigator/PendingNode.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/navigator/PendingNode.java 2009-04-10 14:06:26 UTC (rev 14683)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/navigator/PendingNode.java 2009-04-10 14:08:21 UTC (rev 14684)
@@ -50,9 +50,9 @@
public PendingNode(String type) {
text = new String[4];
text[0] = HibernateConsoleMessages.PendingNode_pending + type;
- text[1] = text + "."; //$NON-NLS-1$
- text[2] = text + ".."; //$NON-NLS-1$
- text[3] = text + "..."; //$NON-NLS-1$
+ text[1] = text[0] + "."; //$NON-NLS-1$
+ text[2] = text[0] + ".."; //$NON-NLS-1$
+ text[3] = text[0] + "..."; //$NON-NLS-1$
}
public String getText() {
15 years, 8 months