Designer is a plug-in for Eclipse. As a newbie to Designer/Eclipse, allow the following - dump - question:
Is it possible to write my own plug-ins for Designer ? For instance, i would like to enhance Designer with the following functionality:
1. I have a special purposes database that is accessed using Java API, not JDBC or JDO
2. I would like to write my own plug-in for Designer that allows me to browse the data objects in this special database and grahically wire fields/arrays from the data objects to jtextfields, dropdownlists, jtables etc.
Therefore, i might need to extend Designer in some way and would like to know if and how this would be possible.
Any feedback would be highly appreciated!
You answered :
So, you want to "wire" your data objects to Swing controls. But what code do you want to produce, can you give example? In theory we could provide you extension point that allows to add button on toolbar and receive for example list of controls. Your plugin could open your database and pass some Java code to add to Designer. But this is just in theory, so provide more info.
Basically, i would like to create a reference between n data object attributes and n java swing gui components graphically
Mapping Table A:
DataObject1.Subobject.Field1 <---> JTextfield1
DataObject1.Subobject.Field1 <---> JTextfield2 ...
For instance, i would do sth like this:
1. I browse the data objects in my plugin
2. I select a field in my plugin
3. I drap and drop a field on a Swing control, for instance JTextfield
4. The reference to this field is stored in a mapping table
1. I select a SWING component, for instance JTextfield
2. I go to properties panel. It has an additional property X with a button on it.
3. I press the button and a user defined GUI appears. I select my data objects/ field from my special database
4. The field reference is stored in the mapping table A
Based on the mapping table, i could generate some code that set the values of the Swing compoments at startup and Get the results when closing the dialog.
All i need is a way to hook into Designer to create this mapping between the SWING components and the data object fields.