Skip to content

08 Profiles

Gilles Querret edited this page Sep 11, 2024 · 2 revisions
  1. 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"
             }
           ]
         }
       }
     ]
  2. 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.

  3. 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 to target/build-gui, this directory will be created at startup.

  4. 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.


Next chapter

Clone this wiki locally