DefaultActionMapping<WorkspaceImpl> mapping = new DefaultActionMapping<WorkspaceImpl>(
SwitchWorkspaceAction.SOAPUI_ACTION_ID, null, null, false, filePath);
mapping.setName(workspace.getName());
mapping.setDescription("Switches to the [" + workspace.getName() + "] workspace");
AbstractAction delegate = new SwingActionDelegate(mapping, SoapUI.getWorkspace());
recentWorkspacesMenu.add(new JMenuItem(delegate), recentWorkspacesMenu.getItemCount() - 2);
recentWorkspacesMenu.getItem(recentWorkspacesMenu.getItemCount() - 1).setEnabled(true);
System.out.println(recentWorkspacesMenu.getItem(recentWorkspacesMenu.getItemCount() - 1).getText());