Skip to content

VS Code colorization for EPICS database, templates and substitution files

License

Notifications You must be signed in to change notification settings

epics-extensions/vscode-epics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vscode-epics, EYE (Enlight Your Epics)

This VS Code extension provides syntax highlighting for EPICS database, template, substitutions and startup files, and streamdevice prototype files.

1. Features

  • Syntax highlighting for:
    • database and template files (.db, .dbd and .template)
    • substitutions files (.substitutions, .sub, and .subs)
    • startup files (.cmd and .iocsh)
    • streamdevice prototype files (.proto)
    • SNL files (.st extensions are considered as .c extension and some keywords are highlighted)

Syntax highlighting

  • Snippets for:
    • database and template files (.db and .template)
    • substitutions files (.substitutions, .sub, and .subs)
    • startup files (.cmd and .iocsh)
    • C source code
    • streamdevice prototype files (.proto)
    • SNL files (over charge of your .c extension)
    • we-test (scenario and suite)
Tips: to see all the available snippets per file type, write "epics." and a list will show up (file has to have a known extension).
  • Compilation facilities

  • Linter for:

    • database and template files
    • substitutions files
    • startup files
    • streamdevice prototype files
    • SNL files

2. Requirements

VS Code 1.5 or newer version.

3. get all the fields of the EPICS database

  • ".db": to select .dbd and .dbd.pod files
  • commun:
$ cat <path_to_epics-base>/src/ioc/db/*.db*  | grep 'field(' | tr "(," " " | awk '{print $2}' | tr "\n" "|" | sed 's/.$//'
  • specific:
$ cat <path_to_epics-base>/src/std/rec/*.db* | grep 'field(' | tr "(," " " | awk '{print $2}' | tr "\n" "|" | sed 's/.$//'

4. useful links

5. create a new extension version

  1. commit changes and close corresponding github issues
  2. report in downloadTracking.ods the number of download with the date and the version
  3. update CHANGELOG.md
  4. check README.md
  5. check version in package.json
  6. create a package with vse: $ vsce package # generate vsix file
  7. create the git tag: git tag -a x.x.x -m "..."
  8. push to server git push origin --tags
  9. on github, create a new release
  10. publish the extension on the vscode marketplace (rights are limited to @nsd and @vnadot) 1. manually 2. via CLI. I didn't manage to make it work yet, issue with the token "requires an Personal Access Token").
  11. post a message on the EPICS [techtalk)[https://epics.anl.gov/tech-talk/2020/msg01930.php]. You can do that by answering by email.

7. create a gif for the documentation

https://github.com/phw/peek

8. Extension Settings

None yet!

9. Known Issues

See gitlab issues.

10. Credits

11. to do