Skip to content

msarson/Clarion-Extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2,354 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Clarion Extension for Visual Studio Code

Version Installs

Professional Clarion language support for Visual Studio Code with intelligent code navigation, IntelliSense, and build integration.

πŸš€ Quick Links


✨ Key Features

🎨 Clarion & Template Language Support

Full language support for Clarion code, basic support for templates.

  • Clarion files (.clw, .inc) - Complete syntax highlighting and IntelliSense
  • Template files (.tpl, .tpw) - Syntax highlighting with 100+ template keywords
  • Code folding for structures and template blocks
  • Context-aware coloring for Clarion code
  • Note: Template files have syntax highlighting only (no IntelliSense/navigation)
  • Learn more about Code Editing β†’

πŸ’‘ Signature Help & Documentation

Get instant parameter hints and documentation - works immediately, no solution needed!

  • 310 built-in functions with parameter hints and descriptions
  • Method overload support β€” overloads narrowed by argument type (e.g. OPEN(Window) shows only WINDOW signatures)
  • Hover documentation for all symbols β€” procedures, classes, variables, attributes, built-ins
  • Context-aware hover β€” HIDE, DISABLE, TYPE show attribute or statement usage depending on context
  • Hover for PROP:/PROPPRINT: runtime properties β€” descriptions from Clarion 11.1 docs
  • Hover for EVENT: equates β€” category, description, and usage example
  • Signature help for class methods including inherited members
  • Learn more about Signature Help β†’

πŸ€– IntelliSense β€” Smart Completions

Type SELF. or MyVar. for context-aware member suggestions. Type PROP:, PROPPRINT:, or EVENT: for documented equate completions.

  • Resolves SELF., PARENT., MyVar., or ClassName. to the correct class
  • Full inheritance walk β€” shows methods and properties from parent classes
  • Access control aware β€” PRIVATE / PROTECTED / PUBLIC scoping enforced
  • Each overload shown as a distinct entry with parameter signatures
  • Chained expressions (SELF.Order.) resolve intermediate types
  • PROP:/PROPPRINT: completions with description and read-only badge
  • EVENT: completions with category label (Field-Specific / Field-Independent / DDE)
  • Learn more about Navigation β†’

✏️ Code Snippets

Write code faster with 50+ smart snippets - works immediately!

πŸ“‚ Solution Management

Open any Clarion solution - just open the folder.

🧭 Smart Code Navigation

Jump to definitions, find implementations, and explore references β€” works in same file immediately, cross-file with solution.

  • Press F12 to go to definition (same file: no solution needed!)
  • Press Ctrl+F12 to go to implementation
  • Press Shift+F12 for Find All References β€” scope-aware across all project files, overload-aware (only the matching overload's sites), routine-aware
  • Press F2 to Rename Symbol β€” renames across the entire workspace in one step
  • Reference-count CodeLens β€” an exact N references count above every procedure, method, class, and routine; click to see them (large solutions briefly show a ~ estimate while the exact count computes)
  • Routines are first-class symbols β€” hover, F12, Go-to-Implementation, references, and CodeLens all work on ROUTINE labels and DO sites, including generated :: names like Menu::MENUBAR1
  • Module-callout procedures β€” references from an implementation reach every module whose MAP includes the callout INC (the generated MODULE('impl.clw') + INCLUDE pattern)
  • Overload resolution by argument types β€” F12, Ctrl+F12, hover, and references pick the overload matching the call's arguments (typed variables, members, EQUATEs, implicit variables, PRE:Field arguments)
  • Document Highlight β€” scope-aware occurrence highlighting, including procedure call sites
  • Workspace Symbol Search (Ctrl+T) β€” search for any procedure, class, or label across all solution files
  • Hover for documentation β€” declaration location, class/interface context, type info, resolved INCLUDE/MODULE/MEMBER file paths
  • Chained navigation: SELF.Order.RangeList.Init β€” hover, F12, Ctrl+F12, and references resolve through CLASS, QUEUE, and GROUP type chains
  • SELF/PARENT properties: F12 on SELF.List navigates to the class member declaration
  • Typed variable members: F12/Ctrl+F12/hover on obj.Method() where obj is any typed variable
  • INTERFACE support: hover, F12, Ctrl+F12, and references for interface methods, IMPLEMENTS(), and 3-part Class.Interface.Method implementations
  • CLASS type names: F12 and Find All References work on type names in parameter and variable declarations
  • Cross-file navigation requires solution
  • Learn more about Navigation β†’

πŸ” Refactoring & Quick Fixes

CodeRush-inspired refactors on Ctrl+. β€” plus quick fixes attached to diagnostics.

  • Surround With… β€” wrap selected statements in IF…END, LOOP/LOOP WHILE/LOOP UNTIL…END, or CASE…OF…END
  • Negate Condition β€” flip the logical sense of an IF / ELSIF / LOOP WHILE / LOOP UNTIL condition
  • Flip IF/ELSE β€” negate the condition and swap the branches of a block-form IF…ELSE…END
  • Introduce EQUATE β€” extract a magic literal to a named EQUATE, choosing which data section it lives in (routine / local / module / global β€” even cross-file into the PROGRAM)
  • Create routine from DO β€” an unresolved DO SomeRoutine offers to scaffold the ROUTINE skeleton in the right scope
  • Add missing INCLUDE / project DefineConstants β€” quick fixes on the corresponding diagnostics
  • Learn more about Code Editing β†’

πŸ”§ Build Integration

Generate applications directly from VS Code.

  • Right-click to build from Solution View
  • Multiple build configurations (Debug/Release) β€” active config auto-detected from .sln.cache
  • Projects sorted by build order (dependency-first) in Solution View
  • Live build output
  • Learn more about Building β†’

🎯 Real-time Diagnostics

Catch errors as you type.

  • Unterminated structures β€” including window sub-structures (WINDOW, SHEET, TAB, OLE, MENU, etc.)
  • Missing RETURN statements
  • FILE validation (DRIVER, RECORD)
  • Missing INCLUDE β€” warns when a variable's class type is defined in an .inc not included in the file; code action inserts the INCLUDE automatically
  • Missing DefineConstants β€” warns when a class's required Link()/DLL() constants are absent from the .cwproj; code action adds them with a QuickPick for static vs DLL mode
  • Discarded return values β€” a value-returning (non-PROC) procedure or method called as a statement, including SELF./PARENT. call sites
  • Literal passed by reference β€” a literal handed to a *TYPE (or complex-type) parameter, which needs an addressable variable
  • Undeclared variables (opt-out) β€” names that resolve to no declaration through the full scope model, cross-file aware
  • Missing implementations / indistinguishable prototypes β€” MAP declarations without bodies, and overloads a call could never disambiguate
  • Character-set validation that respects all Windows ANSI code pages (1250–1258) β€” national letters pass clean, genuine contamination (emoji, box-drawing) is flagged
  • Code inside unconditional OMIT blocks is excluded from diagnostics and reference counts (rename still updates it β€” other build configurations may compile it)
  • Learn more about Diagnostics β†’

⚑ Performance at Scale

Built and measured against real-world solutions (40 projects / 3,000+ source files).

  • Solution ready in ~2s, extension interactive in ~5s on large solutions
  • All indexes (structure declarations, file relationships, reference counts) persist across sessions β€” warm starts re-scan only files that changed
  • Background indexing is time-sliced and never blocks typing, hover, or navigation
  • Project-file regeneration (all .cwproj files touched) coalesces into a single refresh
  • Opt-in performance tracing (clarion.log.performance.enabled) produces a full diagnostic timeline for support

✏️ Code Editing Tools

Productivity features to write code faster.


πŸ“¦ Installation

Requirements

  • Visual Studio Code (latest version)
  • Clarion (for build features)

Quick Install

  1. Open VS Code
  2. Press Ctrl+Shift+X
  3. Search for "Clarion Extensions"
  4. Click Install

Detailed installation instructions β†’


πŸŽ“ Learning Resources

For New Users

Feature Documentation

Reference


πŸ†• What's New

Latest: v1.0.0 β€” Performance at scale, exact references, refactoring

The 1.0 release is the largest update yet β€” a ground-up performance overhaul verified on real 40-project / 3,000-file solutions, plus a batch of new editing features.

⚑ Startup & responsiveness overhaul

  • The IDE is usable seconds after opening a large solution (previously minutes of spinners): solution tree instant, background indexing strictly sequenced and time-sliced, no event-loop freezes.
  • All indexes persist across sessions (structure declarations, file-relationship graph, reference counts) β€” warm starts re-scan only changed files.
  • A Clarion regeneration touching every .cwproj now triggers one refresh instead of forty.
  • New clarion.log.performance.enabled setting (default off) emits a full diagnostic timeline for support.

πŸ”’ Reference counts you can trust

  • CodeLens counts are exact β€” every lens runs a real scoped Find-All-References in the background and clicking shows the results instantly.
  • Routines get lenses too, and are now first-class navigation symbols: hover, F12, Go-to-Implementation, and references work on ROUTINE labels and DO sites β€” including generated :: names.
  • Find-All-References understands the module-callout pattern (MODULE('impl.clw') INC included into many MAPs): references from an implementation now reach every calling module.
  • Overload-aware everywhere: FAR, F12, Ctrl+F12, hover, and signature help all pick the overload matching the call's argument types β€” typed variables, members, EQUATEs, implicit variables, PRE:Field arguments.

πŸ” New refactors & quick fixes (Ctrl+.)

  • Surround With… (IF / LOOP / CASE), Negate Condition, Flip IF/ELSE, Introduce EQUATE (with data-section placement), and Create routine from an unresolved DO.

🎯 Diagnostics

  • New: discarded return values (including SELF./PARENT. sites), literal-passed-by-reference, undeclared variables, indistinguishable prototypes.
  • Fixed: character-set validation respects all Windows ANSI code pages β€” national letters no longer flood non-Western files with warnings.
  • Unconditional OMIT blocks are invisible to diagnostics and reference counts (rename still updates them).

🧰 Under the hood

  • Language client/server upgraded to LSP 8.x; the marketplace package is trimmed to just the runtime files.

See the full changelog for the complete list β†’


Recent: v0.9.9 (2026-07-04) β€” Solution-wide scope correctness + no-solution resilience

  • Tightened open-solution scope correctness across cross-file PROGRAM globals, sibling-MEMBER module scope, Tier 1 routine-local shadowing in SymbolFinder.findSymbol(...), and qualifier completion so Prefix: only returns symbols for that exact qualifier (e.g. TGLO:*).
  • Dot-completion member lists now show inline type information (for example Var1 LONG) while preserving clean insert text.
  • Clarion startup now uses a cleaner TypeScript-style status bar progress flow (activating β†’ language server β†’ solution loading/indexing β†’ ready) instead of multiple transient load popups.
  • Build and generation commands now use a shared status-bar lifecycle (running/succeeded/failed) for clearer operation feedback.
  • Added lazy no-solution FRG coverage for DocumentLink/FAR/completion plus no-solution entry-point completion parity improvements as additive fallback hardening.
  • Landed cross-file overload fallback hardening when a built-but-irrelevant FRG is present.

See full changelog β†’


πŸ’¬ Support & Feedback


πŸ“„ License

MIT License


πŸ™ Acknowledgments

Special thanks to:

  • fushnisoft - Original Clarion syntax highlighting
  • The Clarion community for feedback and testing

About

VS Code Extension for Clarion

Topics

Resources

License

Contributing

Stars

11 stars

Watchers

3 watching

Forks

Packages

 
 
 

Contributors