private KeyReference select(KeyReference[] keyReferences) { ElementListSelectionDialog dialog= new ElementListSelectionDialog(fShell, new WorkbenchLabelProvider());
private KeyReference select(final KeyReference[] keyReferences) { Arrays.sort(keyReferences); final int length= keyReferences.length; ILabelProvider labelProvider= new WorkbenchLabelProvider() { public String decorateText(String input, Object element) { KeyReference keyRef= (KeyReference)element; IStorage storage= keyRef.storage; String name= storage.getName(); if (name == null) return input;  int count= 0; for (int i= 0; i < length; i++) { if (keyReferences[i].storage.equals(storage)) count++; } if (count > 1) { Object[] args= new Object[] { name, new Integer(count) }; name= PropertiesFileEditorMessages.getFormattedString("OpenAction.SelectionDialog.elementLabelWithMatchCount", args); }  return name; } };  TwoPaneElementSelector dialog= new TwoPaneElementSelector(fShell, labelProvider, new WorkbenchLabelProvider()); dialog.setLowerListLabel(PropertiesFileEditorMessages.getString("OpenAction.SelectionDialog.details"));
	private KeyReference select(KeyReference[] keyReferences) {		ElementListSelectionDialog dialog= new ElementListSelectionDialog(fShell, new WorkbenchLabelProvider());		dialog.setMultipleSelection(false);		dialog.setTitle(PropertiesFileEditorMessages.getString("OpenAction.SelectionDialog.title")); //$NON-NLS-1$		dialog.setMessage(PropertiesFileEditorMessages.getString("OpenAction.SelectionDialog.message")); //$NON-NLS-1$		dialog.setElements(keyReferences);				if (dialog.open() == Window.OK) {			Object[] result= dialog.getResult();			if (result != null && result.length == 1)			 return (KeyReference)result[0];		}		return null;	}