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

Find actions should use more modern filtering mechanism #741

Open
tivervac opened this issue May 3, 2023 · 8 comments
Open

Find actions should use more modern filtering mechanism #741

tivervac opened this issue May 3, 2023 · 8 comments
Labels
enhancement New feature or request

Comments

@tivervac
Copy link
Contributor

tivervac commented May 3, 2023

Most modern editors use fuzzy searching or subsequence searching. This basically means they add wildcards in between characters allowing for the following:

  • I want to go the file AliasFormattingTest.java
  • I do a Ctrl+3 and type aliasformtest
  • The file shows up

Right now this doesn't work, Aliasform works, and so those FormattingTest but Aformattingtest doesn't again. This is a phenomenon that's very prevalent in Eclipse and makes it feel less modern. Ctrl+Shift+T and R, Ctrl + O, ... - Open Type, Open Resource, and Quick Outline in JDT - suffer from the same issue. Basically, if you don't know the name of the file you have to type wildcard * all over your query.

@jonahgraham
Copy link
Contributor

Content assist suggestions does use this fuzzy searching (in JDT) with the preference Java -> Editor -> Content Assist -> Show subword matches. This request is to add the same type of searching to all other places.

Ideally a solution to this problem would be done so all extensions that use this type of functionality can take advantage, e.g. PyDev and CDT's open type should be able to easily take advantage of this too.

@mickaelistria
Copy link
Contributor

This would be relatively easy to implement, however it wouldn't be a general change; it would have to be particular to file match and then other matches... OpenResourceQuickAccessComputer#computeElements is where such magic can happen, PRs are welcome.

@mickaelistria mickaelistria transferred this issue from eclipse-platform/eclipse.platform May 3, 2023
@mickaelistria mickaelistria added the enhancement New feature or request label May 4, 2023
@jonahgraham
Copy link
Contributor

however it wouldn't be a general change

I think it can be the basis of a general change by enhancing SearchPattern to have a new search option that achieves the goal in #741 (comment). Then anywhere that searches can use the new API. This would be similar to what was done to enhance things in f31b811.

Additionally, as @vogella said in #12 (comment):

If the matching algorithm can be adjusted easily why not change it without any API changes? I think it would be OK for our search to become better without offering API to go back to the "not so nice" behavior.

@jonahgraham
Copy link
Contributor

Note that Eclipse IDE WG Funded Development Effort #21 has been raised to resolve this problem.

@guw
Copy link
Contributor

guw commented Aug 30, 2023

@jonahgraham Please note that Java -> Editor -> Content Assist -> Show subword matches is very expensive and only works reasonable fast in small/medium workspaces. A more efficient implementation is needed if this is enabled at scale for Ctrl/Cmd+3 dialog.

@jonahgraham
Copy link
Contributor

Thank you @guw for pointing that out. I think we should set some performance parameters.

e.g. If we import all projects in simrel (all git repos in simrel.aggran imported as a single project) that is about 660,000 files. Is this a sufficiently big workspace?

@guw
Copy link
Contributor

guw commented Sep 5, 2023

That sounds like a good example. Having a benchmark done to confirm the numbers not regressing will help.

@vrozkovec
Copy link

Related: #1241

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

5 participants