Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>ramses-bridge-extNew to Visual Studio Code? Get it now.
ramses-bridge-ext

ramses-bridge-ext

Ramses.Superapp

|
11 installs
| (0) | Free
Bridge extension to provide VSCode API functionality in Theia
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Ramses Bridge Extension

The Ramses Bridge is the central service provider and the architectural core of the Ramses SDK tooling. It runs as an invisible, background extension that manages shared state and logic, providing a stable API for all other extensions in the ecosystem.

Core Responsibilities

  1. Schema Provider: It loads the base RXML component schema and watches the user's workspace for custom components (/components directory). It then merges them into a single, unified schema that represents all available components for the project.
  2. Workspace Analysis: It understands the workspace structure, watching for file changes and providing this information to other extensions.
  3. Central API Hub: It exposes a consistent API, both through direct extension exports (for performance) and VS Code commands (for loose coupling), allowing other extensions like the Language Support and Designer to access its services.
  4. AST Manager (Future): It will be responsible for parsing .rxml files into an Abstract Syntax Tree (AST) and serving it to the Visual Designer, enabling real-time synchronization.

Usage (For Extension Developers)

Other extensions can interact with the bridge in two primary ways:

1. Via Commands (Recommended for loose coupling)

This is the safest way to interact with the bridge.

import * as vscode from "vscode";

// Get the complete, merged RXML schema
const mergedSchema = await vscode.commands.executeCommand(
  "ramses.bridge.getSchema",
  {
    schemaType: "rxml-merged",
  }
);

// Get only the user-defined components
const userComponents = await vscode.commands.executeCommand(
  "ramses.bridge.getUserComponents"
);

// Force the bridge to rescan the /components directory
await vscode.commands.executeCommand("ramses.bridge.rescanComponents");

2. Direct API Access (For tightly-coupled extensions)

For higher performance, extensions running in the same host can get the bridge's exported API directly.

import * as vscode from "vscode";

export async function activate(context: vscode.ExtensionContext) {
  const bridgeExt = vscode.extensions.getExtension("ramses-bridge-ext");

  if (bridgeExt) {
    // It's crucial to activate the extension to get its exports
    const bridgeApi = await bridgeExt.activate();

    // Now you can access its functions directly
    const schema = bridgeApi.getSchema("rxml-merged");
    console.log(
      `Loaded schema with ${Object.keys(schema.components).length} components.`
    );

    // Subscribe to schema updates (e.g., when a user adds a new component)
    const disposable = bridgeApi.onSchemaUpdated((schemaType) => {
      console.log(`The ${schemaType} schema was updated!`);
      // Reload your UI or re-validate documents here
    });

    context.subscriptions.push(disposable);
  }
}
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft