Transition to execute complate
487617
def transition_to_execute_complete(self):
        """"""
        assert self.state in [AQStateMachineStates.execute]
        self.state = AQStateMachineStates.execute_complete
279814
def templates_dir_menu
        puts "\n\n******************************************************************************************************************************************\n\n"
        puts "  JUMPSTART TEMPLATES DIRECTORY OPTIONS\n".purple
        puts "  The JumpStart template directory is currently: " + JumpStart.templates_path.green
        puts "\n  1".yellow + " Change the templates directory.\n"
        puts "  2".yellow + " Reset the templates directory to default.\n\n"
        puts "  b".yellow + " Back to main menu.\n\n"
        puts "  x".yellow + " Exit jumpstart.\n\n"
        puts "******************************************************************************************************************************************\n\n"
        templates_dir_options
      end
1283101
public void process(TemplateImpl template, Writer out) throws IOException {
    
    Environment env = new Environment(template.getPath(), out);
    currentScope.declaringEnvironment = env;

    Environment prevEnv = switchEnvironment(env);
    
    TemplateContext tmpl = template.getContext();
    HeaderContext hdr = tmpl.hdr;
    
    if (hdr != null &&
        hdr.hdrSig != null &&
        hdr.hdrSig.callSig != null &&
        hdr.hdrSig.callSig.paramDecls != null) {
      
      for (ParameterDeclContext paramDecl : hdr.hdrSig.callSig.paramDecls) {
        
        String paramId = paramDecl.id.getText();
        
        if (!currentScope.values.containsKey(paramId)) {
          
          currentScope.declare(paramId, eval(paramDecl.expr));
          
        }
        
      }
      
    }
    
		try {
			tmpl.accept(visitor);
		}
		finally {
		  switchEnvironment(prevEnv);
		}
  }
1301240
function buildRunTemplate(opts, callback) {
  var viewOpt = {
    directory: opts.directory,
    processCommand: opts.command,
    user: opts.user,
    processEnvDir: opts.processEnvDir
  };

  renderTemplate(templateFilePath('run', opts.templateOpt), viewOpt, function(err, renderedOutput) {
    if (err) {
      return callback(err.message);
    } else {
      return fs.writeFile(opts.processRunPath, renderedOutput, function(err) {
	if (err) {
	  return callback(err.message);
	} else {
	  fs.chmodSync(opts.processRunPath, 0755);
	  return callback(null);
	}
      });
    }
  });
}
1167364
private void processIfCmd(String parms, int cmdTPosBegin, int cmdTPosEnd)
            throws MiniTemplator.TemplateSyntaxException {
        excludeTemplateRange(cmdTPosBegin, cmdTPosEnd);
        if (condLevel >= maxCondLevels - 1) {
            throw new MiniTemplator.TemplateSyntaxException("Too many nested $if commands.");
        }
        condLevel++;
        boolean enabled = isCondEnabled(condLevel - 1) && evaluateConditionFlags(parms);
        condEnabled[condLevel] = enabled;
        condPassed[condLevel] = enabled;
    }
536862
def handle(self, **options):
        """"""
        template = os.path.dirname(os.path.abspath(__file__)) + "/app_template"
        name = options.pop("name")
        call_command("startapp", name, template=template, **options)
1240964
private Status executeSwitch(Stmt.Switch stmt, CallStack frame, EnclosingScope scope) {
		Tuple<Stmt.Case> cases = stmt.getCases();
		//
		Object value = executeExpression(ANY_T, stmt.getCondition(), frame);
		for (int i = 0; i != cases.size(); ++i) {
			Stmt.Case c = cases.get(i);
			Stmt.Block body = c.getBlock();
			if (c.isDefault()) {
				return executeBlock(body, frame, scope);
			} else {
				// FIXME: this is a temporary hack until a proper notion of
				// ConstantExpr is introduced.
				RValue[] values = executeExpressions(c.getConditions(), frame);
				for (RValue v : values) {
					if (v.equals(value)) {
						return executeBlock(body, frame, scope);
					}
				}
			}
		}
		return Status.NEXT;
	}
987673
function process(parent, index, commands) {
    var cmd = commands[index],
        ret;

    switch (cmd.value[0].type) {
        case ConkittyTypes.TEMPLATE_NAME:
            ret = processCall(parent, false, cmd);
            break;

        case ConkittyTypes.COMMAND_NAME:
            switch (cmd.value[0].value) {
                case 'ATTR':
                    ret = processAttr(parent, true, cmd);
                    break;

                case 'CALL':
                    ret = processCall(parent, true, cmd, commands[index + 1]);
                    break;

                case 'CHOOSE':
                    ret = processChoose(parent, cmd);
                    break;

                case 'EACH':
                    ret = processEach(parent, cmd, commands[index + 1]);
                    break;

                case 'EXPOSE':
                    ret = processExpose(parent, cmd);
                    break;

                case 'JS':
                    ret = processJS(parent, cmd);
                    break;

                case 'MEM':
                    ret = processMem(parent, cmd);
                    break;

                case 'PAYLOAD':
                    ret = processPayload(parent, cmd);
                    break;

                case 'SET':
                    ret = processSet(parent, cmd);
                    break;

                case 'TEST':
                    ret = processTest(parent, cmd);
                    break;

                case 'TRIGGER':
                    ret = processTrigger(parent, cmd);
                    break;

                case 'WITH':
                    ret = processWith(parent, cmd, commands[index + 1]);
                    break;

                default:
                    throw new ConkittyErrors.InconsistentCommand(cmd.value[0]);
            }

            break;

        case ConkittyTypes.VARIABLE:
            ret = processVariable(parent, cmd);
            break;

        case ConkittyTypes.JAVASCRIPT:
            ret = processJavascript(parent, cmd);
            break;

        case ConkittyTypes.STRING:
            ret = processString(parent, cmd);
            break;

        case ConkittyTypes.CSS:
            ret = processElement(parent, cmd);
            break;

        case ConkittyTypes.ATTR:
            ret = processAttr(parent, false, cmd);
            break;

        case ConkittyTypes.INCLUDE:
            ret = processInclude(parent, cmd);
            break;

        case ConkittyTypes.NODE_APPENDER:
            ret = processAppender(parent, cmd);
            break;

        default:
            throw new ConkittyErrors.InconsistentCommand(cmd.value[0]);
    }

    return index + ret;
}
172788
def _handle_template_end(self):
        """"""
        if self._context & contexts.TEMPLATE_NAME:
            if not self._context & (contexts.HAS_TEXT | contexts.HAS_TEMPLATE):
                self._fail_route()
        elif self._context & contexts.TEMPLATE_PARAM_KEY:
            self._emit_all(self._pop())
        self._head += 1
        return self._pop()
1188129
function main() {
    this.prior = this.current;
    this.current = this.current.apply(this, arguments) || this.current;
    // Call user transition function, if defined
    if (this.transition) {
        this.transition.apply(this, arguments);
    }
}
1359066
private function handleTemplateSelection()
	{
		if (\Input::get('key') !== 'new_tpl') {
			return;
		}

		if (\Input::get('original') && !\Input::post('original')) {
			// Preselect the original template
			\Input::setPost('original', \Input::get('original'));
		}

		if (\Input::get('target') && !\Input::post('target')) {
			// Preselect the target template folder
			\Input::setPost('target', \Input::get('target'));
		}
	}
1270162
function (oldInfos, newInfos, transition) {
      _emberMetalRun_loop.default.once(this, this.trigger, 'willTransition', transition);

      if (_emberMetalProperty_get.get(this, 'namespace').LOG_TRANSITIONS) {
        _emberMetalLogger.default.log('Preparing to transition from \'' + EmberRouter._routePath(oldInfos) + '\' to \'' + EmberRouter._routePath(newInfos) + '\'');
      }
    }
956505
private void transitionToFinalBatchStatus() {
        StopLock stopLock = getStopLock(); // Store in local variable to facilitate Ctrl+Shift+G search in Eclipse
        synchronized (stopLock) {

            BatchStatus currentBatchStatus = runtimeWorkUnitExecution.getBatchStatus();
            if (currentBatchStatus.equals(BatchStatus.STARTED)) {
                updateJobBatchStatus(BatchStatus.COMPLETED);
            } else if (currentBatchStatus.equals(BatchStatus.STOPPING)) {
                updateJobBatchStatus(BatchStatus.STOPPED);
            } else if (currentBatchStatus.equals(BatchStatus.FAILED)) {
                updateJobBatchStatus(BatchStatus.FAILED); // Should have already been done but maybe better for possible code refactoring to have it here.
            } else {
                throw new IllegalStateException("Step batch status should not be in a " + currentBatchStatus.name() + " state");
            }
        }
    }
1256655
def _transition(self, nxt, cur=None, since=None):
        '''
        
        '''
        self.transition_intervals[(cur, nxt)].tick()
        if since:
            self.state_durations[cur].end(since)
949934
def copy_templates(entry_point, py_entry_point, auto_write, output_dir):
    '''
    '''

    if not os.path.exists(output_dir):
        os.makedirs(output_dir)

    scripts = []
    for f in os.listdir(bin_path()):
        ext = os.path.splitext(f)[-1]
        newline = NEWLINE_MAP.get(ext, '\n')
        template = bin_path(f)
        destination = output_dir + '/' + entry_point + ext
        scripts.append(destination)

        with io.open(template, 'r') as f:
            code = f.read()
        code = code.replace('{{entry_point}}', entry_point)
        code = code.replace('{{py_entry_point}}', py_entry_point)
        code = code.replace('{{auto_write}}', str(int(auto_write)))

        with io.open(destination, 'w', newline=newline) as f:
            f.write(code)

    return scripts
763846
function (arg) {
            var out = arg.out;
            var statement = arg.statement;

            // Add dependencies specified explicitly in the template declaration
            this._processDependencies(out);

            this._createBlocks(out);
            this._processInheritance(out);
            this._processScript(out);

            out.enterBlock("main");
            out.writeln("var Aria = require('ariatemplates/Aria');");
            out.leaveBlock();

            out.enterBlock("classDefinition");
            this._writeClassDefHeaders(out);
            this._writeConstructor(out);
            this._writeDestructor(out);
            out.leaveBlock();

            // main part of the processing (process the whole template):
            out.processContent(statement.content);

            if (out.errors) {
                out.$dispose();
                this.$callback(out.callback, {
                    classDef : null,
                    errors : out.errors
                });
                // in case of synchronous call, the following line prevents a second call of the callback
                // to report the error
                out.errors = false;
                return;
            }

            out.enterBlock("prototype");
            this._writeClassInit(out);
            this._writeInitTemplate(out);
            out.leaveBlock();

            out.enterBlock("classDefinition");
            this._writeDependencies(out);
            this._writeClassDefEnd(out);
            out.leaveBlock();

            out.enterBlock("main");
            out.writeDependencies();
            out.write(out.getBlockContent("classDefinition"));
            out.leaveBlock();

            out.tree.properties = {
                macros: out.macros,
                views: out.views,
                wlibs: out.wlibs
            };
            var res = null;
            res = out.getBlockContent("main");
            out.$dispose();
            this.$callback(out.callback, {
                classDef : res,
                logicalPath : Aria.getLogicalPath(out.templateParam.$classpath, Aria.ACCEPTED_TYPES[this._classType]),
                tree : out.tree,
                debug : out.debug
            });
        }
1140302
function (methodName, options) {

            // If we don't have options (a `control` instance), we'll run this
            // later.
            paramReplacer.lastIndex = 0;
            if (options || !paramReplacer.test(methodName)) {
                // If we have options, run sub to replace templates `{}` with a
                // value from the options or the window
                var convertedName = options ? can.sub(methodName, [options, window]) : methodName;
                if (!convertedName) {
                    return null;
                }
                // If a `{}` template resolves to an object, `convertedName` will be
                // an array
                var arr = can.isArray(convertedName),

                    // Get the name
                    name = arr ? convertedName[1] : convertedName,

                    // Grab the event off the end
                    parts = name.split(/\s+/g),
                    event = parts.pop();

                return {
                    processor: processors[event] || basicProcessor,
                    parts: [name, parts.join(" "), event],
                    delegate: arr ? convertedName[0] : undefined
                };
            }
        }