Bug 38477 add delegate methods: OK enabled even if nothing selected
20030604 the OK button is enabled even if nothing is selected in the dialog
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddDelegateMethodsAction.java
new Object[] { String.valueOf(count), String.valueOf(fEntries)} );
						state = new StatusInfo(IStatus.INFO, message);
					}
				}
			}
			return state;
		}			
	}
	
	private static ISelectionStatusValidator createValidator(int entries) {
		AddDelegateMethodsActionStatusValidator validator= new AddDelegateMethodsActionStatusValidator(entries);
		return validator;
	}
	
	private void showUI(IType type, IField[] preselected) {
		try {
			AddDelegateMethodsContentProvider provider = new AddDelegateMethodsContentProvider(type);
			Methods2FieldLabelProvider methodLabel = new Methods2FieldLabelProvider();
			SourceActionDialog dialog = new SourceActionDialog(getShell(), methodLabel, provider, fEditor, type);			
			dialog.setValidator(createValidator(provider.getNumEntries()));
			dialog.setSorter(new Methods2FieldSorter());
			dialog.setInput(provider);
			dialog.setContainerMode(true);
			dialog.setMessage(ActionMessages.getString("AddDelegateMethodsAction.message")); 
			dialog.setTitle(ActionMessages.getString("AddDelegateMethodsAction.title")); 
			dialog.setExpandedElements(preselected);
			dialog.setSize(60, 18);
			int result = dialog.open();
			if (result == Window.OK) {
				Object[] o = dialog.getResult();