Internal method to initialize the region manager and all regions in it
519009
function(){
    this.regionManager = new Marionette.RegionManager();

    this.listenTo(this.regionManager, "region:add", function(name, region){
      this[name] = region;
      this.trigger("region:add", name, region);
    });

    this.listenTo(this.regionManager, "region:remove", function(name, region){
      delete this[name];
      this.trigger("region:remove", name, region);
    });
  }
851100
private void initializeIfNeeded() throws BackendInitializationException,
            BackendNewInstanceException {
        if (isClosed()) {
            throw new IllegalStateException("Knowledge source already closed!");
        }
        if (this.inDataSourceGetter == null) {
            this.inDataSourceGetter
                    = new SubtreePropositionDefinitionGetterRegular(this, true);
        }
        if (this.collectSubtreeGetter == null) {
            this.collectSubtreeGetter
                    = new SubtreePropositionDefinitionGetterRegular(this, false);
        }
    }
64303
@PostConstruct
    public void init() throws Exception {
        try {
            if (alreadyInited.compareAndSet(false, true)) {
                initAdminContainerConfigIfNeeded();
                initAdminRegistryIfNeeded();

                if (! adminContainerConfig.shouldEnable()) {
                    return;
                }

                if (adminContainerConfig.shouldScanClassPathForPluginDiscovery()) {
                    adminPageRegistry.registerAdminPagesWithClasspathScan();
                }

                Injector adminResourceInjector;
                if (shouldShareResourcesWithParentInjector()) {
                    adminResourceInjector = appInjector.createChildInjector(buildAdminPluginsGuiceModules());
                } else {
                    adminResourceInjector = LifecycleInjector
                            .builder()
                            .inStage(Stage.DEVELOPMENT)
                            .usingBasePackages("com.netflix.explorers")
                            .withModules(buildAdminPluginsGuiceModules())
                            .build()
                            .createInjector();
                    adminResourceInjector.getInstance(LifecycleManager.class).start();
                }

                server = new Server(adminContainerConfig.listenPort());
                final List<Filter> additionaFilters = adminContainerConfig.additionalFilters();

                // redirect filter based on configurable RedirectRules
                final Context rootHandler = new Context();
                rootHandler.setContextPath("/");
                rootHandler.addFilter(new FilterHolder(adminResourceInjector.getInstance(RedirectFilter.class)), "/*", Handler.DEFAULT);
                rootHandler.addServlet(new ServletHolder(new DefaultServlet()), "/*");

                // admin page template resources
                AdminResourcesFilter arfTemplatesResources = adminResourceInjector.getInstance(AdminResourcesFilter.class);
                Map<String, Object> props = new HashMap<>(adminContainerConfig.getJerseyConfigProperties());
                props.put(PackagesResourceConfig.PROPERTY_PACKAGES, 
                        adminContainerConfig.jerseyViewableResourcePkgList() + ";" + 
                        Objects.toString(props.get(PackagesResourceConfig.PROPERTY_PACKAGES)));
                arfTemplatesResources.setProperties(props);

                logger.info("Admin templates context : {}", adminContainerConfig.templateResourceContext());
                final Context adminTemplatesResHandler = new Context();
                adminTemplatesResHandler.setContextPath(adminContainerConfig.templateResourceContext());
                adminTemplatesResHandler.setSessionHandler(new SessionHandler());
                adminTemplatesResHandler.addFilter(LoggingFilter.class, "/*", Handler.DEFAULT);
                adminTemplatesResHandler.addFilter(new FilterHolder(adminResourceInjector.getInstance(RedirectFilter.class)), "/*", Handler.DEFAULT);
                applyAdditionalFilters(adminTemplatesResHandler, additionaFilters);
                adminTemplatesResHandler.addFilter(new FilterHolder(arfTemplatesResources), "/*", Handler.DEFAULT);
                adminTemplatesResHandler.addServlet(new ServletHolder(new DefaultServlet()), "/*");
                
                // admin page data resources
                AdminResourcesFilter arfDataResources = adminResourceInjector.getInstance(AdminResourcesFilter.class);
                props = new HashMap<>(adminContainerConfig.getJerseyConfigProperties());
                props.put(PackagesResourceConfig.PROPERTY_PACKAGES, 
                        appendCoreJerseyPackages(adminPageRegistry.buildJerseyResourcePkgListForAdminPages()) + ";" + 
                        Objects.toString(props.get(PackagesResourceConfig.PROPERTY_PACKAGES)));
                arfDataResources.setProperties(props);

                logger.info("Admin resources context : {}", adminContainerConfig.ajaxDataResourceContext());
                final Context adminDataResHandler = new Context();
                adminDataResHandler.setContextPath(adminContainerConfig.ajaxDataResourceContext());
                adminDataResHandler.addFilter(LoggingFilter.class, "/*", Handler.DEFAULT);
                adminDataResHandler.addFilter(new FilterHolder(adminResourceInjector.getInstance(RedirectFilter.class)), "/*", Handler.DEFAULT);
                applyAdditionalFilters(adminDataResHandler, additionaFilters);
                adminDataResHandler.addFilter(new FilterHolder(arfDataResources), "/*", Handler.DEFAULT);
                adminDataResHandler.addServlet(new ServletHolder(new DefaultServlet()), "/*");

                QueuedThreadPool threadPool = new QueuedThreadPool();
                threadPool.setDaemon(true);
                server.setThreadPool(threadPool);

                ResourceHandler resource_handler = new ResourceHandler() {
                    @Override
                    public Resource getResource(String path) throws MalformedURLException {
                        Resource resource = Resource.newClassPathResource(path);
                        if (resource == null || !resource.exists()) {
                            resource = Resource.newClassPathResource("META-INF/resources" + path);
                        }
                        if (resource != null && resource.isDirectory()) {
                            return null;
                        }
                        return resource;
                    }                    
                };
                resource_handler.setResourceBase("/");

                HandlerCollection handlers = new HandlerCollection();
                handlers.setHandlers(new Handler[]{resource_handler, adminTemplatesResHandler, adminDataResHandler, rootHandler});
                server.setHandler(handlers);
                for (Connector connector : adminContainerConfig.additionalConnectors()) {
                    server.addConnector(connector);
                }

                server.start();

                final Connector connector = server.getConnectors()[0];
                serverPort = connector.getLocalPort();
                
                logger.info("jetty started on port {}", serverPort);
            }
        } catch (Exception e) {
            logger.error("Exception in building AdminResourcesContainer ", e);
        }
    }
429770
protected void initBundles() {
        if (commonBundle == null) {
            Locale locale = configuration.getLocale();
            this.commonBundle = ResourceBundle.getBundle(commonBundleName, locale);
            this.docletBundle = ResourceBundle.getBundle(docletBundleName, locale);
        }
    }
1121189
def iter_regions(self):
        
        # TODO: Implement BoundingBox
        # TODO: Implement sort order
        for x,z in self.regionfiles.keys():
            close_after_use = False
            if (x,z) in self.regions:
                regionfile = self.regions[(x,z)]
            else:
                # It is not yet cached.
                # Get file, but do not cache later.
                regionfile = region.RegionFile(self.regionfiles[(x,z)], chunkclass = self.chunkclass)
                regionfile.loc = Location(x=x,z=z)
                close_after_use = True
            try:
                yield regionfile
            finally:
                if close_after_use:
                    regionfile.close()
159852
private void initialize() {
        cfName = config.getTable();

        if (!ArrayUtils.isEmpty(config.getInputColumns())) {
            columns = StringUtils.join(config.getInputColumns(), ",");
        }

        partitioner = Utils.newTypeInstance(config.getPartitionerClassName(), IPartitioner.class);

        try {
            session = createConnection();

            retrieveKeys();
        } catch (Exception e) {
            throw new DeepIOException(e);
        }

        rowIterator = new RowIterator();
    }
1339530
private void initialize() {
    this.setSize(300, 200);
    this.setTitle("Connect");
    this.setContentPane(getJContentPane());
    this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
    this.addWindowListener(new WindowAdapter() {
      public void windowClosed(WindowEvent e) {
        cancelTimeout();
      }
    });

    Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener() {
      public void eventDispatched(AWTEvent e) {
        if ((e instanceof KeyEvent && ((KeyEvent) e).getID() == KeyEvent.KEY_PRESSED)
            || (e instanceof MouseEvent && ((MouseEvent) e).getID() == MouseEvent.MOUSE_PRESSED)) {
          if (ConnectionDialog.this.isAncestorOf(((ComponentEvent) e).getComponent())) {
            cancelTimeout();
          }
        }
      }
    }, AWTEvent.KEY_EVENT_MASK | AWTEvent.MOUSE_EVENT_MASK);
    restore();
  }
695664
private void initMappings() throws Exception {
        checkClient();
        // We extract indexes and mappings to manage from mappings definition
        if (mappings != null && mappings.length > 0) {
            Map<String, Collection<String>> indices = getIndexMappings(mappings);

            // Let's initialize indexes and mappings if needed
            for (String index : indices.keySet()) {
                createIndex(client.getLowLevelClient(), classpathRoot, index, forceMapping);
                if (mergeSettings) {
                    updateSettings(client.getLowLevelClient(), classpathRoot, index);
                }

                createMapping(client, classpathRoot, index, mergeMapping);
            }
        }
    }
870277
private void initHandlers() {
		mapWidget.getMapModel().getMapView().addMapViewChangedHandler(this);

		mapWidget.getMapModel().runWhenInitialized(new Runnable() {

			public void run() {
				zoomTo();
			}
		});
	}
591554
def initialize(
        self, region="us-west-1", host=None, port=8000, config_dir=None, session=None
    ):
        
        try:
            import readline
            import rlcompleter
        except ImportError:
            # Windows doesn't have readline, so gracefully ignore.
            pass
        else:
            # Mac OS X readline compatibility from http://stackoverflow.com/a/7116997
            if "libedit" in readline.__doc__:
                readline.parse_and_bind("bind ^I rl_complete")
            else:
                readline.parse_and_bind("tab: complete")
            # Tab-complete names with a '-' in them
            delims = set(readline.get_completer_delims())
            if "-" in delims:
                delims.remove("-")
                readline.set_completer_delims("".join(delims))

        self._conf_dir = config_dir or os.path.join(
            os.environ.get("HOME", "."), ".config"
        )
        self.session = session or botocore.session.get_session()
        self.engine = FragmentEngine()
        self.engine.caution_callback = self.caution_callback
        if host is not None:
            self._local_endpoint = (host, port)
        self.engine.connect(
            region, session=self.session, host=host, port=port, is_secure=(host is None)
        )

        self.conf = self.load_config()
        for key, value in iteritems(DEFAULT_CONFIG):
            self.conf.setdefault(key, value)
        self.display = DISPLAYS[self.conf["display"]]
        self.throttle = TableLimits()
        self.throttle.load(self.conf["_throttle"])
1250244
@PostConstruct
    public synchronized void initialize() {
        final FwWebDirection direction = assistWebDirection();
        actionAdjustmentProvider = direction.assistActionAdjustmentProvider(); // as sub-attribute
        localeHandler = direction.assistUserLocaleProcessProvider();
        timeZoneProvider = direction.assistUserTimeZoneProcessProvider();
        showBootLogging();
    }
346662
public void init (PlaceRegistry registry, InvocationManager invmgr, RootDObjectManager omgr,
                      BodyLocator locator, PlaceConfig config)
    {
        _registry = registry;
        _invmgr = invmgr;
        _omgr = omgr;
        _locator = locator;
        _config = config;

        // initialize our delegates
        applyToDelegates(new DelegateOp(PlaceManagerDelegate.class) {
            @Override
            public void apply (PlaceManagerDelegate delegate) {
                delegate.init(PlaceManager.this, _omgr, _invmgr);
            }
        });

        // let derived classes do initialization stuff
        try {
            didInit();
        } catch (Throwable t) {
            log.warning("Manager choked in didInit()", "where", where(), t);
        }
    }
292609
private function _initialize()
    {
        $params = $this->getParameters();
        if ($params !== null) {
            foreach ($params as $param) {
                switch ($param->getType()) {
                    case self::DOMAIN_KEY:
                        $this->setDomain($param->getValue());
                        break;
                    case self::DIR_KEY:
                        $this->setDir($this->project->resolveFile($param->getValue()));
                        break;

                    case self::LOCALE_KEY:
                        $this->setLocale($param->getValue());
                        break;
                } // switch
            }
        } // if params !== null
    }
1045298
private  void initialize() {
		historyListFiltersButtonGroup = new DeselectableButtonGroup();

		this.setLayout(new BorderLayout());
	    if (Model.getSingleton().getOptionsParam().getViewParam().getWmUiHandlingOption() == 0) {
	    	this.setSize(600, 200);
	    }
		this.add(getHistoryPanel(), java.awt.BorderLayout.CENTER);
		
		this.setDefaultAccelerator(view.getMenuShortcutKeyStroke(KeyEvent.VK_H, KeyEvent.SHIFT_DOWN_MASK, false));
		this.setMnemonic(Constant.messages.getChar("history.panel.mnemonic"));
		
	}
147074
private void initLocaleSelect() {

        if (m_availableLocales.size() < 2) {
            return;
        }
        Map<String, String> selectOptions = new HashMap<String, String>();
        for (Entry<String, String> localeEntry : m_availableLocales.entrySet()) {
            if (m_contentLocales.contains(localeEntry.getKey())) {
                selectOptions.put(localeEntry.getKey(), localeEntry.getValue());
            } else {
                selectOptions.put(localeEntry.getKey(), localeEntry.getValue() + " [-]");
            }
        }
        if (m_localeSelect == null) {
            m_localeSelect = new CmsSelectBox(selectOptions);
            m_toolbar.insertRight(m_localeSelect, 1);
            m_localeSelect.addStyleName(I_CmsLayoutBundle.INSTANCE.generalCss().inlineBlock());
            m_localeSelect.getElement().getStyle().setWidth(100, Unit.PX);
            m_localeSelect.getElement().getStyle().setVerticalAlign(VerticalAlign.MIDDLE);
            m_localeSelect.addValueChangeHandler(new ValueChangeHandler<String>() {

                public void onValueChange(ValueChangeEvent<String> event) {

                    switchLocale(event.getValue());
                }
            });
        } else {
            m_localeSelect.setItems(selectOptions);
        }
        m_localeSelect.setFormValueAsString(m_locale);
        if (m_deleteLocaleButton == null) {
            m_deleteLocaleButton = createButton(
                Messages.get().key(Messages.GUI_TOOLBAR_DELETE_LOCALE_0),
                "opencms-icon-remove-locale");
            m_deleteLocaleButton.addClickHandler(new ClickHandler() {

                public void onClick(ClickEvent event) {

                    confirmDeleteLocale();
                }
            });
            m_toolbar.insertRight(m_deleteLocaleButton, 2);
        }
        if (m_contentLocales.size() > 1) {
            m_deleteLocaleButton.enable();
        } else {
            m_deleteLocaleButton.disable(Messages.get().key(Messages.GUI_TOOLBAR_CANT_DELETE_LAST_LOCALE_0));
        }
        if (m_copyLocaleButton == null) {
            m_copyLocaleButton = createButton(
                I_CmsButton.ButtonData.COPY_LOCALE_BUTTON.getTitle(),
                I_CmsButton.ButtonData.COPY_LOCALE_BUTTON.getIconClass());
            m_copyLocaleButton.addClickHandler(new ClickHandler() {

                public void onClick(ClickEvent event) {

                    openCopyLocaleDialog();
                }
            });
            m_toolbar.insertRight(m_copyLocaleButton, 3);
        }
    }
706706
@PostConstruct
    public void init() {
        logger.info("Using localeAware={}", localeAware);
        logger.info("Using portalLocalesProperty='{}'", portalLocalesProperty);
        if (StringUtils.isNotBlank(portalLocalesProperty)) {
            final List<Locale> list = new ArrayList<>();
            for (String token : portalLocalesProperty.split(",")) {
                list.add(parseLocale(token.trim()));
            }
            portalLocales = Collections.unmodifiableList(list);
            logger.info("Loaded the following portalLocales:  {}", portalLocales);
        }
    }
1359062
public void initialize() {
        try {
            if (tidyInstance == null) {
                tidyInstance = new Tidy();
                tidyInstance.setXHTML(true);
                tidyInstance.setShowWarnings(false);
                tidyInstance.setQuiet(true);
                tidyInstance.setEscapeCdata(true);
                tidyInstance.setTidyMark(false);

                if (tidyConfiguration != null) {
                    tidyInstance.setConfigurationFromFile(tidyConfiguration.getFile().getAbsolutePath());
                }
            }
        } catch (IOException e) {
            throw new CitrusRuntimeException("Failed to initialize XHTML tidy instance");
        }
    }