A note from 2026: This article was published in 2023. It describes SAP Commerce Developers Toolset v2022.3.1 for IntelliJ IDEA 2022.3.x; by 2026, IntelliJ Platform APIs and SAP Commerce Cloud versions have moved on, so verify current plugin releases and compatibility before applying these details.

This article is brought by
Mykhailo Lytvyn
Software Engineering Team Leader, Solution Architect, Development/Performance/Open-Source Lead

Contributors & Editors:
Myles Bunbury, P.Eng, Senior Director, Technology Solutions, Global SAP Customer Experience Lead
Rauf Aliev, Chief Software Engineer, Solution Architect

 
Mykhailo Lytvyn

A brief history of the topic

It has been over three years since Mykyta Kostiuk published his origin article that launched the SAP Commerce Developers Toolset IDEA Plugin (“Plugin”) as EPAM’s “give back” to the Hybris community.

For many years, EPAM has supported the Plugin, focusing on its ongoing compatibility with each IDEA release to keep developers free to work on SAP Commerce (Hybris) & SAP Commerce Cloud.


Questions you may ask are:

  1. What’s next, and…
  2. Will you be able to continue using this free version of the Plugin?

YES! Today I’ll share with you the results of active development started one late night in October 2022.

This article covers all changes made to the* Plugin* v2022.2 – v2022.3.1, along with some TODO’s and ideas for the future.

If you would like to contribute or share any ideas, the Plugin‘s GitHub repository is open, so feel free to contribute. As a starting point, check out the official Intellij Platform Plugin SDK documentation.


Just Open It

In the early days of the* Plugin*, there was only one way to create a new SAP Commerce IDEA project, via the “New Project” wizard.

Jetbrains is continuously working on new capabilities for Intellij IDEA and have introduced a new simplified process of project creation by just opening the folder.

From now on, if you have the* Plugin* installed and are trying to open a folder which is a potential SAP Commerce project, it will be imported with default settings and, once imported, you will be only asked to select the correct JDK.

Note: Due to the simplified import process, it is not possible to specify additional external modules such as Eclipse, Gradle or Maven projects. On other hand it is possible in latest version of the Plugin.

Open SAP Commerce project in IntelliJ IDEA


Plugin Settings Regrouped

Initially, some of the Plugin settings were placed under the Tool Window.

From now on, both Application & Project Plugin settings will be available under the common IDEA Settings page.

The remote instances configuration has been moved from the Tool Window to the new Plugin Settings page.

It is now possible to change settings used during Project Refresh after initial import.

Plugin settings in IntelliJ IDEA


Enabled Plugin Settings Synchronization

Switch your laptop, switch from one IDE to another, or even start from the scratch – settings of the Plugin will not be lost and can be restored/synced thanks to introduced support for the official Intellij IDEA Sync capabilities.

Login with your account and enable “Settings Sync” for the Plugin to ensure graceful switch from IDE to IDE.


Under the Plugin‘s Hood – Global Meta Model Concept

The original type system implementation which was used in code inspections for items.xml had one crucial issue – it was looking at the current file content and not at the “final” type system. This led to incorrectly reported violations of the validation rules.

To ensure that the logic will respect the so-called “final” state of the type system, one which will be actually available and created by SAP Commerce itself, a new, merged, global representation of the type system was required. It had to be used everywhere, in code inspections, code completions and navigation. Nevertheless, it had to follow a simple concept which could be applied for multiple SAP Commerce contexts.

As a result of refactoring, the new concept of the Global Meta Model was introduced. Instead of working on a single items.xml, beans.xml or ***-cockpitng.xml** file, a complete Global Meta Model will be built from all suitable sources. This uncovers new capabilities for code inspection, validation, and meta information retrieval from any place and also improves performance a lot.

The same concept was applied for multiple SAP Commerce configurations, including:


Type System

Type System – Preview

If you were ever wondering how to find out how a declared item would look like after all merges and manipulations without deploying or running SAP Commerce, it is now possible with Preview of the Type System.

Due to the fact that this preview relies on the global meta model of the type system, it will be refreshed on every modification and represent the latest version.

It can be found under [y] Tool Window > Type System and provides read-only access to the details of each declared item.

To ensure that this preview will show valuable data, the following content and actions are available in read-only mode (for now):

Type System preview


Type System – items.xml

items.xml… Some may like, some may not. It may not be big, it may not be small. Less discussions, no more concussions, with new capabilities you just need to rock.


Type System – In Code

SAP Commerce capabilities are hard to count. One of those is dynamic attributes. If you’re using them with caution, then there will be no issues, but in some cases they can be used in unsuitable places.

An excellent example of such usage is user.getAllGroups(). Inaccurate usage of dynamic attributes may lead to serious performance issues.

The situation is usually complicated due to the fact that it is not easy to distinguish “common” attributes from “dynamic” ones.

To support developers in such cases, new inlay hints will be added for each getter/setter in the Java code for dynamic attributes.

Dynamic attribute inlay hints in Java code


Type System – Inspections

Why? Why? Oh why does code inspection for items.xml with ~15k lines take soooooo much time!! I can’t image how many times I have asked myself this question.

In some cases, complete inspection of items.xml can take up to 10 minutes. And re-inspection is triggered on every modification, even on adding a space.

Luckily, it didn’t take much time to identify the root cause of the performance issue and strange grouping of the results, eg. only one single [y] inspection group.

The root cause of this behavior was that all rules were defined as regex rules in a single IDEA inspection rule. As such, they were recompiled, re-evaluated and… they respected only current file content. It means that they could even produce incorrect validation results.

As a result of re-writing all the rules from scratch, performance improved a lot. For a file that required 10 minutes previously, now just 10-20 seconds will be enough to complete the validation cycle.


Type System – Models

Initially it was possible to navigate to Item Type declaration from the generated Model Java classes.

Developers always want more and this “more” will be satisfied with some new capabilities:


Type System – Structure View

Type System structure view


Type System – Debugger Java Type Renderers (y’ll like it!)

Debugging is a mandatory skill and activity of every developer. Unfortunately, SAP Commerce Models are not easy to debug due fact that they have only single field ctx which is available in the Debug preview.This means that every time there is a need to get a value from the SAP Commerce Model’s attribute or relation, one must execute Code Evaluation.

I’m glad to announce that this is all in the past. Now it will be possible to preview all attributes/relations/collections/maps in the Debugger preview for SAP Commerce Models thanks to created on-the-fly custom Java Type Renderers.


Bean System

Bean System – Preview

What is not actually available is complete Bean System. It is not possible to get a complete picture of all beans or all events declared in the SAP Commerce via every beans.xml. At least, it was not possible before…

With this new Plugin release, the same Global Meta Model Concept was applied for the Bean System. This gave it the possibility to build a complete preview of everything declared via beans.xml.

To ensure that this preview will show valuable data, the following content and actions are available in read-only mode (for now):

Bean System preview


Bean System – Commons


Bean System – Structure View

In a similar way to what was done for the Type System


FlexibleSearch

FlexibleSearch – Language

Even if the FlexibleSearch Language model is not yet perfect it is always nice to have something in common with ImpEx or items.xml. Thinking of that, I added the following new capabilities:


FlexibleSearch – In Code

It was not always an easy task to understand or interpolate how FlexibleSearch Query would look like. Taking this as an inspiration:


ImpEx

ImpEx – Commons

When we are talking about SAP Commerce, it’s impossible not to touch ImpEx. Considering the fact that it plays crucial role in every SAP Commerce solution, it had to be enhanced, so it is:


ImpEx – Extras


Cockpit NG System (Backoffice)

Cockpit NG System – Commons

Since the decommission of the hMC and the introduction of Backoffice as its replacement, each SAP Commerce developer has had to touch multiple configuration XML files, specify types, attributes and configure wizards. There was only one tiny issue – the Plugin did not support those configuration files so developers were not able to use wise code completions, validations and navigation.

With this new release, every developer can feel all the power of Intellij IDEA in combination with rich Plugin capabilities.

If there are multiple nested context the Plugin will respect it and pick up closest one with type attribute set.

Cockpit NG component code completion


Cockpit NG System – Integration with Type System

Without any doubts, integration with the Type System is a must-have when working with Cockpit NG configuration files.

Type System was integrated in multiple places of the configuration files in a way it will simplify work of the developer:


Cockpit NG System – Wizards

To ensure that work with Cockpit NG Create Wizards will be easier, support was added for the complex target Type identification. The correct type will be used based on the specified root.


Cockpit NG System – Widgets

Most of the Widgets functionality is supported, except navigation between Socket declarations.


Business Process

Even Business Process files were updated with new functionality, and more is planned to be released in the upcoming version of the Plugin:


Extension Info

Let’s not forget about good ol’ extensioninfo.xml. it didn’t receive any updates for a while, so it’s right about the time to change it.


Local Extensions


Other

Intellij IDEA – Release Channels

It was sometimes difficult to align Plugin with Intellij IDEA’s release cycle since it had only one stable release channel.

For those who always want to be up-to-date with the latest IDEA releases and API changes, a new EAP release channel has been added.

Intellij IDEA release channels


Intellij IDEA – Improved API Usage

Deprecated API usage is unwelcome in every project as it leads to API incompatibility and complexity during migration to newer versions.
If migration to new API versions is not done on a regular basis, it will, for sure, lead to increased release cycle times.

With latest release of the Plugin, usage of deprecated APIs was significantly decreased.

IU-223.7571.182 (2022.3) and below

IU-223.8214.52 (2022.3.1)


Fixes and Adjustments


Plans & Ideas


That’s all for now! Stay tuned, more is coming in part 2 of this article series… Submit your ideas and contribute!