Examples
A simple example
Here is a simple example of tool for windows, that open the project database file (bdp) in an explorer window. The text should be saved in a file “openbdp.etool” located in the “extensions” subdirectory of the Atelier B installation directory (this directory may have to be created).
The file starts with the externalTool tag, which contains the required information as attributes (name, menu label, icon, etc…). Within the external tool, the following tags are used to describe the command:
command: the path to the executable file that will be started (here c:windowsexplorer.exe)
param: describes one parameter of the command. Here the command takes only one parameter, but for more complex commands with multiple parameters, there should be as many <param> as parameters.
The variable elements of the command (here the path to the bdp directory) are expressed using the ${variableName} notation. Here ${projectBdp} is replaced by the path to the bdp directory of the project.
A more complex example
The previous example had one major shortcoming: the path to the “explorer” executable is hardcoded. A better solution would be to allow the user to configure the path to the “explorer” executable. This can be done by using the toolParameter tag, that allows defining a new variable for using within the command. In that case, the corresponding etool file would be the following:
Here, the toolParameter tag define a new variable that can be set by the user: a new tab is created in the “Preferences” dialog, that allows setting the path to the “explorer” executable (linux users could also provide a more suitable file manager).
Integration of ProB model-checker
ProB model-checker is now self generating the etool file for Atelier B (see Detailed procedure).
A sample file is provided below:
Last updated