Expands the currently viewed folder in the tree.<p>
515272
void expandCurrentFolder() {

        if (m_currentFolder != null) {
            m_treeContainer.setChildrenAllowed(m_currentFolder, true);
            m_fileTree.expandItem(m_currentFolder);
        }
    }
1156640
public void addFolder(String folder) {

        m_searchObject.addFolder(folder);
        m_searchObjectChanged = true;
        ValueChangeEvent.fire(this, m_searchObject);
    }
792265
private void scanFolderLevel( Element element, CMFolder cmFolder )
    {
        NodeList nodeList = element.getChildNodes();

        for ( int i = 0; i < nodeList.getLength(); i++ ) {
            Node currentNode = nodeList.item( i );

            if ( currentNode.getNodeType() != Node.ELEMENT_NODE ) {
                continue;
            }

            Element currentElement = ( Element ) currentNode;

            if ( !currentElement.getLocalName().equals( "folder" ) ) {
                continue;
            }

            //calls this method for all the children which is Element
            CMFolder childFolder = cmFolder.addChild( currentElement.getAttribute( "id" ),
                                                      currentElement.getAttribute( "name" ) );

            scanFolderLevel( currentElement, childFolder );
        }
    }
7906
@SuppressWarnings("unchecked")
    private void expandTable() {
        int newCapacity = currentCapacity + increment;
        if (newCapacity < currentCapacity) {
            throw new IllegalStateException(
                            "Attempt to expand LookupTable beyond maximum capacity");
        }
        E[] theNewArray = (E[]) new Object[newCapacity];
        System.arraycopy(this.theElementArray, 0, theNewArray, 0, currentCapacity);
        theElementArray = theNewArray;
        currentCapacity = newCapacity;
    }
51020
def expand_all(self):
        
        if implementsCollapseAPI(self._tree):
            self._tree.expand_all()
            self._walker.clear_cache()
            self.refresh()
785862
def expand_all(self):
        """"""

        def aux(item):
            self.item(item, open=True)
            children = self.get_children(item)
            for c in children:
                aux(c)

        children = self.get_children("")
        for c in children:
            aux(c)
662278
function expandToItem(treeId,itemId) {
	var ul = document.getElementById(treeId);
	if (ul == null) { return false; }
	var ret = expandCollapseList(ul,nodeOpenClass,itemId);
	if (ret) {
		var o = document.getElementById(itemId);
		if (o.scrollIntoView) {
			o.scrollIntoView(false);
		}
	}
}
181303
private void updateButtonsLayout() {
		// Get the buttons layout.
		LinearLayout root = this.chooser.getRootLayout();
		LinearLayout buttonsLayout = (LinearLayout) root.findViewById(R.id.linearLayoutButtons);

		// Verify if the 'Add' button is visible or not.
		View addButton = root.findViewById(R.id.buttonAdd);
		addButton.setVisibility(this.canCreateFiles? View.VISIBLE : View.INVISIBLE);
		addButton.getLayoutParams().width = this.canCreateFiles? ViewGroup.LayoutParams.MATCH_PARENT : 0;

		// Verify if the 'Ok' button is visible or not.
		View okButton = root.findViewById(R.id.buttonOk);
		okButton.setVisibility(this.folderMode? View.VISIBLE : View.INVISIBLE);
		okButton.getLayoutParams().width = this.folderMode? ViewGroup.LayoutParams.MATCH_PARENT : 0;
		
		// If both buttons are invisible, hide the layout.
		ViewGroup.LayoutParams params = buttonsLayout.getLayoutParams();
		if(this.canCreateFiles || this.folderMode) {
			// Show the layout.
			params.height = ViewGroup.LayoutParams.WRAP_CONTENT;

			// If only the 'Ok' button is visible, put him first. Otherwise, put 'Add' first.
			buttonsLayout.removeAllViews();
			if(this.folderMode && !this.canCreateFiles) {
				buttonsLayout.addView(okButton);
				buttonsLayout.addView(addButton);
			} else {
				buttonsLayout.addView(addButton);			
				buttonsLayout.addView(okButton);
			}
		} else {
			// Hide the layout.
			params.height = 0;
		}
	}
1324246
private void addSubDirectory(Path root, Path filePath) throws IOException {
        String listener = getListenerRootPath(root);

        List<String> listeners = mSubDirectories.get(listener);

        if (listeners != null) {
            if (mSubDirectories.get(listener).contains(filePath.toAbsolutePath())) {
                return;
            } else {
                mSubDirectories.get(listener).add(filePath.toString());
            }

            try {
                watchDir(filePath.toFile());
            } catch (IOException e) {
                throw new IOException("Could not watch the subdirectories.", e);
            }
        }
    }
146341
protected void updateRoot(CmsObject rootCms, CmsResource siteRootResource) {

        m_root = siteRootResource;
        m_currentCms = rootCms;
        updateView();
    }
67629
def expand_path(*paths):
    """"""
    return os.path.join(
        os.path.dirname(os.path.realpath(sys.argv[0])), *paths)
320868
private void expand(boolean immediately) {
	if (locked == false && inAction == false && collapsed) {
	  inAction = true;
	  CollapsiblePanelListener[] array =
		  listeners.getListeners(CollapsiblePanelListener.class);
	  for (CollapsiblePanelListener cpl : array) {
		cpl.panelWillExpand(new CollapsiblePanelEvent(this));
	  }
	  pixels = incremental;
	  if (isAnimationEnabled() && immediately == false) {
		calculatedHeight = getSize().height;
		if (isFillMode()) {
		  setEndHeights();
		} else {
		  endHeight = getPreferredSize(false).height;
		}
		getExpandTimer().start();
	  } else {
		changeStatus();
	  }
	}
  }
1070396
def expand_dir(_dir, cwd=os.getcwd()):
    
    _dir = os.path.expanduser(os.path.expandvars(_dir))
    if not os.path.isabs(_dir):
        _dir = os.path.normpath(os.path.join(cwd, _dir))
    return _dir
313040
public void expand(int position, boolean notifyItemChanged) {
        Item item = mFastAdapter.getItem(position);
        if (item != null && item instanceof IExpandable) {
            IExpandable expandable = (IExpandable) item;
            //if this item is not already expanded and has sub items we go on
            if (!expandable.isExpanded() && expandable.getSubItems() != null && expandable.getSubItems().size() > 0) {
                IAdapter<Item> adapter = mFastAdapter.getAdapter(position);
                if (adapter != null && adapter instanceof IItemAdapter) {
                    ((IItemAdapter<?, Item>) adapter).addInternal(position + 1, expandable.getSubItems());
                }

                //remember that this item is now opened (not collapsed)
                expandable.withIsExpanded(true);

                //we need to notify to get the correct drawable if there is one showing the current state
                if (notifyItemChanged) {
                    mFastAdapter.notifyItemChanged(position);
                }
            }
        }
    }
1232779
public void updateResourceInTree(CmsObject cms, CmsUUID id) {

        try {
            CmsResource resource = cms.readResource(id, CmsResourceFilter.IGNORE_EXPIRATION);
            if (resource.isFile()) {
                return;
            }
            // ensuring to only add items belonging to the current site
            if (!resource.getRootPath().startsWith(cms.getRequestContext().getSiteRoot())) {
                m_treeContainer.removeItemRecursively(id);
                return;
            }

            CmsResource parent = cms.readParentFolder(id);
            CmsUUID parentId = null;
            if (parent != null) {
                parentId = parent.getStructureId();
            } else {
                LOG.debug("Parent for resource '" + resource.getRootPath() + "' is null");
            }
            Item resourceItem = m_treeContainer.getItem(id);
            if (resourceItem != null) {
                // use the root path as name in case of the root item
                String resName = parentId == null ? resource.getRootPath() : resource.getName();
                resourceItem.getItemProperty(CmsResourceTableProperty.PROPERTY_RESOURCE_NAME).setValue(resName);
                CmsResourceUtil resUtil = new CmsResourceUtil(cms, resource);
                String iconHTML = CmsResourceIcon.getTreeCaptionHTML(resName, resUtil, null, false);
                resourceItem.getItemProperty(CmsResourceTableProperty.PROPERTY_TREE_CAPTION).setValue(iconHTML);
                resourceItem.getItemProperty(CmsResourceTableProperty.PROPERTY_STATE).setValue(resource.getState());
                if (parentId != null) {
                    m_treeContainer.setParent(resource.getStructureId(), parentId);
                }
            } else {
                addTreeItem(cms, resource, parentId, false, m_treeContainer);
            }
            m_fileTree.markAsDirty();
        } catch (CmsVfsResourceNotFoundException e) {
            m_treeContainer.removeItemRecursively(id);
            LOG.debug(e.getLocalizedMessage(), e);
        } catch (CmsException e) {
            CmsErrorDialog.showErrorDialog(e);
            LOG.error(e.getLocalizedMessage(), e);
        }
    }
526137
void showParentFolder() {

        CmsUUID parentId = (CmsUUID)m_treeContainer.getParent(m_currentFolder);
        if (parentId != null) {
            Item resourceItem = m_treeContainer.getItem(parentId);
            if ((resourceItem.getItemProperty(CmsResourceTableProperty.PROPERTY_DISABLED).getValue() == null)
                || !((Boolean)resourceItem.getItemProperty(
                    CmsResourceTableProperty.PROPERTY_DISABLED).getValue()).booleanValue()) {
                // don't open disabled parent folders
                try {
                    readFolder(parentId);
                    m_fileTree.select(parentId);
                } catch (CmsException e) {
                    CmsErrorDialog.showErrorDialog(
                        CmsVaadinUtils.getMessageText(Messages.ERR_EXPLORER_CAN_NOT_READ_RESOURCE_1, parentId),
                        e);
                    LOG.error(e.getLocalizedMessage(), e);
                }
            }
        }
    }
1368859
public final void expandParent(int parentPosition) {
        if (!isExpanded(parentPosition)) {
            mExpandItemArray.append(parentPosition, true);

            int position = positionFromParentPosition(parentPosition);
            int childCount = childItemCount(parentPosition);
            notifyItemRangeInserted(position + 1, childCount);
        }
    }