code: private void addCommands() {
          boolean dividerRequired = false;
  
          if (creationEnabled) {
              boolean newGroupEnabled = isNewGroupEnabled();
              if (newGroupEnabled) {
                  this.addCommand(view.i18nNewItem(getGroupLiteral()), this::newGroup);
                  dividerRequired = true;
              }
              boolean newDividerEnabled = isNewDividerEnabled();
              if (newDividerEnabled) {
                  this.addCommand(view.i18nNewItem(getDividerLiteral()), this::newDivider);
                  dividerRequired = true;
              }
              boolean newPerspectiveEnabled = isNewPerspectiveEnabled();
              if (newPerspectiveEnabled) {
                  this.addCommand(view.i18nNewItem(getPerspectiveLiteral()), this::newPerspective);
                  dividerRequired = true;
              }
          }
  
          if (moveUpEnabled || moveDownEnabled) {
              if (dividerRequired) {
                  view.addCommandDivider();
              }
              dividerRequired = true;
              if (moveUpEnabled) {
                  this.addCommand(view.i18nMoveFirst(), this::moveFirstCommand);
                  this.addCommand(view.i18nMoveUp(), this::moveUpCommand);
              }
              if (moveDownEnabled) {
                  this.addCommand(view.i18nMoveDown(), this::moveDownCommand);
                  this.addCommand(view.i18nMoveLast(), this::moveLastCommand);
              }
          }
          if (isGotoPerspectiveEnabled()) {
              if (dividerRequired) {
                  view.addCommandDivider();
              }
              dividerRequired = true;
              this.addCommand(view.i18nGotoItem(getPerspectiveLiteral()), this::gotoPerspectiveCommand);
          }
      }
docs: Item commands