How deep we can dive when writing our own designer plugin?

Posts   
 
    
s_tristan
User
Posts: 8
Joined: 15-Jul-2007
# Posted on: 17-Aug-2017 12:58:13   

Is it possible to implement a plugin that adds new nodes for each entity in Project Explorer? For example, it will be nice to have UI-layer generation support in addition to data access layer. I see realization this is to adding to each entity new folder called something like "Views". When we right-clicking that folder - we see the context menu with "Add detail view", "Add list view", "Add lookup view". Then we can implement the designers on our side, that based on project's metadata to design view and then store view definition in project metadata. Later we can use that information to develop custom template to generate the UI layer for our entities.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39763
Joined: 17-Aug-2003
# Posted on: 17-Aug-2017 15:16:44   

that's not possible: the nodes in the project explorer aren't customizable through plugins, only which plugin to run per element, but you can't add additional nodes.

Frans Bouma | Lead developer LLBLGen Pro
s_tristan
User
Posts: 8
Joined: 15-Jul-2007
# Posted on: 17-Aug-2017 15:33:52   

Understand. Ok, if I run plugin against the whole project, read the each entity metadata, make some customization - where the best place to save the customizations (I mean new data such as form definition) - in somewhere in entity metadata (custom property) or use my own data container (file, for example)?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39763
Joined: 17-Aug-2003
# Posted on: 17-Aug-2017 18:29:07   

I think the best way is to simply use a separate file. We do the same thing with layout info for modelviews for example. You can ask the project object's settings object for the location of the project file (https://www.llblgen.com/Documentation/5.2/ReferenceManuals/Designer/html/3DEEF234.htm) so it shouldn't be too hard to store it in the same folder.

There are designer events you can bind plugins to as well. See: https://www.llblgen.com/Documentation/5.2/ReferenceManuals/Designer/html/11E3836.htm. The . You can bind to these events automatically in your plugin, or manually (e.g. the plugin which also comes in sourcecode in the sourcecode package on the website under 'Extras', which does plurification, does that too). For what you want to do, it's likely overkill, but it could give you some ideas where you can extend things simple_smile

Frans Bouma | Lead developer LLBLGen Pro
s_tristan
User
Posts: 8
Joined: 15-Jul-2007
# Posted on: 17-Aug-2017 21:17:44   

Thanks, Frans, will try!