[oXygen-sdk] Find/Replace in Files: Is there an event triggered before Oxygen tries to replace a string in a file?

Radu Coravu support at oxygenxml.com
Tue Jun 7 05:25:05 CDT 2016


Hello Pascal,

We do not yet have such specific API. If this API was available, how 
would you see it look like? Would you like it to give you a separate 
call back for each URL or more like two callbacks, one before the 
Replace All is done  and one after?

But in your custom URL handler implementation Oxygen will request at 
some point an output stream and then start writing to it. Maybe you can 
give Oxygen an output stream implementation which caches content to an 
array and then when Oxygen closes the output stream you could check to 
see if the URL is checked out or not, and if not, ask the end user if he 
wants to check it out. Also using our API you can check if the URL is 
opened or not in the editor.
But this would probably mean that you would ask the end user for each of 
these files... Or somehow remember the user's choice persistently so 
that on the next save that Oxygen attempts at the URL you could check 
out the file automatically without showing the dialog.

Regards,
Radu

On 6/7/16 1:04 PM, Pascal Beutels wrote:
>
> Hi,
>
> With our integration some (most) of the files are read-only and need 
> to be ‘Checked out’ from our repository before changes can be made to 
> these files.
>
> As stated in the subject, when doing a Find/Replace, is there an event 
> triggered before Oxygen tries to replace a string in a file, so we can 
> automatically checkout the file before Oxygen tries to change the file?
>
> Most of these files are not open in the Editor, but they can be.
>
> Kind regards,
>
> Pascal Beutels
>
>
> <www.sdl.com/>
> www.sdl.com
>
>
> SDL PLC confidential, all rights reserved. If you are not the intended 
> recipient of this mail SDL requests and requires that you delete it 
> without acting upon or copying any of its contents, and we further 
> request that you advise us.
>
> SDL PLC is a public limited company registered in England and Wales. 
> Registered number: 02675207.
> Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire 
> SL6 7DY, UK.
>
>
>
>
> This message has been scanned for malware by Websense. 
> www.websense.com <http://www.websense.com/>
>
>
>
> _______________________________________________
> oXygen-sdk mailing list
> oXygen-sdk at oxygenxml.com
> https://www.oxygenxml.com/mailman/listinfo/oxygen-sdk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.oxygenxml.com/pipermail/oxygen-sdk/attachments/20160607/4427c4f0/attachment.html>


More information about the oXygen-sdk mailing list