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 (IField[]) list.toArray(new IField[list.size()]);			
	}
	
	private static NameProposer createNameProposer(){
		return new NameProposer(getGetterSetterPrefixes(), getGetterSetterSuffixes());
	}
	
	private static String[] getGetterSetterPrefixes(){
		return CodeGenerationPreferencePage.getGetterStetterPrefixes();
	}
	
	private static String[] getGetterSetterSuffixes(){
		return CodeGenerationPreferencePage.getGetterStetterSuffixes();
	}
	
	private void generate(IField[] getterFields, IField[] setterFields) throws CoreException{
		if (getterFields.length == 0 && setterFields.length == 0)
			return;
		
		ICompilationUnit cu= null;
		if (getterFields.length != 0)
			cu= getterFields[0].getCompilationUnit();
		else
			cu= setterFields[0].getCompilationUnit();
		
		IEditorPart editor= EditorUtility.openInEditor(cu);
		
		IField[] workingCopyGetterFields= getWorkingCopyFields(getterFields);
		IField[] workingCopySetterFields= getWorkingCopyFields(setterFields);
		if (workingCopyGetterFields != null && workingCopySetterFields != null)