First i thought that i'd go through all the apls, classes and windows to get all names of declared functions. Then go through all of the Actionblocks and look if any of the names of the declared functions are being called. Then report the ones that are never called anywhere. That's how i would find orphaned code.
But i googled and found some websites with advertisement of TeamDeveloper where it stated that TD contains a orphaned code tool. Where do i find this and how do i use it? I can't find any usages of this tool online or anywhere else...
- Founder/Site Admin
- Posts: 1358
- Joined: 24 Feb 2017, 09:12
- Location: Gouda, The Netherlands
Maybe IceTea group offered something in the past. (anyone?)
I created some CDK tools in the past which I use sometimes, but they are far from perfect.
The first action would be to remove unused libraries from a project. These orphaned libraries carry in a lot of unused code.
Try to traverse the include tree from bottom to up and remove libraries to see if they compile on their own and in the entire project as a whole.
In an old project I could reduce the total number of libraries from 1400 to about 900.
But it was a hell to do. But resulted in smaller binaries and faster compile times.
It would be great if TD would offer such tooling out-of-the-box.
TD .NET has a option to analyze orphaned code. It requires manually to go throught all functions, constants, variables and etc. Not very helpfull.
the tool from iceteagroup was called Dr. Livingstone it is still available and (now ) free
but it only works for TD version up to 4.2
I'm still crying behind ... it was really great
Maybe OT should have a look on it to see professional features once availabe by third party and now still missing
Introduction from Dr. Livingstone help file:
Know the Who-is-who of your Team Developer Application without browsing manually through tons of code!
Dr. Livingstone explores your program and tells you exactly where your variables and classes come from, where they've been, and where they go to.
Information at your fingertips, just a click away.
Dr. Livingstone is a powerful extension to Gupta's Team Developer.
It scans the source code and detects all variables, functions, and classes and displays them in a nicely integrated dockable set of windows. From there a simple click brings you to the declarations or to the statements that use them.
This makes it possible to get answers to questions such as:
· Where is a certain variable used?
· Where is a specific variable modified i.e. assigned or passed as a receive parameter?
· What functions are called by a given function?
· From where is a certain function called?
· What classes are derived from a given class?
· What are the base classes of a certain class?
· Where are instances of a functional class created e.g. anUdv = new MyClass?
· Where are variables of a functional class declared?
· Where are instances of window classed declared?
As an extra bonus Dr. Livingstone also offers the possibility to:
· Rename a symbol e.g. change the name of a function and all calls to that function will be renamed automatically
· Show all unreferenced symbols within a section e.g. show all unreferenced parameters in a function or show all unreferenced symbols within the entire application
· Remove all unreferenced symbols in the application, all unreferenced symbol of a certain type e.g. internal functions or only the ones selected by the developer
Copyright © 2007 by Ice Tea Group, L.L.C. and Johan Alm
Author: Johan Alm
Would you be allowed or willing to share these? Maybe i could reuse some of your code (#
Hell YEAH! I really don't understand why tools like these don't come out-of-the-box....
@Aspurga: Thanks but yeah - seems like that "analyzer" is not very helpful in an automated environment -.-
Who is online
Users browsing this forum: No registered users and 0 guests