Run each setup task in sequence
@param ui
@returns {Function}
979425
function taskRunner (ui) {

    return function (item, cb) {

        ui.logger.debug("Starting Step: " + item.step);

        /**
         * Give each step access to the UI Instance
         */
        item.fn(ui, function (err, out) {
            if (err) {
                return cb(err);
            }
            if (out) {
                handleOut(ui, out);
            }
            ui.logger.debug("{green:Step Complete: " + item.step);
            cb();
        });
    };
}
907474
function TaskRun(target) {
    this.name = target.name || 0;
    this.files = target.files || [];
    this._getConfig = target._getConfig;
    this.options = target.options;
    this.startedAt = false;
    this.spawned = null;
    this.changedFiles = Object.create(null);
    this.spawnTaskFailure = false;
    this.livereloadOnError = true;
    if (typeof this.options.livereloadOnError !== 'undefined') {
      this.livereloadOnError = this.options.livereloadOnError;
    }
  }
1031876
def setup_ui(self, ):
        
        grid = QtGui.QGridLayout(self)
        self.setLayout(grid)
        self.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
        self.splitter = QtGui.QSplitter(QtCore.Qt.Horizontal, self)
        grid.addWidget(self.splitter)
        grid.setContentsMargins(0, 0, 0, 0)
879725
function UI(options) {
  if (!(this instanceof UI)) {
    var ui = Object.create(UI.prototype);
    UI.apply(ui, arguments);
    return ui;
  }
  debug('initializing from <%s>', __filename);
  this.options = utils.createOptions(options);
  this.appendedLines = 0;
  this.height = 0;
  this.initInterface();
}
360996
function setup(context) {
  if (GLOBAL.config) {
    console.log('already configured');
    console.trace();
    return;
  }
  if (!context) {
    context = require('./config.js');
  }

  GLOBAL.config = context.config;

  var svc = { pubsub: pubsub, auth: auth, indexer: indexer, pageCache: pageCache };

  GLOBAL.svc = svc;
  auth.setupUsers(GLOBAL, context.logins);
}
1131328
function registerUserTasks() {
    var tasks  = options.tasks,
        task   = that.task.bind(that),
        before = that.before.bind(that),
        after  = that.after.bind(that),
        taskName;

    // register user tasks
    for (taskName in tasks) {
      if ( tasks.hasOwnProperty(taskName) ) {
        task(taskName, tasks[taskName]);
      }
    }

    // register predefined user tasks order
    before('deploy', 'beforeDeploy');

    before('updateCode', 'beforeUpdateCode');
    after('updateCode', 'afterUpdateCode');

    before('npm', 'beforeNpm');
    after('npm', 'afterNpm');

    before('createSymlink', 'beforeCreateSymlink');
    after('createSymlink', 'afterCreateSymlink');

    before('restart', 'beforeRestart');
    after('restart', 'afterRestart');

    after('deploy', 'afterDeploy');
  }
898202
function onLoad() {
    e_interfaceList  = document.getElementById("interface-list")
    e_interfaceName  = document.getElementById("interface-name")
    e_interfaceBody  = document.getElementById("interface-body")
    e_showIdl        = document.getElementById("show-Idl")
    e_showJavaScript = document.getElementById("show-JavaScript")
    e_showJava       = document.getElementById("show-Java")

    setUpShowCheckBoxes()
    populateInterfacesList(IDLTools.getIDLsMatching(/.*/))
}
1175037
public void attachUI(final WComponent ui) {
		if (backing == null || backing instanceof WComponent) {
			backing = ui;
		} else if (backing instanceof InterceptorComponent) {
			((InterceptorComponent) backing).attachUI(ui);
		} else {
			throw new IllegalStateException(
					"Unable to attachUI. Unknown type of WebComponent encountered. " + backing.
					getClass().getName());
		}
	}
426583
function loadTasks() {
  Entry.setContext(CONTEXT);
  var paths = (this.config.path instanceof Array ? this.config.path : [this.config.path]);
  var valid = 0,
    self = this;
  _.forEach(paths, function(sPath) {
    var taskDir = Component.appPath(sPath);
    try {
      var list = crux.util.readDirectory(taskDir, 'js');
    } catch(e) {
      // No tasks
      log.warn('Crux.tasks: no task definitions found in: %s', sPath);
      return;
    }
    // For each task file found in the folder, we register it.
    list.forEach(function(taskPath) {
      var name = taskPath.replace(taskDir, '');
      if(name.charAt(0) === '/' || name.charAt(0) === "\\") name = name.substr(1);
      name = name.replace('.js','');
      name = name.replace(/\\/g,'.').replace(/\//g, '.');
      var split = name.split('.'),
        taskName = split.pop();
      if(split.length !== 0) {
        var ns = split.join('.');
        taskName = ns + ':' + taskName;
      }
      try {
        var taskModule = require(taskPath);
      } catch(e) {
        log.fatal('Crux.tasks: Failed to load task %s', taskName);
        log.debug(e);
        return;
      }
      var taskObj,
        taskConfig = (typeof self.config.tasks[taskName] === 'undefined' ? {} : self.config.tasks[taskName]);
      if(typeof taskModule === 'function') {
        taskObj = new Entry(taskName);
        taskModule.call(CONTEXT, taskObj, taskConfig);
      } else if(taskModule instanceof Entry) {
        taskObj = taskModule;
      }
      if(taskObj == null) return;
      if(!taskObj) {
        log.trace('Crux.tasks: task %s does not implement a crux.Tasks.Entry. Skipping.', taskName);
        return;
      }
      self.registerTask(taskObj);
      valid++;
    });
  });
  if(valid !== 0) {
    log.trace('Crux.tasks: Loaded %s tasks', valid);
  }
}
429089
function runTool(platform, args, done) {
  if (args.length < 1) {
    console.log('usage: query.js file.wtf-trace "[query string]"');
    done(1);
    return;
  }

  var inputFile = args[0];
  var exprArgs = args.slice(1);
  var expr = exprArgs.join(' ').trim();

  console.log('Querying ' + inputFile + '...');

  // Create database for querying.
  var loadStart = wtf.now();
  wtf.db.load(inputFile, function(db) {
    if (db instanceof Error) {
      console.log('ERROR: unable to open ' + inputFile, db);
      done(1);
      return;
    }

    var loadDuration = wtf.now() - loadStart;
    console.log('Database loaded in ' + loadDuration.toFixed(3) + 'ms');
    console.log('');

    queryDatabase(db, expr);

    done(0);
  });
}
518226
function Task(init) {
  this.basedir = init.basedir;
  this.bundle = init.bundle;
  this.datasetId = init.datasetId;
  this.pid = init.pid;
  this.nodes = init.nodes;
  this.action = init.action;
  this.outputStreamOk = true;
  this.files = {};      // object in which we store shuffle file informations to be sent back to master
//  this.lib;         // handler to libraries required on worker side (which cannot be serialized)
//  this.mm;          // handler to worker side memory manager instance
//  this.grid;          // handler to socket object instance
}
585694
function boot() {
		if (window.sap && window.sap.ui && window.sap.ui.getCore) {
			coreInstance = window.sap.ui.getCore();
			return initTags();
		}
		window.sap.ui.require(['/ui5loader-autoconfig', 'sap/ui/core/Core', 'sap/ui/integration/util/CustomElements'],
			function (config, Core, CE) {
				CustomElements = CE;
				Core.boot();
				coreInstance = Core;
				Core.attachInit(function () {
					initTags();
				});
				//pass on the core instance to Customelements interface
				CustomElements.coreInstance = coreInstance;
			});

	}
532049
function executeAll (cfg) {
    console.log(`${clr.DIM+clr.LIGHT_MAGENTA}Package: ${cfg.packageRoot}${clr.RESET}`);
    return new Promise((resolve, reject) => {
        createObservable(cfg).subscribe({
            next ({command, exitCode}) {
                if (exitCode == 0)
                    cfg.log(`${EMIT_COLOR}just-build ${cfg.tasksToRun.join(' ')}`+
                            ` done.${clr.RESET}${cfg.watchMode ? NOW_WATCHING_COLOR+' Still watching...'+clr.RESET : ''}`);
                else 
                    cfg.log(`just-build ${cfg.tasksToRun.join(' ')} failed. ${command} returned ${exitCode}`);
            },
            error (err) {
                reject(err);
            },
            complete () {
                resolve();
            }                
        });
    });
}
1183100
function() {
        self.tasksCount = 0;
        var list = [], i = 0;
        for(var t in self) {
            if( typeof(self[t]) == 'function') {
                list[i] = {
                    func: self[t],
                    cb: hasCallback(self[t])
                }
                ++i
            }
        }
        run(list)
    }
453773
function () {
        var ui = Paginator.ui,
            name,UIComp;
        for (name in ui) {
            if (ui.hasOwnProperty(name)) {
                UIComp = ui[name];
                if (isObject(UIComp) && isFunction(UIComp.init)) {
                    UIComp.init(this);
                }
            }
        }
    }
1204647
function defaultWorkflow(opts) {
  var tasks;
  var paths;
  var runnableTasks;
  var runnablePaths;

  return execP('git status')
    .then(function() {
      return getUnchanged(opts.globs);
    })
    .spread(function(a, b) {
      tasks = a;
      paths = b;
      console.log(
        'Executing: ' + '`git stash && git add . && git stash`.\n'.italic
      );
      return gitCmds.safeStashAll();
    })
    .then(function() {
      console.log(
        'Repo reverted to clean state. Looking at previous screenshots...\n'
      );
      console.log(
        'If anything goes wrong'.bold + ', simply run ' +
        '`git stash pop && git reset HEAD . && git stash pop --index` '.italic +
        'to restore your changes.'
      );
      // TODO: not good enough. Warn earlier about no task. Before stash
      var res = filterRunnables(tasks, paths, opts.taskName);
      runnableTasks = res[0];
      runnablePaths = res[1];

      return runTasks(writeScreenshots, opts, runnableTasks, runnablePaths);
    })
    .catch(function(e) {
      if (e.name === 'OperationalError' &&
          e.message.indexOf('Not a git repository') > -1) {
        return Promise.reject(new Error(notGitMsg));
      }

      return gitCmds
        .safeUnstashAll()
        .then(function() {
          return Promise.reject(e);
        });
    })
    .then(function() {
      console.log(
        'Executing: ' +
        '`git stash pop && git reset HEAD . && git stash pop --index`.\n'.italic
      );
      return gitCmds.safeUnstashAll();
    })
    .then(function() {
      console.log(
        'Repo back to modified state. Getting new screenshots and comparing ' +
        'them with previously recorded ones...\n'
      );
      return runTasks(compareScreenshots, opts, runnableTasks, runnablePaths);
    })
    .then(function() {
      return Promise.map(paths, function(dir, i) {
        return Promise.map(tasks[i], function(task) {
          var p = path.join(
            dir,
            consts.HUXLEY_FOLDER_NAME,
            task.name + consts.TASK_FOLDER_SUFFIX
          );
          return removeDirIfOk(p);
        });
      });
    });
}
545419
def onStart(self, *args, **kwarg):
        
        with transactUI(self):
            config = self.navbar.getActiveConfig()
            config.resetErrors()
            if config.isValid():
                self.clientRunner.run(self.buildCliString())
                self.showConsole()
            else:
                config.displayErrors()
                self.Layout()