Create the content of the "setup.py" file.

@param it the content.
@param basename the basename.
170329
protected void generatePythonSetup(IStyleAppendable it, String basename) {
		it.appendNl("# -*- coding: {0} -*-", getCodeConfig().getEncoding().toLowerCase()); //$NON-NLS-1$
		it.appendHeader();
		it.newLine();
		it.append("from setuptools import setup"); //$NON-NLS-1$
		it.newLine().newLine();
		it.append("setup ("); //$NON-NLS-1$
		it.increaseIndentation().newLine();
		it.append("name='").append(basename).append("lexer',"); //$NON-NLS-1$ //$NON-NLS-2$
		it.newLine();
		it.append("version='").append(getLanguageVersion()).append("',"); //$NON-NLS-1$ //$NON-NLS-2$
		it.newLine();
		it.append("packages=['").append(basename).append("lexer'],"); //$NON-NLS-1$ //$NON-NLS-2$
		it.newLine();
		it.append("entry_points ="); //$NON-NLS-1$
		it.newLine();
		it.append("\"\"\""); //$NON-NLS-1$
		it.newLine();
		it.append("[pygments.lexers]"); //$NON-NLS-1$
		it.newLine();
		it.append("sarllexer = ").append(basename).append("lexer.").append(basename); //$NON-NLS-1$ //$NON-NLS-2$
		it.append(":SarlLexer"); //$NON-NLS-1$
		it.newLine();
		it.append("\"\"\","); //$NON-NLS-1$
		it.decreaseIndentation().newLine();
		it.append(")"); //$NON-NLS-1$
		it.newLine();
	}
997801
protected void updateBasePath(String basePath) {

        if (m_folderOrName != null) {
            if (m_folderOrName.isName()) {
                m_folderOrName = new CmsContentFolderDescriptor(basePath, m_folderOrName.getFolderName());
            }
        } else {
            m_folderOrName = new CmsContentFolderDescriptor(basePath, m_typeName);
        }
    }
678772
static void createConfigFile(String xmlName, Resource configFile) throws IOException {
	configFile.createFile(true);
	createFileFromResource("/resource/config/" + xmlName + ".xml", configFile.getAbsoluteResource());
    }
1199455
@SuppressWarnings("unchecked")
  public void gen(String fileName, String packageName) throws Exception {
    configuration = ConfigBuilder.build(new OverrideConfiguration());
    mapping = configuration.buildMapping();
    defaultCatalog = configuration.getProperties().getProperty(Environment.DEFAULT_CATALOG);
    defaultSchema = configuration.getProperties().getProperty(Environment.DEFAULT_SCHEMA);
    configuration.getProperties().put(Environment.DIALECT, dialect);
    // 1. first process class mapping
    Iterator<PersistentClass> iterpc = configuration.getClassMappings();
    while (iterpc.hasNext()) {
      PersistentClass pc = iterpc.next();
      Class<?> clazz = pc.getMappedClass();
      if (isNotBlank(packageName) && !clazz.getPackage().getName().startsWith(packageName)) continue;
      // add comment to table and column
      pc.getTable().setComment(messages.get(clazz, clazz.getSimpleName()));
      commentProperty(clazz, pc.getTable(), pc.getIdentifierProperty());
      commentProperties(clazz, pc.getTable(), pc.getPropertyIterator());
      PersistentClass mySuper = pc.getSuperclass();
      while(null!=mySuper){
        commentProperties(clazz, pc.getTable(), mySuper.getPropertyIterator());
        mySuper=mySuper.getSuperclass();
      }
      // generator sequence sql
      if (pc instanceof RootClass) {
        IdentifierGenerator ig = pc.getIdentifier().createIdentifierGenerator(
            configuration.getIdentifierGeneratorFactory(), dialect, defaultCatalog, defaultSchema,
            (RootClass) pc);
        if (ig instanceof PersistentIdentifierGenerator) {
          String[] lines = ((PersistentIdentifierGenerator) ig).sqlCreateStrings(dialect);
          sequences.addAll(Arrays.asList(lines));
        }
      }
      // generater table sql
      generateTableSql(pc.getTable());
    }

    // 2. process collection mapping
    Iterator<Collection> itercm = configuration.getCollectionMappings();
    while (itercm.hasNext()) {
      Collection col = itercm.next();
      if (isNotBlank(packageName) && !col.getRole().startsWith(packageName)) continue;
      // collection sequences
      if (col.isIdentified()) {
        IdentifierGenerator ig = ((IdentifierCollection) col).getIdentifier().createIdentifierGenerator(
            configuration.getIdentifierGeneratorFactory(), dialect, defaultCatalog, defaultSchema, null);

        if (ig instanceof PersistentIdentifierGenerator) {
          String[] lines = ((PersistentIdentifierGenerator) ig).sqlCreateStrings(dialect);
          sequences.addAll(Arrays.asList(lines));
        }
      }
      // collection table
      if (!col.isOneToMany()) {
        Table table = col.getCollectionTable();
        String owner = col.getTable().getComment();
        Class<?> ownerClass = col.getOwner().getMappedClass();
        // resolved nested compoent name in collection's role
        String colName = substringAfter(col.getRole(), col.getOwnerEntityName() + ".");
        if (colName.contains(".")) ownerClass = getPropertyType(col.getOwner(),
            substringBeforeLast(colName, "."));
        table.setComment(owner + "-" + messages.get(ownerClass, substringAfterLast(col.getRole(), ".")));

        Column keyColumn = table.getColumn((Column) col.getKey().getColumnIterator().next());
        if (null != keyColumn) keyColumn.setComment(owner + " ID");

        if (col instanceof IndexedCollection) {
          IndexedCollection idxCol = (IndexedCollection) col;
          Value idx = idxCol.getIndex();
          if (idx instanceof ToOne) commentToOne((ToOne) idx, (Column) idx.getColumnIterator().next());
        }
        if (col.getElement() instanceof ManyToOne) {
          Column valueColumn = (Column) col.getElement().getColumnIterator().next();
          commentToOne((ManyToOne) col.getElement(), valueColumn);
        } else if (col.getElement() instanceof Component) {
          Component cp = (Component) col.getElement();
          commentProperties(cp.getComponentClass(), table, cp.getPropertyIterator());
        }
        generateTableSql(col.getCollectionTable());
      }
    }
    Set<String> commentSet = CollectUtils.newHashSet(comments);
    comments.clear();
    comments.addAll(commentSet);
    // 3. export to files
    for (String key : files.keySet()) {
      List<List<String>> sqls = files.get(key);
      FileWriter writer = new FileWriter(fileName + "/" + key, false);
      writes(writer, sqls);
      writer.flush();
      writer.close();
    }
  }
231644
def add_input_file(self, filename):
    
    if filename not in self.__input_files:
      self.__input_files.append(filename)
669220
protected void writeFile(String basename, byte[] content,
			Function2<? super File, ? super String, ? extends File> outputDirectoryFilter) {
		for (final String output : getOutputs()) {
			File directory = new File(output).getAbsoluteFile();
			if (outputDirectoryFilter != null) {
				directory = outputDirectoryFilter.apply(directory, basename);
			}
			try {
				final File outputFile = new File(directory, basename);
				outputFile.getParentFile().mkdirs();
				Files.write(Paths.get(outputFile.getAbsolutePath()), content);
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
	}
401445
def generate(basename, xml_list):
    ''''''

    for idx in range(len(xml_list)):
        xml = xml_list[idx]
        xml.xml_idx = idx
        generate_one(basename, xml)
    copy_fixed_headers(basename, xml_list[0])
199272
def make_file(self, filename, content):
        
        with open(filename, 'w') as fp:
            fp.write(content)
1004435
public void setHostName(String hostName) {
        if (hostName == null || hostName.contains(":")) {
            return;
        }
        ODO_HOST = hostName;
        BASE_URL = "http://" + ODO_HOST + ":" + API_PORT + "/" + API_BASE + "/";
    }
236054
def copy_pkg(self, filename, _):
        
        basename = os.path.basename(filename)
        self._copy(filename, os.path.join(self.connection["mount_point"],
                                          "Packages", basename))
405893
function(basePath, config) {
    this._basePath = basePath;
    this._config = config;

    var directories = IOUtils.getDirectoryList(basePath, false);
    IOUtils.createPathIfNotExists(directories, './');
}
559967
private static IProject createBaseProject(String projectName, URI location)
	{
		// it is acceptable to use the ResourcesPlugin class
		IProject newProject = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);

		if (!newProject.exists())
		{
			URI projectLocation = location;
			IProjectDescription desc = newProject.getWorkspace().newProjectDescription(newProject.getName());

			if (location != null
					|| ResourcesPlugin.getWorkspace().getRoot().getLocationURI().equals(location))
			{
				projectLocation = null;
			}

			desc.setLocationURI(projectLocation);
			try
			{
				newProject.create(desc, null);
				if (!newProject.isOpen())
				{
					newProject.open(null);
				}
			} catch (CoreException e)
			{
				VdmCore.log("VdmModelManager createBaseProject", e);
			}
		}

		return newProject;
	}
317005
public final void initSourceName(String sourceName)
    {
        if (sourceName == null) throw new IllegalArgumentException();
        if (this.sourceName != null) throw new IllegalStateException();
        this.sourceName = sourceName;
    }
1312905
public boolean add(String fileName) {
      writeLock.lock();
      try {
         return filenames.add(fileName);
      } finally {
         writeLock.unlock();
      }
   }
1373709
def create_file_name(file, base_dir)
      file_name = file.split("/").delete_if { |f| f.include?(".") }.first
      unless File.exists?(File.join(base_dir, file_name))
        Dir.mkdir(File.join(base_dir, file_name))
      end
      file_name
    end
1261224
@Override
	public Host createHost(String name, String appBase) {

        if( log.isDebugEnabled() )
            log.debug("Creating host '" + name + "' with appBase '" +
                       appBase + "'");

        StandardHost host = new StandardHost();

        host.setAppBase(appBase);
        host.setName(name);

        return (host);

    }
379613
public void addVirtualHost(String hostname)
    {
        // Note that null hosts are also added.
        if (!_vhosts.contains(hostname))
        {
            _vhosts.add(hostname);
            _contextName=null;

            if (_httpServer!=null)
            {
                if (_vhosts.size()==1)
                    _httpServer.removeMapping(null,this);
                _httpServer.addMapping(hostname,this);
            }
            _vhostsArray=null;
        }
    }