Leo
Leo

Reputation: 5235

Selectively delete methods in eclipse

In a bean class, suppose there are 100 getters and setters methods. How to quickly remove all the setters from that class? Is there any shortcut in eclipse to selectively delete large number of methods at one go?

Upvotes: 2

Views: 883

Answers (1)

Marged
Marged

Reputation: 10953

You can do this from the outline:

  • Open the outline
  • Order from A to Z
  • Select the setters by holding Shift and pressing Cursor down / Page down
  • Press the Del key

Should look similar to this (sorry, I didn't have 100 setters at hand ;-))

Outline

To move the getters out of the way you could open the filters by clicking on the downwards triangle:

Filters

This will work if you only have getters and setters and no other methods. Unfortunately I found no way of telling the filter "not set*".

Upvotes: 8

Related Questions