code: public ElementBase register(String path, PluginDefinition def, IPropertyProvider propertySource) throws Exception {
          if (def.isForbidden()) {
              log.info("Access to plugin " + def.getName() + " is restricted.");
              return null;
          }
          
          if (def.isDisabled()) {
              log.info("Plugin " + def.getName() + " is disabled.");
              return null;
          }
          
          ElementBase parent = parentFromPath(path);
          ElementBase plugin = parent == null ? null : def.createElement(parent, propertySource, false);
          String defPluginId = getDefaultPluginId();
          
          if (plugin instanceof ElementUI && !defPluginId.isEmpty()
                  && (defPluginId.equalsIgnoreCase(def.getId()) || defPluginId.equalsIgnoreCase(def.getName()))) {
              ((ElementUI) plugin).activate(true);
          }
          return plugin;
      }
docs: Registers the plugin with the specified definition with the specified path. If a tree path is
  absent, the plugin is associated with the tab itself.
  
  @param path Format is &lt;tab name&gt;\&lt;tree node path&gt;
  @param def Plugin definition
  @param propertySource Optional source for retrieving property values.
  @return The newly created plugin.
  @throws Exception Unspecified exception.