Author: mareshkau
Date: 2007-12-22 06:53:53 -0500 (Sat, 22 Dec 2007)
New Revision: 5426
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAttributeCreator.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1484, function of creating attributes was
adjusted
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAttributeCreator.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAttributeCreator.java 2007-12-21
17:27:06 UTC (rev 5425)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAttributeCreator.java 2007-12-22
11:53:53 UTC (rev 5426)
@@ -47,16 +47,23 @@
}
public VpeCreatorInfo create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument
visualDocument, nsIDOMElement visualElement, Map visualNodeMap) {
+
if (expression != null) {
if (visualNodeMap != null) {
visualNodeMap.put(this, visualElement);
}
VpeValue vpeValue = expression.exec(pageContext, sourceNode);
- if (vpeValue != null && vpeValue.stringValue().length() > 0) {
- nsIDOMAttr newVisualAttribute = visualDocument.createAttribute(name);
- newVisualAttribute.setValue(vpeValue.stringValue());
- return new VpeCreatorInfo(newVisualAttribute);
- }
+ //FIX FOR JBIDE-1484 added by Max Areshkau
+ //commented to fix JBIDE-1484
+// if (vpeValue != null && vpeValue.stringValue().length() > 0) {
+// nsIDOMAttr newVisualAttribute = visualDocument.createAttribute(name);
+// newVisualAttribute.setValue(vpeValue.stringValue());
+// return new VpeCreatorInfo(newVisualAttribute);
+// }
+ nsIDOMAttr newVisualDOMAttribute = visualDocument.createAttribute(name);
+ newVisualDOMAttribute.setValue(vpeValue==null?null:vpeValue.stringValue());
+ return new VpeCreatorInfo(newVisualDOMAttribute);
+ //END of FIX JBIDE-1484 code
}
return null;
}