Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: for the plan.

Jump to: navigation, search

OTEquinox/Howto Create OTEquinox App From OTApp

Change of namespace
In versions upto 1.4.0 (served from the IDs of OT/Equionx bundles start with org.objectteams.
During the project move to these are being renamed to org.eclipse.objectteams....

Convert the OT application into an eclipse plugin

Migrate the project

  • "Configure > Add Object Teams Support" (from the project's context menu)
This includes the following adjustments
  • Adding the required project nature
  • Adding required plug-in dependencies
  • Adjusting compiler preferences if necessary

Configure the plug-in

  • Declare extensions ("Extensions" tab)
    • Extension point: org.objectteams.otequinox.aspectBindings
      • basePlugin: self
      • teams: adapting teams
  • Export packages ("Runtime" tab)
    • all packages, which should be used in the Application project (see 2. below)

Create an Equinox-Application Project

Create a new Project:

  • new -> Plug-in Project
  • Choose: Target Platform: OSGI framework: Equinox
  • do not generate an activator

Implement IApplication

  • implement Object start(IApplicationContext context) - not returning before exit
    class Application implements IApplication {
      public Object start(IApplicationContext context) throws Exception {
        new myOTApplicationPlugin.Main().startWindow();
        while(win.isVisible()) {
        } // don't return before the window is closed.
        return IApplication.EXIT_OK; // the end.
    package myOTApplicationPlugin;
    // this is the original main class of the ot application
    class Main {
      public Window startWindow() {
        // call the original main method: 
        // return the main window of the application (has to be set somewhere): 
        return mainWindow;

    Note: The type IApplication will not be known until dependece to the corresponding plugin has been declared (see next).

    Configure the plugin


    • Add required plug-ins ("Dependencies" tab: Required Plug-ins -> Add)
      • org.eclipse.core.runtime
      • OT application plugin (see 1.) to run
    • Declare extensions ("Extensions" tab)
      • Extension point: org.eclipse.core.runtime.applications
        • new run... ...Application (run)
    • Set singleton (MANIFEST.MF):
      • Bundle-SymbolicName: <my_name>;singleton:=true

    Launch as Object Teams Eclipse Application and select the Application to run


    Eclipse extensions:
    • Extensions can be declared to extend extension points of existing eclipse plugins.
    • If the "Extensions" tab is not shown, it can be enabled by clicking at "Extensions" in the "Overview" tab.
    • Before an extension can be declared, the plugin providing the extension point has to be declared as dependency.
    • TransformerPlugin.isWaitingForTeams()
    • Listener
    • Class.forName(...)) (don't!)

Back to the top