Code for IBM i: Project Mode

Visual Studio Code for IBM i recently acquired a series of enhancements that greatly enhance the RPGLE developer experience.

Known as Project Mode, the new features allow RPGLE developers to easily navigate their code — and understand it — all while editing remotely in the IDE. They can now find all references to definitions, find definitions of all references, and go to the implementation of export procedures without leaving the editor.

Liam Allan kindly shared his excitement over these new features with us (his favorite is Peek) and showed us how to use them.

The Basics

As reported earlier this year, VS Code for i gives you a standard Outline View and smart content assist that understands what definitions you have access to.

Now in the Outline View you will see that file definitions automatically appear. According to Liam, Code for IBM i is talking to your system to understand all aspects of your code so you no longer need to leave your codebase to understand your existing definitions or file definitions.

You may also find the new Hover support useful. When you want to know what something does at a glance, just hover over it for more information. For example, you’ll see that hovering over a procedure will show you the procedure’s signature as well as where it is defined.

Digging Deeper Into the Details of Your Code

Visual Studio Code can tell you even more about your code. Right click on any definition to access three additional options:

Go to Definition takes you to where the chosen symbol is defined
Go to References shows you where the symbol is used throughout the current source code
Go to Implementation, a very new feature, will take you to where an export function/procedure is actually defined.

Because Visual Studio Code knows all about your project even when you don’t understand where everything is coming from, you can navigate your codebase more easily. This is particularly powerful for new developers working on code written by others.

The Power of Peek

While all of this functionality is useful, one additional feature makes it even more powerful: Peek.

Peek works with Go to Definitions, References and Implementation to let you see where they are explicitly defined without leaving your active editor.

In the image below, we are “peeking” the definition of ENTER. We can see that it is coming in from another file, which is brought in as a copybook in the source.

Final Touches

What Liam loves about using Visual Studio Code for RPGLE development is that it supports a wide range of development setups. He knows that every IBM i development team has their own style for the SDLC (Software Development Life Cycle.) VS Code for IBM i is flexible and adapts well to most environments.

VS Code also supports the many ways of developing RPGLE and COBOL applications. Whether you write your source code in source members with change management or in the IFS and use Git, it will work for you.

Liam also points out that if and when you want to start using Git for your RPGLE or COBOL source code, Visual Studio Code can help get you going. Code for IBM i supports local development and compiles for any ILE language, and it comes with an excellent built-in Git client.

Code for IBM i Resource Guide

To learn more about Visual Studio Code for i and to get started using it, check out our curated compilation of the best how-to resources for Code for i.

Many thanks to Liam both for his work on the Code for IBM i project and for keeping us up-to-date on its progress.

Verified by MonsterInsights