private void addMenuItem(int position, final List<Item> menuItems, final Option option) {
        if (option.isAvailable()) {
            menuItems.add(createItem(
                    option.getText(),
                    () -> option.setOn(!option.isOn()),
                    position));
        }
    }
Update the labels of the context menu items depending on the current XML
editor settings.
stroom-core-client-widget/src/main/java/stroom/editor/client/view/EditorMenuPresenter.java