Processes pluginΒΆ

Processes plugin permits including in MeCoSim funcionalities related to external programs. It provides two main classes inside mecosim.plugin.processes package for performing several operations:

  • ExecutableRunner: runs external programs given as a parameter. They should be included in system Path, or be given the full path to the file. Anyway, there exists different methods to be used inside this class:
    • run: it receives an array of Strings with the arguments. The first is supposed to be the program to run, and a String is built to pass the rest of them to the program. If some parameter is set to -PLI, the path of the current P-Lingua file set in MeCoSim is taken as an argument.
    • runCmd: it is similar to the previous method, but it runs our program from the command line.
    • runProcess: it performs the same operation of run, but making use of folder bin inside MeCoSim as the working directory, allowing us to run programs placed there, work with files inside and so on, without the need of using full paths or including them in system path.
  • DesktopRunner: provide additional functions related to external programs:
    • open: open the indicated file with its default program set in your operating system.
    • browse: shows the indicated URI in your default browser.
    • email: opens your default email client to send an email to the set email address.