Previous: Plugin Manager Next:  Miscellaneous Items Table of contents Frames User guide
Unidata IDV Workshop for version 3.0u1 > Advanced Topics > Configuring IDV Sites

4.4.1 Plugin Creator
We're going to look at how to create IDV plugins.
  1. Bring up the Plugin Creator with the Tools->Plugin Creator menu.
  2. Add in all of the resources you've created.
    • Go to the File->Add File menu.
    • This shows the /home/idv/.unidata/idv/DefaultIdv directory.
    • Shift-click or control-click to add the resource files, e.g., stationmodels.xml, colortables.xml, derived.xml, etc.
  3. Add some items to the menu bar
    • Bring up the Toolbar tab in the user preferences (Edit->Preferences).
    • Select some items on the right and do Export to Menu Plugin. Enter some menu name.
  4. Go to the Excludes and select a number of system resources to exclude. e.g., Color Tables, Station Models, etc.
  5. View the Properties tab, scroll down and change IDV Title to something else.
  6. Enter myplugin.jar in the file browser and click on Write Plugin.
  7. Let's see the results.
    • Shutdown the IDV.
    • Bring up a terminal window and do:
      runIdv -userpath ~/otheridv -plugin /home/idv/myplugin.jar
      
      This brings up the IDV with a different local user resource directory.
    • View some of the resources (e.g., Color Table Editor, Station Model Editor)
    • Exit the IDV
    • From a terminal window view the contents of the plugin:
      jar -tvf myplugin.jar
      
  8. Lets create another plugin that is something that might be used in a classroom setting
    • Add a page for the quicklinks. Bring up a text editor and create a descriptive html page. You can include links to IDV bundles in this html. Paste this into the file:
      <a href="http://www.unidata.ucar.edu/software/idv/data/marsquad.xidv"> Load Mars bundle</a>
      <p>
      <a href="http://www.unidata.ucar.edu/software/idv/data/davenportradar.xidv"> Load Davenport radar example</a>
      <p>
      <a href="action:new.displaywindow">New Window</a>
      <p>
      <a href="action:bundle.save">Save Bundle</a>
      <p>
      <a href="action:exit">Exit the IDV</a>
      
    • Save this file as workshop.qhtml
    • From the Plugin Creator File->Add File menu select this qhtml file.
    • Add in some of the favorite bundles you've created.
      • From the Favorites Manager select multiple favorite bundles (Control-Click).
      • Choose File->Export to Plugin
    • Write out the plugin, selecting the Install checkbox.
    • Exit and restart the IDV

 


Previous: Plugin Manager Next:  Miscellaneous Items Table of contents Frames User guide
Unidata IDV Workshop for version 3.0u1 > Advanced Topics > Configuring IDV Sites