Compact getters/setters plugin

Problem: I usually like getters/setters on a single line with no line between setter/getter, like this:


This makes my code more readable if I have a lot of properties.

Question: Is there a way to achive this from a plugin and in a transparent way (integrated with Reformat Code functionality - Alt + Ctrl + L) ?

If there is no way to do this using open api, maybe a closed api solution?



Edit: Related JIRA issue: IDEABKL-1549[/url]

2 comments
Comment actions Permalink
 public String getName() { return name; }
> public void setName(String name) { this.name = name; }
> 
> public int getAge() { return age; }
> public void setAge(int age) { this.age = age; }
> 
> public int getHeight() { return height; }
> public void setHeight(int height) { this.height = height; }
> ]]>


Just curious, does setting an ordinary line breakpoint works for such
one-liners?

Tom

0
Comment actions Permalink

Of course, it works as usual (by clicking the gutter). Now a method breakpoint is a little trickier (only from View Breakpoints dialog), but I don't usually use those.
A line breakpoint is enough for one line methods :)

0

Please sign in to leave a comment.