Search Results for

    Show / Hide Table of Contents

    Creating Actions

    The Trados Studio Integration API allows developers to implement custom actions in Trados Studio desktop applications.

    An action is a piece of code that can have a UI representation and executes over a UI controller. Actions allow users to trigger application-specific functionality.

    Action Types

    Trados Studio supports two types of actions:

    • Global actions execute in the application context (see StudioContext)
    • Controller actions execute in the context of a view or view part controller (see Creating views, Creating viewparts)

    See Integrating actions for an example of a global action integrated into a custom ribbon group.

    Creating an Action

    To create an action, complete the following steps:

    • Create a class that inherits from one of the following base classes:
      • AbstractAction — for global application context actions
      • AbstractViewControllerAction<TController> — for context-specific view or view part actions
    • Apply the ActionAttribute attribute to specify action metadata
    • Apply one or more ActionLayoutAttribute attributes to specify layout settings and location

    Action Locations

    Specify the action location using one of the following default ribbon tabs or context menus:

    Studio Ribbon Tabs:

    • StudioDefaultRibbonTabs.AddinsRibbonTabLocation
    • StudioDefaultRibbonTabs.HelpRibbonTabLocation
    • StudioDefaultRibbonTabs.ViewRibbonTabLocation

    Translation Studio Ribbon Tabs:

    • TranslationStudioDefaultRibbonTabs.EditorAdvancedRibbonTabLocation
    • TranslationStudioDefaultRibbonTabs.EditorReviewRibbonTabLocation
    • TranslationStudioDefaultRibbonTabs.HomeRibbonTabLocation

    Translation Studio Context Menus:

    • TranslationStudioDefaultContextMenus.EditorDocumentContextMenuLocation
    • TranslationStudioDefaultContextMenus.FilesContextMenuLocation
    • TranslationStudioDefaultContextMenus.ProjectsContextMenuLocation

    You can also target a custom ribbon group (see Integrating ribbon groups).

    See Integrating actions for an example.

    Tip

    On how to obtain an already created action, see: GetAction< TAction>

    Keyboard Shortcuts

    The Trados Studio Integration API allows developers to add keyboard shortcuts to actions.

    To create a keyboard shortcut for an action, apply the ShortcutAttribute to your action class and specify the keyboard key combination that triggers the action.

    Note

    Shortcuts that conflict with existing shortcuts have lower priority and are ignored.

    • Improve this Doc
    In this article
    Back to top Generated by DocFX