RFindUnit 1.2.0 – Automatically detect unused imports! » Developer.Team

RFindUnit 1.2.0 – Automatically detect unused imports!

RFindUnit 1.2.0 – Automatically detect unused imports!
RFindUnit 1.2.0 – Automatically detect unused imports!


To organize based on your configuration press Ctrl+Shift+U:


A lot of bugs were resolved (now we have some unit tests), so now you will have a much more complete list of possible items to be imported and with a much better search string match algorithm. (Ctrl+Shift+A)

It’s an old feature but it’s good to remeber, it’s possible to automatically import “uses” that were imported before. So, once you choose System.SynObjs to be the uses to TCriticalSection (using Ctrl+Shift+A), next time you don’t need to search again you can use the auto-import through the shortcut (Ctrl+Shift+I).

AND the last new feature is something very interesting. After creating a lot of links btw the abstract trees on pas files, I noticed that I was not so far away to be able to detect unused imports. So I decided to create a feature that would be able to detect and highlights unused uses for the developer.
Take note that by default is not active but you can active it on the options.

The feature works in a very simple way. After activating this feature, once you open a pas file you will notice a a hourglass on the top left of you pas file, it means that the algorithm is resolving the dependencies the file and checking valid or not.

After that (depending of the size of the file it can take some seconds), you will see a check that can have two different colors.
Green when all the dependencies were checked and they are all used:


And Orange that means that they were checked, but there is one or more unused import, those unused import will have also an orange underline: