Modelio context service

Modelio v3.8

The Modelio context service can be used to get information about the Modelio application itself:
– the Modelio context service interface is IModelioContext.
– the IModelioContext instance can be obtained from the IModuleContext of the module.

Available data is:

  • Modelio’s version
  • Modelio’s current language
  • Modelio’s current workspace path

The following code snippet lists the Modelio Application context available data.

1IModule myModule = MyModule.getInstance();
2IModelioContext mCtx = myModule.getModuleContext().getModelioContext();
4System.out.println("About Modelio:");
5System.out.println(" version           = " + mCtx.getVersion());
6System.out.println(" language          = " + mCtx.getLanguage());
7System.out.println(" workspace         = " + mCtx.getWorkspacePath());

line 1: Get the unique instance of our module
line 2: Get the IModelioContext instance from the module context
lines 5-7: Use the different accessors to retrieve the information about Modelio

See System.out limitations