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
if (type == null)
			return false;
		if (type.getFields().length == 0)
			return false;
		if (type.getCompilationUnit() == null)
			return false;
		return true;
	}
	
	private static boolean canEnableOn(IField[] fields) throws JavaModelException {
		return fields != null && fields.length > 0;
	}
	
	private void resetNumEntries() {
		fNumEntries= 0;
	}
	
	private void incNumEntries() {
		fNumEntries++;
	}
	private void run(IType type, IField[] preselected, boolean editor) throws CoreException {		
		if (!ElementValidator.check(type, getShell(), dialogTitle, editor))
			return;
		if (!ActionUtil.isProcessable(getShell(), type))
			return;			
		
		ILabelProvider lp= new AddGetterSetterLabelProvider();
		resetNumEntries();
		Map entries= createGetterSetterMapping(type);
		if (entries.isEmpty()){