Open tiagofml opened 6 years ago
If the interpreter is not configured, the following workflow should happen:
The user clicks on the run button and once he does it without configuring the interpreter the console should display an error/tutorial such as:
"There is no interpreter configured, please go to Options -> Interpreter and configure a path"
Qt Creator Example, if you dont have a QT Kit configured it tells you how to do it
@saraiva3 Great, the issue description was updated to meet your suggestion.
[BUG] Currently the system only verify if the chosen path is valid. Thus, user can choose a directory or any file and the system will accept it as a "valid" configuration for the programming language interpreter.
How to reproduce 1: 1) Open Tools -> Options, "Run" tab; 2) Manually type a valid path for a directory, 3) Click "OK"
How to reproduce 2: 1) Open Tools -> Options, "Run" tab; 2) Select any .exe file or manually type a valid path for an .exe file, 3) Click "OK"
1 - The placeholder for the interpreter path must be different depending on which SO the user is using. For example:
MACOS: TerraME: /Applications/terrame.app/Contents/bin/terrame R: /Applications/R.app/Contents/MacOS/R
WINDOWS: ?
LINUX: ?
2- I am not sure how I can get the version of the interpreter and how to know if the .exe/path for a file selected by the user is the right one. Is this possible? I think currently the code is checking for a valid path for a file (not folder).
To check the version the only way probably would be by making a qProcess call and getting the return of a -version commando, something along these lines.
To know if the path is right we maybe can check for the filename since the interpreter has a unique name and extension on its folder. I will think in more ideas.
About the first question, windows and linux should show the path as it is used on the system, just print the path returned basicaly, it should come right.
Redesign the feature "Configure an interpreter for a programming language" (Options interface)
Specification
User Storie
AS user, I WANT to configure an interpreter for a programming language SO THAT I can run models directly through the graphical user interface.
General behavior
Preconditions: no interpreter has been configured for the programming language, that is, models in that language cannot be executed directly through the GUI ("Run Model" feature). Postconditions: an interpreter for the programming language has been successfully configured, that is, models in that language can be directly executed through the GUI ("Run Model" feature).
Rules / restrictions:
Basic Flow
Alternative Flow: user cancel the operation
N.1. User clicks on "Cancel" or "X" (Options window) N.2. The "Options" window is closed without saving configuration data, and the user returns to the main interface
Alternative Flow: user types a wrong path
3.1. User chooses the (new) interpreter manually typing a path which does not correspond to an interpreter for that language. 3.2. The "OK" button is disabled and an error message is presented.
Alternative Flow: user chooses a file that is not an interpreter for that programming language
3.1. User chooses a file as the (new) interpreter using file explorer, but the file does not correspond to an interpreter for that language. 3.2. The "OK" button is disabled and an error message is presented.
Alternative Flow: user chooses an older interpreter's version than the previous one
3.1. User chooses a file as the new interpreter using file explorer, the file is a valid interpreter for that language, but the version is older than the previous one, which was configurated. 3.2 The presented path is updated. The system checks the selected file and identify that the new interpreter version is older than the previous one. A warning message is presented.
GUI
Prototype
Guildelines
Messages and labels (english | portuguese)