Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>cyflex-developer-toolsNew to Visual Studio Code? Get it now.
cyflex-developer-tools

cyflex-developer-tools

TRP Labs

|
15 installs
| (1) | Free
A extension that aims to help with cyflex related files.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CYFLEX Developer Tools Extension

This extension's purpose is to assist in troubleshooting cyflex spec files. Some of the features of this extension include syntax highlighting, listing the detected problem in a message, and file color formatting. Currently, only limit spec files have syntax highlighting and file color formatting. More spec files will be added in the future. The other spec files can be opened but there will not be any syntax highlighting or color formatting at this time.

Important Note

At this moment, the extension is NOT able to verify if the limit specs variable or any referenced cyflex variable(s) are currently active. Due to units.dat files being interchangeable, this extension only checks if the unit is in a correct format at this time.

Syntax Highlighting Overview

When a supported spec file is opened, the extension will read through the opened file and determine if there are any syntax errors or data in the wrong order. When an error has been identified, a squiggly line starting at the beginning of the line will be drawn to the problem character. This will help the user find an error in the file more quickly and easily. When the error is corrected, the squiggly line will disappear.

When hovering the mouse over the squiggly line, an error message with what the extension found wrong along with expected data options for that position. There may be times where the syntax highlighter might not give a helpful message. This is where the user needs to assist and look at the data around the error or even the line above where the error is located. It is recommended to fix the errors from the beginning of the file to the end since some syntax errors may cause multiple errors due to the parser trying to recover from the unexpected error within the file.

Color Format

If the supported shebang is found at the first line when opening a spec file, VS Code will change the coloring of the spec file to make it easier to tell the difference between a variable, units, comments, and keywords. This is to make it easier for the user to know what parts of the file is commented out vs parts of the file that will be read into the spec file application. The colors of the comments, variables, units, and keywords change with the theme that is applied to vs code. NOTE: Not all themes will change the colors of the spec file.

The color format is tied to the file type for the opened file. If the file type is 'plaintext' then all of the text within the file will be the same color. If the file type is detected to be a supported spec file, for example limit_specs, then vs code will start the color formatting for the file.

Implementation Notes

For the best results of the extension working, add: #! spec_file version=n.n.n at the top of the spec file. Future updates will have different version numbers and spec files. (ONLY #! limit_specs version=1.0.0, is supported currently in limit specs files)

Example for limit specs:

#! limit_specs version=1.0.0
#variable         limit_value
                 #Upper/Lower       rate              blink(YES/NO)
                 #enable_variable   violation_event   normal_event
                 #violation_flag    latch_flag        period_out

Otherwise, the text in the limit specs file will be one color as a plaintext file. NOTE: The extension will still do syntax highlighting for limit specs files without the shebang if the file name contains limit_specs.

For vs code to detect the newly added shebang automatically:

  • Add shebang at the top of the file.
  • Save file.
  • Close file.
  • Reopen file.

After the changes are made vs code will automatically use the specs file type when that file is opened in vs code. This change only needs to happen once at first, then update the version number when newer versions are released for the spec file that contain desired changes.

Change File Type

To manually change the file type to a limit_specs file type:

  • Click on the language mode on the bottom right of the vs code application. (might show "plaintext" without the shebang)

  • Type out "limit_specs" or scroll down to "limit_specs".

  • Click on the limit_specs option.

Running this extension

  • Open VS Code.

  • Have CYFLEX Developer Tools Extension installed in virtual studio code application. This can be done by searching for the package on VS Code extension marketplace or installing the vsix file.

    • To install via vsix file click on the extensions tab on the left of the screen.

    • Click on the three dots next to the refresh icon near the top.

    • Click on 'Install from VSIX'.

    • Choose the vsix file to be installed.

  • Open spec file or spec file directory.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft