Believe it or not but this time Smart Mobile Studio actually got something Delphi doesn’t (Delphi 7 was our initial model): global renaming. When you rename a unit under Smart, it doesn’t just alter the source-code for the unit in question – it alters all references to that unit in the entire project. No need to backtrack and update the uses declaration elsewhere, they are all changed in a single sweep.
We can actually map the use of a class or method throughout a whole project, and it’s super quick as well!
Database mapped RTL
But we have more tricks up our sleeve. I took the time to make a recursive database indexer for our RTL files. So the first time you run Smart it will parse and extract every inch of information about the RTL and store it in a database table. This table is kept in memory and used to speedup extraction of data regarding classes, methods and properties.
It also has the benefit of giving me instant access to things like class ancestors, data types, fields, scope, interfaces and all those tiresome look-up chores that makes a mess of a codebase. So armed with a TClientDataset map (what did you expect? No self respecting Delphi app is complete without at least one instance of TClientDataset) of the RTL, it is now super easy to beef up and compliment the compiler. On top of my head here are a few things i’m gunning for:
- Complete class at cursor
- Rename class at cursor
- Add interface to class
- Merge classes
- Support for documentation remarks above methods
- Mouse-over information about symbols
I doubt we will be able to stuff all the goodies into version 1 of Smart Mobile Studio, but rest assured that I will do my best to get as much features into Smart as I can.
And now that the indexing and background compile is up to speed, the time has come to finish the globals feature. Globals allows you to edit a list of object (of any class) that should be created automatically by TApplication. Very handy if you have a database connection or some game logic you want to be created on startup.
These are exciting days!
Thank you. Valuable improvements.
That’s very nice… right up until you get a really big project. If your goal is to enable the development of complex applications, what safeguards do you have in place to keep the whole system from either breaking horribly (see: RAD Studio) or bogging down horribly (again, see: RAD Studio) once your project passes a certain level of complexity?
Im not sure what you mean here Mason?
If you are refering to the rename function, this function get’s its information from the compiler. And by its very nature the compiler keeps track of symbols and tokens, so there is very little that can go wrong. We also issue a save call prior to renaming – which means your files are stored on disk (.bak files) in case something goes wrong.
If you are refering to the proposed functions, like rename class etc. I hardly think you can compare any of this to the uber-bloat that was Rad Studio. Rad studio was an IDE that not only contained Delphi, it also added C++,C#, visual basic and object pascal # to the mix. Im actually blown away that it even got off the ground in the first place.
Our goal with Smart is not to create a “be all” to all users type of product. We have a “inspired goal” of matching the functionality of Delphi 7, which in my view was the most producive and enjoyable version of Delphi. But the central aim is to make it easy to write HTML5 apps in object pascal. Nothing more, nothing less.
OK, so it’s not likely to break and get all corrupted. But when you’ve got a large project, how are you going to keep it from taking up tons of memory and/or taking forever to find something? (Bearing in mind that solving the one usually involves making the other worse.)
You have to elaborate here exactly. Are we talking editor memory or compiled JS memory? The IDE is memory hungry yes, but fairly modest compared to Delphi XE. It is a first generation tool after all.
And im not sure i understand why it should take long to find something? I just described how we use a DB table to speed up finding stuff – even though the compiler actually compiles the whole RTL + our megademo example in less than 1 second.