Compare commits

...
3 Commits
Author SHA1 Message Date
Christoph e5c1ba1908 docs(changelog): add release notes through 2026.9.700
build_and_puplish.yml / build_and_publish (release) Successful in 30s
Populate CHANGELOG with detailed release entries up to 2026.9.700 and tidy historical notes. The new content documents recent features and fixes (notably DEF block template/address handling, the BLOCK_LIST/ADDR_LIST completion keywords, comment spacing/formatting changes, and the persistent workspace index), and cleans up formatting and older release headings for readability.
2026-09-24 15:17:02 +02:00
Christoph 81fe58e023 docs: document DEF block templates, addresses, and formatting changes
Update the README and CHANGELOG to describe newly documented language-server behaviors and editor UX details.

- Read BLOCK_TEMPLATE and ADDRESS names from .def files listed under <DefinedEvents> in PSC layers and refresh on PSC/DEF changes; completion suggestions for MOM_do_template, MOM_ask_address_value, MOM_force, and MOM_suppress
- Insert quoted block templates/addresses and Always|Once|Off modes (replace auto-closed/typed quotes instead of doubling) and insert variables with a leading `$`
- Add BLOCK_LIST and ADDR_LIST completion keywords to list all loaded block templates or addresses
- Document formatting/linting of uplevel bodies as Tcl and normalization of comment spacing (#Comment → # Comment) while preserving ##, #!, and already spaced comments
- Note that the Python debug bootstrap now stops with a clear error instead of hanging when no debugpy listener or only a stale one is available

These changes are reflected under "Unreleased" in the changelog and in the README section about DEF block templates and addresses.
2026-09-24 14:34:23 +02:00
Christoph 4c1837c557 Update version to 2026.9.700 2026-09-24 12:28:41 +00:00
3 changed files with 318 additions and 40 deletions
+288 -38
View File
@@ -1,56 +1,306 @@
# Changelog
All notable changes to NX Postprocessor Support are listed here, newest release first.
Versions correspond to the Git tags of this repository.
## Unreleased
- Reparse only the top-level TCL commands touched by an edit instead of the whole file
- Cache the workspace index in the extension storage so restarts skip reparsing unchanged files; the cache is discarded automatically when the server or bundled tclint changes
### Documentation
- Document DEF block templates, addresses, `BLOCK_LIST`/`ADDR_LIST`, and the formatting changes in the README
## [2026.9.700] - 2026-09-24
### Added
- `BLOCK_LIST` and `ADDR_LIST` completion keywords that list all loaded block templates or addresses; the keyword is replaced by the selected quoted name
### Changed
- Format comments with a space after `#` (`#Comment` becomes `# Comment`); `##` separators, `#!`, and comments that already start with whitespace stay unchanged
## [2026.9.600] - 2026-09-24
### Added
- Read `BLOCK_TEMPLATE` and `ADDRESS` names from the `.def` files listed under `<DefinedEvents>` in PSC layers; changes to PSC and DEF files are picked up automatically
- Suggest block templates for `MOM_do_template` and addresses for `MOM_ask_address_value`, `MOM_force`, and `MOM_suppress`, each followed by variables
- Suggest `Always`, `Once`, and `Off` for the first argument of `MOM_force` and `MOM_suppress`
- Insert block templates, addresses, and modes in quotes without doubling typed or auto-closed quotes; insert variables with a leading `$`
- Persistent workspace index in the extension storage, so restarts skip reparsing unchanged files; the cache is discarded automatically when the server or bundled tclint changes
### Changed
- Reparse only the top-level Tcl commands touched by an edit instead of the whole file
- Speed up TclOO completion, signature help, inlay hints, and Go to Definition by reusing the cached syntax tree and skipping files without classes
- Speed up references, document highlights, and call hierarchy with cached definition lookups
- Keep background indexing from blocking requests that need a fresh syntax tree
- Add Go to Definition for TclOO classes, constructors, and resolved methods, including PSC library definitions
- Index PSC layer scripts (including external paths and legacy Windows encoding) and share TclOO class metadata across files for completion, signatures, inlay hints, and highlighting
- Add document-local TclOO method completion for `new`/`create` instances, `my`, and statically inferred return chains
### Fixed
- Format and lint `uplevel` bodies as Tcl scripts instead of leaving them untouched
- Stop the Python debug bootstrap with a clear error instead of hanging when no debugpy listener or only a stale one is available
## [2026.9.501] - 2026-09-21
### Fixed
- Highlight braced stored-procedure names in `lappend` arguments
## [2026.9.500] - 2026-09-21
### Added
- Index Tcl scripts referenced by PSC layers, including external folders, environment-variable folders, and legacy Windows encoding
- Share TclOO class metadata across files for completion, signature help, inlay hints, and highlighting
- Go to Definition for TclOO classes, constructors, and resolved methods, including PSC library definitions
- CDL event handler snippets declare an extra `<var>_defined` global for parameters marked `TOGGLE Off`
- Allow `INVALID` in the CDL `CATEGORY` grammar
## [2026.9.400] - 2026-09-11
### Added
- Document-local TclOO method completion for `new`/`create` instances, `my`, and statically inferred return chains
- Signature help and parameter inlay hints for resolved TclOO methods and constructors, including optional and variadic arguments
- Suggest TclOO class names as classes and semantically highlight their declarations and calls
- Show signature help and parameter inlay hints for resolved TclOO methods and constructors, including optional and variadic arguments
- Add incoming and outgoing call hierarchy for custom TCL procedures and MOM event handlers
- Add document highlights for procedure and variable occurrences
- Make completion context-aware and prioritize local, current-file, workspace, and built-in symbols
- Add command-aware completion for Tcl subcommands, fixed arguments, and valid options
- Add semantic argument completion for variables, procedures, namespaces, and local file paths
- Add placeholder-based snippets for common Tcl structures and `dict for`
- Integrate the NX Tcl Remote Debugger directly into NX Postprocessor Support
- Add `nx-tcl` attach configurations and breakpoint support for TCL and DEF files
- Support breakpoints, stepping, stack frames, variables, watches, evaluation, logpoints, hit conditions, and Tcl error stops
- Add generation-safe stack and variable references so delayed VS Code requests cannot address stale NX frames
- Add command-buffer breakpoint handling for `LIB_GE_command_buffer_edit_*` source bodies
- Extend the README with launch configuration, path mapping, and debugger usage
- Prevent truncated TCL inlay hints and add configurable parameter hint modes
- Add inlay hints for built-in NX procedures, variadic arguments, and visible ranges
- Add inlay hint documentation and navigation to custom procedure definitions
- Add signature help for custom TCL procedures and built-in NX/MOM procedures
- Clean stale TCL indexes on close, delete, and rename operations
- Make background parsing and index updates thread-safe
- Improve TCL response times with debounced edits and cached semantic, inlay, hover, completion, and variable indexes
- Debounce CDL/DEF diagnostics and remove per-line diagnostic logging
- Keep completion working while the file has syntax errors
## [0.0.1]
## [2026.9.300] - 2026-09-10
- Initial release
### Added
## [0.0.2]
- Array key completion, including keys built with substitutions
- Generated CDL event handler snippets declare `args`
- Add Autocomp for TYPE
## [2026.9.220] - 2026-09-08
## [0.1.0]
### Fixed
- Add Hover Feature
- Completion inside unfinished braced arguments now recognizes nested commands
## [0.2.0]
## [2026.9.210] - 2026-09-04
- Add DEF File Support
### Added
## [2026.6.100]
- Highlight escaped quoted strings and embedded variables in DEF files
- Fix several bugs
## [2026.9.200] - 2026-09-03
## [2026.6.200]
### Added
- Fix foramtting bug
- Command-aware completion for Tcl subcommands, fixed argument values, and options such as `string compare -nocase`
- Semantic argument completion for variables, procedures, namespaces, and local file paths
- Placeholder-based snippets for `if`, `foreach`, `proc`, `switch`, `try`, and `dict for`
## [2026.9.100] - 2026-09-03
### Added
- Incoming and outgoing call hierarchy for custom Tcl procedures and MOM event handlers
- Document highlights for procedure and variable occurrences
- Context-aware completion that ranks local, current-file, workspace, and built-in symbols in that order
### Changed
- Update lsprotocol to 2025.0.0
## [2026.8.300] - 2026-08-28
### Added
- Integrate the NX Tcl Remote Debugger; the separate `local-nx.nx-tcl-debug` extension is no longer needed
- `nx-tcl` attach configurations and breakpoints in Tcl and DEF files
- Stepping, call stack, scopes, variables, watches, evaluation, logpoints, hit conditions, and Tcl error stops
- Breakpoints in `LIB_GE_command_buffer_edit_*` bodies, mapped back to their source and owning procedure
## [2026.8.200] - 2026-08-19
### Added
- Configurable parameter-name inlay hints (`inlayHints.parameterNames`, `inlayHints.suppressWhenArgumentMatchesName`) for custom and built-in NX procedures, including variadic arguments
- Unlimited inlay hint length for Tcl files, so later parameter names are not truncated
### Changed
- Cache semantic tokens, inlay hints, hover, completion, and variable indexes and debounce edits and diagnostics for faster responses
## [2026.8.100] - 2026-08-19
### Added
- Workspace symbol index with Go to Definition, references, and rename
- Signature help for custom Tcl procedures and built-in NX/MOM procedures
- CDL event handler snippets and hover with generated handler and `mom_` parameter hints
- Keep indexes in sync when Tcl files are changed, deleted, or renamed on disk
## [2026.6.201] - 2026-06-22
### Fixed
- Preserve whitespace inside single-line braced expressions when formatting
## [2026.6.200] - 2026-06-22
### Fixed
- Tcl formatting bug caused by the formatter options
## [2026.6.100] - 2026-06-18
### Changed
- Folding ranges for Tcl are computed by the language server, avoiding duplicate regions
- Language server restarts are serialized so only one server runs at a time
- Pin the Python dependencies of the server and update the bundled libraries
### Fixed
- Several stability fixes
## [2025.9.200] - 2025-09-01
### Changed
- Install server dependencies with uv instead of pip
- Relicense to AGPL-3.0-or-later
## [2025.9.101] - 2025-08-16
### Added
- Signature help
- Variable checks and additional semantic tokens
### Fixed
- `incr` on variables that already exist and `foreach` loop variables
## [2025.8.400] - 2025-08-15
### Added
- Outline for DEF and CDL files
### Fixed
- Duplicate `MOM_add_to_block_buffer` entry renamed to `MOM_add_to_line_buffer`
## [2025.8.300] - 2025-08-12
### Added
- Go to Definition and document outline for Tcl
- Variable index with positions
- Procedure documentation in hover
### Fixed
- Formatter deleting line continuations (`\`)
- Wrong semantic highlighting in several cases
## [2025.8.202] - 2025-08-12
### Fixed
- Formatter deleting line continuations (`\`)
## [2025.8.201] - 2025-08-11
### Fixed
- Highlighting errors
## [2025.8.200] - 2025-08-09
- Version change only
## [2025.8.2] - 2025-08-09
- Version change only
## [2025.08.1] - 2025-08-09
### Added
- Load procedures from all workspace files and PSC-referenced scripts for completion
- Extension icon
## [0.4.14] - 2025-08-04
### Added
- `LIB_GE_command_buffer_edit_*` support in the parser
### Fixed
- Namespace calls in POCO code
- Semantic highlighting of variables in arrays
## [0.4.12] - 2025-08-03
### Added
- More semantic tokens and completion items
## [0.4.10] - 2025-07-28
### Added
- Linter based on tclint
### Changed
- Use tclint as parser and formatter
## [0.4.9] - 2025-07-22
### Added
- More completion items
## [0.4.8] - 2025-07-21
### Added
- More NX functions and hover documentation
## [0.4.7] - 2025-07-21
### Added
- Formatter settings
### Fixed
- Formatter fixes
## [0.4.6] - 2025-07-21
### Fixed
- `@` in buffers when formatting
## [0.4.5] - 2025-07-21
### Fixed
- Formatting of buffers
## [0.4.4] - 2025-07-21
### Fixed
- Formatter fixes
## [0.4.3] - 2025-07-21
### Fixed
- Formatting fixes
## [0.4.2] - 2025-07-20
### Added
- Initial release with syntax highlighting, formatting, auto-completion (including `TYPE`), hover, and DEF file support
+29 -1
View File
@@ -14,6 +14,7 @@ A comprehensive VS Code extension providing language support and remote debuggin
- **Document Highlights** - Highlights all reads, writes, and calls of the symbol under the cursor
- **Context-aware Completion** - Prioritizes local symbols and suggests variables, procedures, namespaces, paths, Tcl subcommands, valid argument values, and options based on cursor context
- **PSC and TclOO Classes** - Indexes Tcl scripts referenced by PSC layers, including external folders. Classes from indexed files provide method completion, signature help, parameter hints, and class highlighting in other files. PSC script names may omit `.tcl`; relative folders resolve from the PSC directory, and environment-variable folders are supported. Missing scripts are reported in the output channel; encrypted libraries cannot supply static class metadata.
- **DEF Block Templates and Addresses** - Reads the `.def` files listed under `<DefinedEvents>` in PSC layers and suggests their `BLOCK_TEMPLATE` and `ADDRESS` names, see [DEF block templates and addresses](#def-block-templates-and-addresses)
- **Tcl Snippets** - Inserts placeholder-based structures for `if`, `foreach`, `proc`, `switch`, `try`, and `dict for`
- **NX Tcl Remote Debugger** - Breakpoints, stepping, call stack, scopes, variables, watches, evaluation, logpoints, hit conditions, and Tcl error stops directly in a running NX Post process
@@ -48,6 +49,32 @@ TCL files default to unlimited inlay hint length so that VS Code does not
truncate later parameter names on a line. An explicit user setting for
`editor.inlayHints.maximumLength` still takes precedence.
## DEF Block Templates and Addresses
The language server resolves the `.def` files of every PSC layer's `<DefinedEvents>` section the
same way as layer scripts (relative to the PSC, `SubFolder`, environment variables, missing `.def`
extension) and collects all `BLOCK_TEMPLATE` and `ADDRESS` declarations. Changes to PSC or DEF files
are picked up automatically.
| Command | Suggestions |
|---|---|
| `MOM_do_template` | Block templates, then variables |
| `MOM_ask_address_value` | Addresses, then variables |
| `MOM_force`, `MOM_suppress` | 1st argument: `Always`, `Once`, `Off`, then variables; further arguments: addresses, then variables |
Block templates, addresses, and `Always|Once|Off` are inserted in quotes (`"steady_rest"`); a quote
that is already typed or auto-closed is replaced instead of doubled. Variables are inserted with a
leading `$`. Typing `$` yourself still shows variables only.
Two keywords list all loaded names anywhere in a Tcl file:
- `BLOCK_LIST` - shows all block templates
- `ADDR_LIST` - shows all addresses
Select the keyword from the completion list (or type it completely) to open the list; text typed
directly after the keyword, such as `ADDR_LISTSP`, narrows it. The keyword is replaced by the
selected quoted name.
## NX Tcl Remote Debugger
### Add a VS Code attach configuration
@@ -98,13 +125,14 @@ Simply open any supported file type and enjoy:
- Syntax highlighting
- Error detection and linting
- Code completion
- Code formatting (Format Document command)
- Code formatting (Format Document command), including `uplevel` bodies and a space after `#` in comments
- Hover information
- Signature help while entering procedure arguments
- Incoming and outgoing call hierarchy for custom procedures and MOM event handlers
- Document-wide highlights for procedure and variable occurrences
- Context-aware completion with local symbols ranked before workspace and built-in symbols, plus semantic arguments, local paths, Tcl subcommands, and options such as `string compare -nocase`
- Placeholder-based snippets for common Tcl control structures and procedures
- Block template and address suggestions from PSC DEF files, including `BLOCK_LIST` and `ADDR_LIST`
- Remote NX Tcl debugging with breakpoints and full stepping
## Contributing
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "nx-post-support",
"displayName": "NX Postprocessor Support",
"description": "VS Code extension for NX CAM postprocessor development with language support and remote Tcl debugging for CDL, TCL, and DEF files",
"version": "2026.9.600",
"version": "2026.9.700",
"publisher": "Christoph",
"icon": "images/nx-1.png",
"activationEvents": [