Bug 40952 Generate getter and setter: set field name as default return value
Unfortunately, the new Eclipse version does not create a get/set method in the form of /** * Description. * * @return string */ public String getName() { return name; } anymore but it leaves out the value of the @return param: /** * Description. * * @return */ public String getName() { return name; } But this has the bad side effect that generating javadoc generates warnings for each method that was automatically generated via "Generate getter and setter" function of eclipse. To get a clean javadoc creation back again, you have to fill in the @return value by hand which makes all the nice automatic stuff rather useless. i suggest to set the field name as the default return value: /** * Description. * * @return name */ public String getName() { return name; } which should be quite easy to implement as each get/set method is created based on this field name!
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeTemplateBlock.java
} else if (CodeTemplates.METHODSTUB.equals(name)) {
				return PreferencesMessages.getString("CodeTemplateBlock.methodstub.label"); 
			} else if (CodeTemplates.CONSTRUCTORSTUB.equals(name)) {
				return PreferencesMessages.getString("CodeTemplateBlock.constructorstub.label"); 
			} else if (CodeTemplates.GETTERSTUB.equals(name)) {
				return PreferencesMessages.getString("CodeTemplateBlock.getterstub.label"); 
			} else if (CodeTemplates.SETTERSTUB.equals(name)) {
				return PreferencesMessages.getString("CodeTemplateBlock.setterstub.label"); 
			} else if (CodeTemplates.NEWTYPE.equals(name)) {
				return PreferencesMessages.getString("CodeTemplateBlock.newtype.label"); 
			} else if (CodeTemplates.TYPECOMMENT.equals(name)) {
				return PreferencesMessages.getString("CodeTemplateBlock.typecomment.label"); 
			} else if (CodeTemplates.METHODCOMMENT.equals(name)) {
				return PreferencesMessages.getString("CodeTemplateBlock.methodcomment.label"); 
			} else if (CodeTemplates.OVERRIDECOMMENT.equals(name)) {
				return PreferencesMessages.getString("CodeTemplateBlock.overridecomment.label"); 
			} else if (CodeTemplates.CONSTRUCTORCOMMENT.equals(name)) {
				return PreferencesMessages.getString("CodeTemplateBlock.constructorcomment.label"); 
			}
			return template.getDescription();
		}
	}	
	
	private final static int IDX_EDIT= 0;
	private final static int IDX_IMPORT= 2;
	private final static int IDX_EXPORT= 3;
	private final static int IDX_EXPORTALL= 4;
	
	protected final static Object COMMENT_NODE= PreferencesMessages.getString("CodeTemplateBlock.templates.comment.node"); 
	protected final static Object CODE_NODE= PreferencesMessages.getString("CodeTemplateBlock.templates.code.node");