예제 #1
0
        public override void OnUpdate(CommandUpdateEventArgs e)
        {
            bool add;
            IPendingChangesManager pcm = null;

            add = (e.Command == AnkhCommand.ItemAddToPending) || (e.Command == AnkhCommand.DocumentAddToPending);

            foreach (SvnItem i in GetSelection(e))
            {
                if (i.InSolution || !PendingChange.IsPending(i))
                {
                    continue;
                }

                if (pcm == null)
                {
                    pcm = e.GetService <IPendingChangesManager>();
                    if (pcm == null)
                    {
                        break;
                    }
                }

                if (pcm.Contains(i.FullPath) != add)
                {
                    return;
                }
            }

            e.Enabled = false;
        }
예제 #2
0
        public override void OnUpdate(CommandUpdateEventArgs e)
        {
            PendingChange.RefreshContext rc = null;
            foreach (SvnItem i in e.Selection.GetSelectedSvnItems(true))
            {
                if (PendingChange.IsPending(i))
                {
                    PendingChange pc;

                    if (rc == null)
                    {
                        rc = new PendingChange.RefreshContext(e.Context);
                    }

                    if (PendingChange.CreateIfPending(rc, i, out pc))
                    {
                        if (pc.IsNoChangeForPatching())
                        {
                            continue;
                        }
                    }
                    return;
                }
            }
            e.Enabled = false;
        }
예제 #3
0
        private bool IsChildChanged(string path)
        {
            GitItem item = StatusCache[path];

            if (item == null)
            {
                return(false);
            }

            return(PendingChange.IsPending(item));
        }
예제 #4
0
        public override void OnUpdate(CommandUpdateEventArgs e)
        {
            bool recursive = (e.Command != AnkhCommand.CommitProjectFile);

            foreach (SvnItem i in e.Selection.GetSelectedSvnItems(recursive))
            {
                if (PendingChange.IsPending(i))
                {
                    return;
                }
            }

            e.Enabled = false;
        }