Called to update the GUI when a repo tree item has changed or a new one was selected.
7454
def currentRepoTreeItemChanged(self):
        
        # When the model is empty the current index may be invalid and the currentItem may be None.
        currentItem, currentIndex = self.getCurrentItem()

        hasCurrent = currentIndex.isValid()
        assert hasCurrent == (currentItem is not None), \
            "If current idex is valid, currentIndex may not be None" # sanity check

        # Set the item in the collector, will will subsequently update the inspector.
        if hasCurrent:
            logger.info("Adding rti to collector: {}".format(currentItem.nodePath))
            self.collector.setRti(currentItem)
            #if rti.asArray is not None: # TODO: maybe later, first test how robust it is now
            #    self.collector.setRti(rti)

        # Update context menus in the repo tree
        self.currentItemActionGroup.setEnabled(hasCurrent)
        isTopLevel = hasCurrent and self.model().isTopLevelIndex(currentIndex)
        self.topLevelItemActionGroup.setEnabled(isTopLevel)
        self.openItemAction.setEnabled(currentItem is not None
                                       and currentItem.hasChildren()
                                       and not currentItem.isOpen)
        self.closeItemAction.setEnabled(currentItem is not None
                                        and currentItem.hasChildren()
                                        and currentItem.isOpen)

        # Emit sigRepoItemChanged signal so that, for example, details panes can update.
        logger.debug("Emitting sigRepoItemChanged: {}".format(currentItem))
        self.sigRepoItemChanged.emit(currentItem)
16974
protected void onSelectedItemsChanged() {
        final Collection<ItemT> selectedItems = getSelectedItems();
        if (selectedItems.isEmpty()) {
            anchorLabel();
            getInputWidget().setText("");
        } else {
            getInputWidget().setText(getItemPrinter().printCollection(selectedItems));
            floatLabel();
        }
        if (itemPickerListener != null) itemPickerListener.onSelectionChanged(this, selectedItems);
    }
1050942
def update(self):
        """"""
        for linenum in reversed(sorted(self.updates)):
            self.replace_baseline_repr(linenum, self.updates[linenum])

        if not self.TEST_MODE:
            path = '{}.update{}'.format(*os.path.splitext(self.path))
            with io.open(path, 'w', encoding='utf-8') as fh:
                fh.write('\n'.join(self.lines))
            print('UPDATE: {}'.format(self.showpath(path)))
710780
protected synchronized void updateVisualizerMenus() {
      Projection proj = null;
      if(svgCanvas.getPlot() instanceof DetailView) {
        PlotItem item = ((DetailView) svgCanvas.getPlot()).getPlotItem();
        proj = item.proj;
      }
      menubar.removeAll();
      menubar.add(filemenu);
      ResultHierarchy hier = context.getHierarchy();
      Hierarchy<Object> vistree = context.getVisHierarchy();
      Result start = context.getBaseResult();
      ArrayList<JMenuItem> items = new ArrayList<>();
      if(start == null) {
        for(It<Result> iter = hier.iterAll(); iter.valid(); iter.advance()) {
          if(hier.numParents(iter.get()) == 0) {
            recursiveBuildMenu(items, iter.get(), hier, vistree, proj);
          }
        }
      }
      else {
        for(It<Result> iter = hier.iterChildren(start); iter.valid(); iter.advance()) {
          recursiveBuildMenu(items, iter.get(), hier, vistree, proj);
        }
      }
      // Add all items.
      for(JMenuItem item : items) {
        menubar.add(item);
      }
      menubar.revalidate();
      menubar.repaint();
    }
665487
def changed(self, item):
        
        if self._rejectChanges:
            raise errors.ChangeRejected()
        if self.transaction is not None:
            self.transaction.add(item)
            self.touched.add(item)
443339
def _selectedRepoRow(self):
        
        # TODO - figure out what happens if no repo is selected
        selectedModelIndexes = \
            self.reposTableWidget.selectionModel().selectedRows()
        for index in selectedModelIndexes:
            return index.row()
896353
public void updateItemState(ItemState itemState) throws RepositoryException
   {
      if (itemState.isDeleted())
      {
         throw new RepositoryException("Illegal state DELETED. Use delete(...) method");
      }

      changesLog.add(itemState);
   }
309460
def update():
    """"""
    repo_directory = get_config()['repo_directory']
    os.chdir(repo_directory)
    click.echo("Check for updates...")

    local = subprocess.check_output('git rev-parse master'.split()).strip()
    remote = subprocess.check_output(
        'git ls-remote https://github.com/tldr-pages/tldr/ HEAD'.split()
    ).split()[0]
    if local != remote:
        click.echo("Updating...")
        subprocess.check_call('git checkout master'.split())
        subprocess.check_call('git pull --rebase'.split())
        build_index()
        click.echo("Update to the latest and rebuild the index.")
    else:
        click.echo("No need for updates.")
859162
protected final void doUpdates(final K key,
            final Function<? super V, ? extends V> mutate) {
        apply(new Update<>(key, mutate));
    }
215734
def item_selection_changed(self):
        """"""
        row = self.current_row()
        if self.count() and row >= 0:
            if '</b></big><br>' in self.list.currentItem().text() and row == 0:
                self.next_row()
            if self.mode == self.FILE_MODE:
                try:
                    stack_index = self.paths.index(self.filtered_path[row])
                    self.plugin = self.widgets[stack_index][1]
                    self.goto_line(self.line_number)
                    try:
                        self.plugin.switch_to_plugin()
                        self.raise_()
                    except AttributeError:
                        # The widget using the fileswitcher is not a plugin
                        pass
                    self.edit.setFocus()
                except ValueError:
                    pass
            else:
                line_number = self.filtered_symbol_lines[row]
                self.goto_line(line_number)
483898
protected void updateSelection (int selidx)
    {
        // do nothing if this element is already selected
        if (selidx == _selectedIndex) {
            return;
        }

        // unhighlight the old component
        if (_selectedIndex != -1) {
            JLabel but = (JLabel)getComponent(_selectedIndex);
            but.setBorder(DESELECTED_BORDER);
        }

        // save the new selection
        _selectedIndex = selidx;

        // if the selection is valid, highlight the new component
        if (_selectedIndex != -1) {
            JLabel but = (JLabel)getComponent(_selectedIndex);
            but.setBorder(SELECTED_BORDER);
        }

        // fire an action performed to let listeners know about our
        // changed selection
        fireActionPerformed();

        repaint();
    }
998639
def repoTreeItemChanged(self, rti):
        
        logger.debug("onItemChanged: {}".format(rti))
        currentItem, _currentIndex = self.getCurrentItem()

        if rti == currentItem:
            self.currentRepoTreeItemChanged()
        else:
            logger.debug("Ignoring changed item as is not the current item: {}".format(rti))
261961
public void postUpdate()
    {
        if (current != null)
        {
            final Class<? extends State> next = current.checkTransitions(last);
            if (next != null)
            {
                changeState(next);
            }
        }
    }
97036
private void updateSelection() {
        Dateitem selectedItem = getSelectedItem();
        
        if (selectedItem == null) {
            addStyle("color", "gray");
        } else {
            addStyle("color", "inherit");
        }
        
        setFocus(false);
    }
1236881
def _on_items_changed(self, change):
        
        if change['type'] != 'container':
            return
        op = change['operation']
        if op == 'append':
            i = len(change['value'])-1
            self.adapter.notifyItemInserted(i)
        elif op == 'insert':
            self.adapter.notifyItemInserted(change['index'])
        elif op in ('pop', '__delitem__'):
            self.adapter.notifyItemRemoved(change['index'])
        elif op == '__setitem__':
            self.adapter.notifyItemChanged(change['index'])
        elif op == 'extend':
            n = len(change['items'])
            i = len(change['value'])-n
            self.adapter.notifyItemRangeInserted(i, n)
        elif op in ('remove', 'reverse', 'sort'):
            # Reset everything for these
            self.adapter.notifyDataSetChanged()
1223218
private void updateDelegate()
	{
		T parentValue = parent.getValue();
		
		Observable<U> child = childFactory.createObservable(parentValue);
		
		if (child == null)
		{
			child = Observables.nullObservable();
		}
		
		setDelegate(child);
	}
193185
@Override
    public void onUpdate(Detector.Detections<Barcode> detectionResults, Barcode item) {
        mOverlay.add(mGraphic);
        mGraphic.updateItem(item);
    }