Author: yradtsevich
Date: 2010-07-01 04:00:17 -0400 (Thu, 01 Jul 2010)
New Revision: 23144
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeValueCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeAttributeOperand.java
Log:
https://jira.jboss.org/browse/JBIDE-6542 :
VPE Templates affected by changes in
org.eclipse.wst.xml.core.internal.document.ElementImpl
- methods VpeValueCreator.isEditabledAtribute() and isEditabledAtribute.exec() have been
fixed
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeValueCreator.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeValueCreator.java 2010-07-01
01:57:18 UTC (rev 23143)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeValueCreator.java 2010-07-01
08:00:17 UTC (rev 23144)
@@ -115,7 +115,10 @@
public boolean isEditabledAtribute(VpePageContext pageContext, Element sourceElement,
Map visualNodeMap) {
if (outputAttrName != null && expression != null) {
- String attrValue = sourceElement.getAttribute(outputAttrName);
+ String attrValue = null;
+ if (sourceElement.hasAttribute(outputAttrName)) {
+ attrValue = sourceElement.getAttribute(outputAttrName);
+ }
String exprValue;
try {
exprValue = expression.exec(pageContext, sourceElement).stringValue();
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeAttributeOperand.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeAttributeOperand.java 2010-07-01
01:57:18 UTC (rev 23143)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeAttributeOperand.java 2010-07-01
08:00:17 UTC (rev 23144)
@@ -26,9 +26,7 @@
}
public VpeValue exec(VpePageContext pageContext, Node sourceNode) {
- String value = null;
- value = ((Element)sourceNode).getAttribute(name);
- return new VpeValue((value == null ? "" : value)); //$NON-NLS-1$
+ return new VpeValue(((Element)sourceNode).getAttribute(name));
}
public String getAttributeName() {