Do not override this, use initCreator
@param root the first menu item in the tree
777189
@Override
    public void initialise(String root) {
        functionCalls.clear();
        variables.clear();
        initCreator(root);
    }
197488
public void initialize(CmsEntity entity, CmsEditorBase editor, CmsRootHandler rootHandler) {

        m_undo.clear();
        m_redo.clear();
        m_entity = entity;
        m_editor = editor;
        m_rootHandler = rootHandler;
        m_current = new Change(m_entity.cloneEntity(), null, null, 0, null);
        fireStateChange();
    }
206510
public void initialize() throws IOException  {
    rootEntry.refresh(rootEntry.getPath());
    final FileStatusEntry[] children = doListPathsEntry(rootEntry.getPath(), rootEntry);
    rootEntry.setChildren(children);
  }
559304
public void init() {
		if (initDepth.get() == null) {
			initDepth.set(1);
		} else {
			initDepth.set(initDepth.get() + 1);
		}

		if (resourceCache.get() == null) {
			resourceCache.set(new HashMap<String, Object>());
		}

		if (cacheLocked.get() == null) {
			cacheLocked.set(Boolean.FALSE);
		}
	}
71502
public JimfsPath createRoot(Name root) {
    return createPath(checkNotNull(root), ImmutableList.<Name>of());
  }
1068174
@Override
    protected void postInit() throws Exception {
        if (controlTree == null) {
            throw new RuntimeException("controlTree not set");
        }

        controlTree.create(NODES, false);
        controlTree.create(LEADERS, false);

        if (controlTree.exists(myNodeInfo.treeNodePath)) {
            LOG.error("A node with the name " + myNodeInfo.getName() + " already exists!");
            throw new RuntimeException("Initialization failure");
        }

        LOG.info("Required peer node properties: {}", requiredPeerNodeProperties);
        LOG.info("Required server properties: {}", requiredServerProperties);

        final Set<String> requiredProperties = (myId == 0 ? requiredServerProperties : requiredPeerNodeProperties);
        for (String property : requiredProperties) {
            if (!property.equals("id") && myNodeInfo.get(property) == null) {
                LOG.error("Required property {} not set!", property);
                throw new RuntimeException("Initialization failure");
            }
        }

        /// the calls in the demarcated section need to be in this specific order to avoid a possible race between nodes and leaders
        // `>>>> BEGIN CAREFULLY ORDERED SECTION
        branch = new DistributedBranchHelper(controlTree, NODES, false) {
            @Override
            protected boolean isNodeComplete(String node, Set<String> properties) {
                if (!properties.contains("id")) {
                    return false;
                }
                final short id = Short.parseShort(new String(controlTree.get(node + "/id"), Charsets.UTF_8));
                final Set<String> requiredProperties = (id == 0 ? requiredServerProperties : requiredPeerNodeProperties);
                final boolean success = properties.containsAll(requiredProperties);
                return success;
            }
        };

        branch.addListener(new DistributedTree.ListenerAdapter() {
            @Override
            public void nodeChildAdded(String parentPath, String childName) {
                AbstractCluster.this.nodeAdded(childName);
            }

            @Override
            public void nodeChildDeleted(String parentPath, String childName) {
                AbstractCluster.this.nodeRemoved(childName);
            }
        });
        // This read and handles the nodes.
        branch.init();

        controlTree.addListener(LEADERS, new DistributedTree.ListenerAdapter() {
            @Override
            public void nodeChildAdded(String parentPath, String childName) {
                AbstractCluster.this.leaderAdded(childName);
            }

            @Override
            public void nodeChildDeleted(String parentPath, String childName) {
                AbstractCluster.this.leaderRemoved(childName);
            }
        });

        myNodeInfo.writeToTree();

        setReady(true);

        super.postInit();

        joined = true;
        fireJoinedCluster();
        for (short id : masters.keySet()) {
            if (id != myId)
                fireNodeAdded(id);
        }
    }
891338
private void init() {
        // Add this node to parents children
        if (null != parent) { parent.getChildren().add(this); }

        children.addListener((ListChangeListener<TreeNode>) c -> {
            while (c.next()) {
                if (c.wasRemoved()) { c.getRemoved().forEach(removedItem -> removedItem.removeAllTreeNodeEventListeners()); }
            }
            getTreeRoot().fireTreeNodeEvent(CHILDREN_CHANGED);
        });
    }
938915
public void initImpl()
  {
    if (_level == null) {
      return;
    }
    
    if (_names.size() == 0) {
      _names.add("");
    }
    
    for (String name : _names) {
      _logger = Logger.getLogger(name);
    
      if (_level != null) {
        _logger.setLevel(_level);
      }

      if (_useParentHandlers != null) {
        _logger.setUseParentHandlers(_useParentHandlers.booleanValue());
      }
    
      for (Handler handler : _handlerList) {
        _logger.addHandler(handler);
      }
    
      if (_filter != null) {
        _logger.setFilter(_filter);
      }
    }
  }
927169
private void startElementRootNode(final Attributes attributes) {

        LOG.debug("Found rootNode");
        try {
            this.rootNode = this.newNode(null, attributes);
            this.nodeStack.push(this.rootNode);
        } catch (final RepositoryException e) {
            throw new AssertionError("Could not create node", e);
        }
    }
105022
public void initLeading()
    {
        this.leading = 0;
        while (this.leading < this.value.length() && this.value.charAt(this.leading) == ' ')
        {
            this.leading++;
        }

        if (this.leading == this.value.length())
        {
            this.setEmpty();
        }
    }
1076896
private void initTopicTree(HelpTopicNode htnParent, List<?> children) {
        if (children != null) {
            for (Object node : children) {
                TopicTreeNode ttnChild = (TopicTreeNode) node;
                Topic topic = ttnChild.getTopic();
                Target target = topic.getTarget();
                String source = view.getBook().getBookTitle();
                URL url = null;
                
                try {
                    url = target == null ? null : target.getURL();
                } catch (MalformedURLException e) {}
                
                HelpTopic ht = new HelpTopic(url, topic.getLabel(), source);
                HelpTopicNode htnChild = new HelpTopicNode(ht);
                htnParent.addChild(htnChild);
                initTopicTree(htnChild, ttnChild);
            }
        }
    }
806442
private void initializeButtonMenu() {
		button_menu = (ButtonMenu) findViewById(R.id.button_menu);
		button_menu.setButtonMenuVM(buttonMenuVM);
		button_menu.initialize();
	}
576418
public void init(Object parent, Object objURL)
    {
        super.init(parent, objURL);

        this.setLayout(new BorderLayout());

        String strURL = this.getBaseApplet().getProperty(Params.URL);
        if (strURL != null)
            if (strURL.indexOf(':') != -1)
                strURL = strURL.substring(strURL.indexOf(':') + 1);
        this.displayURL(strURL);
    }
1265244
protected void initTree(CmsResource rootRes) throws CmsException {

        m_currentRoot = rootRes;
        m_treeContainer.removeAllComponents();
        showHeader();
        CmsSitemapTreeController controller = new CmsSitemapTreeController(
            A_CmsUI.getCmsObject(),
            rootRes,
            this,
            m_treeContainer);

        // no need to escape a structure id
        JavaScript.eval(CmsGwtConstants.VAR_LOCALE_ROOT + "='" + rootRes.getStructureId() + "'");

        CmsSitemapUI ui = (CmsSitemapUI)(A_CmsUI.get());
        ui.getSitemapExtension().setSitemapTreeController(controller);
        CmsSitemapTreeNode root1 = controller.createRootNode();
        controller.initEventHandlers(root1);
        m_treeContainer.addComponent(root1);
        controller.onClickOpen(root1);
    }
48249
private synchronized void initialize() {

    if (this.runtimes != null) {
      return;
    }

    this.runtimes = new HashMap<>();

    for (final AvroRuntimeDefinition rd : runtimeDefinition.getRuntimes()) {
      try {

        // We need to create different injector for each runtime as they define conflicting bindings. Also we cannot
        // fork the original injector because of the same reason.
        // We create new injectors and copy form the original injector what we need.
        // rootInjector is an emptyInjector that we copy bindings from the original injector into. Then we fork
        // it to instantiate the actual runtime.
        final Injector rootInjector = Tang.Factory.getTang().newInjector();
        initializeInjector(rootInjector);

        final Configuration runtimeConfig =
            Tang.Factory.getTang().newConfigurationBuilder()
                .bindNamedParameter(RuntimeName.class, rd.getRuntimeName().toString())
                .bindImplementation(Runtime.class, RuntimeImpl.class)
                .build();

        final Configuration config =
            new AvroConfigurationSerializer().fromString(rd.getSerializedConfiguration().toString());

        final Injector runtimeInjector = rootInjector.forkInjector(config, runtimeConfig);

        this.runtimes.put(rd.getRuntimeName().toString(), runtimeInjector.getInstance(Runtime.class));

      } catch (final IOException | InjectionException e) {
        throw new RuntimeException("Unable to initialize runtimes.", e);
      }
    }
  }
113692
private void init(String parentOu) {

        m_parentOu = parentOu;
        m_menu = new CmsContextMenu();
        m_menu.setAsTableContextMenu(this);

        m_container = new IndexedContainer();

        setContainerDataSource(m_container);

        for (TableProperty prop : TableProperty.values()) {
            m_container.addContainerProperty(prop, prop.getType(), prop.getDefault());
            setColumnHeader(prop, prop.getName());
        }
        setContainerDataSource(m_container);
        setItemIconPropertyId(TableProperty.Icon);
        setRowHeaderMode(RowHeaderMode.ICON_ONLY);

        setColumnWidth(null, 40);
        setSelectable(true);

        addGeneratedColumn(TableProperty.Ressources, new ColumnGenerator() {

            private static final long serialVersionUID = 4624734503799549261L;

            public Object generateCell(Table source, Object itemId, Object columnId) {

                String out = "";
                try {
                    boolean isOu = true;
                    for (I_CmsOuTreeType type : m_app.getTreeTypeProvider().getTreeTypes()) {
                        if (type.getId().equals(itemId)) {
                            isOu = false;
                        }
                    }
                    if (isOu) {
                        List<CmsResource> resources = OpenCms.getOrgUnitManager().getResourcesForOrganizationalUnit(
                            m_cms,
                            (String)itemId);
                        if (!resources.isEmpty()) {
                            out = resources.get(0).getRootPath();
                            int i = 1;
                            while ((resources.size() > i) & (out.length() < 50)) {
                                out += ", " + resources.get(i).getRootPath();
                            }
                            if (resources.size() > i) {
                                out += " ...";
                            }
                        }
                    }
                } catch (CmsException e) {
                    LOG.error("unable to read resources.", e);
                }
                return out;
            }
        });

        setVisibleColumns(TableProperty.Name, TableProperty.Description, TableProperty.Ressources);

        try {
            m_cms = OpenCms.initCmsObject(A_CmsUI.getCmsObject());
            m_cms.getRequestContext().setSiteRoot("");
        } catch (CmsException e) {
            m_cms = A_CmsUI.getCmsObject();
        }
        try {
            if (m_app.isOUManagable(m_parentOu)) {

                for (I_CmsOuTreeType treeType : m_app.getTreeTypeProvider().getTreeTypes()) {
                    if (treeType.showInOuTable() && treeType.isValidForOu(m_cms, m_parentOu)) {
                        Item item = m_container.addItem(treeType.getId());
                        item.getItemProperty(TableProperty.Name).setValue(treeType.getName());
                        item.getItemProperty(TableProperty.Icon).setValue(treeType.getIcon());
                        item.getItemProperty(TableProperty.Type).setValue(treeType);
                    }
                }
            }
            List<CmsOrganizationalUnit> webOus = new ArrayList<CmsOrganizationalUnit>();
            for (CmsOrganizationalUnit ou : OpenCms.getOrgUnitManager().getOrganizationalUnits(
                m_cms,
                parentOu,
                false)) {

                if (ou.hasFlagWebuser()) {
                    webOus.add(ou);
                } else {
                    addOuToTable(ou);
                }
            }
            for (CmsOrganizationalUnit ou : webOus) {
                addOuToTable(ou);
            }
        } catch (CmsException e) {
            LOG.error("Unable to read ous", e);
        }

        addItemClickListener(new ItemClickListener() {

            private static final long serialVersionUID = 4807195510202231174L;

            public void itemClick(ItemClickEvent event) {

                setValue(null);
                select(event.getItemId());
                if (event.getButton().equals(MouseButton.RIGHT) || (event.getPropertyId() == null)) {
                    m_menu.setEntries(getMenuEntries(), Collections.singleton((String)getValue()));
                    m_menu.openForTable(event, event.getItemId(), event.getPropertyId(), CmsOUTable.this);
                    return;
                }
                if (event.getButton().equals(MouseButton.LEFT) && event.getPropertyId().equals(TableProperty.Name)) {
                    updateApp((String)getValue());
                }

            }

        });
        setCellStyleGenerator(new CellStyleGenerator() {

            private static final long serialVersionUID = 1L;

            public String getStyle(Table source, Object itemId, Object propertyId) {

                if (TableProperty.Name.equals(propertyId)) {
                    return " " + OpenCmsTheme.HOVER_COLUMN;
                }

                return "";
            }
        });
    }
41829
public void init(Object parent, Object strURL)
    {
        BaseApplet applet = null;
        if (parent instanceof BaseApplet)
            applet = (BaseApplet)parent;
        if (strURL instanceof BaseApplet)
            applet = (BaseApplet)strURL;
        if (applet == null)
            applet = this.getBaseApplet();

        if (strURL == null)
        	if (applet != null)
        		if (applet.getProperty(Params.URL) == null)
        			strURL = "?" + Params.HELP + "=";

        this.setOpaque(false);
        super.init(parent, strURL);

        if (parent instanceof BaseApplet)
        	((BaseApplet)parent).setHelpView(this.getHtmlEditor());
    }