Beispiel #1
0
        private bool StartShowTooltip(Vector2 pos, bool showMethodOverloads)
        {
            if (!isEnabled)
            {
                return(true);
            }

            if (useMultiThreading)
            {
                if (UIDEThreadPool.IsRegistered("AutoComplete_UpdateTooltip"))
                {
                    wantsTooltipUpdate          = true;
                    wantsTooltipUpdateOverloads = showMethodOverloads;
                    return(false);
                }
                toolTipPos         = pos;
                wantsTooltipUpdate = false;

                UIDEThreadPool.RegisterThread("AutoComplete_UpdateTooltip", StartShowTooltipActual, new System.Object[] { toolTipPos, showMethodOverloads });
            }
            else
            {
                toolTipPos         = pos;
                wantsTooltipUpdate = false;
                StartShowTooltipActual(new System.Object[] { toolTipPos, showMethodOverloads });
            }
            return(true);
        }
        private bool UpdateChainResolver()
        {
            if (editor.editorWindow.generalSettings.GetDisableCompletion())
            {
                return(true);
            }
            if (editor.editorWindow.generalSettings.GetForceGenericAutoComplete())
            {
                return(true);
            }
            if (useMultiThreading)
            {
                if (UIDEThreadPool.IsRegistered("SRCSUS_UpdateChainResolver"))
                {
                    wantsChainResolverUpdate = true;
                    return(false);
                }
                wantsChainResolverUpdate = false;
                UIDEThreadPool.RegisterThread("SRCSUS_UpdateChainResolver", UpdateChainResolverActual);
            }
            else
            {
                wantsChainResolverUpdate = false;
                UpdateChainResolverActual(null);
            }

            return(true);
        }
        private bool Reparse()
        {
            if (editor.editorWindow.generalSettings.GetDisableCompletion())
            {
                return(true);
            }
            if (editor.editorWindow.generalSettings.GetForceGenericAutoComplete())
            {
                return(true);
            }

            if (useMultiThreading)
            {
                if (UIDEThreadPool.IsRegistered("SRCSUS_Reparse") || editor.editorWindow.time - lastReparseTime <= 1.0f)
                {
                    wantsParserUpdate = true;
                    return(false);
                }
                lastReparseTime   = editor.editorWindow.time;
                wantsParserUpdate = false;
                UIDEThreadPool.RegisterThread("SRCSUS_Reparse", ReparseActual);
            }
            else
            {
                wantsParserUpdate = false;
                ReparseActual(null);
            }

            return(true);
        }
Beispiel #4
0
 public override void OnTextEditorUpdate()
 {
     if (wantsParserUpdate && editor.editorWindow.time - lastParseTime > reparseDelay)
     {
         if (!UIDEThreadPool.IsRegistered("InlineErrorHighlighter_Parse"))
         {
             wantsParserUpdate = false;
             lastParseTime     = editor.editorWindow.time;
             UIDEThreadPool.RegisterThread("InlineErrorHighlighter_Parse", UpdateParser);
         }
     }
     mouseOverError = null;
 }
 public bool UpdateMultilineFormatting()
 {
     if (useMultiThreading)
     {
         if (UIDEThreadPool.IsRegistered("SRCSUS_UpdateMultilineFormatting"))
         {
             wantsMultiLineFormattingUpdate = true;
             return(false);
         }
         wantsMultiLineFormattingUpdate = false;
         UIDEThreadPool.RegisterThread("SRCSUS_UpdateMultilineFormatting", UpdateMultilineFormattingActual);
     }
     else
     {
         wantsMultiLineFormattingUpdate = false;
         UpdateMultilineFormattingActual(null);
     }
     return(true);
 }
Beispiel #6
0
 public bool TryStartUpdateAutoCompleteList(bool isChain)
 {
     if (!isEnabled)
     {
         return(true);
     }
     if (useMultiThreading)
     {
         if (UIDEThreadPool.IsRegistered("AutoComplete_UpdateAutoCompleteList"))
         {
             wantsChainUpdate        = isChain;
             wantsAutoCompleteUpdate = true;
             return(false);
         }
         wantsAutoCompleteUpdate = false;
         UIDEThreadPool.RegisterThread("AutoComplete_UpdateAutoCompleteList", UpdateAutoCompleteList, isChain);
     }
     else
     {
         wantsAutoCompleteUpdate = false;
         UpdateAutoCompleteList(isChain);
     }
     return(true);
 }