EditorPanel editor = new EditorPanel(diagramEditor, toolbarManager);
GeneralDiagram diagram = diagramEditor.getDiagram();
final Component comp = tabbedPane.add(diagram.getLabelText(), editor);
final int index = tabbedPane.indexOfComponent(comp);
tabbedPane.setToolTipTextAt(index, diagram.getLabelText());
diagram.addNameChangeListener(new NameChangeListener() {
/** {@inheritDoc} */
public void nameChanged(NamedElement element) {
tabbedPane.setTitleAt(index, element.getName());
tabbedPane.setToolTipTextAt(index, element.getName());
}