Initialize additional member variables for components.

        Every component activated through the `Environment` object
        gets an additional member variable: `env` (the environment object)
337628
def component_activated(self, component):
        
        component.env = self
        super(Environment, self).component_activated(component)
97922
def add_components(self, components):
        
        if components:
            for component in components:
                self._components[component["name"]] = (
                    component["factory"],
                    component.get("properties", {}),
                )
970025
@Override
	public synchronized void init(ProcessingEnvironment processingEnv) {
		super.init(processingEnv);

		KriptonProcessor.trees = Trees.instance(processingEnv);

		KriptonOptions.init(this, processingEnv);

		typeProcessor.init(processingEnv);
		many2ManyProcessor.init(processingEnv);
		sharedPreferencesProcessor.init(processingEnv);
		dataSourceProcessor.init(processingEnv);

		count = 0;
	}
379425
public void setEnvironmentVariables(Map<String, String> environment) {
    for (Map.Entry<String, String> entry : environment.entrySet()) {
      setEnvironmentVariable(entry.getKey(), entry.getValue());
    }
  }
299121
private void initComponents()
  {

    fileChooser = new javax.swing.JFileChooser();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    btOk = new javax.swing.JButton();
    btCancel = new javax.swing.JButton();
    txtAdminUsername = new javax.swing.JTextField();
    txtAdminPassword = new javax.swing.JPasswordField();
    pbInit = new javax.swing.JProgressBar();
    cbMigrate = new javax.swing.JCheckBox();

    fileChooser.setFileSelectionMode(javax.swing.JFileChooser.DIRECTORIES_ONLY);

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setTitle("Init - ANNIS Kickstarter");
    setLocationByPlatform(true);

    jLabel1.setText("Postgres-Admin username:");

    jLabel2.setText("Postgres-Admin password:");

    btOk.setMnemonic('o');
    btOk.setText("Ok");
    btOk.addActionListener(new java.awt.event.ActionListener()
    {
      public void actionPerformed(java.awt.event.ActionEvent evt)
      {
        btOkActionPerformed(evt);
      }
    });

    btCancel.setMnemonic('c');
    btCancel.setText("Cancel");
    btCancel.addActionListener(new java.awt.event.ActionListener()
    {
      public void actionPerformed(java.awt.event.ActionEvent evt)
      {
        btCancelActionPerformed(evt);
      }
    });

    txtAdminUsername.setText("postgres");

    cbMigrate.setText("migrate already imported corpora (will take same time as re-import)");
    cbMigrate.addActionListener(new java.awt.event.ActionListener()
    {
      public void actionPerformed(java.awt.event.ActionEvent evt)
      {
        cbMigrateActionPerformed(evt);
      }
    });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
      layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(layout.createSequentialGroup()
        .addContainerGap()
        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
          .addComponent(pbInit, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
          .addGroup(layout.createSequentialGroup()
            .addComponent(jLabel1)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
            .addComponent(txtAdminUsername))
          .addGroup(layout.createSequentialGroup()
            .addComponent(jLabel2)
            .addGap(18, 18, 18)
            .addComponent(txtAdminPassword))
          .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
            .addComponent(btCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(btOk, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE))
          .addComponent(cbMigrate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        .addContainerGap())
    );
    layout.setVerticalGroup(
      layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(layout.createSequentialGroup()
        .addContainerGap()
        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
          .addComponent(jLabel1)
          .addComponent(txtAdminUsername, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
          .addComponent(jLabel2)
          .addComponent(txtAdminPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
        .addComponent(cbMigrate)
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        .addComponent(pbInit, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
          .addComponent(btOk)
          .addComponent(btCancel))
        .addContainerGap())
    );

    pack();
  }
947270
protected function init()
    {
        $this->addCommand(CopyConfigCommand::class);
        $this->addCommand(InstallCommand::class);

        $this->addGlobalOption('e')
            ->alias('env')
            ->description('The environment application name or class.')
            ->defaultValue('dev');
    }
310635
public static void init()
  {
    try {
      initializeEnvironment();
    } catch (Throwable e) {
      log().log(Level.FINER, e.toString(), e);
    }

    try {
      init(Thread.currentThread().getContextClassLoader());
    } catch (Throwable e) {
      log().log(Level.FINER, e.toString(), e);
    }
  }
548889
def initialize_environment(app):
    
    env = app.builder.env

    # Assure ``traceability_all_items`` will always be there.
    if not hasattr(env, 'traceability_all_items'):
        env.traceability_all_items = {}

    update_available_item_relationships(app)
1061541
private function initializeComponentConfigurations()
    {
        foreach ($this->webinyComponents as $c) {
            $componentConfig = $this->componentConfigs->get($c, false);
            if ($componentConfig) {
                $class = 'Webiny\Component\\' . $c . '\\' . $c;
                $method = 'setConfig';
                try {
                    $class::$method($componentConfig);
                } catch (\Exception $e) {
                    // ignore it ... probably user-based component
                }
            }
        }
    }
1085025
function(env) {

			var envConfig = this.createEmptyConfig();

			if (env) {

				envConfig.env = env;

				Object.keys(env).filter(function(name) {
					return env[name];
				}).forEach(function(name) {
					var environment = Environments.name;

					if (environment) {
						if (environment.globals) {
							assign(envConfig.globals, environment.globals);
						}

						if (environment.parserOptions) {
							assign(envConfig.parserOptions, environment.parserOptions);
						}
					}
				});
			}

			return envConfig;
		}
9635
protected function initEnvironment(): void
    {
        $envFile = $this->getRootRelatedPath($this->getEnvFileName());

        $this->assertFileIsReadable($envFile);

        self::$envIsSet = (bool)(new Dotenv($this->getRootDirectory(), $this->getEnvFileName()))->load();
    }
55799
def init_app(self, app, env_file=None, verbose_mode=False):
        """"""
        if self.app is None:
            self.app = app
        self.verbose_mode = verbose_mode

        if env_file is None:
            env_file = os.path.join(os.getcwd(), ".env")
        if not os.path.exists(env_file):
            warnings.warn("can't read {0} - it doesn't exist".format(env_file))
        else:
            self.__import_vars(env_file)
881628
def bind_to_env(self, bound_env):
        '''
        
        '''
        return self.__class__(self._scope, self._location,
                              path=self._path, host=self._host,
                              fragment=self._fragment,
                              ready=self._ready,
                              need_arguments=self._need_arguments,
                              finalize_params=self._finalize_params,
                              parent=self._parent,
                              bound_env=bound_env)
669398
protected function initEnvironment()
    {
        $path = getcwd();
        if (!is_file("$path/.env")) {
            return;
        }
        $dotenv = new \Dotenv\Dotenv($path);
        if ($this->dotEnvOverload) {
            $dotenv->overload();
        } else {
            $dotenv->load();
        }
    }
947053
public function init()
    {

		parent::init();
		self::$plugin = $this;

		Craft::$app->getView()->registerTwigExtension(new EnvironmentLabelTwigExtension());

		Event::on(
			View::class,
			View::EVENT_BEFORE_RENDER_PAGE_TEMPLATE,
			function (Event $event) {
				EnvironmentLabel::$plugin->label->doItBaby();
			}
		);

    }
282989
private function initializeEnvironmentInternal()
    {
        // validate the environment
        $environments = $this->applicationConfig->get('Application.Environments', false);

        if($environments){
            // get the production environment
            $productionEnv = $environments->get('Production', false);
            if (!$productionEnv) {
                throw new BootstrapException('Production environment must always be defined in App/Config/App.yaml');
            }
        }

        // get the name of the current environment
        $currentEnvName = $this->getCurrentEnvironmentName();

        // load the production environment configs
        $this->componentConfigs = $this->loadConfigurations('Production');

        // check if the current env is different from Production
        if ($currentEnvName != 'Production') {
            $currentConfigs = $this->loadConfigurations($currentEnvName);
            $this->componentConfigs->mergeWith($currentConfigs);
        }
    }
713834
private void initComponents()//GEN-BEGIN:initComponents
    {
        java.awt.GridBagConstraints gridBagConstraints;

        jPanel1 = new javax.swing.JPanel();
        lblEnabled = new javax.swing.JLabel();
        cbEnabled = new javax.swing.JCheckBox();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        lblProductName = new javax.swing.JLabel();
        tfProductName = new javax.swing.JTextField();
        lblProductVersion = new javax.swing.JLabel();
        tfProductVersion = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        lblCatalogTerm = new javax.swing.JLabel();
        tfCatalogTerm = new javax.swing.JTextField();
        lblCatalogSeparator = new javax.swing.JLabel();
        tfCatalogSeparator = new javax.swing.JTextField();
        lblSupportsCatalogInIndex = new javax.swing.JLabel();
        tfSupportsCatalogInIndex = new javax.swing.JTextField();
        lblSupportsCatalogInDML = new javax.swing.JLabel();
        tfSupportsCatalogInDML = new javax.swing.JTextField();
        lblSupportsCatalogInPrivilegeDefinitions = new javax.swing.JLabel();
        tfSupportsCatalogInPrivilegeDefinitions = new javax.swing.JTextField();
        lblSupportsCatalogInProcedureCalls = new javax.swing.JLabel();
        tfSupportsCatalogInProcedureCalls = new javax.swing.JTextField();
        lblSupportsCatalogInTableDefinitions = new javax.swing.JLabel();
        tfSupportsCatalogInTableDefinitions = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        lblSchemaTerm = new javax.swing.JLabel();
        tfSchemaTerm = new javax.swing.JTextField();

        setLayout(new java.awt.GridBagLayout());

        addComponentListener(new java.awt.event.ComponentAdapter()
        {
            public void componentShown(java.awt.event.ComponentEvent evt)
            {
                formComponentShown(evt);
            }
            public void componentHidden(java.awt.event.ComponentEvent evt)
            {
                formComponentHidden(evt);
            }
        });

        addHierarchyListener(new java.awt.event.HierarchyListener()
        {
            public void hierarchyChanged(java.awt.event.HierarchyEvent evt)
            {
                formHierarchyChanged(evt);
            }
        });

        jPanel1.setLayout(new java.awt.GridLayout(19, 2));

        lblEnabled.setText("enabled");
        lblEnabled.setDisplayedMnemonic('e');
        jPanel1.add(lblEnabled);

        cbEnabled.setMnemonic('e');
        cbEnabled.addActionListener(new java.awt.event.ActionListener()
        {
            public void actionPerformed(java.awt.event.ActionEvent evt)
            {
                cbEnabledActionPerformed(evt);
            }
        });

        jPanel1.add(cbEnabled);

        jPanel1.add(jLabel1);

        jPanel1.add(jLabel2);

        lblProductName.setText("Database Product Name:");
        jPanel1.add(lblProductName);

        tfProductName.setEditable(false);
        tfProductName.setText("jTextField1");
        tfProductName.setBorder(null);
        jPanel1.add(tfProductName);

        lblProductVersion.setText("Database Product Version:");
        jPanel1.add(lblProductVersion);

        tfProductVersion.setEditable(false);
        tfProductVersion.setText("jTextField2");
        tfProductVersion.setBorder(null);
        jPanel1.add(tfProductVersion);

        jPanel1.add(jLabel8);

        jPanel1.add(jLabel7);

        lblCatalogTerm.setText("Catalog Term:");
        lblCatalogTerm.setLabelFor(tfCatalogTerm);
        jPanel1.add(lblCatalogTerm);

        tfCatalogTerm.setEditable(false);
        tfCatalogTerm.setText("jTextField1");
        tfCatalogTerm.setBorder(null);
        jPanel1.add(tfCatalogTerm);

        lblCatalogSeparator.setText("Catalog Separator:");
        lblCatalogSeparator.setLabelFor(tfCatalogSeparator);
        jPanel1.add(lblCatalogSeparator);

        tfCatalogSeparator.setEditable(false);
        tfCatalogSeparator.setText("jTextField1");
        tfCatalogSeparator.setBorder(null);
        jPanel1.add(tfCatalogSeparator);

        lblSupportsCatalogInIndex.setText("supports Catalog in Index:");
        lblSupportsCatalogInIndex.setLabelFor(tfSupportsCatalogInIndex);
        jPanel1.add(lblSupportsCatalogInIndex);

        tfSupportsCatalogInIndex.setEditable(false);
        tfSupportsCatalogInIndex.setText("jTextField1");
        tfSupportsCatalogInIndex.setBorder(null);
        jPanel1.add(tfSupportsCatalogInIndex);

        lblSupportsCatalogInDML.setText("supports Catalog in DML:");
        lblSupportsCatalogInDML.setLabelFor(lblSupportsCatalogInDML);
        jPanel1.add(lblSupportsCatalogInDML);

        tfSupportsCatalogInDML.setEditable(false);
        tfSupportsCatalogInDML.setText("jTextField1");
        tfSupportsCatalogInDML.setBorder(null);
        jPanel1.add(tfSupportsCatalogInDML);

        lblSupportsCatalogInPrivilegeDefinitions.setText("supports Catalog in Privilege Definitions:");
        lblSupportsCatalogInPrivilegeDefinitions.setLabelFor(tfSupportsCatalogInPrivilegeDefinitions);
        jPanel1.add(lblSupportsCatalogInPrivilegeDefinitions);

        tfSupportsCatalogInPrivilegeDefinitions.setEditable(false);
        tfSupportsCatalogInPrivilegeDefinitions.setText("jTextField1");
        tfSupportsCatalogInPrivilegeDefinitions.setBorder(null);
        jPanel1.add(tfSupportsCatalogInPrivilegeDefinitions);

        lblSupportsCatalogInProcedureCalls.setText("supports Catalog in Procedure Calls:");
        lblSupportsCatalogInProcedureCalls.setLabelFor(tfSupportsCatalogInProcedureCalls);
        jPanel1.add(lblSupportsCatalogInProcedureCalls);

        tfSupportsCatalogInProcedureCalls.setEditable(false);
        tfSupportsCatalogInProcedureCalls.setText("jTextField1");
        tfSupportsCatalogInProcedureCalls.setBorder(null);
        jPanel1.add(tfSupportsCatalogInProcedureCalls);

        lblSupportsCatalogInTableDefinitions.setText("supports Catalog in Table Definitions:");
        lblSupportsCatalogInTableDefinitions.setLabelFor(tfSupportsCatalogInTableDefinitions);
        jPanel1.add(lblSupportsCatalogInTableDefinitions);

        tfSupportsCatalogInTableDefinitions.setEditable(false);
        tfSupportsCatalogInTableDefinitions.setText("jTextField1");
        tfSupportsCatalogInTableDefinitions.setBorder(null);
        jPanel1.add(tfSupportsCatalogInTableDefinitions);

        jPanel1.add(jLabel4);

        jPanel1.add(jLabel3);

        lblSchemaTerm.setText("Schema Term:");
        lblSchemaTerm.setLabelFor(tfSchemaTerm);
        jPanel1.add(lblSchemaTerm);

        tfSchemaTerm.setEditable(false);
        tfSchemaTerm.setText("jTextField1");
        tfSchemaTerm.setBorder(null);
        jPanel1.add(tfSchemaTerm);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        add(jPanel1, gridBagConstraints);

    }