API to Replace Image Preview in Oxygen XML Editor

Post here questions and problems related to oXygen frameworks/document types.
vishwavaranasi
Posts: 181
Joined: Fri Feb 28, 2020 4:02 pm

API to Replace Image Preview in Oxygen XML Editor

Post by vishwavaranasi »

Hello Team ,
We have implemented some custom operations in our Oxygen plugin, where an image file gets replaced during runtime. This file is previously opened in the Oxygen editor and is displayed in the Image Preview area.
My question is:
Is there any API available that allows us to programmatically refresh or replace the content shown in the Image Preview area of the Oxygen XML Editor?
Thanks,
vishwa
sorin_carbunaru
Posts: 425
Joined: Mon May 09, 2016 9:37 am

Re: API to Replace Image Preview in Oxygen XML Editor

Post by sorin_carbunaru »

Hi,

We do not provide such an API. If this image is already opened in the main editor (which you can refresh if needed), do you also need it in the Image Preview view? If yes, please explain so I can better understand your use-case.

All the best,
Sorin Carbunaru
Oxygen XML Editor
vishwavaranasi
Posts: 181
Joined: Fri Feb 28, 2020 4:02 pm

Re: API to Replace Image Preview in Oxygen XML Editor

Post by vishwavaranasi »

Yes i wan to refresh Image Preview view like we have
WSDITAMapEditorPage page = (WSDITAMapEditorPage) mainEditor.getCurrentPage();
page.refreshReferences();

Thanks,
vishwa
Thanks,
vishwa
sorin_carbunaru
Posts: 425
Joined: Mon May 09, 2016 9:37 am

Re: API to Replace Image Preview in Oxygen XML Editor

Post by sorin_carbunaru »

I understand, but my question was why do you need that if you also have the image visible in the editor? I am trying to understand your need.
vishwavaranasi
Posts: 181
Joined: Fri Feb 28, 2020 4:02 pm

Re: API to Replace Image Preview in Oxygen XML Editor

Post by vishwavaranasi »

here is what am trying , one of my oxygen plugin action replaces the image file in the same path , so i just want to refresh with newly replaced image.
Thanks,
vishwa
sorin_carbunaru
Posts: 425
Joined: Mon May 09, 2016 9:37 am

Re: API to Replace Image Preview in Oxygen XML Editor

Post by sorin_carbunaru »

I created issue EXM-56021 API to refresh Image Preview if the image changes begind the scenes. We do not have such an API at the moment.
vishwavaranasi
Posts: 181
Joined: Fri Feb 28, 2020 4:02 pm

Re: API to Replace Image Preview in Oxygen XML Editor

Post by vishwavaranasi »

Thanks sorin,
usually where do we find the newly created issues for oxygen API's

Thanks,
vishwa
Thanks,
vishwa
sorin_carbunaru
Posts: 425
Joined: Mon May 09, 2016 9:37 am

Re: API to Replace Image Preview in Oxygen XML Editor

Post by sorin_carbunaru »

Unfortunately they are not publicly available. They are in our internal JIRA system.

But we will update this thread when such an API will be available.
Radu
Posts: 9505
Joined: Fri Jul 09, 2004 5:18 pm

Re: API to Replace Image Preview in Oxygen XML Editor

Post by Radu »

Hi,
Out of curiosity if you use this plugins API "ro.sync.exml.workspace.api.Workspace.open(URL)" to load the image URL, does it work for you? It should load the image in the Preview view.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply