this.workspace = workspace;
putValue(Action.NAME, NbBundle.getMessage(WorkspaceNode.class, "WorkspaceNode_renameWorkspace"));
}
public void actionPerformed(ActionEvent e) {
ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
String s = (String) JOptionPane.showInputDialog(
null,
"",
NbBundle.getMessage(WorkspaceNode.class, "WorkspaceNode_renameWorkspace_dialogTitle"),
JOptionPane.PLAIN_MESSAGE,
null,
null,
workspace.getName());
//If a string was returned, say so.
if ((s != null) && (s.length() > 0)) {
pc.renameWorkspace(workspace, s);
}
}