/plugins/ProjectViewer/tags/pv_2_0_2/projectviewer/package.html

# · HTML · 51 lines · 39 code · 12 blank · 0 comment · 0 complexity · 32b3232d6a67ada8dfcd7380583e8e2c MD5 · raw file

  1. <body>Working with the Project Viewer.
  2. <p>External plugins can interact with the Project Viewer plugin in various
  3. ways:</p>
  4. <ul>
  5. <li>By providing project specific properties: {@linkplain projectviewer.config properties}</li>
  6. <li>By creating new node types: {@linkplain projectviewer.vpt nodes}</li>
  7. <li>By creating node-specific actions: {@linkplain projectviewer.action actions} </li>
  8. <li>By listening to Project Viewer events</li>
  9. </ul>
  10. <p>In this document, we explain how to use Project Viewer events to track user
  11. actions on the Project Viewer's interface.</p>
  12. <p>The Project Viewer plugin provides a different interface for each open jEdit
  13. view, so the user can work with different projects in different views. This is
  14. useful for PV's purposes, but some plugins may not benefit from such a dependence.</p>
  15. <p>For this reason, the event notification provided by PV can be used by either
  16. kind of plugins. The
  17. {@link projectviewer.ProjectViewer#addProjectViewerListener(ProjectViewerListener,View)
  18. addProjectViewerListener()} in class
  19. {@link projectviewer.ProjectViewer ProjectViewer} provides a way for both types of
  20. plugin to register for PV events.</p>
  21. <p>Currently, the only event notification is for when a new project is loaded
  22. into PV. This works differently for plugins that rely on jEdit's views and for
  23. those that do not. For plugins that are view-dependent (which means, generally,
  24. that there is an instance of some class for each open jEdit view, just like the
  25. ProjectViewer class), these events are only fired when a project is loaded into
  26. that particular instance of PV in that view. Changes in other views will not
  27. fire any events for that listener.</p>
  28. <p>For plugins that do not take into account the current active view, events are
  29. fired more oftenly. Any change of the current project in any view will fire an
  30. event for these listeners. Also, when the current view is changed (i.e., the
  31. user starts working on another view), an event is fired saying that the project
  32. currently active in that view has been activated.</p>
  33. <p>These events can be very useful for plugins that want integration with some
  34. aspect of a project. For example, a plugin may want to display information about
  35. some build file for the project, so each time a project is changed the information
  36. displayed changes. Or maybe the plugin can use different properties for different
  37. projects. For more complex interaction with the ProjectViewer plugin, please
  38. read the other documentation linked at the beginning of this document.</p>
  39. </body>