When installed in the workspace, Che plug-ins bring new capabilities to the Che. Plug-ins consist of a Che-Theia plug-in, metadata, and a hosting container. These plug-ins may provide the following capabilities:

  • Integrating with other systems, including OpenShift and Kubernetes.

  • Automating some developer tasks, such as formatting, refactoring, and running automated tests.

  • Communicating with multiple databases directly from the IDE.

  • Enhanced code navigation, auto-completion and error highlighting.

This chapter provides basic information about Che plug-in installation, enabling, and use in Che workspaces.

Additional tools in the Che workspace

Che plug-ins are extensions to the Che-Theia IDE that come bundled with a container image that contains their native prerequisites (for example, the OpenShift Connector plug-in needs the oc command installed). A Che Plugin is a list of Che-Theia plug-ins together with reference to a Linux container that the plug-in requires to run in. It can also include metadata to define the description, categorization tags, and an icon. Che provides a registry of plug-ins available for installation into the user’s workspace.

Because many VS Code extensions can run inside the Che-Theia IDE, they can be packaged as Che plug-ins by combining them with a runtime or a sidecar container. Users can choose from many more plug-ins that are provided out of the box.

From the Dashboard, plug-ins in the registry can be added from the Plugin tab or by adding them into a devfile. The devfile can also be used for further configuration of the plug-in, such as to define memory or CPU usage. Alternatively, plug-ins can be installed from Che by pressing Ctrl+Shift+J or by navigating to View → Plugins.

Additional resources

Adding language support plug-in to the Che workspace

This procedure describes adding a tool to an already existing workspace, by enabling a dedicated plug-in from the Dashboard.

To add tools that are available as plug-ins into a Che workspace, use one of the following methods:

This procedure uses the Java language support plug-in as an example.

Prerequisites
  • A running instance of Eclipse Che. To install an instance of Eclipse Che, see Che 'quick-starts'.

  • An existing workspace defined in this instance of Eclipse Che; see:

  • The workspace must be in a stopped state. To do so:

    1. Navigate to the Che Dashboard. See Navigating Che using the Dashboard.

    2. In the Dashboard, click the Workspaces menu to open the workspaces list and locate the workspace.

    3. On the same row with the displayed workspace, on the right side of the screen, click the Stop button to stop the workspace.

    4. Wait a few seconds for the workspace to stop, then configure the workspace by clicking on it.

Procedure

To add the plug-in from the Plug-in registry to an already existing Che workspace, use one of the following methods:

  • Installing the plug-in from the Plugin tab.

    1. Navigate to the Plugin tab.

      The list of plug-ins, installed or possible to install, is displayed.

    2. Enable the desired plug-in, for example, the Language Support for Java 11, by using the * Enable* slide-toggle.

      The plug-in source code is added to the workspace devfile, and the plug-in is now enabled.

    3. On the bottom right side of the screen, save the changes by clicking the Save button. + Once the changes are saved, the workspace is restarted.

  • Installing the plug-in by adding content to the devfile.

    1. Navigate to the Devfile tab.

      The devfile structure is displayed.

    2. Locate the component section of the devfile and add the following lines to add the Java language v8 in to the workspace:

       - id: redhat/java8/latest
         type: chePlugin

      See the example of the final result:

      components:
       - id: redhat/php/latest
         memoryLimit: 1Gi
         type: chePlugin
       - id: redhat/php-debugger/latest
         memoryLimit: 256Mi
         type: chePlugin
       - mountSources: true
         endpoints:
           - name: 8080/tcp
             port: 8080
         memoryLimit: 512Mi
         type: dockerimage
         volumes:
           - name: composer
             containerPath: /home/user/.composer
           - name: symfony
             containerPath: /home/user/.symfony
         alias: php
         image: 'quay.io/eclipse/che-php-7:nightly'
       - id: redhat/java8/latest
         type: chePlugin
Additional resources
Tags: