Skip to content

Creating a new plugin

Claus Schätzle edited this page Mar 26, 2019 · 8 revisions

Creating a new Ultimate Plugin

This is the current (improvised) workflow for adding a fresh plugin to Ultimate. Note that for Libaries, there is usually no plugin.xml, no *PluginName.java, and no Activator.java. You can ignore all instructions referencing those files.

  • Copy an existing plugin that is similar (i.e., has the same plugin type as the new one, like IGenerator, ISource, etc.), using your new plugin's name as new name.
  • Delete all files from the old plugin except:
    • the classes Activator.java, OldPluginName.java, and (if you want preferences) OldPlugNamePreferenceInitializer.java,
    • the files plugin.xml, MANIFEST.MF, pom.xml, build.properties, and LicenseTemplate.md
  • Rename *PreferenceInitializer.java and *Plugin.java s.t. they match the new plugin name.
  • Rename the package name s.t. it matches your new plugin name.
  • Rename every string reference to the old plugin in the remaining files:
    • BundleName (MANIFEST.MF) and Activator.PLUGIN_NAME (Activator.java) must be the same string and represent a human-readable name of your plugin.
    • Bundle-SymbolicName (MANIFEST.MF), Activator.PLUGIN_ID (Activator.java), and artifactId (pom.xml) must be the same string which should the base package of your plugin (i.e., the name of the package containing NewPluginName.java).
    • NewPluginName.java's methods getPluginName() and getPluginID() should point to Activator.PLUGIN_NAME and Activator.PLUGIN_ID.
  • The plugin.xml registers you new plugin as Ultimate plugin. It binds PluginName.java to the matching extension point (IOutput, IGenerator, etc.). Ensure that the correct extension point references the correct class, e.g.:
  <plugin>
   <extension point="de.uni_freiburg.informatik.ultimate.ep.generator">
      <impl class="de.uni_freiburg.informatik.ultimate.ltl2aut.LTL2aut"/>
   </extension>
  </plugin>
  • Make sure that the getPreferences() method of NewPlugin.java returns an instance of the new PreferenceInitializer of your plugin.
  • Make sure that your new plugin and all its dependencies are loaded in the run configuration (e.g., Debug-E4) of your Eclipse workbench.

Adding your plugin to the Maven build

You should add your plugin to the maven build if it is required by other plugins already contained in the build. If this is not done, the Eclipse build will still work, but the Jenkins/Maven build will break! Proceed as follows:

  • Register the new plugin as module in the top-level scope (i.e., not in any profile) in Ultimate's parent pom file in BA_MavenParentUltimate/pom.xml.
  • If you have written JUnit tests, register them as module in the profile coverage
  • Check the "Dependencies" tab of all feature.xml files in BA_FeatureUltimate* (CLI, Debug, etc.):
    • Go to the tab and press the button "Compute".
    • If your plugin is shown in the list, add it under the tab "Included Plug-Ins".
    • Remove all Dependencies that were added by your "Compute" action.
Clone this wiki locally