Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Codesmith on November 26, 2005, 10:56:38 am
-
I am interested in if the User Interface Elements can be extended to generate actual Forms and Controls. ;D
I would like to define the types of controls, datasources and data object methods through EA element properties and relationships.
Then generate the objects and most of the code needed through some kind of translation/ code generation process.
Is this possible with the present structure? ???
-
I started that (only a little). What I did so far was creating PHP code from Screens. If I could work full time for that I probably could produce some fancy code generation, but unfortunately I'm just doing that in my spare time. You can create code generation patterns to emit PHP code (or whatever Java/VB/... you use for your server).
Would be nice to have some profile/technology for that.
-
What I am wondering is what details are available about the UI elements. And if there aren't a lot of details like type of control, position, bound datasource etc...Can these details be extended through scripting of EA?
-
What do you expect exactly? Of course you can add tags as you wish...
-
Are you talking about Control Tags?
If you are talking about UI element tags. How does one add tags to them?
I am generating the data mapping layer with Tier Developer(TD). So I have methods and properties to bind the controls to. TD also has form generation but only very basic.
I am hoping that I could retrieve the control type , position, data input rule, assigned datasource from the EA form element and then generate the form in VS.net
-
I'm talking about simple Tagged Values (ctrl-shift-6). You can add anything like Position, Color, etc. Would that be of help?
-
OK, That's interesting! 8) Obviously I need to learn a lot more about EA. Can we access those values from the XML/XMI file?
I noticed that size and position of most elements in the diagrams is irrelevant. But size of a Form or a container control is very relevant as this is normally how we'll get the position coordinates of child controls.
It would be better if we could somehow read the size and position coordinates from the EA diagram storage method maybe?
-
Hi,
size and coordinates of an element on a diagram are easily accessible via the Automation Interface... maybe that will help :-)
Bruno
OK, That's interesting! 8) Obviously I need to learn a lot more about EA. Can we access those values from the XML/XMI file?
I noticed that size and position of most elements in the diagrams is irrelevant. But size of a Form or a container control is very relevant as this is normally how we'll get the position coordinates of child controls.
It would be better if we could somehow read the size and position coordinates from the EA diagram storage method maybe?
-
Yeah that seems right. I looked at that documentation.
Thanks a lot!! you are the best!! ;)
Now I just have to find somebody that can do that kind of work. :-/
-
It's just a bit of Perl ;-)
(or VB, if you prefer)
Check out other postings in this section, Thomas has posted a few things on the subject.
You can (probably) write a 5-liner in Perl to access the stuff you need, though it won't have a GUI !
-
Can the EA forms be modified?
I am also thinking of ways to auto generate User UI Help. I am not much of a coder anymore despite my handle. :-[
Are there some coders around that are really into extending EA? Or can you give me an idea how to find them?