RFindUnit – New status of “unused” imports

Frequently we add just the dcus files on the library path in order to do not compile all the pas files every time we compile our projects.

In the “current” process the RFindUnit will tag those imports on uses clauses as unused imports, but it’s not right.

Now those situations will be underlined with a gray line instead of orange AND to solve it press the button “Process DCUs files from Library Path” on the search form.

This basically will decompile the interface part of the dcus files (that is the part that matters for my goal) and store those decompiled partial pas for future consults.

Use the installer to install the last version, it will prevent you to do manual steps.

 

Posted in RfMemory Manager | Leave a comment

RFindUnit – Installer

Now there is an installer on the main directory, so just download it, choose your Delphi version and click install!

installer

Cheers!

Posted in RfMemory Manager | 4 Comments

RFindUnit – 1.2.0 – Automatically detect unused imports!

Project Github

Hello guys!
For a long without posting as always but…. there are some new interesting quite features.
Basically most of it are related to “uses”, if you are using domains to prefix your units name you probably felt the necessity to organize it better on your uses.
So now we have the following options:

  • Group or not uses by domains
  • Group or not non-domain uses
  • Breakline after every uses
  • Just break line btw domains
  • Sort uses by alphabetical order
  • Always import uses to interface section
  • Organize uses using above features after every inserting a new use

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

organizeAfter

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)

SearchUsesDialog

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.

ExperimentalFeature

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.

ProcessingUses

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:

CheckedAndOK

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:

CheckedAndNotOk

Nice, isn’t it ? BUT, there are some buts, sure.

  • I’m not working very well with forms yet. Mainly those that inherits from another form.
  • The check will be redone when you save the current file.
  • Thread problems….. as basically all the things are done on threads, sometimes you can face same errors while closing the IDE or the project. I’m working on it, but I will get a totally different approach to solve it, that I will describe here in the future.
Posted in RfMemory Manager | Leave a comment

RFindUnit 1.0.11 – Change the organize uses shortcut

Hello all!

For some reason the Ctrl + Shift + O doesn’t work on Delphi Tokyo. I changed the shortcut for Ctrl + Shit + U, I will make it configurable later.

Mainly this is the most radical change, but there are few others:

  • Added cache for processed files. Now the refresh for files will be much faster.
  • Added the option to group uses without namespaces while organizing it.
  • Save visual changes on the settings screen as size.

See you!

Posted in RfMemory Manager | 4 Comments

RFindUnit Version 1.0.8

Hello!

For a long I don’t post about RFindUnit, so here it goes.

In this new version there is a lot of bugs and improvements implemented as like:

  • New version of DelphiAst solving problem while parsing files with the char “&” on the method name
  • Enumerator content is also listed now on the uses search, things as: “rfReplaceall”
  • Remove dependencies of some third libraries
  • A lot of improvements on the quality of the string search. Now it’s returning much more accurate suggestions
  • Error while calling the uses on the last line of the file

And the last but not least, the feature of organizing the uses. So, now is possible to sort the uses by alphabetical order, by namespaces and break line between different namespaces. The result is like this:

Before:

organizeBefore

After:

organizeAfter

The sort will be called before you add  new uses based on your configuration or when you use the shortcut (Ctrl+Shift+O)

Best Regards 🙂

Posted in RfMemory Manager | 2 Comments

Delphi – Library Path Manager

If as me you suffer while working with the Delphi library path, tarammm! Here is an option. It’s just the first version, very simple, but helps a lot.

I can for instance add a directory and ask to also add all it’s sub dirs (right click on item), etc etc. The code is ugly, but it’s working, I will open it’s source later.

Yes, I did a system out of Delphi, because Delphi has some bugs on the OTA that deal with this area so I decided to do not create any workaround, just make it simple.

Download here! 

main

Posted in RfMemory Manager | 5 Comments

Datadog API for Delphi

Hi!

Do you know Datadog ?

datadog-dashboard

No, so here it’s DataDog

Basically, it’s a metrics collector able to provide us nice dashboards on real-time.

But,  Delphi didn’t have a library to communicate with it, now we have: https://github.com/rfrezino/datadog-delphi

 

🙂

Posted in RfMemory Manager | 5 Comments

RFindUnit – Version 1.0.5

Hi everybody!

The RFindUnit – Version 1.0.5, have two important fixes:

  • Now, while working in group project all the files are gonna be put in the search.
  • When opening Delphi from dpr file, there was a problem that did not initialize the search thread.  Now it is ok!

😀

Posted in RfMemory Manager | Leave a comment

Research – Garbage Collector for Delphi

Hi, everybody!

I’ve started a deeper research about Garbage Collector, and checking the viability to implement it for Delphi, and it looks really promissor.

If you like this subject and want to study it too, here is the link for the “project”. By now there is no implementation in course, I’m just putting the information together.

Thank you,

Posted in RfMemory Manager | Leave a comment

RFindUnit – AutoImport improvements and Fixes

Get RFindUnit on GitHub

Hi, everybody!

Last week we had a  very interesting new feature, AutoImport. Now this feature was improved!

Now you don’t need to to use the shortcut (Ctrl+Alt+I) to import the uses, all the memorized units will be imported while you write your code. Take a look:

A lot of small improvements was done too:

  • Now I check on wicth uses’s section I must to add the unit
  • On search form load, I mark the right section to add the unit
  • When I add the unit to a uses, If its already on another, I remove it from the other section.
  • Break uses’s line if it’s bigger then 80 chars
  • Update the DelphiAST version
  • Update the installer
  • Some code refactoring and better messages for debug

😀

 

 

Posted in RFindUnit | 12 Comments