public bool Generate(Document doc, LineToIndexTable lti, bool force = true)
        {
            if (this.Hilighter == null)
            {
                return(false);
            }

            long nowTick = DateTime.Now.Ticks;
            bool sync    = force || !this._IsSync;

            if (sync || Math.Abs(nowTick - this.lastUpdateTicks) >= AllowCallTicks)
            {
                for (int i = 0; i < lti.Count; i++)
                {
                    this.HilightLine(lti, i);
                }

                this.Hilighter.Reset();
                lti.ClearLayoutCache();

                this.lastUpdateTicks = nowTick;

                this._IsSync = true;

                return(true);
            }
            return(false);
        }
 public void Clear(LineToIndexTable lti)
 {
     for (int i = 0; i < lti.Count; i++)
     {
         lti.GetRaw(i).Syntax = null;
     }
     lti.ClearLayoutCache();
     this._IsSync = false;
 }