Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Field comment is ignored if field has prefix

Help
denis r
2012-01-22
2013-04-17
  • 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?
    Thanks

     
  • Martin Kesting
    Martin Kesting
    2013-02-03

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