cancel
Showing results for 
Search instead for 
Did you mean: 

Clicking on Search result opens the file in new Editor

davhak
Associate II

Hi,

This problem is observed in v1.9.0 as well as in earlier versions. If one clicks on any search result to open the respective line then the file is opened in a new Editor, despite the fact that the same file is already opened in another editor window. I have checked the Preferences->General->Search and the Reuse editors to show matches" is checked.

This is very annoying because the file opened from Project Explorer and from Search window appear opened in two Editor windows and the file can be edited in both these editors which makes a mass when it comes to saving any of these files.

Is there a way to tune this via IDE settings to have always just one editor window per file, or is this a bug?

4 REPLIES 4
TDK
Guru

No such issue here. Are you sure they're the same file? If you edit one, do the edits show up in the other window as well?

If you feel a post has answered your question, please click "Accept as Solution".
davhak
Associate II

Yes, i am sure it is the same file. The project files have unique names, so there are no duplicates. I use Ubuntu 20.04, not Windows and my project is for dual-core STM32H745 MCU. Can it be that the new tab opened from the Search window is treated as another file (maybe as a linked resource) although it is still the same file at the end?

davhak
Associate II

Ok, the reason seems in nested projects. The search results duplicats due to nested project structure in dual-core projects. So a new tab is opened because the search first shows the location of the string within the parent project hierarchy while when clicking on a file from the Project Explorer window the file is treated as a one in subproject hierarchy.

Could not find any efficient way to customize the search result, to search only subproject.

Does anyone know a resolution to this?

Depending on what search function you use I believe the search function can be context aware. Meaning that if you select the subproject and then search it the displayed results should be of the subproject.