1.1 --- a/openide.util/src/org/openide/util/Utilities.java Fri Jul 15 14:10:32 2005 +0000
1.2 +++ b/openide.util/src/org/openide/util/Utilities.java Wed Jul 20 06:52:37 2005 +0000
1.3 @@ -2597,8 +2597,13 @@
1.4 }
1.5 Component[] comps = AWTBridge.getDefault().convertComponents(item);
1.6 for (int v = 0; v < comps.length;v++) {
1.7 - if ((comps[v] == null || comps[v] instanceof JSeparator) && menu.getComponentCount() > 0 && menu.getComponent(menu.getComponentCount() - 1) instanceof JSeparator) {
1.8 + Component comp = comps[v];
1.9 + if (comp == null) {
1.10 + comp = new JSeparator();
1.11 + }
1.12 + if (comps[v] instanceof JSeparator && menu.getComponentCount() > 0 && menu.getComponent(menu.getComponentCount() - 1) instanceof JSeparator) {
1.13 // System.out.println("ignorring separator");
1.14 + //TODO improve condition.
1.15 } else {
1.16 // System.out.println("is not=" + comps[v].getClass());
1.17 menu.add(comps[v]);