Author: svasilyev
Date: 2007-07-09 04:09:04 -0400 (Mon, 09 Jul 2007)
New Revision: 2357
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesToolBarTemplate.java
Log:
http://jira.jboss.org/jira/browse/EXIN-231
Little fix
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesToolBarTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesToolBarTemplate.java 2007-07-09
07:43:01 UTC (rev 2356)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesToolBarTemplate.java 2007-07-09
08:09:04 UTC (rev 2357)
@@ -429,7 +429,9 @@
this.leftToolBarItems = new LinkedList<SourceToolBarItem>();
this.rightToolBarItems = new LinkedList<SourceToolBarItem>();
this.itemSeparator = itemSeparator;
- this.itemSeparatorExists = itemSeparator != null &&
!ITEMSEPARATOR_ATTR_NAME.equals(itemSeparator);
+ this.itemSeparatorExists = !(itemSeparator == null
+ || itemSeparator.length() == 0
+ || ITEMSEPARATOR_ATTR_NAME.equals(itemSeparator));
init(sourceNode);
}
@@ -455,11 +457,11 @@
}
}
- if (!isLeftItemsExists()) {
+ if (isItemSeparatorExists() && !isLeftItemsExists()) {
rightToolBarItems.remove(0);
}
- if (!isRightItemsExists()) {
+ if (isItemSeparatorExists() && !isRightItemsExists()) {
leftToolBarItems.remove(leftToolBarItems.size()-1);
}
}