public static void updateExpandBarElements(Collection<Element> libraryElements, Scheme scheme) {
        for (ExpandItem item : bar.getItems()) {
            item.dispose();
        }
        for (Element element : libraryElements) {
            String elementName = element.getName();
            String number = getSuchElementsCount(scheme.getElements(), elementName);            
            String elementDescription = element.getDescr();
            String delay = String.valueOf(element.getDelay());
            String inputsCount = String.valueOf(element.getIcnt());
            String outputsCount = String.valueOf(element.getOcnt());            
            String elementOfSuchType = getNamesOfElements (scheme.getElements(), elementName);
            
            Composite composite = new Composite(bar, SWT.NONE);
            composite.setLayout(new GridLayout(1, false));
            Text textField = new Text(composite, SWT.WRAP | SWT.CENTER | SWT.MULTI);
            textField.setEditable(false);
            textField.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
            textField.setText(elementDescription + "; \ndelay = " + delay + "\n inputs count = " + inputsCount
                    + ";\n outputs count = " + outputsCount + "\n"+ elementOfSuchType);
            ExpandItem item = new ExpandItem(bar, SWT.NONE, 0);
            item.setExpanded(false);
            item.setText(elementName + " [" + number + "] ");
            item.setControl(composite);
            composite.pack();
            composite.pack(true);
            item.setHeight(textField.computeSize(SWT.DEFAULT, SWT.DEFAULT).y + 30);
        }
        for (ExpandItem item : bar.getItems()) {
            item.setExpanded(true);
        }
        bar.redraw();
    }