wiki:IPluginHints

Version 5 (modified by Matthäus Wander, 11 years ago) (diff)

linkfix

IPlugin Validation

When creating a plugin instance for the first time in a workspace, the following methods are called as test in order to validate the plugin. If the methods return gracefully, everything is fine. If an exception is thrown, the plugin is invalid and will not be usable.

  • PreExecution()
  • Execute()
  • Pause()
  • Stop()
  • PostExecution()

IPlugin call flow

source:/trunk/Documentation/ArchitectureAndDesign/Plugin/IPlugin-call-flow.png

The usual call flow in a plugin's lifecycle is as following. Please note, that the call tree is per plugin instance.

  • Initialize() is called once
  • PreExecution() is called when Play has been clicked
  • Execute() is called every time when any input dockpoint has been triggered (OnPropertyChanged...) and all necessary inputs of this plugin are set. Execute() may repeat several times or be never called, depending if and which input data arrives at runtime.
  • Stop() is called once when Stop has been clicked (in order to leave Play Mode) or the workspace is attempting to stop for another reason (e.g. CrypWin MainWindow closing). When Stop() is being called, the plugin may be currently waiting for new input data (which usually doesn't need any handling) or it may be currently executing some computationally intensive operation (which should be aborted).
  • PostExecution() is called when the workspace is leaving Play mode. After PostExecution() the workspace may be either played again (going to PreExecution()) or shut down (going to Dispose()).
  • Dispose() is called when the workspace is being closed and the plugin instance is about to be destroyed. After disposal the plugin is not used again.
  • Pause() is never called.