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

Multiselection: lost after restart #1047

Closed
Wittmaxi opened this issue Aug 18, 2023 · 2 comments
Closed

Multiselection: lost after restart #1047

Wittmaxi opened this issue Aug 18, 2023 · 2 comments

Comments

@Wittmaxi
Copy link
Contributor

How to reproduce

  1. Press Ctrl+F
  2. Enter a search term for a word that is contained multiple times in the file
  3. Press "Select All"
  4. Immediately close eclipse
  5. Reopen eclipse

I am not sure if there are other way to select multiple words at once in eclipse. If that mechanism exists, it would be interesting to see if the same behaviour still applies.

Expected behaviour

After restarting eclipse, I expect the same - multiple - areas to still be part of my selection, instead of having one selection that spans from the first to the last selection.

Screenshots

After Step 3)
grafik
After step 5)
grafik

My setup

Eclipse IDE for RCP and RAP Developers (includes Incubating components)

Version: 2023-06 (4.28.0)
Build id: 20230608-1333

@jukzi jukzi changed the title Restarting Eclipse after having selected multiple areas in one editor (e.G by using Select all) Multiselection: lost after restart Aug 18, 2023
@jukzi
Copy link
Contributor

jukzi commented Aug 18, 2023

@mickaelistria caused by implementing multiselection: 13e3e7a

@Wittmaxi If you need that feature please contribute a PR for saving multiselection

@mickaelistria
Copy link
Contributor

It indeed looks like the editor only persists simple selections properly: block selection is discarded and multi-selection is joined (as described in this issue).
We would need a way to improve how the workspace persists the selections to better cover the various type. This would happen in a combination of changes in AbstractTextEditor#saveState and AbstractTextEditor#doRestoreState to support multiple selections. A PR would be welcome (note that backward compatibiity must be guaranteed, so doRestoreState would need to still be able to part legacy memento.

Wittmaxi added a commit to Wittmaxi/eclipse.platform.ui that referenced this issue Mar 11, 2024
Updates the search-scopes when a new selection is created.
Also implements a regression-test to the FindReplaceDialogTest-class.

Fixes eclipse-platform#1047
Wittmaxi added a commit to Wittmaxi/eclipse.platform.ui that referenced this issue Mar 21, 2024
Updates the search-scopes when a new selection is created.
Also implements a regression-test to the FindReplaceDialogTest-class.

Fixes eclipse-platform#1047
Wittmaxi added a commit to Wittmaxi/eclipse.platform.ui that referenced this issue Mar 22, 2024
Updates the search-scopes when a new selection is created.
Also implements a regression-test to the FindReplaceDialogTest-class.

Fixes eclipse-platform#1047
Wittmaxi added a commit to Wittmaxi/eclipse.platform.ui that referenced this issue Mar 22, 2024
Updates the search-scopes when a new selection is created.
Also implements a regression-test to the FindReplaceDialogTest-class.

Fixes eclipse-platform#1047
HeikoKlare pushed a commit to Wittmaxi/eclipse.platform.ui that referenced this issue Mar 22, 2024
Updates the search-scopes when a new selection is created.
Also implements a regression-test to the FindReplaceDialogTest-class.

Fixes eclipse-platform#1047
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants