Skip to main content

Add new metadata view to plugin

If a D2SV plugin intends to define new views like properties, versions, permissions, task performers then this assistant option could be used to create the boilerplate code associated with such views, which is also known as metadata panel.

caution

Use this option when at least one plugin project exists in the workspace.

Associated questions and their meanings -

  • Select plugin to add new metadata view

    Specify the plugin project where to add boilerplate code for the new metadata view.

  • Enter name for the view

    A unique name for the new metadata view.

    This will be the option name shown in the dropdown by default.

Associated generated boilerplate files and their use -

  • The generated files would be present under <Plugins Directory>\<Selected Plugin>\src\main\smartview\src\widgets\metadata\panels\<View Name>

  • impl folder

    This folder contains the handlebar template file and the style sheet file used by the view.

    It also contains the nls folder which contains the lang files used for the translation strings.

    The option name shown in the dropdown could be changed by changing the translation string value for viewName in lang.js file under nls/root folder.

  • metadata.<View Name>.view.js

    This is the main view file for the new metadata view created.

    This will have code for a simple helloworld view.

    The template file, style sheet and lang file used by this view are already loaded.

    A wrapper class name for this view, ui, regions and events are defined in this view for reference.

    Modify this view based on the usecase.

    Incase of complex view, break it into smaller independent views and keep them under impl folder, specify regions in the main view and show these smaller views using regions.

    By default, this view will be shown for all metadata dropdowns. Add conditions in enabled function to restrict this view based on the usecase.