When Delphi generics were introduced we were unable to find a specification or sufficient examples to update EA to support them with any confidence.
In your words, for "many years" we have effectively had an undocumented maximum version of Delphi supported and had few requests to add the latest. I'm not sure what has changed recently but there has been an influx of support requests for Delphi generics. Thanks to the examples sent in, we have produced an MDG technology that allows parsing generics. There's still far too few examples to add to Enterprise Architect and claim that it will work though.
Hi Simon,
Thank you for your reply in this thread! I have interest in this topic, and I would be happy to help you on the matter.
The current Delphi language support is mostly at the same level as C# or Java, what do you need to update the support Delphi new features?
I can provide you source code with all features you want to support, please let me know how.
So far, I cannot use EA for any serious work related to Delphi source code engineering.
- My first test the parser stops in nested compiler directives
- For DTO/Entities objects, it stops in generics properties/fields declaration
So far, I can not get to the point to test any other new feature, since the parse stops in the beggining of the unit Interface, but I suspect we will have problems with anonymous methods either, among other new features.
There is a project "Delphi AST"
https://github.com/RomanYankovsky/DelphiAST, it parses Delphi source code and creates an abstract syntax tree.
Delphi AST is a opensource project actively updated, I have been using it, and I know for fact that several opensources projects is using it too, maybe you can use it to import Delphi source code.
PS: A plus would be suport for Model Transformation (MDA) for Delphi.
Regards,
Cesar Romero