Rearranger: rearrange prior to CVS commit

I've recently discovered the very cool Rearranger plugin.

Is it possible to get rearranger to run during a CVS commit? simmilar to how the Reformat Code option can be run?

3 comments
Comment actions Permalink

Hi Jason,

I assume what you're looking for is a way for the Rearranger plugin to hook the CVS plugin (or vice versa) so code is rearranged automatically before going into version control.

Unfortunately in 4.5, the IDEA guys started loading plugins in separate classloaders. As far as I can tell, this made it impossible to invoke one plugin from another (unless someone knows of a way to advertise a plugin within IDEA). The "Reformat" plugin used to chain code layout, import optimization, tabifier and rearranger functions, but this won't work any more.

Perhaps someone from IDEA can suggest a solution.

-Dave

0
Comment actions Permalink

Hi Dave,
Your plugin is really really nice. I have been looking for such a feature for a while. I really felt it was lacking in IDEA. I ran across an issue, however. When I rearrange some files, the tool knocks off the semicolon off the package statement at the start of the file. (sometimes also the last char of the last package). Please fix and let me know, I'd love to continue using the tool.

Take care,
Yitzchok Loriner
yitzchok@loriner.com

0
Comment actions Permalink

Hi Yitzchok,

Could you try something for me? Turn off all the spacing options (number of lines around classes, methods, etc.) and see if the problem goes away.

It would help me in debugging if I could have some source code that exhibits the problem. If you are able to provide that, please email it to davek(at)wrq.com. If not, I'll figure out another way.

Thanks for your kind words. I hope it works well for you!

-Dave

0

Please sign in to leave a comment.