Bug 59565 - [content assist] auto-completion for Getter/ Setter names, parameters, code
Summary: [content assist] auto-completion for Getter/ Setter names, parameters, code
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-21 21:15 EDT by Thomas Whitmore CLA
Modified: 2020-12-04 17:09 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Whitmore CLA 2004-04-21 21:15:14 EDT
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
Comment 1 Dani Megert CLA 2004-04-22 04:09:37 EDT
I like the auto-completion idea.


You can configure the comment: Java > Code Style > Code Templates > Comments