static PendingChangesOptionsDialog Build(WorkspaceInfo wkInfo, bool isGluonMode)
        {
            PendingChangesOptionsDialog result = Create(wkInfo, isGluonMode);

            result.CheckFsWatcher(wkInfo);

            result.mInitialOptions = new PendingChangesOptions();
            result.mInitialOptions.LoadPendingChangesOptions();
            result.SetOptions(result.mInitialOptions);

            return(result);
        }
        internal static void ChangeOptions(
            WorkspaceInfo wkInfo,
            bool isGluonMode,
            IRefreshableView view,
            IAutorefreshView autorefreshView,
            EditorWindow window)
        {
            PendingChangesOptionsDialog dialog = Build(wkInfo, isGluonMode);

            autorefreshView.DisableAutorefresh();

            bool isDialogDirty = false;

            try
            {
                if (dialog.RunModal(window) != ResponseType.Ok)
                {
                    return;
                }

                PendingChangesOptions currentOptions = dialog.GetOptions();
                isDialogDirty = dialog.IsDirty(currentOptions);

                if (!isDialogDirty)
                {
                    return;
                }

                currentOptions.SavePreferences();
            }
            finally
            {
                autorefreshView.EnableAutorefresh();

                if (isDialogDirty)
                {
                    view.Refresh();
                }
            }
        }