def METHOD_NAME(self):
    r"""Populates the toolbar with items."""
    # This function is called first when no experiment has been loaded yet.
    try:
        self.experiment
    except:
        return
    self.clear()
    if self.orientation() == QtCore.Qt.Vertical:
        self.addWidget(ToolbarItemsLabel(self, _(u'Commonly used')))
    # Add the core items
    self.add_content([ToolbarItemsItem(self, item)
                      for item in self.experiment.core_items])
    # Create a dictionary of plugins by category. We also maintain a list
    # to preserve the order of the categories.
    cat_dict = OrderedDict()
    for plugin in self.plugin_manager.filter(modes=self.main_window.mode):
        # Ignoring disabled extensions
        cfg_key = f'plugin_enabled_{plugin.name}'
        if cfg_key in cfg and not cfg[cfg_key]:
            continue
        cat = plugin['category']
        if cat not in cat_dict:
            cat_dict[cat] = []
        cat_dict[cat].append(plugin)
    # Add the plugins
    for cat, cat_plugins in cat_dict.items():
        self.addSeparator()
        if self.orientation() == QtCore.Qt.Vertical:
            self.addWidget(ToolbarItemsLabel(self, cat))
        content = []
        for plugin in cat_plugins:
            oslogger.debug(u"adding plugin '%s'" % plugin)
            pixmap = self.theme.qpixmap(plugin.icon_large)
            content.append(ToolbarItemsItem(self, plugin.name, pixmap))
        self.add_content(content)