GEMOC can also run without graphical user interface. It offers a command line interface allowing to automate some task.
Additionally, a specific package is available in order to decrease the size on disk (and hopefully in memory too). This specific package can be downloaded at https://download.eclipse.org/gemoc/packages/nightly/?d
Tip
All commands works on both packages (Full IDE or Headless).
When running on the full IDE you must precise
that you do not want to launch the UI and want to launch the EngineRunner application using the -noSplash and -application options.
./GemocStudio -noSplash -application org.eclipse.gemoc.gemoc_studio.headless.EngineRunner <engineRunner parameters>
The commands take the following form:
./GemocStudioHeadless [<EclipseSpecificOptions>] <EngineRunner options> [<additionnal arguments to be passed to the model execution>]
We have selected the use of the following eclipse specific options which might be useful when running GemocStudioHealess:
-cleanAny cached data used by the OSGi framework and eclipse runtime will be wiped clean. This will clean the caches used to store bundle dependency resolution and eclipse extension registry data. Using this option will force eclipse to reinitialize these caches.-clearPersistedStateRemoves any cached state of the user interface and reloads the model-consoleThe OSGi console is enabled. This is handy for investigating the state of the system and analyze deployment issues.-debugThe platform is put in debug mode. If the value is a string it is interpreted as the location of the .options file. This file indicates what debug points are available for a plug-in and whether or not they are enabled. If a location is not specified, the platform searches for the .options file under the install directory.-noExitThe OSGi Framework will not be shut down after the Eclipse application has ended. This is useful for examining the OSGi Framework (using-console) after the Eclipse application has ended.-data <location>the instance data location for this session. Plug-ins use this location to store their data. For example, the Resources plug-in uses this as the default location for projects (aka the workspace).
(A complete list of eclipse specific options is available at https://help.eclipse.org/2018-12/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fruntime-options.html ).
The EngineRunner currently accepts the following options:
usage: GemocStudioHeadless [-e <engineName>] [-h] [-initMethod
<initializationMethod>] [-l <languageName>] [-le] [-ll] [-m
<fileName>] [-mainMethod <methodEntryPoint>] [-modelEntryPoint
<modelEntryPoint>] [-v]
Run a single model conforming to a language using GEMOC Engine.
Please read the documentation about how to package the language.
Arguments after a -- will be passed to the model initialization method
if any.
-e,--engine<engineName> Uses the given engine when running the model (default is GEMOCKermetaSequentialEngine)-h,--helpPrint help message-initMethod<initializationMethod> Method run prior to the execution in order to initialize the model (Runtime data) from arguments [GEMOCKermetaSequentialEngine, ALEEngine]-l,--language<languageName> Uses the given language when running the model (default is (no valid language definition found))-le,--list-enginesPrint the list of installed GEMOC engines-ll,--list-languagesPrint the list of installed GEMOC languages-m,--model-file<fileName> Runs the given model-mainMethod<methodEntryPoint> Method run as that start of the execution (Ie. main) [GEMOCKermetaSequentialEngine, ALEEngine]-modelEntryPoint<modelEntryPoint> Model element used as 'self' for the method entry point [GEMOCKermetaSequentialEngine, ALEEngine]-v,--verbosePrint more messages
Note
Some options are specific to some engines. The help indicates the applicable engine between square brackets.
Ex: -mainMethod and -modelEntryPoint.

