code: protected void setDefaultCategory(String defaultCategory)
      {
          // If setDefaultCategory() method is invoked before macro initialization, this will make sure the macro will
          // have correct default category after initialization.
          this.defaultCategory = defaultCategory;
  
          // In case if setDefaultCategory() is invoked after macro initialization. Only works if the internal
          // MacroDescriptor is of type AbstractMacroDescriptor.
          if (getDescriptor() instanceof AbstractMacroDescriptor) {
              ((AbstractMacroDescriptor) getDescriptor()).setDefaultCategory(defaultCategory);
          }
      }
docs: Allows sub classes to set the default macro category. This method only has an effect if the internal
  {@link MacroDescriptor} is of type {@link AbstractMacroDescriptor}.
  
  @param defaultCategory the default macro category to be set.