Bug 268819 [WorkbenchLauncher] 'Workspaces' preference page's 'Remove' button should enable/disable itself more intelligently
1. Window > Preferences > General > Startup > Workspaces 2. Select a workspace. 3. Click 'Remove'. 4. There is now no selection, but the 'Remove' button is still enabled.
bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/dialogs/RecentWorkspacesPreferencePage.java
int[] selected = workspacesList.getSelectionIndices();
		java.util.List workspaces = new ArrayList(Arrays.asList(workspacesList.getItems()));
		
		for (int i = selected.length-1; i >= 0; i--) {
			workspaces.remove(selected[i]);
		}
		String[] newItems = new String[workspaces.size()];
		workspaces.toArray(newItems);
		workspacesList.setItems(newItems);
	}
	protected void performDefaults() {
		promptOption.setSelection(true);
		super.performDefaults();
	}
	public boolean performOk() {
		int maxWorkspaces = maxWorkspacesField.getSelection();
		String[] workspaces = new String[maxWorkspaces];
		String[] listItems = workspacesList.getItems();
		if (maxWorkspaces < listItems.length) {
			
			System.arraycopy(listItems, 0, workspaces, 0, maxWorkspaces);
		} else  {
			System.arraycopy(listItems, 0, workspaces, 0, listItems.length);
		}
		workspacesData.setRecentWorkspaces(workspaces);
		workspacesData.writePersistedData();
		return true;
	}
}