class RenameWorkspace extends AbstractAction {

    RenameWorkspace() {
        super(NbBundle.getMessage(DeleteWorkspace.class, "CTL_RenameWorkspace"),
            ImageUtilities.loadImageIcon("DesktopProject/renameWorkspace.png", false));
    }

    @Override
    public void actionPerformed(ActionEvent e) {<FILL_FUNCTION_BODY>}

    @Override
    public boolean isEnabled() {
        return Lookup.getDefault().lookup(ProjectControllerUIImpl.class).canRenameWorkspace();
    }
}

        if (isEnabled()) {
            String name = "";
            ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
            name = pc.getCurrentWorkspace().getLookup().lookup(WorkspaceInformation.class).getName();
            DialogDescriptor.InputLine dd = new DialogDescriptor.InputLine("",
                NbBundle.getMessage(RenameWorkspace.class, "RenameWorkspace.dialog.title"));
            dd.setInputText(name);
            if (DialogDisplayer.getDefault().notify(dd).equals(DialogDescriptor.OK_OPTION) &&
                !dd.getInputText().isEmpty()) {
                Lookup.getDefault().lookup(ProjectControllerUIImpl.class).renameWorkspace(dd.getInputText());
            }
        }
    
<methods>public void <init>() ,public void <init>(java.lang.String) ,public void <init>(java.lang.String, javax.swing.Icon) ,public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener) ,public java.lang.Object[] getKeys() ,public synchronized java.beans.PropertyChangeListener[] getPropertyChangeListeners() ,public java.lang.Object getValue(java.lang.String) ,public boolean isEnabled() ,public void putValue(java.lang.String, java.lang.Object) ,public synchronized void removePropertyChangeListener(java.beans.PropertyChangeListener) ,public void setEnabled(boolean) <variables>private static java.lang.Boolean RECONFIGURE_ON_NULL,private transient javax.swing.ArrayTable arrayTable,protected javax.swing.event.SwingPropertyChangeSupport changeSupport,protected boolean enabled