public void setSelection(Object[] elements) { if ((elements == null) || (fElements == null)) return;   int[] indices= new int[elements.length]; for (int i= 0; i != elements.length; i++) { int j; for (j= 0; j != fFoldedCount; j++) { int max= (j == fFoldedCount - 1) ? fFilteredCount : fFoldedIndices[j + 1];  int l; for (l= fFoldedIndices[j]; l != max; l++) {  if (fElements[fFilteredIndices[l]].equals(elements[i])) { indices[i]= j; break; } }  if (l != max) break; }   if (j == fFoldedCount) indices[i] = 0; }  fList.setSelection(indices);
public void setSelection(int[] selection) { if (selection == null || selection.length == 0) fList.deselectAll(); else fList.setSelection(selection);
	public void setSelection(Object[] elements) {		if ((elements == null) || (fElements == null))			return;							// fill indices		int[] indices= new int[elements.length];		for (int i= 0; i != elements.length; i++) {			int j;						for (j= 0; j != fFoldedCount; j++) {				int max= (j == fFoldedCount - 1)					? fFilteredCount					: fFoldedIndices[j + 1];				int l;									for (l= fFoldedIndices[j]; l != max; l++) {					// found matching element?					if (fElements[fFilteredIndices[l]].equals(elements[i])) {						indices[i]= j;						break;						}				}								if (l != max)					break;			}						// not found			if (j == fFoldedCount)				indices[i] = 0;		}				fList.setSelection(indices);	}