Bug 38491 source generation actions: should be available on most cus
20020604 it should be available on compilation units that have 1 type or more than 1 type if 1 of the types is the primary type some 99% of all cus known to man belong to that category
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
return;
		
		ICompilationUnit cu= null;
		if (getterFields.length != 0)
			cu= getterFields[0].getCompilationUnit();
		else if (setterFields.length != 0)
			cu= setterFields[0].getCompilationUnit();
		else
			cu= getterSetterFields[0].getCompilationUnit();
		
		IEditorPart editor= EditorUtility.openInEditor(cu);
		
		IField[] workingCopyGetterFields= getWorkingCopyFields(getterFields);
		IField[] workingCopySetterFields= getWorkingCopyFields(setterFields);
		IField[] workingCopyGetterSetterFields= getWorkingCopyFields(getterSetterFields);
		IJavaElement workingCopyElementPosition= getWorkingCopy(elementPosition);
		if (workingCopyGetterFields != null && workingCopySetterFields != null && workingCopyGetterSetterFields != null)
			run(workingCopyGetterFields, workingCopySetterFields, workingCopyGetterSetterFields, editor, workingCopyElementPosition);			
	}
	
	private static IJavaElement getWorkingCopy(IJavaElement elementPosition) {
		if(elementPosition instanceof IMember)
			return JavaModelUtil.toWorkingCopy((IMember)elementPosition);
		return elementPosition;
	}
	private IField[] getWorkingCopyFields(IField[] fields) throws CoreException{
		if (fields.length == 0)
			return new IField[0];
		ICompilationUnit cu= fields[0].getCompilationUnit();