duduamar
duduamar

Reputation: 3924

customized save actions in eclipse?

Is there a way do define customized save actions in eclipse? Currently eclipse support only predefined set of actions (i.e. organize imports). I want to add my own save actions (for example - auto generate toString() on save).

Is there such a way?

Thanks

Upvotes: 4

Views: 1584

Answers (1)

sharakan
sharakan

Reputation: 6901

You'd have to write your own plugin, in which you'd provide an implementation of ICleanUp. Write .createFix appropriately to do your code generation. Then you can activate that as a save action, and Eclipse will call your plugin whenever a Java file is saved.

Upvotes: 2

Related Questions