Create your own SAP Web IDE Feature
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:
- https://blogs.sap.com/2016/11/27/custom-ui5-control-generator-sap-web-ide-plugin/
- https://blogs.sap.com/2017/06/29/export-to-plunker-sap-web-ide-feature/
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.
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.
Plugin
A plugin contains the following structure:
- Command
- Commands are menuitems that you can place a specific places in the SAP Web IDE.
- Services
- 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
https://sdk-sapwebide.dispatcher.hana.ondemand.com/index.html
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
Run the feature: https://sdk-sapwebide.dispatcher.hana.ondemand.com/index.html#/topic/ffd23652c3714d1d87ad9820c28e64a3
Tutorials
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 !
Best regards,
Wouter