Field comment is ignored if field has prefix

denis r
  • denis r

    denis r - 2012-01-22

    What template should be to take into account prefixes in fields?
    The default getter template ignores field comment if the field has prefix (m_ in my case)

    Example code

        /** This doc is ignored. */
        String m_message;
        /** This doc is respected. */
        String text;
         * Gets the message.
         * @return the message
        public String getMessage() {
            return m_message;
         * Gets the this doc is respected.
         * @return the this doc is respected
        public String getText() {
            return text;
  • Martin Kesting

    Martin Kesting - 2012-01-24

    You are right. When searching for the related field of a getter the prefix is not recognized. Instead the normal Java bean conventions are used.

    I'll take this for the next release.

  • denis r

    denis r - 2012-01-24

    Thanks for response.
    This would be great!

  • dpndeveloper

    dpndeveloper - 2013-01-30

    Hi to all
    in the last revision is it possible to generate getter/setter comments if the field has prefix how describe in the first post? if yes, how?

  • Martin Kesting

    Martin Kesting - 2013-02-03

    define the prefix under Preferences->Java->Code Style


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks