cancel
Showing results for 
Search instead for 
Did you mean: 

Code snippets (templating of code parts) in Web IDE

Former Member
0 Kudos

Dear SAPUI5 developers,

I started actively using Web IDE for developments and what I actually noticed: I spend pretty much time on very similar operations.

I.e. every time I create new controller, I type every time same text:


sap.ui.define(

  ["sap/ui/core/mvc/Controller"],

  function(Controller) {

  "use strict";

  return Controller.extend("your.namespace.controller.ControllerName", {

  onInit: function(evt) {

  }

  });

  });

Coming from ABAP I always remember pretty good code templates feature letting the developer past any code he wishes into the templates and insert them just by typing the name of the template. Most of oftenly used patterns I was able to insert just by pressing 4-5 keyboard buttons.

Could you please advise - what is your best practice in SAPUI5 ( JS in common ) code templating. Probably you can advise some external tools to generate the code there and just copy-paste it into your project.

I understand - this feature is not so easy to implement into WEB IDE soon - so I'm just trying to find a workaround.

Thanks!

Accepted Solutions (0)

Answers (1)

Answers (1)

michal_keidar
Active Contributor
0 Kudos

Hi Petr,

That's a very nice feature request.

- what do you think?

Regards,
Michal.