public void actionPerformed(ActionEvent e) {
TreePath path = configTree.getSelectionPath();
if (path != null) {
DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent();
String configPath = extractCompletePath(node);
ITreeNode treeNode = configTree.getModel().getTreeNode(node);
if (treeNode.getData() instanceof IEntity) {
IEntity entity = (IEntity) treeNode.getData();
String entityName = askRenameEntityName(entity.getClass(), treeNode.getName());
if (entityName != null) {
// updating node name will generate an event, that
// will make the source
// save the entity with an updated name
treeNode.setName(entityName);
configTree.repaint();
DefaultMutableTreeNode newNode = (DefaultMutableTreeNode) path.getLastPathComponent();
String newConfigPath = extractCompletePath(newNode);
UIPreferences.getInstance().replaceEntryInBookmarks(configPath, newConfigPath);
buildBookmarks();