Search code examples
commentssapui5jsdocoutline

JSDoc with SAPUI5/OPENUI5


I tried hard to get the eclipse outline view filled, but it is still empty

I read these but it does not work:

http://usejsdoc.org/howto-amd-modules.html

SCN: sapui5-mvc-pattern-and-eclipse-outline-view

How can I pass jsdoc comments to my code?

sap.ui.define([
    "sap/ui/model/json/JSONModel",
    "sap/m/MessageToast",
    "sap/ui/model/odata/Filter",
    "sap/ui/model/FilterOperator"
], function (JSONModel, MessageToast, Filter, FilterOperator) { 
    "use strict";

    return BaseController.extend("SAP.Mobile.controller.App", {
        /**
        * @memberOf BaseController
        * ...
        */

        formatter: formatter,

        onInit: function () {

        },

        onAfterRendering: function(){

        }

    });
});

Solution

  • I stumbled accross the same issue. As a switch to WebIDE or Webstorm is not possible due to several reasons, I use a slightly different syntax to have outline support.

    sap.ui.define([
        "sap/ui/model/json/JSONModel",
        "sap/m/MessageToast",
        "sap/ui/model/odata/Filter",
        "sap/ui/model/FilterOperator"
    ], function (JSONModel, MessageToast, Filter, FilterOperator) { 
        "use strict";
    
        var Controller = BaseController.extend("SAP.Mobile.controller.App", {
    
           /**
            * @memberOf SAP.Mobile.controller.App
            */
            formatter: formatter,
    
            onInit: function () {
    
            },
    
            onAfterRendering: function(){
    
            }
    
        });
    
        return Controller;
    
    });