Bug 17598 Source->Generate Getter and Setter enabled for read only file
F1 This action is enabled for read-only files. Executing it shows a dialog saying that the file is read-only. The action should be disabled since all other source actions are disabled as well.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
for (int i = 0; i < selection.length; i++) {
			if (selection[i] instanceof GetterSetterEntry)
				count++;
		}
		return count;
	}
	
	private static IField[] getGetterFields(Object[] result){
		Collection list= new ArrayList(0);
		for (int i = 0; i < result.length; i++) {
			Object each= result[i];
			if ((each instanceof GetterSetterEntry)){ 
				GetterSetterEntry entry= (GetterSetterEntry)each;
				if (entry.isGetterEntry)
					list.add(entry.field);
			}	
		}
		return (IField[]) list.toArray(new IField[list.size()]);			
	}
	
	private static IField[] getSetterFields(Object[] result){
		Collection list= new ArrayList(0);
		for (int i = 0; i < result.length; i++) {
			Object each= result[i];
			if ((each instanceof GetterSetterEntry)){ 
				GetterSetterEntry entry= (GetterSetterEntry)each;
				if (! entry.isGetterEntry)
					list.add(entry.field);
			}	
		}