-
Notifications
You must be signed in to change notification settings - Fork 1
08 Profiles
Projects can have extra profiles, where each profile can override the configuration (such as propath or database connections). This can be used for example to have the same project being compiled with a TTY session or a GUI session, in different output directories. Or create two sets of rcode with a different codepage. Or compile with a v11 database and a v12 database. Or with or without schema holders...
Open the project configuration file, and add this section:
"profiles": [
{
"name": "GUI",
"inherits": "default",
"value": {
"graphicalMode": true,
"buildPath": [
{
"path": "src",
"type": "source",
"build": "target/build-gui"
},
{
"path": "c:\\workshop\\dependency",
"type": "propath"
},
{
"path": "${DLC}/gui/openedge.core.pl",
"type": "propath",
"documentation": "C:\\workshop\\corelib.json"
},
{
"path": "${DLC}/gui/netlib/openedge.net.pl",
"type": "propath",
"documentation": "C:\\workshop\\netlib.json"
}
]
}
}
]
Then restart the language server. Hovering the cursor over the status bar shows the profile being used by the project. As we didn't switch to a different profile, we're currently using the default profile.
Use command "ABL: Switch project to profile", then select "GUI". The language server is restarted with the GUI profile. It will automatically compile all procedures in the src directory. As the build directory is set to target/build-gui
, you'll see that this directory is automatically created at startup.
Note that the current profile is stored in .vscode/profile.json
, so if you restart VS Code, you'll stay in the same profile. This file should always be ignored by the source code repository.