-
Notifications
You must be signed in to change notification settings - Fork 1
08 Profiles
-
Projects can have additional profiles, allowing each profile to override configurations such as Propath or database connections. This feature is useful for scenarios like compiling the same project with a TTY session or a GUI session in different output directories, generating two sets of rcode with different codepages, or compiling with different database versions (e.g., v11 and v12). It can also be used to compile 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" } ] } } ]
-
Restart the language server. You can hover the cursor over the status bar to see the profile currently being used by the project. Since we haven't switched to a different profile, the default profile is in use.
-
Use the command "ABL: Switch Project to Profile" and select "GUI". This action will restart the language server with the GUI profile. All procedures in the
src
directory will be automatically compiled. Since the build directory is set totarget/build-gui
, this directory will be created at startup. -
The current profile is stored in
.vscode/profile.json
. This ensures that if you restart VS Code, you will remain in the same profile. To prevent this file from being tracked by your source code repository, make sure it is included in your.gitignore
file.