Chapter 1. Using language support for Apache Camel extension


Important

The VS Code extensions for Apache Camel are listed as development support. For more information about scope of development support, see Development Support Scope of Coverage

The Visual Studio Code language support extension adds the language support for Apache Camel for XML DSL and Java DSL code.

1.1. About language support for Apache Camel extension

This extension provides completion, validation and documentation features for Apache Camel URI elements directly in your Visual Studio Code editor. It works as a client using the Microsoft Language Server Protocol which communicates with Camel Language Server to provide all functionalities.

1.2. Features of language support for Apache Camel extension

The important features of the language support extension are listed below:

  • Language service support for Apache Camel URIs.
  • Quick reference documentation when you hover the cursor over a Camel component.
  • Diagnostics for Camel URIs.
  • Navigation for Java and XML langauges.
  • Creating a Camel Route specified with Yaml DSL using Camel JBang.

1.3. Requirements

Following points must be considered when using the Apache Camel Language Server:

  • Java 11 is currently required to launch the Apache Camel Language Server. The java.home VS Code option is used to use a different version of JDK than the default one installed on the machine.
  • For some features, JBang must be available on a system command line.
  • For an XML DSL files:

  • For a Java DSL files:

    • Use a .java file extension.
    • Specify the Camel package(usually from an imported package), for example, import org.apache.camel.builder.RouteBuilder.
    • To reference the Camel component, use from or to and a string without a space. The string cannot be a variable. For example, from("timer:timerName") works, but from( "timer:timerName") and from(aVariable) do not work.

1.4. Installing Language support for Apache Camel extension

You can download the Language support for Apache Camel extension from the VS Code Extension Marketplace and the Open VSX Registry. You can also install the Language Support for Apache Camel extension directly in the Microsoft VS Code.

Procedure

  1. Open the VS Code editor.
  2. In the VS Code editor, select View > Extensions.
  3. In the search bar, type Camel. Select the Language Support for Apache Camel option from the search results and then click Install.

This installs the language support extension in your editor.

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.