static bool ProcessKeyActionForOpenMenu(
            OpenMenuOperations openOperationToExecute,
            IOpenMenuOperations openMenuOperations,
            SelectedChangesGroupInfo info)
        {
            OpenMenuOperations openOperations =
                GetOpenMenuOperations.ForPendingChanges(info);

            if (!openOperations.HasFlag(openOperationToExecute))
            {
                return(false);
            }

            ProcessOpenMenuOperation(
                openOperationToExecute, openMenuOperations);

            return(true);
        }
        void UpdateOpenMenuItems(GenericMenu menu, OpenMenuOperations operations)
        {
            if (!operations.HasFlag(OpenMenuOperations.Open) &&
                !operations.HasFlag(OpenMenuOperations.OpenWith) &&
                !operations.HasFlag(OpenMenuOperations.OpenInExplorer))
            {
                menu.AddDisabledItem(mOpenSubmenuItemContent);
                return;
            }

            if (operations.HasFlag(OpenMenuOperations.Open))
            {
                menu.AddItem(mOpenMenuItemContent, false, OpenMenuItem_Click);
            }
            else
            {
                menu.AddDisabledItem(mOpenMenuItemContent);
            }

            if (operations.HasFlag(OpenMenuOperations.OpenWith))
            {
                menu.AddItem(mOpenWithMenuItemContent, false, OpenWithMenuItem_Click);
            }
            else
            {
                menu.AddDisabledItem(mOpenWithMenuItemContent);
            }

            if (operations.HasFlag(OpenMenuOperations.OpenInExplorer))
            {
                menu.AddItem(mOpenInExplorerMenuItemContent, false, OpenInExplorerMenuItem_Click);
            }
            else
            {
                menu.AddDisabledItem(mOpenInExplorerMenuItemContent);
            }

            if (!mMetaMenuOperations.SelectionHasMeta())
            {
                return;
            }

            menu.AddSeparator(PlasticLocalization.GetString(PlasticLocalization.Name.ItemsMenuItemOpen) + "/");

            if (operations.HasFlag(OpenMenuOperations.Open))
            {
                menu.AddItem(mOpenMetaMenuItemContent, false, OpenMetaMenuItem_Click);
            }
            else
            {
                menu.AddDisabledItem(mOpenMetaMenuItemContent);
            }

            if (operations.HasFlag(OpenMenuOperations.OpenWith))
            {
                menu.AddItem(mOpenMetaWithMenuItemContent, false, OpenMetaWithMenuItem_Click);
            }
            else
            {
                menu.AddDisabledItem(mOpenMetaWithMenuItemContent);
            }

            if (operations.HasFlag(OpenMenuOperations.OpenInExplorer))
            {
                menu.AddItem(mOpenMetaInExplorerMenuItemContent, false, OpenMetaInExplorerMenuItem_Click);
            }
            else
            {
                menu.AddDisabledItem(mOpenMetaInExplorerMenuItemContent);
            }
        }