break; case IDX_EDIT:
if (!elementsToAdd.isEmpty()) { if (fFoldersList.getSize() == 1) { CPListElement existing= (CPListElement) fFoldersList.getElement(0); if (existing.getResource() instanceof IProject) { askForChangingBuildPathDialog(existing); } } HashSet modifiedElements= new HashSet(); askForAddingExclusionPatternsDialog(elementsToAdd, modifiedElements);  fFoldersList.addElements(elementsToAdd); fFoldersList.postSetSelection(new StructuredSelection(elementsToAdd));  if (!modifiedElements.isEmpty()) { for (Iterator iter= modifiedElements.iterator(); iter.hasNext();) { Object elem= iter.next(); fFoldersList.refresh(elem); fFoldersList.expandElement(elem, 3); } }  } } else if (index == IDX_EDIT) {
	protected void sourcePageCustomButtonPressed(DialogField field, int index) {		if (field == fFoldersList) {			List elementsToAdd= new ArrayList(10);			switch (index) {			case IDX_ADD: /* add */								if (fCurrJProject.exists()) {					CPListElement[] srcentries= openSourceContainerDialog(null);					if (srcentries != null) {						for (int i= 0; i < srcentries.length; i++) {							elementsToAdd.add(srcentries[i]);						}					}										} else {					CPListElement entry= openNewSourceContainerDialog(null);					if (entry != null) {						elementsToAdd.add(entry);					}				}							break;			case IDX_EDIT: /* add existing */				editEntry();				return;			}			if (!elementsToAdd.isEmpty()) {				fFoldersList.addElements(elementsToAdd);				fFoldersList.postSetSelection(new StructuredSelection(elementsToAdd));				// if no source folders up to now				if (fFoldersList.getSize() == elementsToAdd.size()) {					askForChangingBuildPathDialog();				}			}		}	}