Apache Camel for Visual Studio Code
This is a preview release of the Visual Studio Code extension that adds Apache Camel language support for XML DSL and Java DSL code.
When you add this extension to your installation of VS Code, the VS Code editor provides the following features:
Language service support for Apache Camel URIs (both XML DSL and Java DSL)
Auto-completion for Camel components, attributes, and the list of attribute values
Camel-K Groovy DSL (It requires to have file named with the pattern *.camelk.groovy or that the file starts with // camel-k:)
Camel-K Kotlin DSL (It requires to have file named with the pattern _*.camelk.kts or that the file starts with // camel-k:)
Camel Kafka Connect properties
Camel-K Yaml DSL (It requires to have file named with the pattern *.camelk.yaml or that the file starts with // camel-k:)
Camel properties file (restricted to camel components ids and camel components properties)
Quick reference documentation when you hover the cursor over a Camel component
Diagnostics for Camel URIs
Navigation to Camel contexts and routes in the VS Code outline panel and in the Go > Go to Symbol in File navigation panel (XML DSL only)
Auto-completion for referenced IDs of
SEDA components (XML DSL only)
Find references for
direct VM components in all open Camel files (XML DSL only)
It is possible to use a specific Camel Catalog version. This can be specified in File -> Preferences -> Settings -> Apache Camel Tooling -> Camel catalog version
To use a Red Hat integration productized version, you need to configure extra repositories. See in Camel Language Server documentation.
Additional Camel components can be provided. This can be specified in File -> Preferences -> Settings -> Apache Camel Tooling -> Extra-components -> Edit in settings.json
You can add a list of Camel components definition. This json definition can be found in jar of the Camel component. You will end up with something like:
For detailed information about Apache Camel supported features, see the Language Server GitHub page.
If you run into an issue or have a suggestion, you can report it by creating a new issue on GitHub.
How to install
You can download this Language Support for Apache Camel extension from the Visual Studio Code Marketplace at https://marketplace.visualstudio.com/items?itemName=camel-tooling.vscode-apache-camel.
After you install VS Code, follow these steps:
- In VS Code, select View > Extensions.
- Search for Camel.
- Select the Language Support for Apache Camel option and then click Install.
Requirements for using this extension
After you install this Language Support for Apache Camel extension, follow these guidelines to access its features:
For an XML DSL file:
For a Java DSL file:
- Use a
.java file extension.
- Specify Camel (usually from an imported package).
- To reference the Camel component, use
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.