Single click preview mode when opening files from project explorer
Suggestion
Currently when opening files from the project explorer a new editor is opened per file. When you just want to go quickly through the source code it gets tedious as you have to close each window again.
When you however use the search function and click through the search results from the search view the editor window is reused when opening new files as long as you do not edit the file.
I am proposing to add an optional single-click preview mode to Preferences > General > Open mode which opens files as usual through a double click but when a file is single clicked it is opened in a re-used editor window similar to what the search view is doing.
If this suggestion is accepted I'd be willing to contribute to it. However while I have experience in developing Eclipse plugins, I have no knowledge about the inner workings of the eclipse.platform.ui project so I would need some help:
Where do I find?
- the code for the search view that reuses the editor window when clicking through the result sets
- the code that handles what happens when I click/double click in the project explorer
- the code that contributes the "Open mode" preference entry.
Community
- [X] I understand suggesting an enhancement doesn't mandate anyone to implement it. Other contributors may consider this suggestion, or not, at their own convenience. The most efficient way to get it fixed is that I implement it myself and contribute it back as a good quality patch to the project.
@mickaelistria @akurtakov @iloveeclipse As written in the description I am willing to implement the suggestion but I would like some signal that a PR like this would be accepted. Also as stated I am still missing experience with the platform.ui project so I would appreciate if anyone could answer some of the question I stated. Thanks in advance!
This sounds more like a view concept, that doesn't need any "single click" option (which will be confusing IMO). Just have "Preview" view opened and select any file you want.
What I am suggestion is basically the behavior of vscode. The same editor window/tab is reused when opening files as long as you don't edit the open file. It actually feels very natural how vscode does it and no special preview view needs to be added.
I personally can't say if I like it or not without trying it. If it fits into VS code way of working, is not a guarantee it will fit into Eclipse UI. If you think it's useful and want it be in Eclipse too, show it with a PR.