class DeleteWorkspace extends AbstractAction {

    DeleteWorkspace() {
        super(NbBundle.getMessage(DeleteWorkspace.class, "CTL_DeleteWorkspace"),
            ImageUtilities.loadImageIcon("DesktopProject/deleteWorkspace.png", false));
    }

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

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

        if (isEnabled()) {
            ProjectControllerUIImpl cui = Lookup.getDefault().lookup(ProjectControllerUIImpl.class);
            if (ev.getSource() != null && ev.getSource() instanceof Workspace) {
                Workspace workspace = (Workspace) ev.getSource();
                cui.deleteWorkspace(workspace);
            } else {
                cui.deleteWorkspace();
            }
        }
    
<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