This is to:
Other guides have pockets of outdated information such as the no-longer-existing option to create a 'Fiori Launchpad Plugin' from 'New Project from Template'
2020 Updated
Steps:
.then()
add custom code for modifications to FLP.init: function () {
// call the base component's init function
UIComponent.prototype.init.apply(this, arguments);
var rendererPromise= this._getRenderer();
rendererPromise.then(function(oRenderer){
// var bFull= jQuery.sap.getUriParameters().get("plugin-full");
oRenderer.addHeaderItem("sap.ushell.ui.shell.ShellHeadItem", {
icon:"sap-icon://add"
,tooltip:"Current Stage"
},true,true);
});
// var oRenderer= sap.ushell.Container.getRenderer('fiori2');
// oRenderer.addHeaderItem({icon:'sap-icon://add'},true,true);
// enable routing
// this.getRouter().initialize();
// set the device model
// this.setModel(models.createDeviceModel(), "device");
},
_getRenderer:function(){
var that=this,
oDeferred= new jQuery.Deferred(),
oRenderer;
that._oShellContainer= jQuery.sap.getObject("sap.ushell.Container");
if(!that._oShellContainer){
oDeferred.reject("Illegal state: shell container not available. This component must be executed in a unified shell runtime context.");
} else{
oRenderer= that._oShellContainer.getRenderer();
if(oRenderer){oDeferred.resolve(oRenderer);}
else{ //renderer not initialized yet, listen to rendererCreated event
that._onRendererCreated= function(oEvent){
oRenderer= oEvent.getParameter('renderer');
if(oRenderer){oDeferred.resolve(oRenderer);}
else{oDeferred.reject('Illegal state: shell renderer not available after receiving rendererLoaded event');}
};
that._oShellContainer.attachRendererCreatedEvent(that._onRendererCreated);
}
}
return oDeferred.promise();
}
How it Looks: *Note the additional '+' button on top ribbon. Success!
References: