Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single click preview mode when opening files from project explorer #1692

Open
1 task done
sebthom opened this issue Feb 16, 2024 · 4 comments
Open
1 task done

Single click preview mode when opening files from project explorer #1692

sebthom opened this issue Feb 16, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@sebthom
Copy link

sebthom commented Feb 16, 2024

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?

  1. the code for the search view that reuses the editor window when clicking through the result sets
  2. the code that handles what happens when I click/double click in the project explorer
  3. the code that contributes the "Open mode" preference entry.

Community

  • 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.
@sebthom sebthom added the enhancement New feature or request label Feb 16, 2024
@sebthom
Copy link
Author

sebthom commented May 16, 2024

@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!

@iloveeclipse
Copy link
Member

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.

@sebthom
Copy link
Author

sebthom commented May 16, 2024

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.

@sebthom sebthom changed the title Single click preview mode for opening files from project explorer Single click preview mode when opening files from project explorer May 16, 2024
@iloveeclipse
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants