'Find in Files' highlighting incorrect text for OxygenXML 13.0

Having trouble installing Oxygen? Got a bug to report? Post it all here.
csalsa
Posts: 97
Joined: Tue Apr 22, 2008 9:31 am

'Find in Files' highlighting incorrect text for OxygenXML 13.0

Post by csalsa »

Hi

I used the 'Find in Files' command for OxygenXML 13.0. The text is found, I can select it, the correct file is opened, but the wrong text is highlighted.

My guess is that the file has the document element and its attributes on the one line, however, I have configured OxygenXML to always format the XML contents. As a result the attributes are being wrapped onto new lines and the highlighted text does not account for these new lines. It also does correctly account for the formatting changing the indenting. Thus the wrong text is highlighted.

I would guess to fix this problem, the 'find-in-files' command should check if the file has been loaded first before reading it from disk. If already loaded, then use for 'formatted' version to get the correct location of the targeted text.

The file is 'read-only', as it has been fetched from our code repository and so the file cannot be written first to disk before the search is conducted.
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: 'Find in Files' highlighting incorrect text for OxygenXML 13.0

Post by adrian »

Hello,

Your guess is correct, the problem is triggered by the option Format and Indent the document on Open. Find/Replace in Files searches and provides matches for the file as it is stored in the file system(on the HDD). If the file is modified in the editor(as it happens with formatting on open), the highlights no longer match.

Note that Find In Files does not search in the opened editor(which can be modified and unsaved), only in the file that is saved in the file system.

I'll log this to our issue tracking tool and we'll investigate if we can find a solution for this situation.

Possible workarounds:
- use the Find/Replace dialog(Find -> Find/Replace) and perform the same search in the opened editor
- disable the option Format and Indent the document on Open from Options > Preferences, Editor > Format.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply