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

Post here questions and problems related to oXygen frameworks/document types.
yokota
Posts: 3
Joined: Wed Mar 13, 2024 4:22 am

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

Post 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
Radu
Posts: 9164
Joined: Fri Jul 09, 2004 5:18 pm

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

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
yokota
Posts: 3
Joined: Wed Mar 13, 2024 4:22 am

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

Post 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?
Radu
Posts: 9164
Joined: Fri Jul 09, 2004 5:18 pm

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

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
yokota
Posts: 3
Joined: Wed Mar 13, 2024 4:22 am

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

Post 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
Post Reply