Author: DartPeng
Date: 2009-04-10 06:09:15 -0400 (Fri, 10 Apr 2009)
New Revision: 14654
Added:
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/Template.txt
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/
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/temp/
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ConditionTypeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ConditionsTypeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/DocumentRootUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/FeaturesTypeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/HandlerTypeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/HandlersTypeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ImportTypeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ParamTypeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ParamsTypeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ProfileTypeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ProfilesTypeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ReaderTypeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ResourceConfigTypeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ResourceTypeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/SetOffTypeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/SetOnTypeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/SmooksResourceListTypeUICreator.java
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/common/provider/AbstractAnyTypeItemProvider.java
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/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/PropertyUICreatorManager.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/SmooksStuffPropertyDetailPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java
Log:
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/common/provider/AbstractAnyTypeItemProvider.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/common/provider/AbstractAnyTypeItemProvider.java 2009-04-10
10:07:25 UTC (rev 14653)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/common/provider/AbstractAnyTypeItemProvider.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -14,6 +14,7 @@
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.util.FeatureMapUtil;
import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
@@ -150,12 +151,12 @@
// (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT,
// "")));
//
-// newChildDescriptors.add
-// (createChildParameter
-// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
-// FeatureMapUtil.createEntry
-// (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
-// "")));
+ newChildDescriptors.add
+ (createChildParameter
+ (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+ FeatureMapUtil.createEntry
+ (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
+ "")));
//
// newChildDescriptors.add
// (createChildParameter
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-10
10:07:25 UTC (rev 14653)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksModelUtils.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -17,8 +17,11 @@
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.util.ExtendedMetaData;
+import org.eclipse.emf.ecore.util.FeatureMapUtil;
import org.eclipse.emf.ecore.xml.type.AnyType;
import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
+import org.eclipse.emf.edit.command.CommandParameter;
+import org.eclipse.emf.edit.domain.EditingDomain;
import org.jboss.tools.smooks10.model.smooks.ParamType;
import org.jboss.tools.smooks10.model.smooks.ResourceConfigType;
import org.jboss.tools.smooks10.model.smooks.ResourceType;
@@ -42,37 +45,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);
+ public static EStructuralFeature ELEMENT_BINDING =
ExtendedMetaData.INSTANCE.demandFeature(
+ "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) {
+ ResourceConfigType resourceConfig) {
List<ParamType> paramList = resourceConfig.getParam();
- for (Iterator<ParamType> iterator = paramList.iterator(); iterator
- .hasNext();) {
+ 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;
}
}
@@ -81,31 +81,26 @@
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);
}
- public static AnyType getBindingViaProperty(
- ResourceConfigType resourceConfig, String property) {
+ public static AnyType getBindingViaProperty(ResourceConfigType resourceConfig, String
property) {
List bindingList = getBindingListFromResourceConfigType(resourceConfig);
for (Iterator iterator = bindingList.iterator(); iterator.hasNext();) {
AnyType binding = (AnyType) iterator.next();
- String pro = getAttributeValueFromAnyType(binding,
- ATTRIBUTE_PROPERTY);
- if (pro != null)
- pro = pro.trim();
+ String pro = getAttributeValueFromAnyType(binding, ATTRIBUTE_PROPERTY);
+ if (pro != null) pro = pro.trim();
if (property.equals(pro)) {
return binding;
}
@@ -115,26 +110,21 @@
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)) {
@@ -146,15 +136,13 @@
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;
@@ -167,16 +155,13 @@
return "";
}
- public static void setTransformType(ResourceConfigType resourceConfig,
- String type) {
- if (type == null)
- type = "";
+ public static void setTransformType(ResourceConfigType resourceConfig, String type) {
+ if (type == null) type = "";
if (isTransformTypeResourceConfig(resourceConfig)) {
List paramList = resourceConfig.getParam();
for (Iterator iterator = paramList.iterator(); iterator.hasNext();) {
ParamType param = (ParamType) iterator.next();
- if (SmooksModelConstants.STREAM_FILTER_TYPE.equals(param
- .getName())) {
+ if (SmooksModelConstants.STREAM_FILTER_TYPE.equals(param.getName())) {
cleanTextToSmooksType(param);
setTextToAnyType(param, type);
}
@@ -184,8 +169,7 @@
}
}
- public static boolean isFilePathResourceConfig(
- ResourceConfigType resourceConfig) {
+ public static boolean isFilePathResourceConfig(ResourceConfigType resourceConfig) {
ResourceType resource = resourceConfig.getResource();
if (resource != null) {
String value = resource.getStringValue();
@@ -201,11 +185,9 @@
return false;
}
- public static boolean isTransformTypeResourceConfig(
- ResourceConfigType resourceConfig) {
+ 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;
}
@@ -217,8 +199,7 @@
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;
}
@@ -228,14 +209,13 @@
}
public static void setParamText(String paramName, String value,
- ResourceConfigType resourceConfigType) {
+ 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;
@@ -250,14 +230,12 @@
setTextToAnyType(param, value);
}
- public static String getParmaText(String paramName,
- ResourceConfigType resourceConfigType) {
+ public static String getParmaText(String paramName, ResourceConfigType
resourceConfigType) {
List plist = resourceConfigType.getParam();
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);
@@ -266,15 +244,14 @@
return null;
}
- public static String getAttributeValueFromAnyType(AnyType anyType,
- EStructuralFeature attribute) {
+ public static String getAttributeValueFromAnyType(AnyType anyType, EStructuralFeature
attribute) {
String value = (String) anyType.getAnyAttribute().get(attribute, false);
return value;
}
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();
@@ -286,7 +263,7 @@
public static String getAnyTypeCDATA(AnyType anyType) {
Object value = anyType.getMixed().get(
- XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA, true);
+ 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();
@@ -296,14 +273,13 @@
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;
}
- AnyType binding = (AnyType) EcoreUtil
- .create(XMLTypePackage.Literals.ANY_TYPE);
+ AnyType binding = (AnyType) EcoreUtil.create(XMLTypePackage.Literals.ANY_TYPE);
if (property != null) {
binding.getAnyAttribute().add(ATTRIBUTE_PROPERTY, property);
}
@@ -318,13 +294,15 @@
}
public static void appendTextToSmooksType(AnyType smooksModel, String text) {
- smooksModel.getMixed().add(
- XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, text);
+ smooksModel.getMixed().add(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
text);
}
+
+ public static void appendTextToSmooksType(EditingDomain editingDomain , AnyType
smooksModel, String text) {
+ smooksModel.getMixed().add(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
text);
+ }
public static void appendCDATAToSmooksType(AnyType smooksModel, String text) {
- smooksModel.getMixed().add(
- XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA, text);
+ smooksModel.getMixed().add(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA,
text);
}
public static void setTextToAnyType(AnyType smooksModel, String text) {
@@ -339,7 +317,7 @@
public static void cleanTextToSmooksType(AnyType smooksModel) {
Object obj = smooksModel.getMixed().get(
- XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, true);
+ XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, true);
if (obj instanceof List) {
((List) obj).clear();
}
@@ -347,9 +325,19 @@
public static void cleanCDATAToSmooksType(AnyType smooksModel) {
Object obj = smooksModel.getMixed().get(
- XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA, true);
+ XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA, true);
if (obj instanceof List) {
((List) obj).clear();
}
}
+
+ 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));
+ }
+
+ public static CommandParameter createChildParameter(Object owner ,Object feature, Object
child) {
+ return new CommandParameter(owner, feature, child);
+ }
+
}
Added:
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
(rev 0)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Codegenerator.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -0,0 +1,118 @@
+package org.jboss.tools.smooks.configuration.editors;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.lang.reflect.Field;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+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/";
+ String tempContents = "";
+
+ public Codegenerator() {
+ 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"));
+ BufferedReader r = new BufferedReader(reader);
+ String line = r.readLine();
+ while (line != null) {
+ tempContents += line;
+ line = r.readLine();
+ if (line != null) {
+ tempContents += "\n";
+ }
+ }
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public static void main(String[] args) {
+ Codegenerator g = new Codegenerator();
+ try {
+ g.generateCodes(SmooksPackage.eINSTANCE);
+ } catch (IllegalArgumentException e) {
+ e.printStackTrace();
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void generateCodes(EPackage epackage) throws IllegalArgumentException,
+ IllegalAccessException, IOException {
+ Field[] fields = epackage.getClass().getDeclaredFields();
+ for (int i = 0; i < fields.length; i++) {
+ Field f = fields[i];
+ f.setAccessible(true);
+ Class<?> clazz = f.getType();
+ if (clazz == EClass.class) {
+ EClass eClass = (EClass) f.get(epackage);
+ if (eClass.isAbstract() || eClass.isInterface()) {
+ continue;
+ }
+ File file = new File(basePath + eClass.getName() + "UICreator.java");
+ System.out.println("map.put("+eClass.getName()+"Impl.class, new
"+eClass.getName()+"UICreator());");
+ if (!file.exists()) {
+ file.createNewFile();
+ FileWriter writer = new FileWriter(file);
+ writer.write(generateContents(eClass, epackage));
+ writer.close();
+ }
+ }
+ }
+ }
+
+ private String generateContents(EClass eClass, EPackage ePackage) {
+ if (tempContents != null) {
+ String className = eClass.getName() + "UICreator";
+ String t = tempContents;
+ if (t.indexOf("${className}") != -1) {
+ String s = t.substring(0, t.indexOf("${className}"));
+ String es = t.substring(t.indexOf("${className}") +
"${className}".length(), t
+ .length());
+ t = s + className + es;
+ }
+ String epName = ePackage.getClass().getSimpleName();
+ if (epName.endsWith("Impl")) {
+ epName = epName.substring(0, epName.indexOf("Impl"));
+ }
+
+ String allepName = epName + ".eINSTANCE.get" + eClass.getName();
+ List<EAttribute> alist = eClass.getEAllAttributes();
+ String attributeMethod = "";
+ 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] });
+ firstC = firstC.toUpperCase();
+ atn = firstC + atn.substring(1,atn.length());
+ String n = allepName + "_" + atn + "()";
+ String cn = "if(feature == " + n + "){}\n";
+ attributeMethod += cn;
+ }
+ int index2 = t.indexOf("${attributeMethod}");
+ if (index2 != -1) {
+ String am1 = t.substring(0, index2);
+ String am2 = t.substring(index2 + "${attributeMethod}".length() ,
t.length());
+ t = am1 + attributeMethod + am2;
+ }
+ return t;
+ }
+ return "";
+ }
+}
Property changes on:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Codegenerator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
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
10:07:25 UTC (rev 14653)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/IPropertyUICreator.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -11,6 +11,7 @@
package org.jboss.tools.smooks.configuration.editors;
import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;
@@ -23,4 +24,6 @@
public interface IPropertyUICreator {
public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature);
+
+ public void createExtendUI(AdapterFactoryEditingDomain editingdomain,FormToolkit
toolkit, Composite parent,Object model );
}
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
10:07:25 UTC (rev 14653)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreator.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -13,11 +13,13 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.smooks.SmooksPackage;
/**
* @author Dart (dpeng(a)redhat.com)
@@ -37,7 +39,9 @@
*/
public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
- // TODO Auto-generated method stub
+ if(feature == SmooksPackage.eINSTANCE.getAbstractReader_TargetProfile()){
+
+ }
return null;
}
@@ -49,4 +53,10 @@
return SmooksUIUtils.getJavaProject(model);
}
+ public void createExtendUI(AdapterFactoryEditingDomain editingdomain, FormToolkit
toolkit,
+ Composite parent, Object model) {
+
+ }
+
+
}
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreatorManager.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreatorManager.java 2009-04-10
10:07:25 UTC (rev 14653)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreatorManager.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -16,9 +16,19 @@
import org.jboss.tools.smooks.configuration.editors.javabean.BindingsPropertyUICreator;
import org.jboss.tools.smooks.configuration.editors.javabean.JavabeanValueUICreator;
import org.jboss.tools.smooks.configuration.editors.javabean.JavabeanWiringUICreator;
+import org.jboss.tools.smooks.configuration.editors.smooks.ConditionTypeUICreator;
+import org.jboss.tools.smooks.configuration.editors.smooks.ImportTypeUICreator;
+import org.jboss.tools.smooks.configuration.editors.smooks.ParamTypeUICreator;
+import org.jboss.tools.smooks.configuration.editors.smooks.ResourceConfigTypeUICreator;
+import org.jboss.tools.smooks.configuration.editors.smooks.ResourceTypeUICreator;
import org.jboss.tools.smooks.model.javabean.impl.BindingsTypeImpl;
import org.jboss.tools.smooks.model.javabean.impl.ValueTypeImpl;
import org.jboss.tools.smooks.model.javabean.impl.WiringTypeImpl;
+import org.jboss.tools.smooks.model.smooks.impl.ConditionTypeImpl;
+import org.jboss.tools.smooks.model.smooks.impl.ImportTypeImpl;
+import org.jboss.tools.smooks.model.smooks.impl.ParamTypeImpl;
+import org.jboss.tools.smooks.model.smooks.impl.ResourceConfigTypeImpl;
+import org.jboss.tools.smooks.model.smooks.impl.ResourceTypeImpl;
/**
* @author Dart (dpeng(a)redhat.com)<p>
@@ -38,6 +48,13 @@
map.put(BindingsTypeImpl.class, new BindingsPropertyUICreator());
map.put(ValueTypeImpl.class, new JavabeanValueUICreator());
map.put(WiringTypeImpl.class, new JavabeanWiringUICreator());
+
+ // for smooks models
+ map.put(ConditionTypeImpl.class, new ConditionTypeUICreator());
+ map.put(ImportTypeImpl.class, new ImportTypeUICreator());
+ map.put(ParamTypeImpl.class, new ParamTypeUICreator());
+ map.put(ResourceConfigTypeImpl.class, new ResourceConfigTypeUICreator());
+ map.put(ResourceTypeImpl.class, new ResourceTypeUICreator());
}
public void registePropertyUICreator(Class<?> key,IPropertyUICreator creator){
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
10:07:25 UTC (rev 14653)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMasterDetailBlock.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -281,14 +281,12 @@
@Override
public boolean select(Viewer viewer, Object parentElement, Object element) {
Object obj = element;
- while (obj != null && obj instanceof IWrapperItemProvider) {
- obj = ((IWrapperItemProvider) obj).getValue();
- }
+ obj = AdapterFactoryEditingDomain.unwrap(obj);
if (obj instanceof BasicFeatureMapEntry) {
EStructuralFeature sf = ((BasicFeatureMapEntry) obj).getEStructuralFeature();
if (sf.equals(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT)
|| sf.equals(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA)) {
- return false;
+// return false;
}
}
return true;
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
10:07:25 UTC (rev 14653)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksStuffPropertyDetailPage.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -96,24 +96,26 @@
/**
*
- * @param propertyComposite
+ * @param detailsComposite
*/
- protected void createPropertyComposite(Composite propertyComposite) {
+ protected void createStuffDetailsComposite(Composite detailsComposite) {
try {
GridLayout layout = new GridLayout();
layout.numColumns = 2;
- propertyComposite.setLayout(layout);
- IPropertyUICreator creator =
PropertyUICreatorManager.getInstance().getPropertyUICreator(
- getModel());
- List<IItemPropertyDescriptor> propertyDes =
itemPropertySource.getPropertyDescriptors(getModel());
- for (Iterator<IItemPropertyDescriptor> iterator = propertyDes.iterator();
iterator.hasNext();) {
+ detailsComposite.setLayout(layout);
+ 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) {
- Composite composite = creator.createPropertyUI(formToolkit, propertyComposite,
- itemPropertyDescriptor, getModel(), feature);
+ Composite composite = creator.createPropertyUI(formToolkit, detailsComposite,
+ itemPropertyDescriptor, getModel(), feature);
if (composite != null) {
createDefault = false;
}
@@ -121,24 +123,31 @@
if (createDefault) {
EClassifier typeClazz = feature.getEType();
if (typeClazz instanceof EEnum) {
- createEnumFieldEditor(propertyComposite, (EEnum) typeClazz, formToolkit,
- itemPropertyDescriptor);
+ createEnumFieldEditor(detailsComposite, (EEnum) typeClazz, formToolkit,
+ itemPropertyDescriptor);
}
if (typeClazz.getInstanceClass() == String.class) {
- createStringFieldEditor(propertyComposite, formToolkit, itemPropertyDescriptor);
+ createStringFieldEditor(detailsComposite, formToolkit,
+ itemPropertyDescriptor);
}
if (typeClazz.getInstanceClass() == Boolean.class
- || typeClazz.getInstanceClass() == boolean.class) {
- createBooleanFieldEditor(propertyComposite, formToolkit, itemPropertyDescriptor);
+ || typeClazz.getInstanceClass() == boolean.class) {
+ createBooleanFieldEditor(detailsComposite, formToolkit,
+ itemPropertyDescriptor);
}
if (typeClazz.getInstanceClass() == Integer.class
- || typeClazz.getInstanceClass() == int.class) {
- createIntegerFieldEditor(propertyComposite, formToolkit, itemPropertyDescriptor);
+ || typeClazz.getInstanceClass() == int.class) {
+ createIntegerFieldEditor(detailsComposite, formToolkit,
+ itemPropertyDescriptor);
}
}
}
- formToolkit.paintBordersFor(propertyComposite);
- propertyComposite.pack();
+ if (creator != null) {
+ creator.createExtendUI((AdapterFactoryEditingDomain) formEditor.getEditingDomain(),
+ formToolkit, detailsComposite, getModel());
+ }
+ formToolkit.paintBordersFor(detailsComposite);
+ detailsComposite.pack();
propertyMainComposite.layout();
} catch (Exception e) {
e.printStackTrace();
@@ -146,7 +155,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);
@@ -174,11 +183,12 @@
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)) {
@@ -199,19 +209,20 @@
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) {
@@ -220,16 +231,15 @@
});
}
- 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) {
@@ -252,16 +262,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) {
@@ -270,7 +280,8 @@
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());
@@ -296,16 +307,15 @@
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();
propertyComposite = new Composite(propertyMainComposite, SWT.NONE);
}
- createPropertyComposite(propertyComposite);
+ createStuffDetailsComposite(propertyComposite);
}
refreshWhenSelectionChanged();
}
Added:
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
(rev 0)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Template.txt 2009-04-10
10:09:15 UTC (rev 14654)
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * 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.uitls.temp;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+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.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.javabean.BindingsType;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class ${className} extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ ${attributeMethod}
+ return null;
+ }
+
+}
Property changes on:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Template.txt
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java 2009-04-10
10:07:25 UTC (rev 14653)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -15,7 +15,7 @@
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.jboss.tools.smooks.configuration.editors.IPropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
import org.jboss.tools.smooks.model.javabean.JavabeanPackage;
@@ -24,7 +24,7 @@
* <p>
* Apr 8, 2009
*/
-public class BindingsPropertyUICreator implements IPropertyUICreator {
+public class BindingsPropertyUICreator extends PropertyUICreator {
/*
* (non-Javadoc)
@@ -62,5 +62,4 @@
final IItemPropertyDescriptor propertyDescriptor, final Object model) {
return SmooksUIUtils.createJavaTypeSearchFieldEditor(composite, toolkit,
propertyDescriptor, (EObject)model);
}
-
}
Added:
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
(rev 0)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ConditionTypeUICreator.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -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.smooks;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+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.model.smooks.SmooksPackage;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class ConditionTypeUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ if (feature == SmooksPackage.eINSTANCE.getConditionType_Value()) {
+ }
+ if (feature == SmooksPackage.eINSTANCE.getConditionType_Evaluator()) {
+ }
+ if (feature == SmooksPackage.eINSTANCE.getConditionType_Id()) {
+ }
+ if (feature == SmooksPackage.eINSTANCE.getConditionType_IdRef()) {
+ }
+
+ return null;
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ConditionTypeUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
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
(rev 0)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ImportTypeUICreator.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * 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.smooks;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+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.model.smooks.SmooksPackage;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class ImportTypeUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ if (feature == SmooksPackage.eINSTANCE.getImportType_File()) {
+ }
+ return null;
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ImportTypeUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
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
(rev 0)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ParamTypeUICreator.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * 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.smooks;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+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.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.smooks.SmooksPackage;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class ParamTypeUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ if (feature == SmooksPackage.eINSTANCE.getParamType_Name()) {
+ }
+ if (feature == SmooksPackage.eINSTANCE.getParamType_Type()) {
+ }
+ return null;
+ }
+
+ @Override
+ public void createExtendUI(AdapterFactoryEditingDomain editingdomain, FormToolkit
toolkit,
+ Composite parent, Object model) {
+ SmooksUIUtils.createTextFieldEditor("Value", editingdomain, toolkit, parent,
model);
+ }
+}
\ No newline at end of file
Property changes on:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ParamTypeUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
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
(rev 0)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ResourceConfigTypeUICreator.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * 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.smooks;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+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.model.smooks.SmooksPackage;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class ResourceConfigTypeUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+
+ if (feature == SmooksPackage.eINSTANCE.getResourceConfigType_Selector()) {
+ }
+ if (feature == SmooksPackage.eINSTANCE.getResourceConfigType_SelectorNamespace()) {
+ }
+ if (feature == SmooksPackage.eINSTANCE.getResourceConfigType_TargetProfile()) {
+ }
+
+ return null;
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ResourceConfigTypeUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
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
(rev 0)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ResourceTypeUICreator.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -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.smooks;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+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.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.smooks.SmooksPackage;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class ResourceTypeUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ if (feature == SmooksPackage.eINSTANCE.getResourceType_Value()) {
+ return SmooksUIUtils.createJavaTypeSearchFieldEditor(parent, toolkit,
+ propertyDescriptor, (EObject) model);
+ }
+ if (feature == SmooksPackage.eINSTANCE.getResourceType_Type()) {
+ }
+
+ return null;
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ResourceTypeUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
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
10:07:25 UTC (rev 14653)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -1,13 +1,36 @@
+/*******************************************************************************
+ * 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.uitls;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.FeatureMapUtil;
+import org.eclipse.emf.ecore.xml.type.AnyType;
+import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.edit.command.RemoveCommand;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor.PropertyValueWrapper;
import org.eclipse.jdt.core.IJavaElement;
@@ -23,6 +46,8 @@
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.forms.events.HyperlinkEvent;
import org.eclipse.ui.forms.events.IHyperlinkListener;
@@ -32,18 +57,104 @@
import org.jboss.tools.smooks.configuration.editors.javabean.JavaMethodsSelectionDialog;
import
org.jboss.tools.smooks.configuration.editors.javabean.JavaPropertiesSelectionDialog;
import org.jboss.tools.smooks.model.javabean.BindingsType;
+import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils;
+/**
+ *
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
public class SmooksUIUtils {
+ 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);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ valueText.setLayoutData(gd);
+ if (model instanceof AnyType) {
+ String text = SmooksModelUtils.getAnyTypeText((AnyType) model);
+ if (text != null) {
+ valueText.setText(text);
+ }
+ }
+ final Object fm = model;
+ final AdapterFactoryEditingDomain fEditingDomain = editingdomain;
+ valueText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ if (!(fm instanceof AnyType)) {
+ return;
+ }
+ String text = SmooksModelUtils.getAnyTypeText((AnyType) fm);
+ if (!valueText.getText().equals(text)) {
+ CompoundCommand ccommand = new CompoundCommand();
+ List<String> listValue = new ArrayList<String>();
+ listValue.add(valueText.getText());
+ Command addCommand = AddCommand.create(fEditingDomain, fm,
+ XMLTypePackage.Literals.ANY_TYPE__MIXED, FeatureMapUtil.createEntry(
+ XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, valueText
+ .getText()));
+ Object removeValue = ((AnyType) fm).getMixed().get(
+ 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();) {
+ Object string = (Object) iterator.next();
+ rList.add(FeatureMapUtil.createEntry(
+ XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, string));
+ }
+ Command cc = RemoveCommand.create(fEditingDomain, fm, null, rList);
+ if (cc != null && cc.canExecute()) {
+ ccommand.append(cc);
+ }
+ }
+ if (addCommand != null && addCommand.canExecute()) {
+ ccommand.append(addCommand);
+ }
+ fEditingDomain.getCommandStack().execute(ccommand);
+ return;
+ }
+ }
+ });
+ }
+
+ 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);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ Text cdataText = toolkit.createText(parent, "", SWT.MULTI | SWT.V_SCROLL);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.heightHint = 300;
+ cdataText.setLayoutData(gd);
+
+ if (model instanceof AnyType) {
+ String cdata = SmooksModelUtils.getAnyTypeCDATA((AnyType) model);
+ if (cdata != null) {
+ cdataText.setText(cdata);
+ }
+ }
+ }
+
+ 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);
@@ -54,8 +165,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());
@@ -64,18 +175,20 @@
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());
}
}
});
@@ -84,18 +197,17 @@
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) {
@@ -144,9 +256,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 {
@@ -154,7 +266,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) {
@@ -163,9 +275,9 @@
return null;
}
- public static Composite createJavaPropertySearchFieldEditor(BindingsType container,
Composite parent,
- FormToolkit toolkit, final IItemPropertyDescriptor propertyDescriptor, String
buttonName,
- final EObject model) {
+ 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 {
@@ -173,7 +285,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) {
@@ -192,8 +304,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);
@@ -203,8 +315,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());
@@ -216,10 +328,12 @@
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/uitls/temp/ConditionTypeUICreator.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ConditionTypeUICreator.java
(rev 0)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ConditionTypeUICreator.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * 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.uitls.temp;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+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.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.javabean.BindingsType;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class ConditionTypeUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ if(feature == SmooksPackage.eINSTANCE.getConditionType_Mixed()){}
+if(feature == SmooksPackage.eINSTANCE.getConditionType_Any()){}
+if(feature == SmooksPackage.eINSTANCE.getConditionType_AnyAttribute()){}
+if(feature == SmooksPackage.eINSTANCE.getConditionType_Value()){}
+if(feature == SmooksPackage.eINSTANCE.getConditionType_Evaluator()){}
+if(feature == SmooksPackage.eINSTANCE.getConditionType_Id()){}
+if(feature == SmooksPackage.eINSTANCE.getConditionType_IdRef()){}
+
+ return null;
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ConditionTypeUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ConditionsTypeUICreator.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ConditionsTypeUICreator.java
(rev 0)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ConditionsTypeUICreator.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * 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.uitls.temp;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+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.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.javabean.BindingsType;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class ConditionsTypeUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ if(feature == SmooksPackage.eINSTANCE.getConditionsType_Mixed()){}
+if(feature == SmooksPackage.eINSTANCE.getConditionsType_Any()){}
+if(feature == SmooksPackage.eINSTANCE.getConditionsType_AnyAttribute()){}
+
+ return null;
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ConditionsTypeUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/DocumentRootUICreator.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/DocumentRootUICreator.java
(rev 0)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/DocumentRootUICreator.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * 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.uitls.temp;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+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.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.javabean.BindingsType;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class DocumentRootUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ if(feature == SmooksPackage.eINSTANCE.getDocumentRoot_Mixed()){}
+
+ return null;
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/DocumentRootUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/FeaturesTypeUICreator.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/FeaturesTypeUICreator.java
(rev 0)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/FeaturesTypeUICreator.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * 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.uitls.temp;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+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.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.javabean.BindingsType;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class FeaturesTypeUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ if(feature == SmooksPackage.eINSTANCE.getFeaturesType_Mixed()){}
+if(feature == SmooksPackage.eINSTANCE.getFeaturesType_Any()){}
+if(feature == SmooksPackage.eINSTANCE.getFeaturesType_AnyAttribute()){}
+
+ return null;
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/FeaturesTypeUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/HandlerTypeUICreator.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/HandlerTypeUICreator.java
(rev 0)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/HandlerTypeUICreator.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * 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.uitls.temp;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+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.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.javabean.BindingsType;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class HandlerTypeUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ if(feature == SmooksPackage.eINSTANCE.getHandlerType_Mixed()){}
+if(feature == SmooksPackage.eINSTANCE.getHandlerType_Any()){}
+if(feature == SmooksPackage.eINSTANCE.getHandlerType_AnyAttribute()){}
+if(feature == SmooksPackage.eINSTANCE.getHandlerType_Class()){}
+
+ return null;
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/HandlerTypeUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/HandlersTypeUICreator.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/HandlersTypeUICreator.java
(rev 0)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/HandlersTypeUICreator.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * 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.uitls.temp;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+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.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.javabean.BindingsType;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class HandlersTypeUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ if(feature == SmooksPackage.eINSTANCE.getHandlersType_Mixed()){}
+if(feature == SmooksPackage.eINSTANCE.getHandlersType_Any()){}
+if(feature == SmooksPackage.eINSTANCE.getHandlersType_AnyAttribute()){}
+
+ return null;
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/HandlersTypeUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ImportTypeUICreator.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ImportTypeUICreator.java
(rev 0)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ImportTypeUICreator.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * 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.uitls.temp;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+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.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.javabean.BindingsType;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class ImportTypeUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ if(feature == SmooksPackage.eINSTANCE.getImportType_Mixed()){}
+if(feature == SmooksPackage.eINSTANCE.getImportType_Any()){}
+if(feature == SmooksPackage.eINSTANCE.getImportType_AnyAttribute()){}
+if(feature == SmooksPackage.eINSTANCE.getImportType_File()){}
+
+ return null;
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ImportTypeUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ParamTypeUICreator.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ParamTypeUICreator.java
(rev 0)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ParamTypeUICreator.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * 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.uitls.temp;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+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.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.javabean.BindingsType;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class ParamTypeUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ if(feature == SmooksPackage.eINSTANCE.getParamType_Mixed()){}
+if(feature == SmooksPackage.eINSTANCE.getParamType_Any()){}
+if(feature == SmooksPackage.eINSTANCE.getParamType_AnyAttribute()){}
+if(feature == SmooksPackage.eINSTANCE.getParamType_Name()){}
+if(feature == SmooksPackage.eINSTANCE.getParamType_Type()){}
+
+ return null;
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ParamTypeUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ParamsTypeUICreator.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ParamsTypeUICreator.java
(rev 0)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ParamsTypeUICreator.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * 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.uitls.temp;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+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.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.javabean.BindingsType;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class ParamsTypeUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ if(feature == SmooksPackage.eINSTANCE.getParamsType_Mixed()){}
+if(feature == SmooksPackage.eINSTANCE.getParamsType_Any()){}
+if(feature == SmooksPackage.eINSTANCE.getParamsType_AnyAttribute()){}
+
+ return null;
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ParamsTypeUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ProfileTypeUICreator.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ProfileTypeUICreator.java
(rev 0)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ProfileTypeUICreator.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -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.uitls.temp;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+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.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.javabean.BindingsType;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class ProfileTypeUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ if(feature == SmooksPackage.eINSTANCE.getProfileType_Mixed()){}
+if(feature == SmooksPackage.eINSTANCE.getProfileType_Any()){}
+if(feature == SmooksPackage.eINSTANCE.getProfileType_AnyAttribute()){}
+if(feature == SmooksPackage.eINSTANCE.getProfileType_Value()){}
+if(feature == SmooksPackage.eINSTANCE.getProfileType_BaseProfile()){}
+if(feature == SmooksPackage.eINSTANCE.getProfileType_SubProfiles()){}
+
+ return null;
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ProfileTypeUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ProfilesTypeUICreator.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ProfilesTypeUICreator.java
(rev 0)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ProfilesTypeUICreator.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * 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.uitls.temp;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+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.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.javabean.BindingsType;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class ProfilesTypeUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ if(feature == SmooksPackage.eINSTANCE.getProfilesType_Mixed()){}
+if(feature == SmooksPackage.eINSTANCE.getProfilesType_Any()){}
+if(feature == SmooksPackage.eINSTANCE.getProfilesType_AnyAttribute()){}
+
+ return null;
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ProfilesTypeUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ReaderTypeUICreator.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ReaderTypeUICreator.java
(rev 0)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ReaderTypeUICreator.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * 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.uitls.temp;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+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.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.javabean.BindingsType;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class ReaderTypeUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ if(feature == SmooksPackage.eINSTANCE.getReaderType_Mixed()){}
+if(feature == SmooksPackage.eINSTANCE.getReaderType_Any()){}
+if(feature == SmooksPackage.eINSTANCE.getReaderType_AnyAttribute()){}
+if(feature == SmooksPackage.eINSTANCE.getReaderType_TargetProfile()){}
+if(feature == SmooksPackage.eINSTANCE.getReaderType_Class()){}
+
+ return null;
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ReaderTypeUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ResourceConfigTypeUICreator.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ResourceConfigTypeUICreator.java
(rev 0)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ResourceConfigTypeUICreator.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -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.uitls.temp;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+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.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.javabean.BindingsType;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class ResourceConfigTypeUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ if(feature == SmooksPackage.eINSTANCE.getResourceConfigType_Mixed()){}
+if(feature == SmooksPackage.eINSTANCE.getResourceConfigType_Any()){}
+if(feature == SmooksPackage.eINSTANCE.getResourceConfigType_AnyAttribute()){}
+if(feature == SmooksPackage.eINSTANCE.getResourceConfigType_Selector()){}
+if(feature == SmooksPackage.eINSTANCE.getResourceConfigType_SelectorNamespace()){}
+if(feature == SmooksPackage.eINSTANCE.getResourceConfigType_TargetProfile()){}
+
+ return null;
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ResourceConfigTypeUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ResourceTypeUICreator.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ResourceTypeUICreator.java
(rev 0)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ResourceTypeUICreator.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * 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.uitls.temp;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+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.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.javabean.BindingsType;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class ResourceTypeUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ if(feature == SmooksPackage.eINSTANCE.getResourceType_Mixed()){}
+if(feature == SmooksPackage.eINSTANCE.getResourceType_Any()){}
+if(feature == SmooksPackage.eINSTANCE.getResourceType_AnyAttribute()){}
+if(feature == SmooksPackage.eINSTANCE.getResourceType_Value()){}
+if(feature == SmooksPackage.eINSTANCE.getResourceType_Type()){}
+
+ return null;
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/ResourceTypeUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/SetOffTypeUICreator.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/SetOffTypeUICreator.java
(rev 0)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/SetOffTypeUICreator.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * 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.uitls.temp;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+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.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.javabean.BindingsType;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class SetOffTypeUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ if(feature == SmooksPackage.eINSTANCE.getSetOffType_Mixed()){}
+if(feature == SmooksPackage.eINSTANCE.getSetOffType_Any()){}
+if(feature == SmooksPackage.eINSTANCE.getSetOffType_AnyAttribute()){}
+if(feature == SmooksPackage.eINSTANCE.getSetOffType_Feature()){}
+
+ return null;
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/SetOffTypeUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/SetOnTypeUICreator.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/SetOnTypeUICreator.java
(rev 0)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/SetOnTypeUICreator.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * 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.uitls.temp;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+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.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.javabean.BindingsType;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class SetOnTypeUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ if(feature == SmooksPackage.eINSTANCE.getSetOnType_Mixed()){}
+if(feature == SmooksPackage.eINSTANCE.getSetOnType_Any()){}
+if(feature == SmooksPackage.eINSTANCE.getSetOnType_AnyAttribute()){}
+if(feature == SmooksPackage.eINSTANCE.getSetOnType_Feature()){}
+
+ return null;
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/SetOnTypeUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/SmooksResourceListTypeUICreator.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/SmooksResourceListTypeUICreator.java
(rev 0)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/SmooksResourceListTypeUICreator.java 2009-04-10
10:09:15 UTC (rev 14654)
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * 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.uitls.temp;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+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.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.javabean.BindingsType;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class SmooksResourceListTypeUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ if(feature == SmooksPackage.eINSTANCE.getSmooksResourceListType_Mixed()){}
+if(feature == SmooksPackage.eINSTANCE.getSmooksResourceListType_Any()){}
+if(feature == SmooksPackage.eINSTANCE.getSmooksResourceListType_AnyAttribute()){}
+if(feature == SmooksPackage.eINSTANCE.getSmooksResourceListType_AbstractReaderGroup()){}
+if(feature ==
SmooksPackage.eINSTANCE.getSmooksResourceListType_AbstractResourceConfigGroup()){}
+if(feature == SmooksPackage.eINSTANCE.getSmooksResourceListType_DefaultConditionRef()){}
+if(feature == SmooksPackage.eINSTANCE.getSmooksResourceListType_DefaultSelector()){}
+if(feature ==
SmooksPackage.eINSTANCE.getSmooksResourceListType_DefaultSelectorNamespace()){}
+if(feature ==
SmooksPackage.eINSTANCE.getSmooksResourceListType_DefaultTargetProfile()){}
+
+ return null;
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/SmooksResourceListTypeUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain