VSCode Extension#
The Lattix VSCode extension brings the capabilities of Lattix into the
VSCode IDE, within a new Impact Explorer facility.
Installation#
Compatibility#
The Lattix VSCode Extension is only compatible with Lattix version 2025 or greater. If you are using an older version of Lattix, please contact your Lattix supplier to discuss upgrading.
The VSCode Extension is licensed as an add-on to Lattix Architect, so will require an Lattix IDE license key, in addition to a Lattix Architect license key. Please contact your Lattix supplier for a Lattix IDE license key.
Please follow the steps outlined in License Management to add the Lattix IDE license key from within Lattix Architect.
Installing#
To install the Lattix VSCode extension:
Ensure that you have Lattix Architect already installed and licensed on your machine
Open VSCode
Open the VSCode Extension Marketplace by clicking on the Marketplace button in the sidebar
Search for Lattix
Click Install
The version of Lattix Architect installed on the user’s machine will be detected, so that the correct version of the VSCode extension will be installed.
If Lattix Architect cannot be found, you will be prompted to specify its location:
The usual location for a Lattix Architect install is /opt/Lattix
for unix-like systems, and
C:\Program Files\Lattix${VERSION}
for Windows.
This location will be saved within the Settings of the Lattix VSCode Extension. In the case that your Lattix installation location moves, or you wish to specify a different installation location, you can edit this path:
Open the settings with keyboard shortcut
CTRL+,
Search for
@ext:codeclinicllc.lattix
Edit the path of the Location of Lattix Architect Install
Note
The VSCode Extension requires line number information to function. Please include line number processing when creating the Lattix project to use the VSCode Extension.
Licensing#
Your Lattix IDE license key can be installed from within Lattix Architect by following the steps outlined in License Management.
Alternatively, if you start the Lattix VSCode Extension without having installed the Lattix IDE license key, the extension will respond with an error informing you that the ide functionality is not licensed:
Clicking on yes
will open up a text dialogue at the top of the screen, in which
you can paste your Lattix IDE license key.
Note
The textbox is particularly ‘sensitive’ to defocussing, and does not allow pasting from the right-click sub menu. If this occurs, it will close without accepting input. Please pre copy your license key and paste it in with {CTRL/CMD}-V.
Using the Extension#
Selecting a project#
When you first open a software project, the Lattix VSCode Extension will prompt you to select the Lattix Architect project LDZ file:
If you already have an LDZ file for the project you are working on, specify its location.
If not, you will need to follow the steps outlined in Create a New Project within Lattix Architect. There is no way to create an LDZ file from within the VSCode Extension.
The extension will attempt to match the source files in the LDZ file with the source files in the current directory. This means that the LDZ file does not need to be created on the host machine, but could be downloaded from a pipeline, for example.
The location of the LDZ file is saved in a configuration file in the current project
under ./.lattix/ldzpath
.
The Impact Explorer#
The Lattix VSCode Extension provides an Impact Explorer view to your VSCode IDE. The Impact Explorer allows you to view the Up and Downstream dependencies of selected partitions identified by Lattix.
This view is located at the bottom of your screen, alongside Problems, Output, Terminal etc.
The Lattix Impact Explorer is split into three different panels:
Upstream - Used By Report
File Info
Downstream - Uses Report
File Info Panel#
The File Info panel shows information about the currently selected file or tag. When a Tag is selected, only the tag name is displayed. When a file is selected, the filename and the type of file (e.g. Header file, Source file) are displayed.
Upstream - Used By Panel#
The Upstream panel shows all the items which are used by the selected source file or tag.
One line is given per dependency edge (i.e. per line of code).
Clicking on one of these dependencies, where applicable, will open and highlight that line of code in the code editor of VSCode.
Expanding the tree (by clicking on the chevron on the left) will expand the dependencies by one level, i.e. showing the Upstream dependencies for that element.
Each line in the up or downstream panels contains the type of dependency, the file or function name, and the line number (if applicable).
Downstream - Uses Panel#
The Downstream panel is much like the Upstream view, however it displays each of the items that uses the selected source file or tag.
Using the Impact Explorer#
Open the explorer and mouse-over the central File Info panel:
Two icons will appear:
A star icon, used to select the currently open source file for impact analysis.
A tag icon, used to select a Tag for impact analysis.
Use one of these icons to select either a source file or a tag for impact analysis.
Alternatively you can right click a source file and choose Lattix -> Impact Analysis to choose a file for impact analysis.
Once you have selected a tag or file for analysis, you can browse the Upstream and Downstream panels to explore the dependencies.
Troubleshooting#
There may be a problem with the extension recognising where the source files in the lattix project are located in your workspace. This occurs primarily when the project was built not on the local machine, such as in a pipeline. Should this happen, the message “No match between ldz atoms and local files found” will be displayed.
If this occurs, you will need to specify the mapping between the ldz filepath and the local filepath.
Create a file in the .lattix
workspace called pathmap
of the form:
// /home/USER/projects/isoaglib/.lattix/pathmap
{
"from":"/builds/lattix1/",
"to":"/home/USER/projects/"
}
Where "from"
is the path of the source files in the ldz file, and "to"
is the absolute
path to the files on the local disk.
Note
Windows users should either escape the backslash characters, or use forward slashes.
For example: "to":"C:\\Users\\USER\\projects\\"
or "to":"C:/Users/USER/projects/"
.
The path translator can find the location of a file on the disk by taking a path from the ldz,
and replacing the from
prefix with to
.
For example, the path to util_funcs.cpp
in an
isoaglib pipeline is /builds/lattix1/isoaglib/library/xgpl_src/IsoAgLib/util/impl/util_funcs.cpp
.
/builds/lattix1/
will be replaced by /home/USER/projects/
to obtain the path
/home/USER/projects/isoaglib/library/xgpl_src/IsoAgLib/util/impl/util_funcs.cpp
in the workspace.
If the incorrect mapping is given in pathmap
, the VSCode Extension will not work as intended,
and the error message “File not found in the Lattix Project” will be given.
Note
If no prefix is to be taken off the ldzpath, then give an empty path “//
” for from
.
In this case, the “to” prefix will be prepended to each path.