Includes and cross-file navigation
PRO follows inc relationships between indexed .gpp files. These relationships establish the context for cross-file completion, hover, definitions, references, rename, and diagnostics.
A two-file example
Section titled “A two-file example”Place these files together in a local PRO project:
C:\Postprocessors\MyMachine\ gppl.project.json MyMachine.gpp helpers.gppIn MyMachine.gpp:
inc "helpers"
@init_postendp
@start_of_file call @usr_messageendpIn helpers.gpp:
@init_incendp
@usr_message ; Helper procedure used by the main file.endpThe .gpp extension may be omitted in the include directive. Both single and double quotes are supported. After indexing, use F12 on @usr_message in the main file to visit its definition in helpers.gpp; Shift+F12 lists references.
These files demonstrate editor behavior, not a complete postprocessor for a machine.
Include paths
Section titled “Include paths”Use local relative paths. PRO resolves an include relative to the directory of the file containing that directive, and the target must stay within that directory tree. Child-directory paths can be analyzed by PRO; absolute paths, UNC paths, and paths escaping the including file’s directory are rejected.
A project root does not make .. references to sibling directories valid. Organize shared files below the including file’s directory, and keep them within the indexed project. Links must also remain within the permitted local path boundary.
Community’s clickable include link supports neighboring filenames only. Opening a target through a link and analyzing symbols across files are separate features.
Main file and VMID
Section titled “Main file and VMID”A typical component has one main file with @init_post, while helper files use @init_inc. If several candidates declare @init_post, PRO reports GPPL2013. Review whether a helper should use @init_inc, or specify the intended main candidate using entryPoints in the project manifest.
Main-file resolution also determines which VMID supplies machine-specific parameters to included files.
Common issues
Section titled “Common issues”- Missing target (
GPPL2012): check the relative name, disk location, scanner exclusions, and file limit. - Cycle (
GPPL2010): remove the edge that makes a chain return to an earlier file. - Excessive depth (
GPPL2011): reduce nesting beyond the supported 16 levels. - Rejected path (
GPPL2014): move the include inside the permitted local directory tree. - Duplicate global (
GPPL2015): use a single declaration for that global in the component.
The GPPL Project tree shows roots and nested include relationships. For a broader symbol search, use VS Code’s Go to Symbol in Workspace command. Cross-file rename should be reviewed before applying edits across multiple files.