Page 1 of 1

Accepts all track changes in topics and maps without Refactoring dialog wizard

Posted: Tue Jun 25, 2024 7:22 am
by yokota
Hello,

In Oxygen 26.1

Our team requires a function to accept tracking changes of multiple files within a Oxygen project.
We understand that this operation can be performed from the GUI’s XML Refactoring, but we want to execute this operation automatically without target choosing step.
Is there API equivalent the operation with GUI XML Refactoring dialog, or API get tracking change target files at once?

If there is nothing such API, we have to get files from a path, and operate each files with invoking ChangeTrackingController. Is it correct understand?

Regards,
YOKOTA

Re: Accepts all track changes in topics and maps without Refactoring dialog wizard

Posted: Tue Jun 25, 2024 10:37 am
by Radu
Hi Yokota,
If you want to create some kind of Oxygen plugin which accepts all track changes, if you look at XML documents containing track changes in the Text editing mode, the track changes are actually processing instructions so you do not need Oxygen's APIs to accept them, you can just read XML content from the file, maybe apply some regular expressions and then save the XML content back to the file.
Regards,
Radu

Re: Accepts all track changes in topics and maps without Refactoring dialog wizard

Posted: Tue Jun 25, 2024 11:26 am
by yokota
Thanks for your quick reply, Radu.

> if you look at XML documents containing track changes in the Text editing mode, the track changes are actually processing instructions so you do not need Oxygen's APIs to accept them, you can just read XML content from the file, maybe apply some regular expressions and then save the XML content back to the file.

Using regular expressions is a good idea I had forgot.
To Collect target files( having track change, in a project) is needed, is there API to achieve it simply?

Re: Accepts all track changes in topics and maps without Refactoring dialog wizard

Posted: Tue Jun 25, 2024 11:53 am
by Radu
Hi,
We do not have APIs to give you precisely the files which contain track changes. You can load the contents of each file to a string, test if it contains "<?oxy" inside it and if it does, then it probably contains Oxygen track changes and/or comments.
Regards,
Radu

Re: Accepts all track changes in topics and maps without Refactoring dialog wizard

Posted: Tue Jun 25, 2024 12:00 pm
by yokota
Radu wrote: Tue Jun 25, 2024 11:53 am We do not have APIs to give you precisely the files which contain track changes. You can load the contents of each file to a string, test if it contains "<?oxy" inside it and if it does, then it probably contains Oxygen track changes and/or comments.
I see. I'll try the way.

Regards,
YOKOTA