Initialize packages information.

@param env the compilation environment
@param packages a list of package names (String)
508341
private void setPackages(DocEnv env, List<String> packages) {
        ListBuffer<PackageDocImpl> packlist = new ListBuffer<PackageDocImpl>();
        for (String name : packages) {
            PackageDocImpl pkg = env.lookupPackage(name);
            if (pkg != null) {
                pkg.isIncluded = true;
                packlist.append(pkg);
            } else {
                env.warning(null, "main.no_source_files_for_package", name);
            }
        }
        cmdLinePackages = packlist.toList();
    }
461792
def init_argparser_package_names(self, argparser, help=(
                'names of the python package to generate artifacts for; '
                'note that the metadata directory for the specified '
                'packages must be writable')):
        

        argparser.add_argument(
            'package_names', metavar=metavar('package'), nargs='+', help=help)
1302631
@PublicAPI(usage = ACCESS)
    public JavaClasses importPackages(String... packages) {
        return importPackages(ImmutableSet.copyOf(packages));
    }
1134483
public static synchronized void initializeEnvironment()
  {
    if (_isStaticInit)
      return;

    _isStaticInit = true;

    ClassLoader systemLoader = ClassLoader.getSystemClassLoader();

    Thread thread = Thread.currentThread();
    ClassLoader oldLoader = thread.getContextClassLoader();
    try {
      thread.setContextClassLoader(systemLoader);
      
      if ("1.8.".compareTo(System.getProperty("java.runtime.version")) > 0)
        throw new ConfigException("Baratine requires JDK 1.8 or later");

      // #2281
      // PolicyImpl.init();

      //EnvironmentStream.setStdout(System.out);
      //EnvironmentStream.setStderr(System.err);

      /*
      try {
        Vfs.initJNI();
      } catch (Throwable e) {
      }
      */
      
      Properties props = System.getProperties();

      ClassLoader envClassLoader
        = EnvironmentClassLoader.class.getClassLoader();

      /*
      boolean isGlobalLoadableJndi = false;
      try {
        Class<?> cl = Class.forName("com.caucho.v5.naming.InitialContextFactoryImpl",
                                    false,
                                    systemLoader);

        isGlobalLoadableJndi = (cl != null);
      } catch (Exception e) {
        log().log(Level.FINER, e.toString(), e);
      }
      
      // #3486
      String namingPkgs = (String) props.get("java.naming.factory.url.pkgs");
      if (namingPkgs == null)
        namingPkgs = "com.caucho.v5.naming";
      else
        namingPkgs = namingPkgs + ":" + "com.caucho.v5.naming";
      props.put("java.naming.factory.url.pkgs", namingPkgs);

      if (isGlobalLoadableJndi) {
        // These properties require the server to be at the system loader

        if (props.get("java.naming.factory.initial") == null) {
          props.put("java.naming.factory.initial",
                    "com.caucho.v5.naming.InitialContextFactoryImpl");
        }
      }
      */

      /*
      boolean isGlobalLoadableJmx = false;
      try {
        Class<?> cl = Class.forName("com.caucho.v5.jmx.MBeanServerBuilderImpl",
                                    false,
                                    systemLoader);

        isGlobalLoadableJmx = (cl != null);
      } catch (Exception e) {
        log().log(Level.FINER, e.toString(), e);
      }
      
      if (isGlobalLoadableJmx) {
        // props.put("java.naming.factory.url.pkgs", "com.caucho.naming");

        EnvironmentProperties.enableEnvironmentSystemProperties(true);

        String oldBuilder = props.getProperty("javax.management.builder.initial");
        if (oldBuilder == null) {
          oldBuilder = "com.caucho.v5.jmx.MBeanServerBuilderImpl";
          props.put("javax.management.builder.initial", oldBuilder);
        }

        Object value = ManagementFactory.getPlatformMBeanServer();
      }
      */
    } catch (Throwable e) {
      log().log(Level.FINE, e.toString(), e);
    } finally {
      thread.setContextClassLoader(oldLoader);
      
      _isInitComplete = true;
    }
  }
650415
public void initializePackageContents() {
		if (isInitialized) return;
		isInitialized = true;

		// Initialize package
		setName(eNAME);
		setNsPrefix(eNS_PREFIX);
		setNsURI(eNS_URI);

		// Create type parameters

		// Set bounds for type parameters

		// Add supertypes to classes

		// Initialize classes and features; add operations and parameters
		initEClass(documentRootEClass, DocumentRoot.class, "DocumentRoot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEAttribute(getDocumentRoot_Mixed(), ecorePackage.getEFeatureMapEntry(), "mixed", null, 0, -1, null, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getDocumentRoot_XMLNSPrefixMap(), ecorePackage.getEStringToStringMapEntry(), null, "xMLNSPrefixMap", null, 0, -1, null, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getDocumentRoot_XSISchemaLocation(), ecorePackage.getEStringToStringMapEntry(), null, "xSISchemaLocation", null, 0, -1, null, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getDocumentRoot_BackgroundColor(), this.getHexColor(), "backgroundColor", null, 0, 1, null, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getDocumentRoot_BorderColor(), this.getHexColor(), "borderColor", null, 0, 1, null, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getDocumentRoot_Color(), this.getHexColor(), "color", null, 0, 1, null, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		// Initialize data types
		initEDataType(hexColorEDataType, String.class, "HexColor", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);

		// Create resource
		createResource(eNS_URI);

		// Create annotations
		// http:///org/eclipse/emf/ecore/util/ExtendedMetaData
		createExtendedMetaDataAnnotations();
	}
1310979
public void export(Package... packages) {
        String[] pkgs = new String[packages.length];
        for (int i = 0; i < packages.length; i++) {
            pkgs[i] = packages[i].getName();
        }
        export(pkgs);
    }
454325
public void eInit(Resource resource, String packageName, IJvmTypeProvider context) {
		this.builder.eInit(resource, packageName, context);
	}
716985
public Blade scanPackages(@NonNull String... packages) {
        this.packages.addAll(Arrays.asList(packages));
        return this;
    }
328622
public App withEnvironmentVariables(java.util.Map<String, String> environmentVariables) {
        setEnvironmentVariables(environmentVariables);
        return this;
    }
395845
public static void resolve(Map<String, String> env) {
		for (Map.Entry<String,String> entry: env.entrySet()) {
			entry.setValue(Util.replaceMacro(entry.getValue(), env));
		}
	}
375969
protected void addPackageInfo(PackageInfo packageInfo) {
        if (packageInfo != null) {
            packageInfoMap.put(packageInfo.getInternalPackageName(), packageInfo);
        }
    }
882227
private void initExecutables() {
        if (StringUtils.isBlank(cmdMvn.getExecutable())) {
            if (StringUtils.isBlank(mvnExecutable)) {
                mvnExecutable = "mvn";
            }
            cmdMvn.setExecutable(mvnExecutable);
        }
        if (StringUtils.isBlank(cmdGit.getExecutable())) {
            if (StringUtils.isBlank(gitExecutable)) {
                gitExecutable = "git";
            }
            cmdGit.setExecutable(gitExecutable);
        }
    }
1357822
public Application packages(String... packages) {
        if (scanPackages == null) {
            scanPackages = Sets.newHashSet();
        }
        Collections.addAll(scanPackages, packages);
        return this;
    }
498263
private void init(Set<String> pCommands, String ... pArgs) {
        quiet = options.containsKey("quiet");
        verbose = options.containsKey("verbose");
        jarFile = lookupJarFile();

        // Special cases first
        extraArgs = checkCommandAndArgs(pCommands, pArgs);
    }
332249
public static void init() {
        reports.clear();
        Reflections reflections = new Reflections(REPORTS_PACKAGE);
        final Set<Class<? extends Report>> reportClasses = reflections.getSubTypesOf(Report.class);

        for(Class<? extends Report> c : reportClasses) {
            LOG.info("Report class: " + c.getName());
            try {
                reports.add(c.newInstance());
            } catch (IllegalAccessException | InstantiationException e) {
                LOG.error("Error while loading report implementation classes", e);
            }
        }

        if(LOG.isInfoEnabled()) {
            LOG.info(String.format("Detected %s reports", reports.size()));
        }
    }
1252970
def write_init_files(packages):
    
    init_text = """__path__ = __import__('pkgutil').extend_path(__path__, __name__)

try:
    from .__doc__ import __doc__
except ImportError:
    pass
"""
    for package in packages:
        path = os.path.join('src', package.replace('.', os.sep), '__init__.py')
        if os.path.exists(path):
            with open(path) as f:
                old_text = f.read()
        else:
            old_text = ''
        if old_text != init_text:
            with open(path, 'w') as f:
                f.write(init_text)
541969
public function init($environment = 'production'): void
    {
        $this->environment = $environment;

        try {
            // initial default helper path
            $this->addHelperPath(__DIR__ . '/Helper/');

            // init Config
            $this->initConfig();

            // first log message
            Logger::info('app:init');

            // init Session, start inside class (if needed)
            Session::getInstance();

            // init Messages
            Messages::getInstance();

            // init Request
            $this->initRequest();

            // init Response
            $this->initResponse();

            // init Translator
            $this->initTranslator();

            // init Router
            $this->initRouter();
        } catch (\Exception $e) {
            throw new ApplicationException("Application can't be loaded: " . $e->getMessage());
        }
    }