How to Lock a ParagraphUnitSegmentPair inside of a Batch task

I'm using the Batch Task API to create a Segment locker task. Essentially, depending on some context info, the task decides whether to lock a segment pair. So far, everything I've tried to do to lock a segment Pair doesn't show up when I open the file for editing. 

I add a new BilingualContentHandlerAdapter

Screenshot of Trados Studio code with a comment suggesting to add a custom bilingual processor to the file converter.

While inside the ProcessParagraphUnit of the SegmentLockerPreProcessor I've tried several approaches:

Screenshot of Trados Studio code showing a method to lock segment pairs within a paragraph unit without visible errors.

And also with editorController, but in that case, the activeDocument is null

Screenshot of Trados Studio code with a comment indicating that the activeDocument is null when trying to lock segment pairs.

Can this be done inside ProcessParagraphUnit? And how?



Generated Image Alt-Text
[edited by: Trados AI at 1:22 PM (GMT 0) on 5 Mar 2024]
Parents Reply Children
No Data