Open file at cursor: image in Oxygen Image Preview

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
martindholmes
Posts: 139
Joined: Wed Apr 20, 2005 5:43 pm
Location: Victoria, BC, Canada

Open file at cursor: image in Oxygen Image Preview

Post by martindholmes » Wed Mar 13, 2019 11:15 pm

Hi there,

When I right-click (in Editor mode) on the path to an image, I have the option to Open File at Cursor, and Open File at Cursor in System Application. In both cases, an image (JPG) is opened in the system application. Is it possible to configure Oxygen so that the first of these would open the file in the Image Preview window inside Oxygen? That doesn't seem to be an option when configuring file types in the Preferences.

All help appreciated,
Martin

Radu
Posts: 6433
Joined: Fri Jul 09, 2004 5:18 pm

Re: Open file at cursor: image in Oxygen Image Preview

Post by Radu » Thu Mar 14, 2019 9:16 am

Hi Martin,

I would agree that "Open File at Cursor" should prefer Oxygen's Image Preview for images, I will add an internal issue for it.
Of course another approach could be to add some framework specific API and when the cursor is moved inside the image element the Image Preview could automatically show the image reference if the view is visible.
Or what a plugin could do, if it adds a cursor move listener to the text editing page's JTextArea:

https://www.oxygenxml.com/InstData/Edit ... omponent--

would be do detect when the cursor is inside the image reference, compute the URL to the target image and use this API:

ro.sync.exml.workspace.api.Workspace.open(URL)

which should open the image in the Preview view.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply