Plugin Behavior Safety Checklist (Code to Spec)
Lexer / Parser semantics
- Token/rule ordering assumptions stated (first-match-wins / longest-match)
- Malformed / unterminated input handling described (bad-literal, regex fallback)
- PSI tree shape and key element types identified
- Source of truth for tokens noted (
PhelTypesinsrc/main/gen/)
State transitions
- Lexer states and their entry/exit conditions listed (e.g.
<REGEX_LITERAL>) - Invalid transitions defined (recover vs
BAD_CHARACTER)
IDE runtime
- Threading model described (read action / EDT / background)
- Cancellation handled (
ProcessCanceledExceptionrethrown, not swallowed) - Performance considerations for large files noted
Registration & compatibility
- Extension points in
plugin.xmlidentified - Version-compat range respected (2024.2 – 2026.1.x)
- Generated-source / registry regeneration impact noted
Observability
- Logging via platform
Loggerwhere failures can occur - Test coverage (unit + integration) for the behavior identified