Under Review

Requesting Additional API exposure for direct Studio native find and replace with highlighting method

Dear Trados Development Team,
Please check the below post, as I am kindly requesting additional API exposure for either:

  1. A direct Find/Replace with Highlighting method,
  2. Or extensibility of segment markup/styling in IDisplayRowInfo for filter matches.

Thanks a lot

Sameh Ragab

----------------------

Hello RWS Developer Community,

My name is Sameh Ragab, and I'm the developer of the TWAS Studio Assistant plugin (available on RWS AppStore). I'm reaching out to get guidance on implementing native Trados Studio behaviors within my plugin's Find/Replace and Display Filter functionality.

Background

My plugin includes a Regex Manager with Find/Replace and Display Filter features. While I can successfully navigate to segments and apply custom display filters using the public API, I'm unable to replicate certain native Studio behaviors that would significantly improve user experience.

Specific Technical Questions

1. Find Next with Native Text Highlighting

  • Current Implementation: I use EditorController.ActiveDocument.SetActiveSegmentPair(paragraphUnitId, segmentId, true) to navigate to matching segments, but the matched text is not highlighted like it is when using Studio's native Find (Ctrl+F → F4).
  • Question: Is there an Action class or API method I can invoke to trigger Studio's native Find Next functionality with text highlighting? I've tried SendKeys with F4, but this feels like a workaround rather than a proper integration.
  • Desired Behavior: When my plugin finds a match (plain text or regex), the matching text should be highlighted in orange, just like Studio's native Find dialog.

2. Reset Display Filter Action

  • Current Implementation: I call ActiveDocument.ApplyFilterOnSegments(null) to clear filters programmatically, and use SendKeys.SendWait("^%{F6}") to invoke the native Reset Filters command.
  • Question: Is there an Action class (similar to how Studio uses ExecuteAction<TAction>()) for the Reset Display Filter command? What's the proper way to invoke this natively without relying on SendKeys?
  • Desired Behavior: A single API call that performs the complete filter reset, just like Ctrl+Alt+F6.

3. Access to Advanced Display Filter Implementation

  • Observation: The Studio's Advanced Display Filter is very powerful, but I couldn't find its source code in the Sdl-Community GitHub repository.
  • Question: Is the Advanced Display Filter implementation available publicly? If so, where can I find it? Understanding how Studio implements this feature would help me better integrate my custom IDisplayFilter implementation.

4. General Editor Integration Guidance

  • Question: Is there documentation or sample code demonstrating how plugins can invoke Studio's native editor commands/actions programmatically? Specifically:
    • Find/Replace operations with highlighting
    • Filter management (apply, clear, reset)
    • Search scope configuration (source/target, case-sensitive, regex mode)

What I've Already Tried

  •  Successfully implemented IDisplayFilter for custom segment filtering
  •  Using EditorController and ActiveDocument API for segment navigation
  •  Reviewed the Sdl-Community repository for similar implementations
  •  Studied the Studio API Documentation
  •  Unable to find Action classes or command IDs for Find Next and Reset Filters
  •  No examples of native Find/Replace invocation with highlighting in public plugins

Development Environment

  • Language: C# (.NET Framework 4.8)
  • Target: Trados Studio 2024 (Studio 18)
  • Referenced Assemblies:
    • Sdl.TranslationStudioAutomation.IntegrationApi
    • Sdl.FileTypeSupport.Framework.BilingualApi
    • Sdl.Desktop.IntegrationApi

Request

If anyone from the RWS development team or experienced plugin developers could point me to:

  1. The correct Action classes or API methods for native Find/Replace and Reset Filters
  2. Documentation on Studio's command/action system
  3. Source code references for Advanced Display Filter (if publicly available)
  4. Any code samples demonstrating proper editor command integration

I would be extremely grateful. My goal is to provide users with a seamless experience that feels native to Studio rather than relying on workarounds like SendKeys.

Thank you in advance for your help!

Best regards,
Sameh Ragab
Developer, TWAS Studio Assistant