Author: DartPeng
Date: 2009-01-20 02:35:17 -0500 (Tue, 20 Jan 2009)
New Revision: 13138
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/util/SmooksModelUtils.java
Log:
JBIDE-3592
Fix the bug and add a new property section for edit the connection line's properties (
selector sperator , selector generation policy).
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/util/SmooksModelUtils.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/util/SmooksModelUtils.java 2009-01-20
07:35:00 UTC (rev 13137)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/util/SmooksModelUtils.java 2009-01-20
07:35:17 UTC (rev 13138)
@@ -91,6 +91,23 @@
return false;
}
+ public static void setPropertyValueToAnyType(Object value,EStructuralFeature
attribute,AnyType anyType){
+ anyType.getAnyAttribute().set(attribute, value);
+ }
+
+ 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();
+ if(property.equals(pro)){
+ return binding;
+ }
+ }
+ return null;
+ }
+
public static boolean isInnerFileContents(ResourceConfigType resourceConfig){
ResourceType resource = resourceConfig.getResource();
if(resource == null) return false;
Show replies by date