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
* Returns fields in the selection or <code>null</code> if the selection is 
	 * empty or not valid.
	 */
	private IField[] getSelectedFields(IStructuredSelection selection) {
		List elements = selection.toList();
		int nElements = elements.size();
		if (nElements > 0) {
			IField[] res = new IField[nElements];
			ICompilationUnit cu = null;
			for (int i = 0; i < nElements; i++) {
				Object curr = elements.get(i);
				if (curr instanceof IField) {
					IField fld = (IField) curr;
					if (i == 0) {
						
						cu = fld.getCompilationUnit();
						if (cu == null) {
							return null;
						}
					} else if (!cu.equals(fld.getCompilationUnit())) {
						
						return null;
					}
					try {
						if (fld.getDeclaringType().isInterface()) {
							 
							return null;
						}
					} catch (JavaModelException e) {
						JavaPlugin.log(e);