Dear IdM experts,
in this video (duration: 00:09:24), I demonstrate JavaScript development for SAP NetWeaver(R) Identity Management using a customized version of the popular open source editor GNU Emacs.
Working on a simple, yet realistic scripting use case, I show some nice features in action:
- Code completion anywhere for IdM built-in functions, view/table names, Identity Center attribute names and more
- Basic JavaScript syntax checks as you type and on request
- Automatic indentation as you type and on request re-indentation of your complete script
- Eclipse-like splitting up of strings into multi-line, concatenated strings by pressing Enter inside any string
- Minimal start-up time using Emacs client/server architecture
In the hope that these customizations might be interesting or even useful to others as well, I published them as open source under the terms of the GNU General Public License (GPL v3). The complete source code of all customizations and Emacs extensions required to get started with scripting like in the video is available at GitHub in the IDMacs repository.
If you want to try it out, just follow the installation instructions in the project’s README file. It’s reasonably easy to set up.
Happier scripting!
Lambert
Lambert,
This is an amazing tool! My only comment is that you need to include the new key bindings in the help file.
As I saw from your video tutorial There were 4 bindings:
CTRL-Enter – Auto complete
CTRL-F2 – Syntax Check
CTRL-F3 – Save
Shift-F1 – Auto Format
It’s also somewhat disconcerting that in the emacs windows the file appears with a .vbs extension. Can this be changed?
Again, congrats on a fantastic tool! This is going into every DEV environment I work in!
Matt
Thanks Matt!
Your list of keybindings is correct. In addition, the following IDMacs-specific keybindings exist which I didn’t show in the video:
I’ve just pushed an update to the README in GitHub to document them properly, and also how to file bug reports.
Regarding the .vbs extension: I agree it’s confusing. As you probably know, that’s the file name exported by MMC to any external script editor, no matter whether it’s JavaScript or Visual Basic Script. I will look into if and how this could be improved.
Best regards,
Lambert
The .vbs extension is now suppressed in JavaScript mode by the latest version in GitHub.
Cheers, Lambert
Thanks for sharing !
Can’t get auto-complete to work? That’s because my documentation of that key binding was wrong! It’s not (and never was) bound to Ctrl-Enter. The correct key binding is:
Ctrl-Space: Auto-complete
I’ve updated the video link in the main post accordingly, so now the audio and subtitle for this one are correct as well.
BR, Lambert
Thanks for that update! I thought it was a problem with my keyboard/computer.
Any chance you can work in a link to the help file or website for function lookups?
Matt
No problem:
Shift+F2: Display API Documentation
is now available in the latest IDMacs version on GitHub. Here’s another video tutorial (duration: 00:04:55) showing how this can be used and customized to either display help from the web or from a local help file.
Hope that helps,
Lambert