Problem with getter template for boolean - blank in method name

I have a problem generating getters for booleans.
Obviously there is a blank in the generation template. Unfortunately I have no clue how to fix this or
where to find the appropriate configuration (search for the template in all files without result).
The error popup:
intellij idea gettersetter prob.png

I have not changed any code generation prefix. Intellij Idea version is 14.1.5

By the way:
-> I have no such "Getter / Setter Template" item in any of the code generation config tabs. Is this outdated?

Any clue anyone?

Comment actions Permalink

There should be choosers on the top of list of available fields, please check the template there


Comment actions Permalink

Obviously the problem was our template:

* @return the {@link #$}
public ##

static ##
$field.type ##
#set($name = $StringUtil.capitalizeWithJavaBeanConvention($StringUtil.sanitizeJavaIdentifier($helper.getPropertyName($field, $project))))

#if ($field.boolean && $field.primitive)
    #if ($StringUtil.startsWithIgnoreCase($name, 'is'))
        #set($name = $StringUtil.decapitalize($name))
() {
return $;

I still don't know what's wrong with the above. However, I just copied the Intellij default and inserted the Javadoc above and this does the trick. Maybe there is a problem with tabs.

Thanks for your help, Anna. :)


Please sign in to leave a comment.