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
*/
		public Object[] getElements(Object inputElement) {
			try {
				IType type= (IType)inputElement;
				IField[] fields= type.getFields();
				List fieldList= new ArrayList(fields.length);
				for (int i = 0; i < fields.length; i++) {
					if (fGetterSetterEntries.containsKey(fields[i]))
						fieldList.add(fields[i]);
				}
				return (IField[]) fieldList.toArray(new IField[fieldList.size()]);
			} catch (JavaModelException e) {
				return EMPTY;
			}
		}
		/*
		 * @see IContentProvider#dispose()
		 */
		public void dispose() {
			fGetterSetterEntries.clear();
			fGetterSetterEntries= null;
		}
		/*
		 * @see IContentProvider#inputChanged(Viewer, Object, Object)
		 */
		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
		}
		
	}
}