Author: dmaliarevich
Date: 2011-11-03 07:30:02 -0400 (Thu, 03 Nov 2011)
New Revision: 36158
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
Log:
https://issues.jboss.org/browse/JBIDE-10089 - moving style updating code to the top,
before searching routine in getNodeForUpdate(..)
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2011-11-03
08:40:23 UTC (rev 36157)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2011-11-03
11:30:02 UTC (rev 36158)
@@ -785,23 +785,21 @@
if (nodeMapping instanceof VpeElementMapping) {
elementMapping = (VpeElementMapping) nodeMapping;
if (elementMapping != null && elementMapping.getTemplate() != null) {
- Node updateNode = elementMapping.getTemplate()
- .getNodeForUpdate(pageContext,
- elementMapping.getSourceNode(),
- elementMapping.getVisualNode(),
- elementMapping.getData());
/*
- * special processing of "style" element
- *
- * for unification of updating nodes - or redevelop updating
- * mechanism (for example : transfer this function to template )
- * or redevelop template of "style" element
+ *
https://issues.jboss.org/browse/JBIDE-10089
+ * <style> is updated in a special way:
+ * There is no need in removing and adding its visual node.
+ * Thus the underneath statement is reasonable here.
*/
if (HTML.TAG_STYLE.equalsIgnoreCase(sourceNode.getNodeName())) {
- // refresh style node
VpeStyleUtil.refreshStyleElement(this, elementMapping);
return;
}
+ Node updateNode = elementMapping.getTemplate()
+ .getNodeForUpdate(pageContext,
+ elementMapping.getSourceNode(),
+ elementMapping.getVisualNode(),
+ elementMapping.getData());
if ((updateNode != null) && (updateNode != sourceNode)) {
updateNode(updateNode);
return;