================
CODE SNIPPETS
================
TITLE: Build and Run Electron Example
DESCRIPTION: Clones the Theia repository, installs dependencies, builds the Electron example, downloads plugins, and starts the application. Requires Node.js and npm.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#_snippet_3
LANGUAGE: sh
CODE:
```
git clone https://github.com/eclipse-theia/theia \
&& cd theia \
&& npm install \
&& npm run build:electron \
&& npm run download:plugins \
&& npm run start:electron
```
--------------------------------
TITLE: Build and Run Browser Example
DESCRIPTION: Clones the Theia repository, installs dependencies, builds the browser example, downloads plugins, and starts the application. Assumes a standard Node.js environment.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#_snippet_2
LANGUAGE: sh
CODE:
```
git clone https://github.com/eclipse-theia/theia \
&& cd theia \
&& npm install \
&& npm run build:browser \
&& npm run download:plugins \
&& npm run start:browser
```
--------------------------------
TITLE: Cloning and Setup
DESCRIPTION: Clones the theia-playwright-template repository, navigates into the directory, and installs project dependencies using yarn.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/examples/playwright/docs/GETTING_STARTED.md#_snippet_0
LANGUAGE: bash
CODE:
```
git clone git@github.com:eclipse-theia/theia-playwright-template.git
cd theia-playwright-template
yarn
```
--------------------------------
TITLE: Run Electron-Based Example Application
DESCRIPTION: Starts the Electron-based example application. This command is a shortcut for starting the Electron build.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#_snippet_17
LANGUAGE: sh
CODE:
```
npm start:electron
```
--------------------------------
TITLE: Getting Started Widget Functionality
DESCRIPTION: The getting-started widget in the @theia/getting-started extension provides several key functionalities for new users. These include commands for opening files, folders, and workspaces, a list of recently accessed workspaces, commands to open preferences and keyboard shortcuts, and links to relevant documentation and guides.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/packages/getting-started/README.md#_snippet_0
LANGUAGE: typescript
CODE:
```
/**
* The getting-started widget provides useful commands and functionality for quickly getting up to speed with the application.
* For example:
* - open commands: commands which are used to open files, folders, and workspaces quickly.
* - recent workspaces: recently used workspaces are listed for easy and quick access.
* - settings commands: commands which are used to open the preferences and keyboard shortcuts widgets.
* - help: useful links pointing to documentation and/or guides.
*/
```
--------------------------------
TITLE: Run Browser Example with Gitpod
DESCRIPTION: Starts the Theia development environment on Gitpod by prefixing the GitHub repository URL. Gitpod handles cloning, building, and setting up the workspace.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#_snippet_6
LANGUAGE: sh
CODE:
```
https://gitpod.io/#https://github.com/eclipse-theia/theia
```
LANGUAGE: sh
CODE:
```
npm run start:browser ../.. --hostname 0.0.0.0
```
--------------------------------
TITLE: Run Browser-Based Example Application
DESCRIPTION: Starts the backend of the browser-based example application, typically listening on port 3000. The frontend is then accessible via a browser.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#_snippet_15
LANGUAGE: sh
CODE:
```
npm run start
```
--------------------------------
TITLE: Download Plugins
DESCRIPTION: Downloads necessary plugins for Theia example applications. This command should be run after installing dependencies.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#_snippet_4
LANGUAGE: sh
CODE:
```
npm run download:plugins
```
--------------------------------
TITLE: Run Browser Example with SSL
DESCRIPTION: Builds and runs the browser example with SSL enabled. Requires SSL certificate and key files. Starts the backend on port 3000.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#_snippet_5
LANGUAGE: sh
CODE:
```
git clone https://github.com/eclipse-theia/theia \
&& cd theia \
&& npm install \
&& npm run download:plugins \
&& npm run build:browser \
&& npm run start:browser --ssl --cert /path/to/cert.crt --certkey /path/to/certkey.key
```
--------------------------------
TITLE: Rebuild for Browser Example
DESCRIPTION: Rolls back native Node.js package changes made for Electron builds, ensuring compatibility with the browser example. Should be run before starting the browser example if Electron was previously built.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#_snippet_16
LANGUAGE: sh
CODE:
```
npm run rebuild:browser
```
--------------------------------
TITLE: Install Dependencies and Compile TypeScript
DESCRIPTION: Installs all project dependencies using npm and compiles all TypeScript packages within the monorepo. This is a fundamental step before building examples.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#_snippet_9
LANGUAGE: sh
CODE:
```
npm install
npm run compile
```
--------------------------------
TITLE: Build Playwright Library and Dependencies
DESCRIPTION: This command builds the Playwright library, installs all necessary dependencies including browsers like chromium, and sets up the testing environment within the examples/playwright directory.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/examples/playwright/docs/GETTING_STARTED.md#_snippet_2
LANGUAGE: bash
CODE:
```
cd examples/playwright
yarn build
```
--------------------------------
TITLE: Build Everything
DESCRIPTION: A comprehensive command that installs dependencies, links and builds all TypeScript packages, lints the code, and builds all example applications.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#_snippet_11
LANGUAGE: sh
CODE:
```
npm run all
```
--------------------------------
TITLE: Build and Run Theia on Windows
DESCRIPTION: Clones the Theia repository, installs dependencies, builds the browser version, and starts the browser application. Requires Git Bash or a similar environment.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#_snippet_29
LANGUAGE: bash
CODE:
```
git clone https://github.com/eclipse-theia/theia.git \
&& cd theia \
&& npm install \
&& npm run build:browser \
&& npm run start:browser
```
--------------------------------
TITLE: API Documentation for @theia/getting-started
DESCRIPTION: Provides API documentation for the @theia/getting-started extension, detailing its modules and functionalities for developers integrating or extending Theia.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/packages/getting-started/README.md#_snippet_1
LANGUAGE: APIDOC
CODE:
```
API documentation for @theia/getting-started:
https://eclipse-theia.github.io/theia/docs/next/modules/getting_started.html
```
--------------------------------
TITLE: Build Example Applications
DESCRIPTION: Builds specific example applications (browser-only, Electron) or all example applications at once. Relies on npm scripts defined in package.json.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#_snippet_10
LANGUAGE: sh
CODE:
```
npm run build:browser
npm run build:browser-only
npm run build:electron
# build all example applications at once:
npm run build:applications
```
--------------------------------
TITLE: Documentation and Getting Started Improvements
DESCRIPTION: Updates to project documentation, including profiling guides, debug launch configurations, and plugin host debugging. Also includes usability improvements for the getting started widget.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/changelogs/CHANGELOG-2019.md#_snippet_91
LANGUAGE: typescript
CODE:
```
Updated documentation on how to profile [#6087](https://github.com/eclipse-theia/theia/pull/6087)
Updated documentation to include new debug launch configurations [#6241](https://github.com/eclipse-theia/theia/pull/6241)
Updated documentations on how to debug the plugin host [#6081](https://github.com/eclipse-theia/theia/pull/6081)
Added ability to tab links in the getting-started widget [#6162](https://github.com/eclipse-theia/theia/pull/6162)
```
--------------------------------
TITLE: Playwright: Getting Started Documentation
DESCRIPTION: Improves the getting started documentation for Playwright, making it easier for new users to begin using the testing framework with Theia.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/changelogs/CHANGELOG-2022.md#_snippet_170
LANGUAGE: markdown
CODE:
```
[
// playwright] improved getting started documentation [#11094](https://github.com/eclipse-theia/theia/pull/11094)
]
```
--------------------------------
TITLE: Watch Example Applications
DESCRIPTION: Monitors changes in the frontend or backend of example applications and triggers rebuilds automatically. Allows for rapid iteration during development.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#_snippet_20
LANGUAGE: sh
CODE:
```
# either
npm run watch:browser
# or
npm run watch:electron
```
--------------------------------
TITLE: Example: Adding a new dependency and preparing for analysis
DESCRIPTION: Illustrates the process of creating a temporary directory, initializing an npm project, installing a specific version of a package ('getmac@1.4.6'), cleaning build artifacts, installing production dependencies via yarn, and then using synp to generate a package-lock.json.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/__wiki__/Registering-CQs.md#_snippet_5
LANGUAGE: bash
CODE:
```
mkdir /tmp/a; cd /tmp/a
npm init -y
npm install getmac@1.4.6 --save-dep
rm -rf node_modules/ package-lock.json
yarn install --production
synp -s yarn.lock
```
--------------------------------
TITLE: Build Changes
DESCRIPTION: Commands to install npm dependencies and build the project, ensuring all extensions are correctly compiled.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Publishing.md#_snippet_7
LANGUAGE: bash
CODE:
```
npm install && npm run build
```
--------------------------------
TITLE: Enable Playwright UI Mode via CLI
DESCRIPTION: Starts Playwright tests in UI Mode, providing an interactive development experience with features like watch mode and tracing. This mode is recommended for advanced test development.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/examples/playwright/docs/GETTING_STARTED.md#_snippet_7
LANGUAGE: bash
CODE:
```
yarn ui-tests --ui
```
--------------------------------
TITLE: Install Windows Build Tools
DESCRIPTION: Installs the necessary build tools for Native Node modules on Windows. This command should be run in PowerShell as an Administrator.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#_snippet_30
LANGUAGE: powershell
CODE:
```
npm --add-python-to-path install --global --production windows-build-tools
```
--------------------------------
TITLE: Llamafile Configuration Example
DESCRIPTION: Example JSON configuration for setting up Llamafiles in Theia IDE. This includes the name, URI, and port for each Llamafile.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/packages/ai-llamafile/README.md#_snippet_0
LANGUAGE: json
CODE:
```
{
"ai-features.llamafile.llamafiles": [
{
"name": "MyLlamaFile",
"uri": "file:///path/to/my.llamafile",
"port": 30000
}
]
}
```
--------------------------------
TITLE: Theia Installer Documentation and Blueprint
DESCRIPTION: References to a documentation Pull Request (PR) for the Theia Installer and an example/blueprint PR, indicating progress and proposed changes for the installer's setup and structure.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/__wiki__/Dev-Meetings-2021.md#_snippet_74
LANGUAGE: markdown
CODE:
```
- see documentation PR: https://github.com/theia-ide/theia-website/pull/133
- see example/blueprint PR: https://github.com/eclipse-theia/theia-example/pull/24
```
--------------------------------
TITLE: Run Backend Server
DESCRIPTION: Starts the backend server. For the browser target, a server starts on http://localhost:3000 by default. For the Electron target, a server starts on `localhost` with a dynamically allocated port. Arguments are passed directly to the server; use `--help` for supported options.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/dev-packages/cli/README.md#_snippet_11
LANGUAGE: bash
CODE:
```
theia start
```
--------------------------------
TITLE: Install Xcode Command Line Tools on macOS
DESCRIPTION: Installs the necessary Xcode command line tools for building and running Theia on macOS. This command is essential for macOS development.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#_snippet_34
LANGUAGE: sh
CODE:
```
xcode-select --install
```
--------------------------------
TITLE: Run Specific UI Test File Headless via CLI
DESCRIPTION: Allows running a single Playwright test file or a group of tests matching a pattern in headless mode. Replace `` with the actual file path or use `-g` with a partial file name.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/examples/playwright/docs/GETTING_STARTED.md#_snippet_4
LANGUAGE: bash
CODE:
```
yarn ui-tests
```
LANGUAGE: bash
CODE:
```
yarn ui-tests -g ""
```
--------------------------------
TITLE: Run UI Tests Headful via CLI
DESCRIPTION: Executes all Playwright UI tests with a visible browser window, allowing for direct observation of the test execution. Useful for debugging and understanding test flows.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/examples/playwright/docs/GETTING_STARTED.md#_snippet_5
LANGUAGE: bash
CODE:
```
yarn ui-tests-headful
```
--------------------------------
TITLE: Headless Plugin Entry Point (headless.js)
DESCRIPTION: Example of a headless plugin's entry point script, loaded outside of a frontend connection. It demonstrates activating and using Theia's API provider sample.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/sample-plugins/sample-namespace/plugin-gotd/README.md#_snippet_1
LANGUAGE: javascript
CODE:
```
const { injectable, inject } = require('inversify');
const { GreetingOfTheDayService } = require('@theia/api-provider-sample');
module.exports = {
activate: async (context) => {
console.log('Headless plugin activated');
const gotdService = context.getService(GreetingOfTheDayService);
if (gotdService) {
const greeting = await gotdService.getGreeting();
console.log(`Greeting: ${greeting}`);
}
}
};
```
--------------------------------
TITLE: Theia Example Applications - VS Code Extension Alignment
DESCRIPTION: Proposal to create Theia example applications that more closely resemble VS Code's setup, by utilizing built-in VS Code extensions where possible. This aims to resolve conflicts with Theia extensions and improve the developer experience.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/__wiki__/Dev-Meetings-2019.md#_snippet_27
LANGUAGE: markdown
CODE:
```
Add VS Code like examples (examples/browser have some theia extensions that are colliding with usage of VS Code extensions so would be nice to have a reduced Theia example close to VS Code. BTW a lot of PR are saying as well: first, drop these extensions from the examples so would be nice to have a closer example)
- this means basically to have our example applications use the built-in VS Code extensions as much as possible, instead of the equivalent Theia extensions. e.g. for textmate support, node-debug. We probably can't switch to the VS Code version of git short term, but longer term there would be benefits.
```
--------------------------------
TITLE: MCP Servers Configuration Example
DESCRIPTION: Provides an example of how to configure various MCP servers within the Theia IDE's preferences. This includes specifying the command, arguments, environment variables, and autostart behavior for each server.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/packages/ai-mcp/README.md#_snippet_0
LANGUAGE: json
CODE:
```
{
"ai-features.mcp.mcpServers": {
"memory": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-memory"
],
"autostart": false
},
"brave-search": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-brave-search"
],
"env": {
"BRAVE_API_KEY": "YOUR_API_KEY"
}
},
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"ABSOLUTE_PATH_TO_ALLOWED_DIRECTORY",
]
},
"git": {
"command": "uv",
"args": [
"--directory",
"/path/to/repo",
"run",
"mcp-server-git"
]
},
"git2": {
"command": "uvx",
"args": [
"mcp-server-git",
"--repository",
"/path/to/otherrepo"
]
}
}
}
```
--------------------------------
TITLE: Finding Issues to Contribute
DESCRIPTION: Guides new contributors on how to find suitable issues to start contributing to the Eclipse Theia project, including links to 'good first issue' and 'beginner friendly issue' labels.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/README.md#_snippet_5
LANGUAGE: markdown
CODE:
```
- First time contributing to open source? Pick a [good first issue](https://github.com/eclipse-theia/theia/labels/good%20first%20issue) to get you familiar with GitHub contributing process.
- First time contributing to Theia? Pick a [beginner friendly issue](https://github.com/eclipse-theia/theia/labels/beginners) to get you familiar with codebase and our contributing process.
```
--------------------------------
TITLE: Vanilla Desktop Installers Request
DESCRIPTION: Acknowledgement of the high demand for vanilla desktop installers for Theia.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/__wiki__/Dev-Meetings-2020.md#_snippet_48
LANGUAGE: markdown
CODE:
```
- Anton: vanilla desktop installers is a most popular request by now: https://github.com/eclipse-theia/theia/issues/5481#issue-456325266
```
--------------------------------
TITLE: Theia Application Installers and Packaging
DESCRIPTION: Proposal to continue work on Theia example application installers for various platforms. This includes discussions on testing, marketing, an update feature for end-users, positioning against competitors like Eclipse Classic and Che, and the inclusion of VS Code built-in extensions for language support. Considerations for a browser version and naming conventions are also mentioned.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/__wiki__/Dev-Meetings-2020.md#_snippet_2
LANGUAGE: markdown
CODE:
```
[Maximilian Koegel](https://github.com/koegel) is proposing, on behalf of ST Microelectronics, to continue the work on our Theia example application installers for various platforms. See [issue](https://github.com/eclipse-theia/theia/issues/8707). He agreed to come talk about this initiative with us
- [marc] thanks Maximilian for coming to our dev-meeting and talking with us about our example packaged application. Here are some notes I have taken. I think we have more questions than answers, but I may just have missed some of the later category. Anyone feel free to add or correct:
- work planned to happen over the next 3 months. However ST is also putting efforts on their own product, so limited time to spend.
- a few key aspects: testing, marketing efforts (with help from Brian King of the EF), update feature (for end-user to be able to update their Theia app)
- Marketing: Good enough to self-host? What do we say this is for? Desktop IDE good enough to locally work on Eclipse Theia? (self dog-fooding as step zero - partially achieved through use of Gitpod by many committers for Theia-related work)
- How to position vs Eclipse classic, Che?
- Position: ATM this is a bare-bone example Theia application for the Desktop, available in the form of various OS-specific packages.
- Agree on which group of people; looking at Theia as platform, want to explore it ASAP, get an installer
- Position it from Theia perspective. what did not have before? what now?
- danger: to over-promise. Need to be careful about claiming to be vscode competitor
- purpose: run it as replacement of vscode or to see what Theia is capable to do as platform?
- misc:
- For it to be useful OOTB we will need to add a set of so-called [vscode built-in extensions](https://github.com/eclipse-theia/theia/blob/master/package.json#L85-L154), that provide the grammars used to color-highlight the source code in various languages and much more. For some languages like `JS/TS`, LSP support is provided by a build-in ext.
- The main challenge was in figuring-out the various packagings and in some cases their signing, and now that it's nicely done, we can enhance the example application easily.
- considerations:
- make available a browser version of the example app too, e.g. for easy inclusion in `docker` images.
- name this example application. Something that flows better than "packaged and signed example Theia application" :)
```
--------------------------------
TITLE: Install npm Packages with Unsafe Perm
DESCRIPTION: Installs npm packages while bypassing permission checks, which can resolve errors encountered when installing with root privileges.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#_snippet_36
LANGUAGE: sh
CODE:
```
npm install --unsafe-perm
```
--------------------------------
TITLE: Example Prompt for Search
DESCRIPTION: Demonstrates how to use an MCP server's tool function within a prompt template. This specific example shows how to invoke the Brave Search functionality.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/packages/ai-mcp/README.md#_snippet_1
LANGUAGE: md
CODE:
```
~{mcp_brave-search_brave_web_search}
```
--------------------------------
TITLE: Changelog Format Example
DESCRIPTION: Illustrates the required format for updating the changelog during an Eclipse Theia release. It shows how to structure version headers, entries with prefixes, past tense descriptions, links to pull requests, and a separate section for breaking changes.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Publishing.md#_snippet_4
LANGUAGE: md
CODE:
```
## 1.55.0 - 10/31/2024
[core] added support for Node 20.x [#1234](https://github.com/eclipse-theia/theia/pull/1234) - Contributed on behalf of x
[Breaking Changes:]
```
--------------------------------
TITLE: Build TypeScript Sources
DESCRIPTION: Compiles all TypeScript source files in the project. Dependencies must be installed prior to running this command.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#_snippet_12
LANGUAGE: sh
CODE:
```
npm run compile
```
--------------------------------
TITLE: Frontend Plugin Entry Point (frontend/index.ts)
DESCRIPTION: Example of a frontend plugin's entry point, typically used for UI-related logic or interacting with frontend services. This example is minimal.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/sample-plugins/sample-namespace/plugin-gotd/README.md#_snippet_3
LANGUAGE: typescript
CODE:
```
import { injectable, inject } from 'inversify';
import { FrontendApplicationContribution } from '@theia/core/lib/common/plugin-api';
export default class MyFrontendPlugin implements FrontendApplicationContribution {
async initialize(): Promise {
console.log('Frontend plugin initialized');
}
}
```
--------------------------------
TITLE: Start MCP Server Command
DESCRIPTION: Allows users to start an MCP server by selecting from a list of configured servers via the command palette.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/packages/ai-mcp-ui/README.md#_snippet_0
LANGUAGE: typescript
CODE:
```
{
"command": "mcp.startserver",
"category": "MCP",
"label": "MCP: Start MCP Server"
}
```
--------------------------------
TITLE: Backend Plugin Entry Point (backend.js)
DESCRIPTION: Example of a backend plugin's entry point script, loaded within a frontend connection's backend process. It also demonstrates using the Greeting of the Day API.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/sample-plugins/sample-namespace/plugin-gotd/README.md#_snippet_2
LANGUAGE: javascript
CODE:
```
const { injectable, inject } = require('inversify');
const { GreetingOfTheDayService } = require('@theia/api-provider-sample');
module.exports = {
activate: async (context) => {
console.log('Backend plugin activated');
const gotdService = context.getService(GreetingOfTheDayService);
if (gotdService) {
const greeting = await gotdService.getGreeting();
console.log(`Greeting: ${greeting}`);
}
}
};
```
--------------------------------
TITLE: Monaco Editor Initialization with Overrides
DESCRIPTION: Demonstrates how to initialize Monaco services with custom overrides during the first call to `StaticServices.initialize`.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Migration.md#_snippet_14
LANGUAGE: typescript
CODE:
```
import { StaticServices } from '@theia/monaco-editor-core';
StaticServices.initialize({
// Custom service overrides here
});
```
--------------------------------
TITLE: Run UI Tests Headless via CLI
DESCRIPTION: Executes all Playwright UI tests in a headless mode. This is the default method for running automated tests without a visible browser.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/examples/playwright/docs/GETTING_STARTED.md#_snippet_3
LANGUAGE: bash
CODE:
```
yarn ui-tests
```
--------------------------------
TITLE: Announcement for Base Release
DESCRIPTION: This snippet provides the markdown text to announce the start of a base release in a project discussion forum.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Publishing.md#_snippet_5
LANGUAGE: md
CODE:
```
The release will start now. We’ll post an update once it has completed.
```
--------------------------------
TITLE: Desktop Installers and Website Linking
DESCRIPTION: Update on the completion of desktop installers and a discussion about linking to downloads or repositories from the main GitHub repo or Theia website.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/__wiki__/Dev-Meetings-2020.md#_snippet_7
LANGUAGE: markdown
CODE:
```
- [Rob] Completed desktop installers: https://download.eclipse.org/theia/
- From here Arm will take a backseat and I believe Brian King is keen to take this to the next level (branding, plugins, etc.)
- Do we want to link to the downloads or repo from the main GitHub repo or the Theia website?
- sure, sounds like a good idea
```
--------------------------------
TITLE: Rebuild Everything
DESCRIPTION: Rebuilds all TypeScript packages and example applications within the Theia project. This command ensures all components are up-to-date.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#_snippet_18
LANGUAGE: sh
CODE:
```
npm run build
```
--------------------------------
TITLE: Theia Installer Development
DESCRIPTION: This entry covers the progress on developing installers for vanilla Theia applications across multiple platforms. The installers are now successfully building, and the next steps involve signing and deploying them. Access to Eclipse Foundation agents has been obtained for signing packages.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/__wiki__/Dev-Meetings-2020.md#_snippet_28
LANGUAGE: markdown
CODE:
```
- [Rob] Installer for a vanilla Theia app: good progress being made. The installers for our 3 platforms now build. Next step: have them signed and deployed (not necessarily in this order). Repo:
https://github.com/eclipse-theia/theia-example
- installers / packaging of a demo Theia app: obtained access to Eclipse Foundation `agents`, used to sign packages for our 3 main platforms.
```
--------------------------------
TITLE: Theia Plugin Manifest (package.json)
DESCRIPTION: Demonstrates how to declare entry-point scripts for different Theia plugin host contexts (headless and backend) using the 'theiaPlugin' and 'main' properties.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/sample-plugins/sample-namespace/plugin-gotd/README.md#_snippet_0
LANGUAGE: json
CODE:
```
{
"name": "theia-example-headless-plugin",
"version": "0.0.1",
"private": true,
"dependencies": {
"@theia/api-provider-sample": "*"
},
"theiaPlugin": {
"frontend": {
"entryPoint": "./frontend/index.ts"
},
"headless": {
"entryPoint": "./headless.js"
},
"backend": {
"entryPoint": "./backend.js"
}
},
"main": "./backend.js"
}
```
--------------------------------
TITLE: Extension Installation/Uninstallation
DESCRIPTION: Discussion on enabling extension installation and uninstallation without requiring a frontend rebuild via webpack.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/__wiki__/Dev-Meetings-2018.md#_snippet_37
LANGUAGE: markdown
CODE:
```
## Minutes 2018-02-20
- Florent about installing/uninstalling extensions without requiring rebuilding the frontend in webpack. Will open a ticket to further discuss.
```
--------------------------------
TITLE: Run Specific UI Test File Headful via CLI
DESCRIPTION: Runs a particular Playwright test file in headful mode, displaying the browser during execution. Useful for debugging specific test cases.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/examples/playwright/docs/GETTING_STARTED.md#_snippet_6
LANGUAGE: bash
CODE:
```
yarn ui-tests-headful
```
--------------------------------
TITLE: Build Playwright Library and Dependencies
DESCRIPTION: Builds the Playwright library, tests, and installs necessary dependencies like Chromium within the examples/playwright directory.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/examples/playwright/docs/DEVELOPING.md#_snippet_1
LANGUAGE: bash
CODE:
```
cd examples/playwright
npm run build
```
--------------------------------
TITLE: Socket.io Sticky Sessions for Load Balancing
DESCRIPTION: Configuration note for deploying Theia with Socket.io behind a load balancer, requiring sticky sessions.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Migration.md#_snippet_15
LANGUAGE: shell
CODE:
```
# Enable sticky-sessions in your load balancer configuration
# Refer to socket.io documentation for specific implementation details.
```
--------------------------------
TITLE: User Documentation Updates
DESCRIPTION: This snippet notes the addition of a 'user docu' section to the user getting started documentation, providing a link to the updated page.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/__wiki__/Dev-Meetings-2022.md#_snippet_14
LANGUAGE: markdown
CODE:
```
- [Jonas] Added section "user docu" https://theia-ide.org/docs/user_getting_started/
```
--------------------------------
TITLE: Switch Xcode Command Line Tools Directory on macOS
DESCRIPTION: Fixes an error on macOS where the system incorrectly points to a command line tools instance instead of the full Xcode installation. This command updates the active developer directory.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#_snippet_35
LANGUAGE: sh
CODE:
```
sudo xcode-select --switch /Library/Developer/CommandLineTools
```
--------------------------------
TITLE: Task Configuration Example
DESCRIPTION: Defines a task to list workspace files recursively using a shell command. Includes platform-specific configurations for Windows.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/packages/task/README.md#_snippet_0
LANGUAGE: json
CODE:
```
{
"label": "Test task - list workspace files recursively",
"type": "shell",
"command": "ls",
"args": [
"-alR"
],
"options": {
"cwd": "${workspaceFolder}"
},
"windows": {
"command": "cmd.exe",
"args": [
"/c",
"dir",
"/s"
]
}
}
```
--------------------------------
TITLE: Example Foo Plugin API Provider Implementation
DESCRIPTION: Demonstrates how to implement the `ExtPluginApiProvider` interface to expose custom API objects to different plugin hosts. It shows how to specify initialization paths and functions for frontend and backend/headless plugins.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/packages/plugin-ext/doc/how-to-add-new-custom-plugin-api.md#_snippet_0
LANGUAGE: typescript
CODE:
```
import { injectable } from '@theia/core/lib/common/di';
import { ExtPluginApiProvider, ExtPluginApi } from '@theia/plugin-ext/lib/api/plugin-api-provider';
import * as path from 'path';
@injectable()
export class FooExtPluginApiProvider implements ExtPluginApiProvider {
provideApi(): ExtPluginApi {
return {
frontendExtApi: {
initPath: '/path/to/foo/api/implementation.js',
initFunction: 'fooInitializationFunction',
initVariable: 'foo_global_variable'
},
backendInitPath: path.join(__dirname, 'foo-init'),
// Provide the same API to headless plugins, too (or a different/subset API)
headlessInitPath: path.join(__dirname, 'foo-init')
};
}
}
```
--------------------------------
TITLE: Run API Tests
DESCRIPTION: Starts the backend server and runs API tests against it. The command terminates after tests are completed. It accepts the same arguments as the `start` command, plus additional arguments for specifying test files, enabling inspection, or generating test coverage.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/dev-packages/cli/README.md#_snippet_14
LANGUAGE: bash
CODE:
```
theia test
```
--------------------------------
TITLE: Install @theia/cli
DESCRIPTION: Installs the @theia/cli package as a development dependency using either yarn or npm.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/dev-packages/cli/README.md#_snippet_0
LANGUAGE: bash
CODE:
```
yarn add @theia/cli@next --dev
```
LANGUAGE: bash
CODE:
```
npm install @theia/cli@next --save-dev
```
--------------------------------
TITLE: Install theiaext as a dev dependency
DESCRIPTION: This JSON snippet shows how to install the '@theia/ext-scripts' package as a development dependency in a project's package.json. This makes the 'theiaext' command available for use.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/dev-packages/private-ext-scripts/README.md#_snippet_1
LANGUAGE: json
CODE:
```
{
"name": "@theia/myextension",
"devDependencies": {
"@theia/ext-scripts": "^0.1.1"
}
}
```
--------------------------------
TITLE: React 18: ReactDOM.render Replacement
DESCRIPTION: Demonstrates the updated way to render React applications in version 18, replacing the deprecated `ReactDOM.render` with `createRoot`.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Migration.md#_snippet_10
LANGUAGE: javascript
CODE:
```
import { createRoot } from 'react-dom/client';
const container = document.getElementById('root');
const root = createRoot(container);
root.render();
```
--------------------------------
TITLE: Install from VSIX Command
DESCRIPTION: Adds the `Install from VSIX...` command to the vsx-registry, enabling users to install local extensions. Also includes toolbar menu support for the extensions-view.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/changelogs/CHANGELOG-2021.md#_snippet_300
LANGUAGE: typescript
CODE:
```
/**
* @description Adds `Install from VSIX...` command to install a local extension.
* @description Adds toolbar menu support for the extensions-view.
*/
// Related to issue #9184
```
--------------------------------
TITLE: Run Electron Startup Performance Script
DESCRIPTION: Executes the script to measure the startup performance of the Theia frontend in an Electron environment. This requires building the Electron example first. The script accepts parameters for measurement name, output folder, workspace path, number of runs, and debug logging.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/scripts/performance/README.md#_snippet_1
LANGUAGE: bash
CODE:
```
yarn run performance:startup:electron
```
LANGUAGE: bash
CODE:
```
npm install
npm run build:electron
```
LANGUAGE: bash
CODE:
```
node electron-performance.js --name "Electron Test" --folder "custom_electron" --workspace "/path/to/theia/workspace" --runs 15 --debug true
```
--------------------------------
TITLE: Node Native Addon Example (C++)
DESCRIPTION: Example C++ code demonstrating how to create a Node.js native addon using Node-API. This snippet would typically be part of the `ffmeg.node` implementation to interact with ffmpeg.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/dev-packages/ffmpeg/README.md#_snippet_0
LANGUAGE: c++
CODE:
```
#include
Napi::Value GetCodecList(const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
// Placeholder for actual ffmpeg interaction logic
// This would involve calling ffmpeg libraries to get codec info
return Napi::Array::New(env);
}
Napi::Object Init(Napi::Env env, Napi::Object exports) {
exports.Set(
Napi::String::New(env, "getCodecList"),
Napi::Function::New(env, GetCodecList)
);
return exports;
}
NODE_API_MODULE(NODE_GYP_MODULE_NAME, Init)
```
--------------------------------
TITLE: Theia Text Editor Test
DESCRIPTION: A system test for the Theia text editor that verifies undo/redo functionality and the dirty state of the editor. It demonstrates opening a workspace, editing text, performing undo/redo operations, saving, and reopening the editor.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/examples/playwright/docs/GETTING_STARTED.md#_snippet_1
LANGUAGE: typescript
CODE:
```
test('should undo and redo text changes and correctly update the dirty state', async ({ playwright, browser }) => {
// 1. set up workspace contents and open Theia app
const ws = new TheiaWorkspace([path.resolve(__dirname, 'resources/sample-files1']);
app = await TheiaAppLoader.load( { playwright, browser }, ws);
// 2. open Theia text editor
const sampleTextEditor = await app.openEditor(
'sample.txt',
TheiaTextEditor
);
// 3. make a change and verify contents and dirty
await sampleTextEditor.replaceLineWithLineNumber('change', 1);
expect(await sampleTextEditor.textContentOfLineByLineNumber(1)).toBe(
'change'
);
expect(await sampleTextEditor.isDirty()).toBe(true);
// 4. undo and verify contents and dirty state
await sampleTextEditor.undo(2);
expect(await sampleTextEditor.textContentOfLineByLineNumber(1)).toBe(
'this is just a sample file'
);
expect(await sampleTextEditor.isDirty()).toBe(false);
// 5. undo and verify contents and dirty state
await sampleTextEditor.redo(2);
expect(await sampleTextEditor.textContentOfLineByLineNumber(1)).toBe(
'change'
);
expect(await sampleTextEditor.isDirty()).toBe(true);
// 6. save verify dirty state
await sampleTextEditor.save();
expect(await sampleTextEditor.isDirty()).toBe(false);
await sampleTextEditor.close();
// 7. reopen editor and verify dirty state
const reopenedEditor = await app.openEditor('sample.txt', TheiaTextEditor);
expect(await reopenedEditor.textContentOfLineByLineNumber(1)).toBe(
'change'
);
await reopenedEditor.close();
});
```
--------------------------------
TITLE: Eclipse Theia IP Guide - Dash-licenses Integration
DESCRIPTION: This section details the integration of the Eclipse Foundation's dash-licenses tool within the Theia project. It highlights the main Node.js script responsible for fetching and running dash-licenses, its 'auto-review' mode for ticket creation, and the dependency on a GitLab token for committers.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/__wiki__/Eclipse-Theia-contributors:-Intellectual-Property-(IP)-guide.md#_snippet_3
LANGUAGE: APIDOC
CODE:
```
TheiaDashLicensesIntegration:
description: Integrates Eclipse Foundation's dash-licenses tool for automated third-party license checks.
main_file: scripts/check_3pp_licenses.js
script_details:
language: Node.js
functionality: Fetches and runs dash-licenses, utilizing 'auto-review' mode when possible.
auto_review_mode:
description: Automatically opens individual tickets on EF GitLab for dependencies flagged by dash-licenses.
requirement: Requires an Eclipse Foundation GitLab token (DASH_LICENSES_PAT environment variable).
limitation: Only functional for PRs originating from users with write-access (committers).
related_files:
- package.json (for license:check and license:check:review scripts)
- dependency-check-baseline.json (for filtering false positives)
```
--------------------------------
TITLE: Theia Extension Configuration for Electron Main Process
DESCRIPTION: Demonstrates how to configure Theia extensions to contribute to the Electron main process, alongside preload scripts for the renderer process. This is necessary for Electron-related functionality that needs to run in the main process.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Migration.md#_snippet_8
LANGUAGE: json
CODE:
```
{
"theiaExtensions": [
{
"preload": "lib/electron-browser/preload",
"electronMain": "lib/electron-main/electron-main-module"
}
]
}
```
--------------------------------
TITLE: Configure and Run API Tests
DESCRIPTION: Starts the application with a specified workspace directory, loads VS Code extensions from a given path, and runs test files matching a glob pattern. Use `theia test --help` for more options, with test-specific options prefixed by `--test-`.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/dev-packages/cli/README.md#_snippet_15
LANGUAGE: bash
CODE:
```
theia test . --test-spec=./test/*.spec.js --plugins=./plugins
```
--------------------------------
TITLE: Build Theia Application
DESCRIPTION: Builds the main Theia application by installing dependencies and running the build script in the root directory.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/examples/playwright/docs/DEVELOPING.md#_snippet_0
LANGUAGE: bash
CODE:
```
npm install && npm run build
```
--------------------------------
TITLE: Debug IPC Servers
DESCRIPTION: To debug IPC servers, pass a `---inspect=` argument to the backend server. The example shows how to inspect the nsfw watcher process. All Node.js inspector flags are supported. You can find the `server-name` by running the backend with `--log-level=debug`.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#_snippet_23
LANGUAGE: sh
CODE:
```
npx your-backend-command --nsfw-watcher-inspect=0
```
--------------------------------
TITLE: Theia CLI: Download Plugins
DESCRIPTION: Provides an example of how to use the `@theia/cli` script `download:plugins` in a `package.json` file. This command is used to fetch plugins remotely, which is relevant when extensions are no longer bundled with example applications.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/changelogs/CHANGELOG-2020.md#_snippet_256
LANGUAGE: json
CODE:
```
{
"scripts": {
"download:plugins": "theia download:plugins"
}
}
```
--------------------------------
TITLE: Core: ApplicationShellOptions Handling
DESCRIPTION: Ensures `ApplicationShellOptions` are properly applied during initialization, improving the setup and configuration of the application shell.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/changelogs/CHANGELOG-2023.md#_snippet_27
LANGUAGE: typescript
CODE:
```
// Core internal implementation detail, no direct user code example.
```
--------------------------------
TITLE: Monaco Editor Service Access (New)
DESCRIPTION: Illustrates the new method for accessing Monaco services using `StaticServices.get` with service identifiers.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Migration.md#_snippet_13
LANGUAGE: typescript
CODE:
```
import { StaticServices } from '@theia/monaco-editor-core';
import { ITextModelService } from '@theia/monaco-editor-core/esm/vs/editor/common/services/model';
const modelService = StaticServices.get(ITextModelService);
// Use modelService...
```
--------------------------------
TITLE: Install synp for package-lock.json generation
DESCRIPTION: Installs the synp tool globally using npm, which is used to create a package-lock.json file from a yarn.lock file, a requirement for the ClearlyDefined tool.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/__wiki__/Registering-CQs.md#_snippet_2
LANGUAGE: bash
CODE:
```
npm install -g synp
```
--------------------------------
TITLE: Singleton Scope for Dependency Injection
DESCRIPTION: Illustrates the correct way to bind a contribution to a singleton scope using `inSingletonScope()`. The 'bad' example shows a default binding that creates a new instance on each request, while the 'good' example ensures a single instance is reused.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/coding-guidelines.md#_snippet_12
LANGUAGE: ts
CODE:
```
// bad
// bind(CommandContribution).to(LoggerFrontendContribution);
// good
// import { CommandContribution } from "@theia/core/lib/common";
// import { LoggerFrontendContribution } from "@theia/logger/lib/browser/logger-frontend-contribution";
// import { Container } from "inversify";
// const container = new Container();
// container.bind(CommandContribution).to(LoggerFrontendContribution).inSingletonScope();
```
--------------------------------
TITLE: Cloning and Building vscode-extension-samples
DESCRIPTION: This snippet demonstrates how to clone the vscode-extension-samples repository and build a specific sample extension, such as 'webview-sample'. It covers the necessary git and npm commands.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/__wiki__/Testing-VS-Code-Extensions.md#_snippet_0
LANGUAGE: git
CODE:
```
git clone https://github.com/microsoft/vscode-extension-samples.git
```
LANGUAGE: bash
CODE:
```
cd vscode-extension-samples/webview-sample/ && npm i && npm run compile
```
--------------------------------
TITLE: Theia Extension Generator Repository Example
DESCRIPTION: This example demonstrates a potential GitHub repository structure for a Theia extension generator, suggesting placement within the Eclipse GitHub organization for easier integration and contribution.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/__wiki__/Dev-Meetings-2018.md#_snippet_21
LANGUAGE: shell
CODE:
```
https://github.com/eclipse/
```
--------------------------------
TITLE: Theia API Factory Example
DESCRIPTION: Demonstrates the creation of an API factory in Theia, which is used to instantiate the API object for each plugin. It shows how to instantiate and register Ext services, and how to return the API object with its namespaces and types.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Plugin-API.md#_snippet_6
LANGUAGE: typescript
CODE:
```
export function createAPIFactory(
rpc: RPCProtocol,
pluginManager: PluginManager,
envExt: EnvExtImpl,
debugExt: DebugExtImpl,
preferenceRegistryExt: PreferenceRegistryExtImpl,
editorsAndDocumentsExt: EditorsAndDocumentsExtImpl,
workspaceExt: WorkspaceExtImpl,
messageRegistryExt: MessageRegistryExt,
clipboard: ClipboardExt,
webviewExt: WebviewsExtImpl
): PluginAPIFactory {
// Instantiation of Ext services.
// Instantiate and register with RPC so that it will be called when the main side uses its proxy.
const authenticationExt = rpc.set(MAIN_RPC_CONTEXT.AUTHENTICATION_EXT, new AuthenticationExtImpl(rpc));
const commandRegistry = rpc.set(MAIN_RPC_CONTEXT.COMMAND_REGISTRY_EXT, new CommandRegistryImpl(rpc));
// [...]
// The returned function is used to create an instance of the plugin API for a plugin.
return function (plugin: InternalPlugin): typeof theia {
const authentication: typeof theia.authentication = {
// [...]
};
// [...]
// Here the API is returned. Add members of the root namespace directly to the returned object.
// Each namespace is contained in its own property.
return {
version: require('../../package.json').version,
// The authentication namespace
authentication,
// [...]
// Types
StatusBarAlignment: StatusBarAlignment,
Disposable: Disposable,
EventEmitter: Emitter,
CancellationTokenSource: CancellationTokenSource,
// [...]
};
};
}
```
--------------------------------
TITLE: Example Log Message Format
DESCRIPTION: Illustrates the format of log messages in Theia, highlighting the logger name and log level, and optionally including child process information.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/packages/core/README.md#_snippet_7
LANGUAGE: bash
CODE:
```
root INFO [parcel-watcher: 10734] Started watching: /Users/captain.future/git/theia/CONTRIBUTING.md
```
--------------------------------
TITLE: Clone Theia Repository
DESCRIPTION: Clones the official Eclipse Theia repository from GitHub. This is the first step for local development.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#_snippet_7
LANGUAGE: sh
CODE:
```
git clone https://github.com/eclipse-theia/theia
```
--------------------------------
TITLE: PluginManagerExt Initialization Update
DESCRIPTION: PluginManagerExt.$init no longer starts plugins automatically. It now only initializes RPC services to reduce initial data load. Call `$start` explicitly to begin plugin execution.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/changelogs/CHANGELOG-2019.md#_snippet_78
LANGUAGE: typescript
CODE:
```
PluginManagerExt.$init()
// Call $start to start plugins
```
--------------------------------
TITLE: Add Command-Line Plugin Installation
DESCRIPTION: Introduces a command-line interface (CLI) command to install plugins. This provides a convenient way for users to manage and install extensions directly from the terminal.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/changelogs/CHANGELOG-2024.md#_snippet_178
LANGUAGE: shell
CODE:
```
added command to install plugins from the command line [#13406]
```
--------------------------------
TITLE: Dockerfile Removal
DESCRIPTION: Removes an example Dockerfile from the repository. This is a cleanup action that removes potentially outdated or unnecessary example configuration files.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/changelogs/CHANGELOG-2019.md#_snippet_28
LANGUAGE: shell
CODE:
```
dockerfile: removed example dockerfile [#6586](https://github.com/eclipse-theia/theia/pull/6585)
```
--------------------------------
TITLE: VSX Registry: Extension Installation and Styling Fixes
DESCRIPTION: Fixes an issue preventing extensions from being installed on new setups and improves the styling of the 'Extensions' view. Also removes localization for 'Open VSX Registry' and updates extension editor rendering.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/changelogs/CHANGELOG-2022.md#_snippet_55
LANGUAGE: typescript
CODE:
```
// Conceptual VSX Registry operations:
// Installation might involve:
// vsxRegistry.installExtension(extensionId);
// Styling improvements could affect CSS classes used in the Extensions view.
// Extension editor rendering updates might involve changes to how extension details are displayed.
```
--------------------------------
TITLE: Building Native Extensions from Source
DESCRIPTION: Sets the npm_config_build_from_source environment variable to true before running yarn. This instructs 'prebuild-install' to build native extensions locally, which can resolve issues with missing shared libraries.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Migration.md#_snippet_20
LANGUAGE: sh
CODE:
```
# either:
export npm_config_build_from_source=true
yarn
# or:
npm_config_build_from_source=true yarn
```
--------------------------------
TITLE: Linux/macOS Prerequisites for Theia Development
DESCRIPTION: This snippet details the necessary system packages and tools required for building Theia on Linux and macOS. It includes dependencies for native Node.js modules like 'native-keymap' and 'keytar', specifying package manager commands for different distributions.
SOURCE: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#_snippet_0
LANGUAGE: shell
CODE:
```
sudo apt-get install build-essential
sudo apt-get install libx11-dev libxkbfile-dev
sudo apt-get install libsecret-1-dev
```
LANGUAGE: shell
CODE:
```
sudo yum install libX11-devel.x86_64 libxkbfile-devel.x86_64
sudo yum install libsecret-devel
```
LANGUAGE: shell
CODE:
```
sudo pkg install libX11
```
LANGUAGE: shell
CODE:
```
apk add libsecret-dev
```
LANGUAGE: shell
CODE:
```
sudo pacman -S libsecret
```