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
return IMAGE;	
			return super.getImage(element);
		}
	}
	
	
	/**
	 * @return map IField -> GetterSetterEntry[]
	 */
	private static Map createGetterSetterMapping(IType type) throws JavaModelException{
		IField[] fields= type.getFields();
		Map result= new HashMap();
		String[] prefixes= AddGetterSetterAction.getGetterSetterPrefixes();
		String[] suffixes= AddGetterSetterAction.getGetterSetterSuffixes();
		for (int i= 0; i < fields.length; i++) {
			List l= new ArrayList(2);
			if (GetterSetterUtil.getGetter(fields[i], prefixes, suffixes) == null)
				l.add(new GetterSetterEntry(fields[i], true));
				
			if (GetterSetterUtil.getSetter(fields[i], prefixes, suffixes) == null)
				l.add(new GetterSetterEntry(fields[i], false));	
			if (! l.isEmpty())
				result.put(fields[i], (GetterSetterEntry[]) l.toArray(new GetterSetterEntry[l.size()]));
		}
		return result;
	}
	
	private static class AddGetterSetterContentProvider implements ITreeContentProvider{
		private static final Object[] EMPTY= new Object[0];
		private Map fGetterSetterEntries;