An Introduction To Server Connector for IntelliJ

Server Connector for IntelliJ, also known as IntelliJ-rsp is a tool for acquiring, locating, installing, starting, stopping, and deloying artifacts to Application Servers like WildFly and EAP. TheThe project’s source code can be found here: GitHub - IntelliJ-rsp / Server Connector for IntelliJ

The project had it’s first public-ready release this week, at version 0.7.0. For people who have used JBossTools or the VS Code Server Connector Extensions, the UI and general workflows should be mostly familiar.

Installation

This long-awaited public release can be installed either by opening the Settings window in IntelliJ (Press Ctrl+Alt+S to open the IDE settings), selecting Plugins, and searching for Server Connector, or by going to the marketplace entry for the project and downloading the selected version for a local installation.

Demo Video

A short demo can be found at the marketplace entry for the extension or at YouTube directly, and we encourage you all to check it out!

What’s an RSP?

The Server Connector extension for IntelliJ, much like the Server Connector extension for VS Code, works similar to a Language Server Protocol (or LSP) server. LSP Servers separate all of the logic for handling language-specific features like syntax coloring, code completion, and many other, away from the user’s IDE and into a background process. This background process can be re-used in multiple IDE’s, so long as each IDE has a thin integration layer that would allow the UI to integrate with the background server.

Similar to an LSP, this Server Connector extension separates out all the common logic of dealing with, locating, starting, stopping, and deploying to Application Servers like WildFly and EAP into a background process that we call an RSP, or Runtime Server Protocol. With a thin UI layer customized for each IDE, this can extend support for these servers to other IDEs, like IntelliJ.

What’s Different? What’s the Same?

For users of our VS Code extension, there are some small differences. The IntelliJ extension does not bundle the background RSP, but does provide an action to download the newest release of each. This update menu item will also investigate whether it should be enabled or not, or if there’s been a new release of the underlying RSP, on each restart of the IDE.

Despite some other small UI differences, the VS Code tool and the IntelliJ tool look and behave almost identically.

Ok, it’s installed. Now what?

Once installed, you should notice a RSP Servers view on the left of your workspace. Once selected, you should see two different RSP types. One, Community Server Connector by Red Hat, and the other Red Hat Server Connector. The former exposes support for many community servers like Apache Felix, Karaf, Tomcat, Glassfish, Jetty and Websphere Liberty. The latter provides support for WildFly and EAP.

If you right-click on the Red Hat Server Connector, you can execute the Download / Update RSP action item to install the background RSP. The RSP can then be started.

Once started, you can right-click on the RSP and see two new action items: Create Server and Download Server. The former will begin a workflow that allows you to create a descriptor for a local server already on your disk, complete with optional and required attributes. The latter will first assist you in downloading and extracting the server before doing the same.

With a server defined, you can see the following actions in its context menu: * Delete Server - Delete the selected server adapter (but not its underlying files).

  • Start Server (run) - Start the given server in run mode

  • Start Server (debug) - Start the given server in debug mode and, if possible, connect a remote debugger.

  • Restart Server (run) - Restart the selected server in run mode

  • Restart Server (debug) - Restart the given server in debug mode and, if possible, connect a remote debugger.

  • Stop Server - Request the server stop.

  • Terminate Server - Request the server be terminated if possible.

  • Add Deployment - Add a deployable file or folder to the server to be published.

  • Remove Deployment from Server - Remove a selected deployment from the server.

  • Publish Server (Full) - Publish the server, synchronizing the content of deployments from your workspace to the server.

  • Publish Server (Incremental) - Publish the server with recent changes, synchronizing the content of deployments from your workspace to the server.

  • Edit Server - View a JSON representation of your server in an editor, and submit any changed properties back to the RSP.

  • Server Actions - Some server types may expose to the user arbitrary actions that the user may invoke, such as changing some configuration options, opening a web browser, or editing a configuration file. These server-contributed actions have few restrictions placed on them by the framework other than what may be done on the client-side.

Modifying the Server Descriptor

To get a look at what data the RSP is keeping to interact with your server, you can right-click the server object and select Edit Server. Here you’ll be able to see the JSON descriptor that is stored, and make any changes to properties that you might want to tweak. You can see more details about what properties are available for addition or modification over at the project’s documentation page. Many of these properties relate to modifying the program arguments or vm arguments when launching the runtime, or ensuring a certain environment is passed through to the server when it starts.

Conclusion

Going through each of these features one-by-one would be a bit overkill for a blog post. However, if you’re a user of WildFly and EAP, and have been using Red Hat’s existing tools for interacting with these Application Servers in Eclipse or VS Code, but wished you could do so more effectively while using IntelliJ, we encourage you to watch the Demo listed above, try out the tools, and chat with us on Gitter about what you like and what you don’t like.