Class DefaultAutocompleter
OptimaJet.Workflow.Core.Runtime.CodeAutocomplete.DefaultAutocompleter
Provides the default ICodeAutocompleter implementation.
Namespace: OptimaJet.Workflow.Core.Runtime.CodeAutocomplete
public class DefaultAutocompleter : ICodeAutocompleterInheritance
- Object
Implemented Interfaces
Constructors
public DefaultAutocompleter(Action<Exception, string> log) #Initializes a new instance of DefaultAutocompleter with a default type searcher.
Parameters
Name
Type
Description
logAction<Exception, String>Logging callback used for non-fatal autocomplete errors.
public DefaultAutocompleter(Action<Exception, string> log, ITypeSearcher typeSearcher) #Initializes a new instance of DefaultAutocompleter.
Parameters
Name
Type
Description
logAction<Exception, String>Logging callback used for non-fatal autocomplete errors.
typeSearcherITypeSearcherType searcher used to discover and resolve CLR types.
Properties
Name
Type
AutocompleterName #StringGets the name that identifies the default autocompleter.
Initialized #BooleanGets a value indicating whether initialization has completed.
Methods
public HashSet<AutocompleteItem> Get(string pattern, IEnumerable<string> usings, IEnumerable<AutocompleteVariable> variables) #Gets autocomplete items that match the specified pattern.
Parameters
Name
Type
Description
patternStringText to search for, for example
System.Thr.usingsIEnumerable<String>Active namespace prefixes used for resolution.
variablesIEnumerable<AutocompleteVariable>Context variables to include in completion results.
Returns
Type
Description
HashSet<AutocompleteItem>A set of matching AutocompleteItem instances.
public void InitIfNotInitialized() #Initializes the autocompleter lazily and performs one-time root setup.
public void AddVariables(IEnumerable<AutocompleteVariable> variables) #Adds variables to the autocompleter root.
Parameters
Name
Type
Description
variablesIEnumerable<AutocompleteVariable>Variables to add to available completion candidates.
Fields
public static string DefaultAutocompleterName #Default autocompleter name.
Remarks
Call DefaultAutocompleter.InitIfNotInitialized() before calling DefaultAutocompleter.Get(string, IEnumerable<string>, IEnumerable<AutocompleteVariable>) or DefaultAutocompleter.AddVariables(IEnumerable<AutocompleteVariable>) so the autocomplete tree is built before use.