Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Websoft Code NavigatorNew to Visual Studio Code? Get it now.
Websoft Code Navigator

Websoft Code Navigator

Websoft

|
27 installs
| (0) | Free
Smart autocomplete, navigation, diagnostics, and library-import support for Websoft HCM platform sources (.bs, .xml, .xmd, .js) — including XQuery, XQueryExpr, and BorisScript import aliases.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Websoft Code Navigator

Languages / Языки: English · Русский

Smart indexing, autocomplete, navigation, and live error checking for Websoft platform sources (.xml, .xmd, .js, .bs) in spxml folders — including first-class support for XQuery(...) and XQueryExpr(...) queries.


English

Websoft Code Navigator indexes your Websoft sources and turns VS Code into a query-aware editor: it understands namespaces, catalogs (tables), and fields, and offers scoped autocomplete, go-to-definition, and real-time diagnostics for both the XQuery("...") string dialect and the fluent XQueryExpr(...) builder.

Highlights

  • 🔎 Scoped autocomplete for namespaces, objects, and members (websoft., websoft.hcm.core_hr., …).
  • 🧭 Go to Declaration / Definition, Document & Workspace Symbols (Outline).
  • 🧩 .NET type-aware autocomplete for objects exposed to the script language.
  • 🗄️ XQuery & XQueryExpr assistance — catalog, field, and type suggestions.
  • 🚦 Live diagnostics — unknown variables, aliases, catalogs, and fields are underlined.
  • 📦 Library import support — autocomplete, navigation, and hover for import alias from '...' and import {alias} from '...', including logical object names such as websoft.tools_params.
  • ⚡ Smart startup indexing — loads instantly from a persistent snapshot; re-indexes only changed files.

Symbol indexing & navigation

  • Indexes only files under paths containing /spxml/.
  • Understands namespaces from folders like name@namespace (e.g. core_hr@websoft.hcm).
  • Builds object scopes from parent XML/XMD tags; remaps component.xml / component.js to namespace.module, and spxml/libs/*.js to namespace.module.filename.
  • Scopes spxml/tools/*.js / .xml to the object tag declared inside the tools XML (so wtv_tools_components_main.js, whose XML declares <tools_components_main>, is indexed as websoft.tools_components_main) — the file name prefix is never used as the scope.
  • Supports optional chaining (?. behaves like .) and excludes nested functions from the index.
  • Provides Document Symbols, Workspace Symbols, Go to Declaration / Definition, hover, and signature help.

XQuery string autocomplete — XQuery("...")

While typing inside a raw XQuery("...") (single- or multi-line template) statement:

  • Catalogs are suggested right after a for/join ... $var in binding.

    xq = XQuery("for $elem in ")            // ← suggests catalogs (e.g. websoft.platform.security.users)
    
  • Fields are suggested right after a $var/, filtered to the catalog bound to that variable — for every variable and every join in the statement:

    XQuery("for $elem in websoft.platform.security.users
            ljoin $site in websoft.site on $elem/code = $site/code
            where $elem/login = 'user1' return $elem/id, $site/id")
    
  • XQueryLiteral(value, Type) type constants are suggested for the type argument, preselecting the constant that matches the compared field's type:

    XQuery(`... where $elem/name = ${XQueryLiteral(123, TypeString)} ...`)  // name is a string → TypeString
    

Table & column suggestions in XQueryExpr(...) string arguments

  • Table names for the first argument of XQueryExpr, Table, InnerJoin, LeftJoin, RightJoin. Only catalog object types (SPXML-FORM CATALOG="1") are offered; the table name comes from the xmd wrapper element (e.g. <users>), independent of the file name (which may carry a wtv_ prefix), giving keys like websoft.platform.security.users.
  • Column names for the field arguments of On*, Where*, GroupBy, OrderBy, Return, filtered to the catalog bound to the referenced alias.
  • Type constants (TypeInteger, TypeReal, TypeBool, TypeDate, TypeString) for the TypeId argument of Where*/On*, preselecting the one matching the column's type (or inferred from the literal value when the column type is unknown).

Precise go-to-definition for catalogs & fields

Ctrl/Cmd-click (or Go to Definition) on a catalog or field inside XQuery(...) / XQueryExpr(...) navigates to the exact catalog or the exact field of the catalog bound to the referenced variable/alias — not the first same-named symbol in the index.

Live diagnostics (error underlining)

Mistakes are underlined as you type, in every clause (in, where, on, return, joins, …):

Problem Example
Unknown XQuery variable where $elems/login when only $elem is declared
Unknown XQueryExpr alias .OnEquals("c","f","x","g") when x is never declared
Unknown catalog (table) for $e in websoft.hcm.missing / XQueryExpr("ns.missing", …)
Unknown field (column) $elem/nofield / .Return("c","nofield")

To keep noise low, a field is not re-flagged when its variable/alias or catalog is already unknown, and incomplete statements (while typing) are not flagged.

.NET type autocomplete (exposed objects)

Some components expose .NET objects to the script language via an entry function (e.g. websoft.xqueryexpr.XQueryExpr(...)). The extension provides type-aware member autocomplete — including chained builder calls, terminal result properties, and locally-assigned variables (xq.WhereEqual(...).LeftJoin(...).Transpile().QueryText). It works by:

  • Discovering *.dotnet-index.json manifests (schema kind: "dotnet-types") shipped beside components.
  • Reading a /** @returns {Fully.Qualified.TypeName} */ JSDoc on the entry function to link the JS entry point to its .NET return type.

When inference cannot determine the type, annotate the variable explicitly (it overrides inference):

/** @type {Websoft.XQuery.XQueryExpr} */
xqExpr = SomeFactory();
// xqExpr.  ← now autocompletes XQueryExpr members

@type is also accepted inline (/** @type {T} */ x = ...) or as a trailing comment (x = ...; // @type {T}). Manifests are reloaded automatically when they change on disk.

Library import navigation & autocomplete

The extension understands import statements used to bring in BorisScript library modules — a default alias or braced names (as aliases included):

// Relative to the current file's directory
import {ai_process_lib} from 'libs/tool_model_processing.js'

// Absolute path within the Websoft server tree (x-local:// resolves under WebSoftServer/)
import xtcomponents_main from 'x-local://components/core_hr@websoft.hcm/spxml/libs/core_hr_library.js'

// Logical object name — resolved through the index, not by guessing a path
import tparams from 'websoft.tools_params'
import tcomponents_main from 'websoft.tools_components_main'

// Logical dotted notation: namespace.component.library
import {feed_rss_lib} from 'websoft.channel_providers_main.feed_rss-atom_library'

Once imported, the alias gives full IDE support:

  • Autocomplete — type tparams. to get every function and field of the imported object.
  • Go to Definition — Ctrl/Cmd-click tparams.load_params_int to jump to its declaration.
  • Hover — hover over any member call to see its signature and origin file.
  • Clickable path — Ctrl/Cmd-click the path string in the import statement to open the library file directly.
Format Example Resolves to
Relative 'libs/file.js' <dir of current file>/libs/file.js
x-local 'x-local://comp/spxml/libs/file.js' <websoftRoot>/WebSoftServer/comp/spxml/libs/file.js
Logical 'websoft.tools_params' every indexed file whose symbols carry scopePath = websoft.tools_params

A logical name is looked up in the index, not on the filesystem. A dotted, slash-free source path names the object a file exposes rather than a location on disk: every indexed symbol carries the dotted scopePath of its owning object, so the import resolves to whichever file declares that scope — a tools pair under spxml/tools/, a library under spxml/libs/, or any other layout. When several files share one scope (a tools object is declared by a .js/.xml pair), completion offers the members of both and navigation lands on the script file. Only when no indexed symbol carries the scope does the extension fall back to the conventional <component>@<namespace>/spxml/libs/<libname>.js location, so a library that is not indexed yet still resolves.

If a logical import does not resolve, its scope is missing from the index — run Websoft Code Navigator: Rebuild Index to refresh it.

Persistent index & usage stats

  • The index is persisted at the Websoft installation root — the directory containing WebSoftServer/xhttp_64.exe (or xhttp_64.out): <installRoot>/.index/index.json and <installRoot>/.index/changes/index-change-*.json. If a nested subdirectory of the installation is opened in VS Code, the extension walks up to the installation root and uses (and reuses) the .index there — the whole installation is indexed regardless of which folder was opened.
  • Per-user autocomplete usage stats: %USERPROFILE%\.websoft-nav\completion-stats.json.
  • Frequently used functions rank higher in completion lists.

Commands

  • Websoft Code Navigator: Rebuild Index
  • Websoft Code Navigator: Show Index Stats
  • Websoft Code Navigator: Toggle Autocomplete

Configuration

Setting Default Description
websoftNav.includeGlobs ["**/*.{js,bs,xml,xmd}"] Glob patterns included in indexing.
websoftNav.excludeGlobs ["**/{node_modules,.git,dist,out}/**"] Glob patterns excluded from indexing.
websoftNav.maxFileSizeKb 1024 Maximum indexed file size (KB).
websoftNav.autocomplete.enabled true Enable inline autocomplete.
websoftNav.parser.strict false Strict parser mode (reserved).
websoftNav.performanceLogs false Emit timing diagnostics to the Websoft Code Navigator output channel.

Getting started

  1. Install the extension and open a workspace containing Websoft spxml sources.
  2. The index loads instantly from a persistent snapshot on startup. If files have changed since the last session the extension re-indexes only the modified files automatically. Use Rebuild Index to force a full rescan.
  3. Start typing an XQuery(...) or XQueryExpr(...) — suggestions and diagnostics appear immediately.
  4. Add import alias from '...' (or import {alias} from '...') at the top of any .bs or .js file to get autocomplete and navigation for library functions via the alias.

Open the Websoft Code Navigator output channel to see index load/rebuild/change logs.


Русский

Websoft Code Navigator индексирует исходники платформы Websoft и превращает VS Code в редактор с пониманием запросов: он знает пространства имён, каталоги (таблицы) и поля, предоставляя контекстное автодополнение, переход к определению и диагностику в реальном времени как для строкового диалекта XQuery("..."), так и для «текучего» построителя XQueryExpr(...).

Ключевые возможности

  • 🔎 Контекстное автодополнение пространств имён, объектов и членов (websoft., websoft.hcm.core_hr., …).
  • 🧭 Переход к объявлению / определению, символы документа и рабочей области (Outline).
  • 🧩 Автодополнение с учётом типов .NET для объектов, доступных языку сценариев.
  • 🗄️ Помощь по XQuery и XQueryExpr — подсказки каталогов, полей и типов.
  • 🚦 Диагностика в реальном времени — неизвестные переменные, псевдонимы, каталоги и поля подчёркиваются.
  • 📦 Поддержка импорта библиотек — автодополнение, навигация и всплывающие подсказки для операторов import alias from '...' и import {alias} from '...', включая логические имена объектов вида websoft.tools_params.
  • ⚡ Умная индексация при запуске — моментальная загрузка из снапшота; переиндексация только изменённых файлов.

Индексация символов и навигация

  • Индексирует только файлы по путям, содержащим /spxml/.
  • Определяет пространства имён из папок вида name@namespace (например, core_hr@websoft.hcm).
  • Строит области объектов из родительских тегов XML/XMD; сопоставляет component.xml / component.js с namespace.module, а spxml/libs/*.js — с namespace.module.filename.
  • Для spxml/tools/*.js / .xml берёт область из тега объекта, объявленного внутри tools XML (поэтому wtv_tools_components_main.js с тегом <tools_components_main> индексируется как websoft.tools_components_main) — префикс имени файла областью не становится.
  • Поддерживает опциональную цепочку (?. работает как .) и исключает вложенные функции из индекса.
  • Предоставляет символы документа и рабочей области, переход к объявлению/определению, всплывающие подсказки и подсказки сигнатур.

Автодополнение строк XQuery — XQuery("...")

При вводе внутри строкового XQuery("...") (одно- или многострочный шаблон):

  • Каталоги предлагаются сразу после привязки for/join ... $var in .

    xq = XQuery("for $elem in ")            // ← предлагает каталоги (например, websoft.platform.security.users)
    
  • Поля предлагаются сразу после $var/, отфильтрованные по каталогу, привязанному к этой переменной — для каждой переменной и каждого соединения в запросе:

    XQuery("for $elem in websoft.platform.security.users
            ljoin $site in websoft.site on $elem/code = $site/code
            where $elem/login = 'user1' return $elem/id, $site/id")
    
  • Константы типа для XQueryLiteral(value, Type) предлагаются для аргумента типа, при этом предварительно выбирается константа, соответствующая типу сравниваемого поля:

    XQuery(`... where $elem/name = ${XQueryLiteral(123, TypeString)} ...`)  // name — строка → TypeString
    

Подсказки таблиц и столбцов в строковых аргументах XQueryExpr(...)

  • Имена таблиц для первого аргумента XQueryExpr, Table, InnerJoin, LeftJoin, RightJoin. Предлагаются только объекты-каталоги (SPXML-FORM CATALOG="1"); имя таблицы берётся из тега-обёртки xmd (например, <users>), независимо от имени файла (которое может иметь префикс wtv_), давая ключи вида websoft.platform.security.users.
  • Имена столбцов для аргументов-полей On*, Where*, GroupBy, OrderBy, Return, отфильтрованные по каталогу, привязанному к указанному псевдониму.
  • Константы типа (TypeInteger, TypeReal, TypeBool, TypeDate, TypeString) для аргумента TypeId в Where*/On*, с предварительным выбором соответствующей типу столбца (или выведенной из литерального значения, если тип столбца неизвестен).

Точный переход к определению каталогов и полей

Ctrl/Cmd-клик (или Перейти к определению) по каталогу или полю внутри XQuery(...) / XQueryExpr(...) переходит к точному каталогу или точному полю каталога, привязанного к указанной переменной/псевдониму — а не к первому одноимённому символу в индексе.

Диагностика в реальном времени (подчёркивание ошибок)

Ошибки подчёркиваются по мере ввода, в любом предложении (in, where, on, return, соединения, …):

Проблема Пример
Неизвестная переменная XQuery where $elems/login, когда объявлена только $elem
Неизвестный псевдоним XQueryExpr .OnEquals("c","f","x","g"), когда x нигде не объявлен
Неизвестный каталог (таблица) for $e in websoft.hcm.missing / XQueryExpr("ns.missing", …)
Неизвестное поле (столбец) $elem/nofield / .Return("c","nofield")

Чтобы снизить шум, поле не помечается повторно, если его переменная/псевдоним или каталог уже неизвестны, а незавершённые (в процессе ввода) конструкции не помечаются.

Автодополнение типов .NET (доступные объекты)

Некоторые компоненты предоставляют объекты .NET языку сценариев через функцию-точку входа (например, websoft.xqueryexpr.XQueryExpr(...)). Расширение предоставляет автодополнение членов с учётом типов — включая цепочки вызовов построителя, финальные свойства результата и локально присвоенные переменные (xq.WhereEqual(...).LeftJoin(...).Transpile().QueryText). Это работает за счёт:

  • Обнаружения манифестов *.dotnet-index.json (схема kind: "dotnet-types") рядом с компонентами.
  • Чтения JSDoc /** @returns {Fully.Qualified.TypeName} */ у функции-точки входа для связи точки входа JS с её типом возврата .NET.

Если тип не удаётся вывести, аннотируйте переменную явно (это переопределяет вывод):

/** @type {Websoft.XQuery.XQueryExpr} */
xqExpr = SomeFactory();
// xqExpr.  ← теперь автодополняет члены XQueryExpr

@type также принимается встроенно (/** @type {T} */ x = ...) или в виде завершающего комментария (x = ...; // @type {T}). Манифесты перезагружаются автоматически при изменении на диске.

Навигация и автодополнение импортируемых библиотек

Расширение понимает операторы import, используемые для подключения библиотечных модулей BorisScript, — как псевдоним по умолчанию, так и фигурные имена (включая алиасы as):

// Относительный путь от директории текущего файла
import {ai_process_lib} from 'libs/tool_model_processing.js'

// Абсолютный путь в дереве сервера Websoft (x-local:// разрешается через WebSoftServer/)
import xtcomponents_main from 'x-local://components/core_hr@websoft.hcm/spxml/libs/core_hr_library.js'

// Логическое имя объекта — разрешается через индекс, а не подбором пути
import tparams from 'websoft.tools_params'
import tcomponents_main from 'websoft.tools_components_main'

// Логическая точечная нотация: пространство_имён.компонент.библиотека
import {feed_rss_lib} from 'websoft.channel_providers_main.feed_rss-atom_library'

После импорта псевдоним даёт полную поддержку IDE:

  • Автодополнение — введите tparams., чтобы получить все функции и поля импортированного объекта.
  • Переход к определению — Ctrl/Cmd-клик на tparams.load_params_int переходит к объявлению.
  • Всплывающая подсказка — наведите на вызов члена, чтобы увидеть сигнатуру и файл-источник.
  • Кликабельный путь — Ctrl/Cmd-клик на строку пути в операторе импорта открывает файл библиотеки.
Формат Пример Разрешается в
Относительный 'libs/file.js' <директория текущего файла>/libs/file.js
x-local 'x-local://comp/spxml/libs/file.js' <websoftRoot>/WebSoftServer/comp/spxml/libs/file.js
Логический 'websoft.tools_params' все индексированные файлы, чьи символы имеют scopePath = websoft.tools_params

Логическое имя ищется в индексе, а не на диске. Точечная запись без слэшей называет объект, который файл предоставляет, а не его расположение: каждый индексированный символ несёт точечный scopePath своего объекта-владельца, поэтому импорт разрешается в тот файл, который объявляет эту область — пару tools в spxml/tools/, библиотеку в spxml/libs/ или любой другой макет. Если одну область объявляют несколько файлов (объект tools задан парой .js/.xml), автодополнение предлагает членов обоих файлов, а переход ведёт в скрипт (.js). Только если ни один индексированный символ не имеет нужной области, расширение откатывается к традиционному расположению <component>@<namespace>/spxml/libs/<libname>.js, так что ещё не индексированная библиотека тоже разрешится.

Если логический импорт не разрешается, значит его область отсутствует в индексе — выполните Websoft Code Navigator: Rebuild Index для его обновления.

Постоянный индекс и статистика использования

  • Индекс сохраняется в корне установки Websoft — каталоге, содержащем WebSoftServer/xhttp_64.exe (или xhttp_64.out): <installRoot>/.index/index.json и <installRoot>/.index/changes/index-change-*.json. Если в VS Code открыт вложенный подкаталог установки, расширение поднимается вверх до корня установки и использует (и переиспользует) находящийся там .index — индексируется вся установка независимо от того, какая папка открыта.
  • Статистика автодополнения по пользователю: %USERPROFILE%\.websoft-nav\completion-stats.json.
  • Часто используемые функции ранжируются выше в списках автодополнения.

Команды

  • Websoft Code Navigator: Rebuild Index — перестроить индекс
  • Websoft Code Navigator: Show Index Stats — показать статистику индекса
  • Websoft Code Navigator: Toggle Autocomplete — включить/выключить автодополнение

Настройки

Параметр По умолчанию Описание
websoftNav.includeGlobs ["**/*.{js,bs,xml,xmd}"] Шаблоны включения в индексацию.
websoftNav.excludeGlobs ["**/{node_modules,.git,dist,out}/**"] Шаблоны исключения из индексации.
websoftNav.maxFileSizeKb 1024 Максимальный размер индексируемого файла (КБ).
websoftNav.autocomplete.enabled true Включить встроенное автодополнение.
websoftNav.parser.strict false Строгий режим парсера (зарезервировано).

Начало работы

  1. Установите расширение и откройте рабочую область с исходниками Websoft spxml.
  2. Индекс моментально загружается из постоянного снапшота при запуске. Если файлы изменились с момента последнего сеанса, расширение автоматически переиндексирует только изменённые файлы. Используйте Rebuild Index для принудительного полного пересканирования.
  3. Начните вводить XQuery(...) или XQueryExpr(...) — подсказки и диагностика появятся сразу.
  4. Добавьте операторы import alias from '...' (или import {alias} from '...') в начало любого .bs или .js файла для автодополнения и навигации по функциям библиотеки через псевдоним.

Откройте канал вывода Websoft Code Navigator, чтобы видеть журналы загрузки/перестроения/изменения индекса.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft