Search Results for

    Show / Hide Table of Contents

    Class AbstractAutoSuggestProvider

    Defines the base class for the autosuggest provider, which are components with visual representation that provide to SDL Trados Studio users suggestions while they are editing the target documents (the translation in a "target" language of a document).

    Inheritance
    System.Object
    AbstractAutoSuggestProvider
    Implements
    System.IDisposable
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Sdl.TranslationStudioAutomation.IntegrationApi.AutoSuggest
    Assembly: Sdl.TranslationStudioAutomation.IntegrationApi.dll
    Syntax
    public abstract class AbstractAutoSuggestProvider : ISuggestionProvider, IDisposable

    Constructors

    AbstractAutoSuggestProvider()

    Declaration
    protected AbstractAutoSuggestProvider()

    Properties

    ActiveDocument

    Get the active document property.

    Declaration
    protected Document ActiveDocument { get; }
    Property Value
    Type Description
    Document

    ActiveSegmentPair

    Get the active segment pair of the active document.

    Declaration
    protected ISegmentPair ActiveSegmentPair { get; }
    Property Value
    Type Description
    ISegmentPair

    EditorController

    Get the editor controller.

    Declaration
    protected EditorController EditorController { get; }
    Property Value
    Type Description
    EditorController

    Icon

    Gets or sets the icon for this auto suggestion provider . Can be null.

    Declaration
    public Icon Icon { get; set; }
    Property Value
    Type Description
    System.Drawing.Icon

    Settings

    Get or set the AutoSuggest provider settings.

    Declaration
    public AutoSuggestSettings Settings { get; set; }
    Property Value
    Type Description
    AutoSuggestSettings

    Methods

    Dispose()

    Executed to release the resources.

    Declaration
    public void Dispose()

    Dispose(Boolean)

    Dispose(bool disposing) executes in two distinct scenarios. If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. If disposing equals false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed.

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    Determines the caller that is invoking the dispose.

    GetSuggestions(AbstractEditingContext)

    Executed when the suggestions are requested.

    Declaration
    protected abstract IEnumerable<AbstractAutoSuggestResult> GetSuggestions(AbstractEditingContext context)
    Parameters
    Type Name Description
    AbstractEditingContext context

    the context of the request.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<AbstractAutoSuggestResult>

    An enumeration containg the suggested results.

    Remarks

    This method is not invoked if the SDL Trados Studio user decided to disable the provider (Settings.Enabled = false).

    OnActiveDocumentChanged()

    Override it to process when the active document is changed. This method is called whenever the SDL Trados Studio user changes the current document by opening, closing or switching documents. Note: The concreate implementation can be used to prepare the AutoSuggest dictionary, prepare document specific initializations, etc.

    Declaration
    protected virtual void OnActiveDocumentChanged()
    Remarks

    This method will not be invoked if the SDL Trados Studio user decided to disable the provider (Settings.Enabled = false).

    OnActiveSegmentChanged()

    Override it to process when the active segment is changed. This method is called whenever in the editor the current active segment has been changed. Note: The concreate implementation can be used to prepare the AutoSuggest cadidates.

    Declaration
    protected virtual void OnActiveSegmentChanged()
    Remarks

    This method will not be invoked if the SDL Trados Studio user decided to disable the provider (Settings.Enabled = false).

    OnSettingsChanged()

    Override to implement custom logic when the provider settings are changed.

    Declaration
    protected virtual void OnSettingsChanged()
    Remarks

    This method informs the developer of any setting changes and can be used to establish if the provider is enable or disabled.

    Implements

    System.IDisposable

    Extension Methods

    WindowsControlUtils.ForWindowFromFrameworkElement(Object, Action<Window>)

    On this page

    • Constructors
      • AbstractAutoSuggestProvider()
    • Properties
      • ActiveDocument
      • ActiveSegmentPair
      • EditorController
      • Icon
      • Settings
    • Methods
      • Dispose()
      • Dispose(Boolean)
      • GetSuggestions(AbstractEditingContext)
      • OnActiveDocumentChanged()
      • OnActiveSegmentChanged()
      • OnSettingsChanged()
    • Implements
    • Extension Methods
    Back to top Generated by DocFX