Author: dmaliarevich
Date: 2011-06-03 05:16:52 -0400 (Fri, 03 Jun 2011)
New Revision: 31798
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeVisualLinkCreator.java
Log:
https://issues.jboss.org/browse/JBIDE-9063 , PATCH was applied.
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeVisualLinkCreator.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeVisualLinkCreator.java 2011-06-03
08:23:28 UTC (rev 31797)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeVisualLinkCreator.java 2011-06-03
09:16:52 UTC (rev 31798)
@@ -146,9 +146,24 @@
textContainer.appendChild(text);
}
}
-
+ copyAttribute(sourceNode, a,"id"); //$NON-NLS-1$
+ copyAttribute(sourceNode, a,"rel"); //$NON-NLS-1$
+ copyAttribute(sourceNode, a,"tabindex"); //$NON-NLS-1$
return creatorInfo;
}
+ /**
+ * Copies attribute from source node to visual node
+ * @param sourceNode
+ * @param a
+ * @param attrName
+ */
+ private void copyAttribute(Node sourceNode, nsIDOMElement a, String attrName) {
+ Element sourceA = (Element) sourceNode;
+ String attrValue = sourceA.getAttribute(attrName);
+ if ((attrValue != null) && (attrValue.length() > 0)) {
+ a.setAttribute(attrName, attrValue);
+ }
+ }
@Override
public boolean isRecreateAtAttrChange(VpePageContext pageContext,