Written by Uladzislau Kalesnikau, Software Developer at IBA Group Poland and Zowe™ IntelliJ Team Lead
In today’s software development landscape, using Integrated Development Environments (IDEs) for legacy programming languages like COBOL remains crucial. Therefore, it is very important to find new ways to help programmers work with legacy code in a familiar environment. We are excited to announce the Zowe™ COBOL Language Support Plugin for IntelliJ IDEA™, now available on JetBrains Marketplace!
This is our very first MVP version 0.0.1, created in cooperation between the Zowe Community and IBA Group. This initial version includes core features and is set to be further enhanced and expanded in future iterations based on the invaluable user input.
In this article, we will explore the main components designed to enhance the development experience for COBOL programmers. We will also highlight the standout features of the plugin and how it can support your journey toward mainframe modernization.
Using Zowe COBOL Plugin for IntelliJ IDEA: Major Features
The plugin allows users to benefit from such functionalities as code highlighting, code completion, and integration with COBOL language servers through an intuitive visual interface. It provides developers with all the capabilities available on the IntelliJ IDEA platform. Let us look at a few of these features and see how easily you can use them.
- Code Highlighting and Navigation
The Zowe COBOL plugin uses the TextMate Bundle and LSP server, provided by the open-source community, to enhance the editing experience for COBOL developers. It leverages the com.redhat.devtools.lsp4ij library for communication with Language Server Protocol implementations tailored for COBOL.
In the video below, you can see how syntax highlighting is implemented in COBOL programs. The plugin differentiates keywords, variables, strings, comments, and other code elements with distinct colors to improve readability. Additionally, the plugin lets you efficiently work with variables: by hovering over a variable name, you can see a window displaying the details about how the variable was defined. If you wish to navigate directly to the variable definition, please use CTRL/CMD+left mouse button, which will move the cursor to the exact location.
- Auto-Completion and Find Usages
Auto-completion is another feature of the Zowe COBOL plugin that significantly streamlines developers’ work and reduces the number of errors. In the video below, you can see how it automatically suggests and completes code elements as you type.
Finally, you can see that right-clicking on a variable name and selecting the ‘Find Usages’ option will display the list of all the places where the variable is defined or referenced. In addition to identifying the location of the reference, the ‘Find Usages’ feature allows you to navigate to each occurrence by clicking on it in the list, enabling developers to quickly review relevant code sections. ‘Find Usages’ can also be applied to functions, methods, classes, or properties within a codebase.
Moreover, while working on your code, you can use the CTRL/CMD + ‘/’ shortcut to comment and uncomment some parts of it. After commenting on a part of the code that was previously listed in ‘Find Usages’, you will see this part marked as commented (indicated with an asterisk) in the list.
How the Zowe COBOL Plugin for IntelliJ IDEA Can Help You on Your Modernization Path
COBOL remains a fundamental language in various industries, especially banking, insurance, and government sectors where legacy systems continue to operate. Our Zowe COBOL plugin offers robust COBOL support in modern IDEs like IntelliJ IDEA, filling a critical gap for developers maintaining and modernizing legacy systems.
The Zowe COBOL plugin for IntelliJ IDEA can greatly simplify and speed up the mainframe modernization process. Here is how this can be achieved:
- Code Highlighting and Improved Navigation
- Syntax highlighting makes the code more readable and helps you quickly find errors.
- Intelligent navigation (e.g., ‘Go To Reference, ‘Find Usages’) allows developers to quickly navigate through large COBOL code, which is crucial when working with legacy systems.
- Smart Hint and Autocomplete
- The plugin can provide contextual hints and auto-completion, speeding up the coding process and reducing the likelihood of errors.
- Integration with Version Control Systems
- IntelliJ IDEA platform tools allow you to use all the capabilities of modern editors. Integration with version control systems such as Git makes it easier to track code changes, collaborate, and roll back to previous versions when necessary.
- Support for Code Analysis and Refactoring
- Code analysis capabilities help identify potential problems and vulnerabilities.
- Future development of the plugin will introduce new features, including code refactoring. Refactoring helps improve the structure and readability of code, which is especially important when modernizing older systems.
- Testing
- IntelliJ IDEA offers excellent integration capabilities with plugins and existing testing tools (Test4z, COBOL check, Galasa) via CLI, making it easier to identify and resolve errors.
- Syntax highlighting makes writing any type of test a more natural and intuitive experience.
- Commenting
- Tools for working with comments make it easier to understand the business logic embedded in the code.
- Compatibility and Integration with Other Tools
- Since the plugin uses the IntelliJ IDEA platform, it is compatible with all JetBrains IDEs based on the IntelliJ IDEA platform. This provides flexibility in the choice of tools for the development team.
- The ability to integrate with other modern tools and services (e.g., CI/CD, DevOps) allows you to create more efficient and automated development and deployment processes.
Taken together, the Zowe COBOL plugin for IntelliJ IDEA can significantly improve the productivity of a development team by making the mainframe modernization process easier, improving code quality and simplifying its maintenance.
Conclusion
Developing the first MVP version of Zowe COBOL plugin for IntelliJ IDEA involved integrating with LSP implementations, managing plugin lifecycle states, and ensuring robust error handling and user feedback. By addressing the unique challenges of COBOL development within modern IDE environments, the Zowe COBOL plugin aims to streamline workflows and enhance developer productivity in maintaining and modernizing legacy systems.
Zowe IntelliJ Squad: Future Plans
In the future, we aim to provide syntax highlighting for other popular mainframe languages as PL/I, Rexx, and HLASM. If you are interested in contributing to this project or have any questions, please reach out to us on Slack!
Special thanks for their advice and feedback go to the COBOL Language Support for VSCode Community, Vit Gottwald and Dana Boudreau from Broadcom, and the LSP4IJ Community.
Links