Community
Participate
Working Groups
Hi people, Martin, I work on a lot of getter/ setter code manually; both because methods occur sporadically in code and because I avoid voluminous JavaDoc obscuring the actual code. Unfortunately there is massive redundancy in writing Getter/ Setter methods. So if I type 'public IQueryExec get' then I'd like name auto-completion to suggest 'getQueryExec' based on the de-prefixed type, as well as possibly suggesting getters based on existing fields. Then I would like auto-completion as to parameters (for setters). Then I would like auto-completion of code body; and this must be able to generate such trivial method bodies onto the same line. I find as a literate programmer & software designer that the whole JavaDoc thing obscures collaborations and larger (= more important) patterns of behaviour while rabbiting on uselessly about the trivia. Why does a getter or setter need any documentation beyond this basic category of behaviour? Answer: It doesn't, and so-called JavaDoc in this case just adds to described and visual complexity. Here's an example of efficient readable code. // Transaction // - derived from bound element public EditTransaction getTransaction() {return tx;} // bound Element/ Prop name public Object getElement() {return element;} public String getProp() {return prop;} // Help Topic public String getHelpTopic() {return helpTopic;} public void setHelpTopic (String topic) {this.helpTopic = topic;} Cheers, Thomas
I like the auto-completion idea. You can configure the comment: Java > Code Style > Code Templates > Comments