1
votes

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(){

        }

    });
});
3
As Eclipse has rather poor Javascript support, I would not touch it; rather go with SAP WebIDE, Jetbrains Webstorm, etc since they have much better Javascript support and tooling (and the class structure is displayed as it should be) - Qualiture

3 Answers

2
votes

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;

});
0
votes

The problem occurs because of the new way of defining functions using sap.ui.define and Eclipse is not able to generate an outline. SAP is recommending their WebIDE for UI5 related developments and enhancements to SAPUI5 eclipse is not being taken care of.

0
votes

I'm using this way and works very well to me.

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

/**
* Controller
* @class
*/
function Controller (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;

}