Part II. SAP Commerce Developers Toolset (v.2023.1.0 Intellij IDEA plugin)


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

 

In my previous article on the Intellij IDEA Plugin (“Plugin“), I described the huge leap forward of the free & open-source SAP Commerce Developers Toolset Intellij IDEA Plugin, documenting myriad of new features, enhancements, and fixes. This article continues the story and will cover changes included in the next version 2023.1.

Kudos to all contributors of the 2023.1 Plugin release:

  • Mykyta Kostiuk
  • Andrei Lisetskii
  • Pawel Boron

And don’t forget, if you feel any desire to contribute or share cool ideas, Plugin‘s GitHub repository is open and welcome to see what you have to contribute. As a starting point, check out official Intellij Platform Plugin SDK docs (here).


API Usage

Even if you try to always be on track, it may drain too much energy. In Plugin‘s last release, API usage was improved significantly, but Jetbrains does not sleep and has declared the next batch of deprecated API. Some of these were already fixed, some were planned to be fixed, and some may require serious refactoring of the whole solution, like this tiny one: IDEA-166061.

IU-223.8214.52 (2022.3.1)

  • 1 deprecated API usage
  • 1 compatibility warning
  • 43 experimental API usages

IU-231.6890.12 (2022.3.1)

  • 1 deprecated API usage
  • 1 compatibility warning
  • 3 usages of internal API
  • 43 experimental API usages

SAP Commerce in the Public Cloud (CCv2)

CCv2 – SAP Commerce Cloud [y]

Every SAP Commerce project deployed to SAP’s Public Cloud (CCv2) has to follow rules declared by the target platform. For CCv2, that includes specific project structure and the presence of the mandatory project descriptor file, manifest.json.

The Plugin is here to simplify a developer’s life when they are working with that file. The following features were added in scope of the CCv2 project structure support:

  • Added code contributions based on allowed values defined in the custom JSON schema
  • Enabled validation of the manifest.json file according to the custom JSON schema
  • Added code inspection for extension name validation with few notes:
    • Project refresh may be required due to the fact that some extensions were not registered as available during the import (fixed)
    • Not available cloud-only extensions may be highlighted as missing
      • If you know a list of all such exceptions please contact us or submit a new ticket in the Plugin‘s GitHub repository

Note: The JSON schema file shipped with the Plugin is based on docs for SAP Commerce manifest.json file

 

Added code contributions for extension name related properties
  • storefrontAddons -> addon
  • storefrontAddons -> storefront
  • storefrontAddons -> template
  • webapps -> name
  • extensions -> element of the array

 

Added code contributions & inspection for extension pack properties

 

It is now possible to specify and validate complex commerceSuiteVersion according to the docs

CCv2 – SAP Data Hub

You may call it a dinosaur, zombie, phoenix or, officially, SAP Data Hub. Actually, it does not matter how it is being named. It works, it is still in use, and it just does what it has to.

It must not be easy for SAP to say goodbye and simply ignore SAP Data Hub from a CCv2 perspective. Ergo, they recognized the need and added SAP Data Hub support to CCv2.

If you need to use SAP Data Hub in CCv2, once again the project has to have a specific structure and a mandatory SAP Data Hub project descriptor file, manifest.json, has to be placed under the datahub root folder.

Again, the Plugin is here also to simplify a developer’s life when they are working with that file:

  • A JSON schema file is shipped with the Plugin based on docs for the SAP Commerce manifest.json file.
  • Enabled validation of the manifest.json file according to the custom JSON schema
  • Added code contributions based on allowed values defined in the custom JSON schema

CCv2 – JavaScript Storefront

And let’s not forget about JavaScript storefront in the SAP’s Public Cloud. It, too, has to have a specific project structure and a mandatory project descriptor file, manifest.json, has to be placed under the js-storefront root folder.

The Plugin is here once again to simplify Developer’s life when they are working with that file.

  • JSON schema file shipped with The Plugin based on docs for SAP Commerce manifest.json file.
  • Enabled validation of the manifest.json file according to custom JSON schema
  • Added code contributions based on allowed values defined in the custom JSON schema

Type System

Type System – Preview

Usability of the Preview mode for the Type System was improved by adding a new grouping mode for Item type. Once enabled all Item types will respect their extends, with the top-most parent as Item.


Type System – items.xml

  • Added Item attribute based code completion for index definition
  • Added navigation to the declaration of Item attribute
  • Added icons and flattened types for any type reference to improve usability and speedup development

ImpEx

Previously, ImpEx actions group was always displayed, for every file. From now on this action group will be available only for ImpEx files.

Note that icons for Action menu may not be displayed in some circumstances, like OS, configuration or enabled New UI.

New custom ImpEx Action icon.


FlexibleSearch

FlexibleSearch actions group adjusted in the same way as ImpEx one.

New custom FlexibleSearch Action Icon.


Cockpit NG System (Backoffice)

Cockpit NG System – Commons

Cockpit NG was not forgotten in this release and listing of references was added for multiple definitions.


Business Process

The following new functionality was added for Business Process (BP) files:

  • Added listing of references for the id attribute within Business Process definition
  • Added completion and navigation for onError attribute within Business Process definition

Extension Info

Some extras have been added for extensioninfo.xml

  • Added code completion for the key attribute of the meta tag
  • Added code completion for the value attribute of the meta tag based on value of the key attribute

Other

Fixes and Adjustments

  • Improved project startup performance
  • Not all extension names were shown in the code completion (project refresh is required)
  • Run configurations were not always created after project import
  • SAP Commerce project specific settings should be visible only for [y] projects
  • FlexibleSearch icon updated in accordance with file extension
    • fsx -> fxs
  • Updated 3rd-party plugin dependencies
  • Plugin upgraded to Gradle 8

 

Disabled spell check for properties with custom named values

 

Improved Project Structure information notification content

Improved the representation of the available extensions
  • Grouping by type: Custom, OOTB, CCv2 & Platform
  • Added custom icons for better visualisation
  • Note: Project Refresh may be required to use new representation


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

Leave a Reply