Generate the whole project. Returns True if at least one
        file has been generated, False otherwise.
761511
def generate_project(self):
        
        # checks needed properties
        if not self.name or not self.destdir or \
               not os.path.isdir(self.destdir):
            raise ValueError("Empty or invalid property values: run with 'help' command")

        _log("Generating project '%s'" % self.name)
        _log("Destination directory is: '%s'" % self.destdir)

        top = os.path.join(self.destdir, self.name)
        src = os.path.join(top, self.src_name)
        resources = os.path.join(top, self.res_name)
        utils = os.path.join(src, "utils")

        if self.complex:
            models = os.path.join(src, "models")
            ctrls = os.path.join(src, "ctrls")
            views = os.path.join(src, "views")
        else: models = ctrls = views = src

        res = self.__generate_tree(top, src, resources, models, ctrls, views, utils)
        res = self.__generate_classes(models, ctrls, views) or res
        res = self.__mksrc(os.path.join(utils, "globals.py"), templates.glob) or res

        if self.complex: self.templ.update({'model_import' : "from models.application import ApplModel",
                                            'ctrl_import' : "from ctrls.application import ApplCtrl",
                                            'view_import' : "from views.application import ApplView"})
        else: self.templ.update({'model_import' : "from ApplModel import ApplModel",
                                 'ctrl_import' : "from ApplCtrl import ApplCtrl",
                                 'view_import' : "from ApplView import ApplView"})

        res = self.__mksrc(os.path.join(top, "%s.py" % self.name), templates.main) or res

        # builder file
        if self.builder:
            res = self.__generate_builder(resources) or res

        if self.dist_gtkmvc3: res = self.__copy_framework(os.path.join(resources, "external")) or res

        if not res: _log("No actions were taken")
        else: _log("Done")
        return res
1320502
def generate(organization, package, destination):
    
    gen = ResourceGenerator(organization, package)

    tmp = tempfile.NamedTemporaryFile(mode='w+t', delete=False)
    try:
        tmp.write(gen.conf())
    finally:
        tmp.close()

    shutil.copy(tmp.name, os.path.join(destination, 'conf.py'))

    tmp = tempfile.NamedTemporaryFile(mode='w+t', delete=False)
    try:
        tmp.write(gen.makefile())
    finally:
        tmp.close()

    shutil.copy(tmp.name, os.path.join(destination, 'Makefile'))
1245171
public void generate(GenerationContext context) {
    boolean exists = exists(context.getFile());
    if (!context.isOverwrite() && exists) {
      return;
    }
    File dir = context.getFile().getParentFile();
    if (dir != null) {
      mkdirs(dir);
    }
    Writer writer = openWriter(context);
    try {
      Template template = getTemplate(context.getTemplateName());
      process(template, context.getModel(), writer);
    } finally {
      IOUtil.close(writer);
    }
    if (exists) {
      Logger.info(Message.DOMAGEN0020.getMessage(context.getFile().getPath()));
    } else {
      Logger.info(Message.DOMAGEN0019.getMessage(context.getFile().getPath()));
    }
  }
1365083
def generate(argv: List[str]) -> bool:
    
    opts = genargs().parse_args(argv)
    filebase = os.path.dirname(opts.infile) + str(os.path.basename(opts.infile).rsplit('.', 1)[0])
    if opts.nojson:
        opts.jsonfile = None
    elif not opts.jsonfile:
        opts.jsonfile = filebase + ".json"
    if opts.nordf:
        opts.rdffile = None
    elif not opts.rdffile:
        opts.rdffile = filebase + "." + rdf_suffix(opts.format)
    if do_parse(opts.infile, opts.jsonfile, opts.rdffile, opts.format, opts.context):
        if opts.jsonfile:
            print("JSON output written to {}".format(opts.jsonfile))
        if opts.rdffile:
            print("{} output written to {}".format(opts.format, opts.rdffile))
        return True
    else:
        print("Conversion failed")
        return False
543021
public function actionGenerate() {
		$versionList = MiscHelper::getAllVersions();
		$versionList = array_combine($versionList, $versionList);
		$selected = Select::display('Select package', $versionList);
		$version = Select::getFirstValue($selected);
		ApiDocHelper::generate($version);
		Output::block('Success generated');
	}
1329643
def generate(self, blueprint, context, interactive=True):
        """"""
        if not isinstance(blueprint, Blueprint):
            bp = self.blueprints.get(blueprint)
            if not bp:
                raise ValueError('%s is not a valid blueprint' % blueprint)
            blueprint = bp

        self.stdout.write(
            style.format_command(
                'Generating',
                blueprint.full_name
            )
        )
        generator = Generator(
            self,
            blueprint,
            context,
            interactive=interactive
        )
        result = generator.generate()
        if blueprint.name == 'init':
            # try re-setting the name
            self.refresh()
        return result
868666
def _project_auto_open(self):
        
        for project in self._projects.values():
            if project.auto_open:
                yield from project.open()
858683
def export_project(self):
        
        output = copy.deepcopy(self.generated_project)
        self.process_data_for_makefile(self.workspace)
        self._fix_sublime_paths(self.workspace)
        self.workspace['linker_options'] =[]

        output['path'], output['files']['makefile'] = self.gen_file_jinja('makefile_gcc.tmpl', self.workspace, 'Makefile', self.workspace['output_dir']['path'])

        self.workspace['buildsys_name'] = 'Make'
        self.workspace['buildsys_cmd'] = 'make all'

        path, output['files']['sublimetext'] = self.gen_file_jinja(
            'sublimetext.sublime-project.tmpl', self.workspace, '%s.sublime-project' % self.workspace['name'], self.workspace['output_dir']['path'])
        generated_projects = output
        return generated_projects
1157784
def build
      return false if @generated
      logger.info("--> #{path}")
      @dependencies = Set.new
      file.parent.mkpath
      if input.template?
        evaluate_template
      else
        copy_resource
      end
      @generated = true
    end
706158
protected function createStarterFiles()
    {
        $this->output->writeLn("Ensuring project files are present.");

        $count = 0;
        foreach ($this->starterFiles as $source => $file) {
            $label = $this->tree(++$count >= count($this->starterFiles));
            if (!file_exists($file)) {
                if (file_put_contents($file, fopen($this->srcUrl . $source, 'r')) > 0) {
                    $this->output->writeLn($label . $this->ok($file));
                } else {
                    $this->output->writeLn($label . $this->fail($file));
                    $this->flagFailing();
                }
            } else {
                $this->output->writeLn($label . $this->skip($file));
            }
        }

        $this->nl();
    }
988373
private boolean generateJavaCode(File baseFile, File dataFile, File extendedFile) {
        return (baseFile.lastModified() < dataFile.lastModified() || (extendedFile.exists() && baseFile.lastModified() < extendedFile
            .lastModified()));
    }
577324
function (child) {
                    // Replicate filtering that getAllFiles() does
                    if (ProjectManager.shouldShow(child)) {
                        if (child.isFile && _isReadableText(child.name)) {
                            // Re-check the filtering that the initial search applied
                            if (_inSearchScope(child)) {
                                addedFiles.push(child);
                                addedFilePaths.push(child.fullPath);
                            }
                        }
                        return true;
                    }
                    return false;
                }
741581
boolean shouldExecuteOnProject() {
    File report = pathResolver.relativeFile(fileSystem.baseDir(), configuration.getItReportPath());
    boolean foundReport = report.exists() && report.isFile();
    boolean shouldExecute = configuration.shouldExecuteOnProject(foundReport);
    if (!foundReport && shouldExecute) {
      JaCoCoExtensions.logger().info(this.toString() + ": JaCoCo IT report not found.");
    }
    return shouldExecute;
  }
273653
def generate(self):
        
        generated_content = ''
        if 'published' in (self._config['status'][0]).lower():
            if os.path.isdir(self.dirs['www_dir']):
                shutil.rmtree(self.dirs['www_dir'])
            os.mkdir(self.dirs['www_dir'])
            # copy the whole source directory of the page,
            # excluding 'nowww' and *s2md
            sfl = glob.glob(os.path.join(self.dirs['source_dir'], "*"))
            dirlist = [f for f in sfl if os.path.isdir(f)]
            filelist = [f for f in sfl if os.path.isfile(f)]
            for f in filelist:
                if not '.md' in os.path.split(f)[1]:
                    shutil.copy(f, self.dirs['www_dir'])
            for d in dirlist:
                rfn = os.path.split(d)[1]
                if rfn != 'nowww':
                    shutil.copytree(d, os.path.join(self.dirs['www_dir'], rfn))
                #write the rendered "page" to file

            #fout = open(self.dirs['www_filename'], 'w')
            #fout.write(self.render())
            #fout.close()

            generated_content = self.render()
            fout = codecs.open(self.dirs['www_filename'], "w", encoding="utf-8", errors="xmlcharrefreplace")
            fout.write(generated_content)
            fout.close()

        return generated_content
1127921
private boolean setNextObject() {
        while (true) {
            while (ds == null) {
                if (!fileSetIterator.hasNext()) {
                    return false;
                }
                FileSet fs = fileSetIterator.next();
                ds = fs.getDirectoryScanner(project);
                ds.scan();
                if (iterateDirectories) {
                    files = ds.getIncludedDirectories();
                } else {
                    files = ds.getIncludedFiles();
                }
                if (files.length > 0) {
                    fileIndex = -1;
                    break;
                } else {
                    ds = null;
                }
            }

            if (ds != null && files != null) {
                if (++fileIndex < files.length) {
                    nextFile = new File(ds.getBasedir(), files[fileIndex]);
                    nextObjectSet = true;
                    return true;
                } else {
                    ds = null;
                }
            }
        }
    }
63469
def generate(self, project):
		
		for assignment in self.s2n_mapping:
			if assignment["ipprefix"] == project:
				self._name = assignment["package"]
				return self

		#
		# github.com -> github
		# code.google.com/p/ -> googlecode
		# golang.org/x/ -> golangorg
		# gopkg.in/check.v1 -> gopkg-check
		# camlistore.org
		#

		name = project
		if name.startswith("github.com"):
			name = re.sub(r"^github\.com", "github", name)

		if name.startswith("gopkg.in"):
			name = re.sub(r"gopkg\.in", "gopkg", name)
			# any version marks?
			name = re.sub(r"\.v\d", "", name)
			name = re.sub(r"/v\d/", "/", name)

		if name.startswith("code.google.com/p"):
			name = re.sub(r"^code\.google\.com/p", "googlecode", name)

		if name.startswith("golang.org/x"):
			name = re.sub(r"^golang\.org/x", "golangorg", name)

		if name.startswith("google.golang.org"):
			name = re.sub(r"^google\.golang\.org", "googlegolangorg", name)

		if name.startswith("bitbucket.org"):
			name = re.sub(r"^bitbucket\.org", "bitbucket", name)

		if name.startswith("k8s.io"):
			name = re.sub(r"^k8s\.io", "k8s", name)

		if name.endswith(".org"):
			name = re.sub(r"\.org$", "", name)

		name = name.replace("/", "-")

		self._name = "golang-%s" % name

		return self
1345753
def generate(self):
        
        if self._tar_buffer.tell():
            self._tar_buffer.seek(0, 0)
            yield self._tar_buffer.read()

        for fname in self._files_to_add:
            last = self._tar_buffer.tell()
            self._tar_obj.add(fname)
            self._tar_buffer.seek(last, os.SEEK_SET)
            data = self._tar_buffer.read()
            yield data

        for info, content in self._ios_to_add.items():
            last = self._tar_buffer.tell()
            self._tar_obj.addfile(info, content)
            self._tar_buffer.seek(last, os.SEEK_SET)
            data = self._tar_buffer.read()
            yield data

        self._tar_obj.close()
        yield self._tar_buffer.read()
        self._generated = True