Visual Studio Code Extensions
Visual Studio Code (also known as VS Code) is a hugely popular, open source code editor for Windows, Linux and macOS. Given this popularity, Red Hat decided to create extensions for VS Code that would allow software developers who are working with Red Hat technologies to use their new favorite development environment all the time in a way that is seamless and enjoyable, without having to switch back and forth between a patchwork of editors and IDEs. We started working on VS Code in 2016 with our Language Support for Java™ extension, and since then our portfolio has registered over 19 million downloads. Learn about these seven extensions:
Language Support for Java™
Our first extension was published in 2016. Given our strong history with all things Java™, Language Support for Java™ for Visual Studio Code was the obvious choice for our first foray into the VS Code world. This extension is built on the Language Server Protocol, and provides language support for Java™ through the Eclipse™ JDT Language Server. It makes developing Java™ applications with VS Code much easier and enjoyable. Using Eclipse™ JDT under the covers means that the experience you have with VS Code is exactly the same as what you’d get with Eclipse™. It provides full support for Maven pom.xml projects, basic Gradle Java™ project support, code completion, Javadoc hovers, code outlining, highlighting, etc. etc - everything you need. Like everything we do, the extension is completely open source. You can follow developments on this extension through our Twitter feed.
With the rise of Kubernetes, and OpenShift, our enterprise supported distribution, YAML has seen an increase in usage for creating and editing configuration files. Our second extension, YAML Support for Visual Studio Code, makes using VS Code for reading and editing YAML easy, organized and fool-proof. It provides YAML validation, error detection, document outlining, auto-completion, hover support, plus syntax checking for Kubernetes YAML files. It has proven to be a very popular add-on for VS Code. The full source is available on GitHub, where we publish all of the source for our extensions.
Our XML Language Support extension, like our extensions for Java™ and YAML, is built on the Language Server Protocol. It is based on the LSP4XML language server. XML is a generally useful language, and especially useful for configuration of Red Hat Fuse (or the upstream project, Apache Camel). With features such as syntax error reporting, code completion, auto-close tags, automatic node indentation, symbol highlighting, and document folding (to name just a few) as well as DTD and XSD related features, the XML extension by Red Hat should find its way into many developers’ VS Code configurations. The source for this extension is available on GitHub, where we welcome contributions.
The OpenShift Connector by Red Hat allows a developer to interact directly with a Red Hat OpenShift cluster or by using a local instance of OpenShift such as minishift or Red Hat Container Development Kit. Leveraging the OpenShift Application Explorer view, you can improve the end-to-end experience of developing applications.
The extension provides a quick, simple way for any developer to work their “inner loop” process directly using VS Code - no CLI or wizard hat required.
Mohit Suman wrote this excellent article when the extension was first launched. It has a great video demonstration of how to use the extension for development. It’s a really exciting extension for anyone developing for deployment on OpenShift or kubernetes.
The full source is available on GitHub, where we publish all of the source for our extensions.
Using third party packages for your Maven or Node projects is made safer and easier when you have greater visibility into those dependencies! Our Dependency Analytics extension for VS Code is a service that checks your dependencies and flags security vulnerabilities (CVEs) and suggests a remedial version. It will also show Github popularity metrics along with latest version available for your chosen package. Since shipping your software with the correct licensing is important, the extension will also suggest a project level license, check for conflicts between dependency licenses. It does this all by using a Red Hat service that has been in development for years that accesses only your manifests and license file(s) to learn about your application dependencies and licenses and providing AI based guidance for additional, alternative dependencies where warranted.
Project Initializer by Red Hat
Defeat the tyranny of the empty page! With the Project Initializer, which is based on Red Hat Launcher, you can easily generate quickstart projects using Visual Studio Code (VS Code). It supports new project generation for Thorntail, Vert.X, Spring Boot, Red Hat Fuse and Node.js. It will walk you through the choices you need to make and generate the new project framework for you.
This extension supports a number of commands for interacting with Wildfly, EAP and Minishift server adapters; these are accessible via the command menu (Cmd+Shift+P on macOS or Ctrl+Shift+P on Windows and Linux) and may be bound to keys in the normal way. This is a quick, convenient way to interact with your application server for development.
OpenShift Extension Packs
Of course, we don’t work on projects in a vacuum! Our OpenShift Extension Pack contains a number of useful extensions for working with OpenShift and Kubernetes, including the Project Initializer extension for starting up new projects on OpenShift. If you’re really focused on Java™ development on OpenShift, you should look at the OpenShift Extension Pack for Java™, which is an easy way to get all of the tooling you need for Java™ development for deployment on Red Hat OpenShift.