# Interface ICodeAutocompleteProvider OptimaJet.Workflow.Core.Runtime.CodeAutocomplete.ICodeAutocompleteProvider Provides access to code autocomplete providers and methods for registering, initializing, and querying completion data. Namespace: [OptimaJet.Workflow.Core.Runtime.CodeAutocomplete](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.CodeAutocomplete/) ```csharp public interface ICodeAutocompleteProvider ``` ## Type Hierarchy - ICodeAutocompleteProvider Current type - Implementing types - [CodeAutocompleteProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.CodeAutocomplete/CodeAutocompleteProvider/) ## Methods `void AddVariablesToDefaultCompleterIfEnable(IEnumerable variables)` Adds the provided variables to the [DefaultAutocompleter](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.CodeAutocomplete/DefaultAutocompleter/) when the default autocompleter is available. If the [DefaultAutocompleter](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.CodeAutocomplete/DefaultAutocompleter/) is not added, the method does nothing. If it is available but not yet initialized, this method initializes it before adding variables. ### Parameters | Name | Type | Description | | --- | --- | --- | | `variables` | `IEnumerable` | Variables to add to the default autocomplete source. | `void AddVariablesToDefaultCompleterIfEnable(string varName, Type varType)` Adds a variable to the [DefaultAutocompleter](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.CodeAutocomplete/DefaultAutocompleter/) when the default autocompleter is available. If the [DefaultAutocompleter](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.CodeAutocomplete/DefaultAutocompleter/) is not added, the method does nothing. If it is available but not yet initialized, this method initializes it before adding the variable. ### Parameters | Name | Type | Description | | --- | --- | --- | | `varName` | `String` | Variable name that should appear in autocomplete results. | | `varType` | `Type` | Variable runtime type used for completion candidates. | `HashSet Get(string pattern, IEnumerable usings, IEnumerable variables)` Gets completion entries from all autocompleters that are already initialized. ### Parameters | Name | Type | Description | | --- | --- | --- | | `pattern` | `String` | Text pattern to match, for example `System.Thr`. | | `usings` | `IEnumerable` | Namespace aliases in scope, such as `System` or `System.Threading`. | | `variables` | `IEnumerable` | Variables that can be suggested during completion. | ### Returns | Type | Description | | --- | --- | | `HashSet` | A set of matching autocomplete items. | `void InitCodeAutocomletersThatNoInitialized()` Initializes each registered autocompleter that is not yet initialized. `void RegisterCodeAutocompleters(params ICodeAutocompleter[] completers)` Registers additional code autocompleters without initializing them. ### Parameters | Name | Type | Description | | --- | --- | --- | | `completers` | `ICodeAutocompleter[]` | Autocompleter instances to add to the provider collection. | `void RunInitTask()` Starts an asynchronous task that initializes registered autocompleters. [Previous DefaultAutocompleter](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.CodeAutocomplete/DefaultAutocompleter/) [Next ICodeAutocompleter](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime.CodeAutocomplete/ICodeAutocompleter/)