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); } } } }
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; } } } }
protected override void OnIdle(AnkhIdleArgs e) { base.OnIdle(e); if (_shouldParse) { _shouldParse = false; if (Parse()) { ScheduleSynchronize(); } } }
// 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 }
protected virtual void OnIdle(AnkhIdleArgs e) { }