/** * Sets the name and description of the category for uncategorized commands. * This is the category that will be returned if * {@link #getCategory(String)} is called with <code>null</code>. * * @param name * The name of the category for uncategorized commands; must not * be <code>null</code>. * @param description * The description of the category for uncategorized commands; * may be <code>null</code>. * @since 3.2 */ public final void defineUncategorizedCategory(final String name, final String description) { final Category category = getCategory(AUTOGENERATED_CATEGORY_ID); category.define(name, description); }
/** * Sets the name and description of the category for uncategorized commands. * This is the category that will be returned if * {@link #getCategory(String)} is called with <code>null</code>. * * @param name * The name of the category for uncategorized commands; must not * be <code>null</code>. * @param description * The description of the category for uncategorized commands; * may be <code>null</code>. * @since 3.2 */ public void defineUncategorizedCategory(final String name, final String description) { final Category category = getCategory(AUTOGENERATED_CATEGORY_ID); category.define(name, description); }
/** * Sets the name and description of the category for uncategorized commands. * This is the category that will be returned if * {@link #getCategory(String)} is called with <code>null</code>. * * @param name * The name of the category for uncategorized commands; must not * be <code>null</code>. * @param description * The description of the category for uncategorized commands; * may be <code>null</code>. * @since 3.2 */ public final void defineUncategorizedCategory(final String name, final String description) { final Category category = getCategory(AUTOGENERATED_CATEGORY_ID); category.define(name, description); }
@Override public Category defineCategory(String id, String name, String description) { Category cat = commandManager.getCategory(id); if (!cat.isDefined()) { cat.define(name, description); } return cat; }
private void createCategory(MCategory catModel) { Category category = commandService.getCategory(catModel.getElementId()); if (!category.isDefined()) { category.define(localize(catModel.getName(), catModel), localize(catModel.getDescription(), catModel)); } }
category.define(name, description);