Re: Uses clause tool



Koger wrote:
Hi

I'm looking for a tool to do the following.

+ Remove unused units
+ Move my own units from interface to implementation
- Sort the uses clause
- Arrange implementation uses clause to have one unit at a line.

Any recommendations?

Thank you

Hi Koger!
I have a tool to remove unused units, and move units to the implementation section. This tool is called CodeWrench.

Note that Delphi will insist on having units appear in the interface section that aren't actually required for compilation. My tool has an option for leaving these units in the interface section.
The tool will not sort units or do any kind of special formatting. But it is open source so you could do this yourself.

This tool works by parsing all of your source code, and building a list of symbols declared in each unit, and a list for each symbol for where the symbol is referenced. Once this information is gathered, CodeWrench can then determine what units are required for compilation.

The parser only works for Delphi versions up to Delphi 7. If a unit has a parser error, the tool will not refactor that unit.

I had a website for this tool, but its no longer up and running (hopefully for not much longer). If you or anyone else is interested, you can e-mail me for now.
.



Relevant Pages

  • Uses clause tool
    ... Remove unused units ... Move my own units from interface to implementation ... - Sort the uses clause ... Arrange implementation uses clause to have one unit at a line. ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Uses clause tool
    ... - Sort the uses clause ... Arrange implementation uses clause to have one unit at a line. ... CnPack IDE Wizards is a free ... them, a tool that removes unused units, as you want on first point. ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: implementing roles in OOP......
    ... everything should be driven by abstracting the problem ... my draft interfaces define what sort of thing I would ... All I need is the Composite relationships to navigate, ... IEnumerator is an interface defined by my environment, we can put, ...
    (comp.object)
  • Re: LW9 running FIXED. hub problem found (i think)
    ... Well, this was all good news, sort of LOL ... I know its capable of some REALLY cool imagery, but why such an utterly goddam amateur interface? ... As for this part, I had to bust out laughing, as this was just too funny LOL ... I was able to start creating cool and FUN scenes pretty much right out of the shoot! ...
    (comp.graphics.apps.lightwave)
  • Re: IInterfaceList and Sort
    ... Unfortunately there is no Sort method. ... {descend from this interface for specific uses ... localCompare:=.asInteger; ... TQuickSort = class(TInterfacedObject, ISorter) ...
    (borland.public.delphi.language.objectpascal)