コード例 #1
0
        void IAnkhIdleProcessor.OnIdle(AnkhIdleArgs e)
        {
            OnIdle(e);
            if (_shouldSynchronize || _shouldUpdate)
            {
                _shouldSynchronize = false;
                _shouldUpdate      = false;

                if (_activeView != null)
                {
                    int line, col;
                    if (VSErr.Succeeded(_activeView.GetCaretPos(out line, out col)))
                    {
                        SynchronizeCombos(_activeView, line, col);
                    }
                }

                _shouldSendSync = true;
            }

            if (_shouldSendSync && _bar != null)
            {
                _shouldSendSync = false;

                foreach (ComboMemberCollection cmc in _combos)
                {
                    if (cmc.IsDirty(true))
                    {
                        _bar.RefreshCombo(cmc.Index, cmc.Current);
                    }
                }
            }
        }
コード例 #2
0
        public void OnIdle(AnkhIdleArgs e)
        {
            ThreadHelper.ThrowIfNotOnUIThread();

            if (_delayed)
            {
                TryReleaseDelayed();
            }
            else
            if (e.Periodic)
            {
                for (int i = 0; i < _tickCount; i++)
                {
                    if (_ticks[i] != 0)
                    {
                        Debug.WriteLine(string.Format("AnkhSVN: Tocking {0}", AnkhCommand.TickFirst + i));
                        PostExecCommand(AnkhCommand.TickFirst + i);
                    }
                }
            }

            if (e.NonPeriodic)
            {
                AnkhAction action;

                while (null != (action = GetIdleAction()))
                {
                    try
                    {
                        if (action != null)
                        {
                            action();
                        }
                    }
                    catch (Exception ex)
                    {
                        IAnkhErrorHandler handler = GetService <IAnkhErrorHandler>();
                        if (handler != null && handler.IsEnabled(ex))
                        {
                            handler.OnError(ex);
                        }
                        else
                        {
                            throw;
                        }
                    }

                    if (!e.ContinueIdle())
                    {
                        break;
                    }
                }
            }
        }
コード例 #3
0
        protected override void OnIdle(AnkhIdleArgs e)
        {
            base.OnIdle(e);

            if (_shouldParse)
            {
                _shouldParse = false;

                if (Parse())
                {
                    ScheduleSynchronize();
                }
            }
        }
コード例 #4
0
        // Returns: BOOL
        int IOleComponent.FDoIdle(uint grfidlef)
        {
            AnkhIdleArgs args = new AnkhIdleArgs(this, unchecked ((int)grfidlef));
            bool         done = true;

            foreach (IAnkhIdleProcessor pp in _idleProcessors)
            {
                args.Done = true;

                pp.OnIdle(args);

                done = done && args.Done;
            }

            return(done ? 0 : 1); // TRUE to be called again
        }
コード例 #5
0
 protected virtual void OnIdle(AnkhIdleArgs e)
 {
 }
コード例 #6
0
        protected override void OnIdle(AnkhIdleArgs e)
        {
            base.OnIdle(e);

            if (_shouldParse)
            {
                _shouldParse = false;

                if (Parse())
                {
                    ScheduleSynchronize();
                }
            }
        }