/* * Licensed Materials - Property of IBM * * IBM Cognos Products: Modeling UI * * Copyright IBM Corp. 2017, 2019 * * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ define(['bi/glass/core/Class', 'ca-modeller/CMIcons'], function (BaseClass) { var PackageEnrichHandler = BaseClass.extend({ init: function() { PackageEnrichHandler.inherited('init', this, arguments); }, doAction: function(context) { return Promise.resolve(this.onSelectItem(context)); }, onSelectItem: function(context) { require(['ca-modeller/packageEnrich'], function(packageEnrich) { var selected = context.target.activeObject.aSelectedContext[0]; packageEnrich.default(context.glassContext, { storeId: selected.id, packageName: selected.defaultName }); }) }, /** * Method invoked when rendering glass Menu, ContextMenu and GlassPlugin classes to determine if the item should be displayed * @param {context} which contains the following: *