Did you know you could extend the SAP Web IDE with your own feature? If not, then now you know 🙂 SAP created an SDK for the SAP Web IDE to make it easy for every developer to create his own feature.
I created two SAP Web IDE Features:
In this blog I want to share my experience with creating features and hope it will inspire and help you!
Feature vs Plugin
First you have to know the difference between a Feature and a Plugin. It’s not that big of a deal when you create a Feature/Plugin. But it’s important for understanding and for terminology, just so we’re on the same level.
A plugin contains certain functionality. Several plugins can be grouped together into one Feature. This means one Feature can contain multiple Plugins and a Plugin is part of a Feature.
A feature contains multiple folders, each folder stands for another plugin. The feature has also a package.json with all the configuration of the feature.
Each plugin can contain services, these services can be shared between plugins in the same feature.
A plugin contains the following structure:
- Commands are menuitems that you can place a specific places in the SAP Web IDE.
- Contains reusable logic
- UI5 View
- You can add a view to a specific area in a perspective of the SAP Web IDE
It also includes a plugin.json which connects all the parts together.
In the plugin.json, you have to define the following:
- SAP Web IDE SDK Services that you want to use in your plugin
- A few service are already defined but there are many more. Those can be found by using debugging. Remember that they can be changed as long as they are not released officially by SAP.
- In this blog I show you how to find other non-documented SAP Web IDE services: <url>
- Define your own services
- Define your own View
- Add it to a perspective in the SAP Web IDE
- Define the place of a command
How to start
SAP already documented most of the basic possibilities with the SDK. Go to documentation and there on the left you have multiple tutorials:
In the SAP Web IDE you also have wizards for generating a Feature.
Start with generating a feature:
You can immediately generate a plugin. Include the sample code to have an example:
This will help you understanding all the different parts.
You can always add more plugins to your feature:
Right click on the client folder in the feature –> new –> SAP Web IDE Plugin
Run your feature
You can run and test your feature in the SAP Web IDE:
Right click on “package.json” –> Run –> Run As Feature
Tutorials based on the SDK documentation combined with my experience during developing my own Features that will help you developing your Feature. Some of the things I will mention in these tutorials I couldn’t find in the documentation or isn’t documented yet. Be aware that everything that’s not officially documented by SAP can change in the future.
- Create a Custom Command
- Add a view to the SAP Web IDE development perspective
- Create your own Plugin service
- Use existing Plugin services
You can find the full code of the demo feature on github: https://github.com/lemaiwo/SAPWebIDEFeatureTutorial
Start making your own SAP Web IDE Features and make the SAP Web IDE great together !