Testing Che-Theia plug-ins
Developers can test how plug-ins work while working on them by running Che-Theia in the hosted mode. It is a special mode in which Che-Theia loads your plug-in directly from the
/projects directory (as opposed to the rest of the plug-ins, which are loaded from the plug-in registry). The Che-Theia hosted mode is similar to the debug mode in VS Code.
Press F1 to display the command palette, and run the
Hosted Plugin: Start Instancecommand.
Specify the path to the plug-in. A new browser tab is opened.
When running in the hosted mode, Che-Theia displays a Development Host message in the status bar. When you hover your mouse over the message, a tip is displayed with the name of the hosted plug-in.
At the same time, the main instance of Che-Theia displays a Hosted Plugin message in the status bar. This element indicates the state of the hosted instance. After starting the hosted instance, main Che-Theia begins to watch the code changes.
When you change something in your plug-in, you can switch to the hosted Che-Theia instance, refresh the page, and immediately see the results.
When you run a hosted instance, the main Che-Theia instance opens the Output view. This view contains all the output from the
yarn back-end process. It also contains the output of the back-end plug-in that is being developed.
You can control the state of the hosted instance directly from the main instance. Click Hosted Plugin element in the status bar, and a context menu with the available actions is displayed. You can stop and restart the running hosted Che-Theia instance from the context menu. When a hosted instance is stopped, use the context menu to start it again.
There is a full code completion provided to help you write your plug-in. Code completion covers both the
Che Editor plug-in API and the
Che Plugin plug-in API.