Bug 94777 new project wizard: remove button enablement
I20050509-2000 (M7 test pass) new project wizard, 2nd page, projects dependencies tab: - the 'Remove' button is always enabled, even when the selection is on a access rule definition. Pressing it has no effect. It should only be enabled if the selection exclusively containes projects.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ProjectsWorkbookPage.java
fProjectsList.setDialogFieldListener(adapter);
		fProjectsList.setLabelText(NewWizardMessages.ProjectsWorkbookPage_projects_label); 
		
		fProjectsList.enableButton(IDX_REMOVE, false);
		fProjectsList.enableButton(IDX_EDIT, false);
		
		fProjectsList.setViewerSorter(new CPListElementSorter());
	}
	
	public void init(IJavaProject jproject) {
		updateProjectsList(jproject);
	}
		
	private void updateProjectsList(IJavaProject currJProject) {
		
		List cpelements= fClassPathList.getElements();
		
		final List checkedProjects= new ArrayList(cpelements.size());
		
		for (int i= cpelements.size() - 1 ; i >= 0; i--) {
			CPListElement cpelem= (CPListElement)cpelements.get(i);
			if (isEntryKind(cpelem.getEntryKind())) {
				checkedProjects.add(cpelem);
			}
		}
		fProjectsList.setElements(checkedProjects);
		fCurrJProject= currJProject;
	}