Bug 17383 create getter/setter - no explicit hint if getter/setter already exist
Create getter/setter seems to know which getter/setters exist already. However, there's no explicit way to show this. I can figure out by selecting the type (only not existing getter/setter are shown). If I select a field, I see all the setter/getter of the type and I loose the information which setter and getter exist already.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
return;
			}
			IJavaElement element= SelectionConverter.getElementAtOffset(fEditor);
			if (element != null){
				IType type= (IType)element.getAncestor(IJavaElement.TYPE);
				if (type != null){
					if (! checkCu(type))
						return; 
					if (type.getFields().length > 0){
						run(type, new IField[0], true);	
						return;
					} 
				}
			} 
			MessageDialog.openInformation(getShell(), dialogTitle, 
				ActionMessages.getString("AddGetterSetterAction.not_applicable")); 
		} catch (CoreException e) {
			JavaPlugin.log(e.getStatus());
			showError(ActionMessages.getString("AddGetterSetterAction.error.actionfailed")); 
		}
	}
	
	private boolean checkCu(IMember member) throws JavaModelException{
		if (JavaModelUtil.isEditable(member.getCompilationUnit())) 
			return true;
		MessageDialog.openInformation(getShell(), dialogTitle, 
			ActionMessages.getFormattedString("AddGetterSetterAction.read_only", member.getElementName())); 
		return false;
	}