docs: function restoreMissingPluginsForPlatform(platform, projectRoot, options) {
      events.emit('verbose', 'Checking for any plugins added to the project that have not been installed in ' + platform + ' platform');
  
      // Flow:
      // 1. Compare <platform>.json file in <project>/plugins ("old") and platforms/<platform> ("new")
      // 2. If there is any differences - merge "old" one into "new"
      // 3. Reinstall plugins that are missing and was merged on previous step
  
      var oldPlatformJson = PlatformJson.load(path.join(projectRoot, 'plugins'), platform);
      var platformJson = PlatformJson.load(path.join(projectRoot, 'platforms', platform), platform);
  
      var missingPlugins = Object.keys(oldPlatformJson.root.installed_plugins)
          .concat(Object.keys(oldPlatformJson.root.dependent_plugins))
          .reduce(function (result, candidate) {
              if (!platformJson.isPluginInstalled(candidate))
                  result.push({name: candidate,
                      // Note: isPluginInstalled is actually returns not a boolean,
                      // but object which corresponds to this particular plugin
                      variables: oldPlatformJson.isPluginInstalled(candidate)});
  
              return result;
          }, []);
  
      if (missingPlugins.length === 0) {
          events.emit('verbose', 'No differences found between plugins added to project and installed in ' +
              platform + ' platform. Continuing...');
          return Q.resolve();
      }
  
      var api = platforms.getPlatformApi(platform);
      var provider = new PluginInfoProvider();
      return missingPlugins.reduce(function (promise, plugin) {
          return promise.then(function () {
              var pluginOptions = options || {};
              pluginOptions.variables = plugin.variables;
              pluginOptions.usePlatformWww = true;
  
              events.emit('verbose', 'Reinstalling missing plugin ' + plugin.name + ' in ' + platform + ' platform');
              var pluginInfo = provider.get(path.join(projectRoot, 'plugins', plugin.name));
              return api.removePlugin(pluginInfo, pluginOptions)
              .then(function () {
                  return api.addPlugin(pluginInfo, pluginOptions);
              });
          });
      }, Q());
  }