Separator item = new Separator();
menuItems.add(item);
}
IWorkingSet[] sets = typedSets[i];
for (int j = 0; j < sets.length; j++) {
IWorkingSet set = sets[j];
Set existingElements = new HashSet();
existingElements.addAll(Arrays
.asList(set.getElements()));
boolean visible = false;
IAdaptable [] adaptables = new IAdaptable[selectedElements.length];
System.arraycopy(selectedElements, 0, adaptables, 0, selectedElements.length);
adaptables = set.adaptElements(adaptables);
if (adaptables.length > 0 && add) {
for (int k = 0; k < adaptables.length; k++) {
if (!existingElements.contains(adaptables[k])) {
// show if any element is not present in
// addition