Install language

[64]

In order to run a model using the headless runner, the plugins that define the language must be placed in a location where the runner will be able to find them.

1. Installing jars in dropins folder

The easiest way to install a language is to copy the jars in the dropins folder of the studio (headless or IDE). Eclipse will automatically find them and add them.

Warning

Using the dropins folder is handy but in case of trouble (typically dependency or java version issue), the jars will be silently ignored by default. Have a look in Section 4, “Debugging language deployment issues” in order to get tips about how to detect and solve them.

2. Installing jars using the p2 director

If the jars have been packaged as an update site, you can use the p2 director application to install them in an existing eclipse from the command line.

See https://help.eclipse.org/2018-12/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fp2_director.html

3. Installing jars using the --installLanguage option

TO BE IMPLEMENTED

4. Debugging language deployment issues

Here are series of tips and thing you must verify in case of troubles.

  1. check that your language correctly works in the Modeling Workbench launched in development (ie. starting a second eclipse from the language workbench as described in Section 1, “Deployment of languages for the Language designer”.)
  2. Verify that the language is correctly detected using --list-languages option.
  3. Verify that the plugins are correctly installed using OSGI console

    1. launch the studio using the following options: ./GemocStudioHeadless -console -noExit -debug --list-languages

      1. the -debug option associated to the .options file in the root of the studio installation will increase the number of messages related to the management of jars in the dropins folder. (Unfortunatly, these messages are still unclear and you should try the next tip)

        1. content of the .options file org.eclipse.equinox.p2.core/debug=true org.eclipse.equinox.p2.core/reconciler=true
      2. the -console -noExit options allow to start the OSGI console and query the installation about its status. Once you get the <OSGI> prompt you can try the following commands: (Note: the stdio of several threads are mixed up, so you may need to type Enter to get the prompt). (Note2: in OSGI, Bundle means Eclipse plugin)

        1. help gets help about all OSGI commands
        2. ss and ss <partOfYourPluginsName> lists the installed bundles (ie. plugins) and their status.
        3. install file:<pathToYourJar> or install reference:file:<pathToYourJar> manually installs a missing jar (useful when dropins reconciler ignored a given jar due to dependency issue). (Note: relative path is accepted)
        4. diag <BundleID> check a given plugin for dependency issue
        5. start <BundleId> start the plugin. this is useful since some plugin may not declare any dependecy issue but crash on start.
  4. Verify that the jar content of the plugins is correct. Ie. in development mode, Eclipse uses the folder containing the source as input for the second workbench, however when creating the jar (which is actually a zip archive) it may not copy everything (for example, it doesn’t contain java files but only class files…​). Additional resources may be missing if not correctly specified. Typical missing resources are: plugin.xml, xxx.dsl file, model/xxx.ecore file, model/xxx.genmodel file, libs, images, …​ Specifying jar content is done via the MANIFEST.MF/Build.properties editor in the Build tab.

If you think that some missing plugin should be part of the Headless package, please file a bug in https://github.com/eclipse/gemoc-studio/issues .

Note

The Headless studio does not contains Eclipse UI, thus plugins requiring it will not work in it. If for some reason you really need UI components while launching a model execution from command line, then you may consider using the -application option directly on a standard GEMOC Studio.