Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Post-Generation Extension Point

Revision as of 19:41, 1 November 2010 by Nmehrega.cisco.com (Talk | contribs)

< To: Tigerstripe Extension Points

  • Full name : org.eclipse.tigerstripe.workbench.base.generateComplete

Purpose : This extension point is fired when a Tigerstripe project "Generate" is completed allowing post-generate actions to be ran.

  • Usage : Post-generate extensions can subscribe to one of three notification modes:

ALWAYS will run your extension upon generation whether the generation was successful or not.
ON_SUCCESS_ONLY will run your extension only if generation is successful. ON_FAILURE_ONLY will run your extension only if one or more plugin fails to generate successfully. NOTE: The runStatus object passed to the run method will be from all the generated plugins, it is up to you to pick out only the ones that failed.

The listener class must implement the IGenerateCompleteListener interface which has one method: public PluginRunStatus run(GenerateCompletionStatus status, ITigerstripeModelProject project, PluginRunStatus[] runStatus); where: status is either GenerateCompletionStatus.SUCCESS or GenerateCompletionStatus.FAILURE - This is intended for listeners that listen ALWAYS project is the Tigerstripe project the generation was ran against runStatus is a list of statuses from all the generators that ran You can also return a PluginRunStatus object to show the user the status of your post-generate action. If you have no status to return than null is acceptable.

  • Example :
<plugin>
  <extension
       id="generateCompleteTestListener"
       name="Generate Complete Test Listener"
       point="org.eclipse.tigerstripe.workbench.base.generateComplete">
    <generateCompleteListener
          class="org.eclipse.tigerstripe.workbench.base.test.generation.SampleGenerateCompleteListener"
          notificationMode="ON_SUCCESS_ONLY">
    </generateCompleteListener>
 </extension>
  ...
</plugin>
  • Some important notes :

A "Generate" with no generators will still fire this extension passing GenerateCompletionStatus.SUCCESS as a status.

Back to the top