de:doku:plugin-api-manifest

Das Plugin-Manifest

Das Plugin-Manifest ist eine Datei im XML-Format mit dem festen Dateinamen (alles Kleinbuchstaben):

com.grt.plugin.xml

Ein übliches Plugin-Manifest hat folgenden Aufbau:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<GordonsReloadingTool>
<!--
GRT plugin manifest
 
Plugin configuration <plugin>
The attribute "id" must be begin with the domain "com.grt.plugin" and is
usually extended by a unique, alphanumeric name without spaces for your plugin.
 
The attribute "enabled" activates or deactivates the plugin. If "false" the
plugin is ignored at startup.
 
The attributes "launch-windows" and "launch-linux" defines the executable of
the plugin. The executables can be placed in a sub-folder also. In this case
just add the local directory path like "bin\plugin.exe" for windows or
"bin/plugin" for linux. At least ONE of both attributes must contain a valid
executable file. The Plugin fails to load if no file for the specific OS is
specified.
 
The attribute "launch-type" configures the launch method for the plugin.
With value "permanent" the plugin is executed at startup and permanent attached
to the GRT (default). With Value "onDemand", the plugin is launched if a
user-action take place and it is not yet running. The plugin can terminate
itself after finish a process and will be then launched again on next
user-action.
 
If you are using a script language that runs on windows and linux e.g. python,
then just enter in BOTH attributes the same file.
 
The attribute "launch-args" are the custom commandline for the plugin where
the placeholder "{PLUGIN_COMMANDLINE}" can be used to implement the original
commandline from the GRT (holds the specific connection infos).
"launch_args" replaces the original commandline that are passed at plugin start.
 
-->
 
  <plugin
	  name           = "GRT Example Plugin"
	  id             = "com.grt.plugin.example"
	  version        = "1.0.0"
	  provider       = "Test Provider"
    description    = "This is a plugin example"
    launch-windows = "plugin.exe"
    launch-linux   = "plugin"
    launch-type    = "permanent"
    launch-args    = ""
    start-timeout  = "2.0"
    enabled        = "false"
  >
<!--
Registering to GRT events
each event you turn on with value "true" will be sent to your plugin when the
the event occours.
 
NOTE: ONLY TURN EVENTS ON THAT YOU ARE REALY NEED, OTHERWISE IT CAN AFFECT
THE PERFORMANCE OF THE GRT IN CASE OF MANY PLUGINS ACTIVE.
 
The events here are only for example purpose all activated.
-->
    <registerevent>
      <event name="ColorPresetChange" enabled="true" />
      <event name="TabSwitch" enabled="true" />
      <event name="TabDataChange" enabled="true" />
      <event name="TabUnitChange" enabled="true" />
      <event name="TabClosed" enabled="true" />
      <event name="WindowActivate" enabled="true" />
      <event name="WindowDeactivate" enabled="true" />
      <event name="WindowMaximize" enabled="true" />
      <event name="WindowMinimize" enabled="true" />
      <event name="WindowRestore" enabled="true" />
      <event name="WindowMoved" enabled="true" />
      <event name="WindowResized" enabled="true" />
      <event name="WindowClosed" enabled="true" />
    </registerevent>
 
<!--
Menu integration
You can as many menuitems and submenus define as you want.
The main tag <menu> is the main menuitem only that are created with the name
of your plugin defined above. <menu> has the attributes "autoenable" and "icon"
only. If autoenable="true" the GRT auto-enables the menu items in
the GRT menu integration for you. Otherwise you have to alter each
menuitem yourself to enable/disable it (using the menuitem command).
 
Each <menuitem> can be a submenu by inserting more <menuitem>-tags.
Each <menuitem> must have the attributes "id" and "label".
The attribute "id" is appended to the plugin-id defined above and will be
sent to the plugin if a menuaction event occours.
(same for toolbar-icons/buttons down below)
 
-->
    <menu autoenable="true" icon="media/icons/icn_about_16x16.png">
      <menuitem id="menu1" label="Menu 1">
    		<menuitem id="entry1" label="Entry 1" icon="media/icons/icn_plugin_16x16.png" enabled="true" checked="false"/>
    		<separator />
    		<menuitem id="entry2" label="Entry 2" icon="media/icons/icn_plugin_go_16x16.png" enabled="true" checked="false"/>
    		<menuitem id="entry3" label="Entry 3" icon="media/icons/icn_plugin_edit_16x16.png" enabled="true" checked="false"/>
    	</menuitem>
      <menuitem id="menu2" label="Menu 2">
    		<menuitem id="entry1" label="Entry 1" icon="media/icons/icn_plugin_16x16.png" enabled="false" checked="false"/>
    		<menuitem id="entry2" label="Entry 2" enabled="true" checked="true"/>
    	</menuitem>
  		<menuitem id="about" label="About" icon="media/icons/icn_about_16x16.png" enabled="true" checked="false"/>
  		<menuitem id="version" label="Version" enabled="true" checked="false"/>
    </menu>
<!--
Toolbar integration
You can as many toolbar-icons/buttons define as you want.
Also separators can be added with <separator />.
Each Toolbar-Icon have to be 32 x 32 pixels and the GRT overlays a small plugin-icon in the
right bottom corner to indicate the toolbar-icon/button as plugin.
-->
    <toolbar>
      <toolbaritem
        id           = "toolbar_button1"
        label        = "Plugin example"
        tooltip      = "press to show this plugin"
        icon         = "media/icons/icn_about_32x32.png"
        enabled      = "true"
      />
    </toolbar>
 
  </plugin>
</GordonsReloadingTool>

This website uses only functional necessary cookies.

By clicking on OK, you agree with storing that cookies on your computer for the time of your session.
If you do not agree please leave the website.

Show information about the used cookies.

Show our policies.

  • de/doku/plugin-api-manifest.txt
  • Last modified: 2021/05/30 03:33
  • (external edit)