[jbosstools-commits] JBoss Tools SVN: r43578 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/selection/bar.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Tue Sep 11 05:39:29 EDT 2012
Author: dmaliarevich
Date: 2012-09-11 05:39:29 -0400 (Tue, 11 Sep 2012)
New Revision: 43578
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/selection/bar/SelectionBar.java
Log:
https://issues.jboss.org/browse/JBIDE-7692 - fix for empty text nodes in selection bar.
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/selection/bar/SelectionBar.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/selection/bar/SelectionBar.java 2012-09-11 08:22:31 UTC (rev 43577)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/selection/bar/SelectionBar.java 2012-09-11 09:39:29 UTC (rev 43578)
@@ -351,9 +351,10 @@
&& (node.getNodeType() == Node.ELEMENT_NODE
|| node.getNodeType() == Node.COMMENT_NODE
|| node.getNodeType() == Node.ATTRIBUTE_NODE
- || node.getNodeType() == Node.TEXT_NODE)) {
+ || (node.getNodeType() == Node.TEXT_NODE
+ && node.getNodeValue().trim().length() > 0))) {
+
addNodeListenerTo(node);
-
/*
* If there is no DDM -- item will be added to line
*/
@@ -364,7 +365,8 @@
for (int i = 0; i < children.getLength(); i++) {
Node child = children.item(i);
if ((child.getNodeType() == Node.ELEMENT_NODE)
- || (child.getNodeType() == Node.TEXT_NODE)) {
+ || (child.getNodeType() == Node.TEXT_NODE
+ && child.getNodeValue().trim().length() > 0)) {
list.add(child);
}
}
More information about the jbosstools-commits
mailing list