tip of the day: eclipse clean up's

Tags: #<Tag:0x00007f0f22be3b28> #<Tag:0x00007f0f22be3948>

Hello again for another exciting tip of the day!

I was trying to add all missing @Override annotations into the java classes of openmrs-core and new I could use the eclipse save action for it but then I’d have to open every file and I’m lazy :grin:

So I searched and found the Eclipse Clean Up feature :sunny:

Here’s what you do:

Go to the preferences, search for cleanup and find this:

then you create a new profile, in my case I called it ‘add override annotations’ and you select just what you want to clean up. The options are just like in the save actions settings dialog.

Now to clean up all the files in the repo you open the Eclipse project explorer and go to the package view, right click and select ‘Source’ -> ‘Clean Up’ as shown below

Voila :tada: Now I can go back to being lazy again :grin:

If anyone wants to try this out, there is enough to do on the clean code quest so grab an issue, or create one according to things shown by codacy, create a clean up profile and become a clean code hero :smile:

These tips are awesome! :smile: Are you putting them on some sort of tips wiki page?

hehe, well the save actions one is in the code conventions wiki on how to setup the eclipse IDE. this one Im not sure where it should go. do you have a suggestion?

Are you asking for where the eclipse tips page should go? :slight_smile:

Yes, well the other tip fits well to the coding conventions. this one I’m not sure. I just want to avoid adding duplicate information and multiple pages regarding IDE setup. We already have a few topics that are mentioned on several pages. Is there an IDE wiki page?

@teleivo how about here? https://wiki.openmrs.org/display/docs/Developer+How-To+Use+Eclipse+Guide

see the shiny new page :smile:

I updated some bits but I hope someone else wants to volunteer on updating the other parts of the page since they are outdated :frowning: