Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.0.M2
    • Component/s: UI
    • Labels:
      None

      Description

      Press a quick key shortcut pops up a dialog that searches for a text string in a 'live query' style. So the matches update as you type.

      It should also remember at least one previous search and use that as initial search text.

      If the current active editor has a non-empty text selection that that should be used as the search text.

      It should also have some mechanism for prioritizing and skipping over certain files during the search.

      Using the currently open editors to inform the search priority function seems like a good idea.

        Activity

        Hide
        Andrew Eisenberg (c) added a comment -

        Some thoughts on prioritization:

        1. highest priority, if the package explorer or navigator or common navigator, etc has focus, then the items currently selected there should take highest priority.
        2. As already mentioned current editor should be next priority
        3. other open editors next
        4. The project that contains the currently open editor should be under that
        5. Projects in the working set or dependent/depending projects after that.

        I think this is a good start.

        Show
        Andrew Eisenberg (c) added a comment - Some thoughts on prioritization: highest priority, if the package explorer or navigator or common navigator, etc has focus, then the items currently selected there should take highest priority. As already mentioned current editor should be next priority other open editors next The project that contains the currently open editor should be under that Projects in the working set or dependent/depending projects after that. I think this is a good start.
        Hide
        Kris De Volder (c) added a comment -

        I've already implemented a subset of this. It is only based on two sources of information:
        1) active editor
        2) other open editors

        The file open in active editor gets highest possible priority.
        Other open editors get priority below that.

        Also paths leading to something with raised priority will automatically have the same priority.

        This results in a searching order that always searches the active editor first.
        Then it searches all other editors.

        Then it searches in directories "around" the active editor.

        So that does already do your points 2..4
        also 4.b (the projects containing other open editors next)

        Since I'm not using infos on project dependencies or working sets, it doesn't do 5.

        Also doesn't do 1 as I hadn't thought of that but it seems like a good idea.

        Another idea might be to use SelectionService to listen for selections and remember the last X files visited and search them in order of most recent first.

        What I've implemented is a helper data structure that tracks priorities for a finite set of paths in a tree-data structure. It is very easy to implement different priority assignments on top of that.

        I also considered a different algorithm based on name similarity. Essentialy keep a set of interesting paths and use some algorithm to quickly compute a score for any path string based on how similar it is to any of the paths in the set.

        What I got now seems already to work quite nicely though... You can all play with it next week

        Another idea... if mylyn is available, maybe the implicit degree of interest model would be an excellent way of prioritizing the files to search in.

        Show
        Kris De Volder (c) added a comment - I've already implemented a subset of this. It is only based on two sources of information: 1) active editor 2) other open editors The file open in active editor gets highest possible priority. Other open editors get priority below that. Also paths leading to something with raised priority will automatically have the same priority. This results in a searching order that always searches the active editor first. Then it searches all other editors. Then it searches in directories "around" the active editor. So that does already do your points 2..4 also 4.b (the projects containing other open editors next) Since I'm not using infos on project dependencies or working sets, it doesn't do 5. Also doesn't do 1 as I hadn't thought of that but it seems like a good idea. Another idea might be to use SelectionService to listen for selections and remember the last X files visited and search them in order of most recent first. What I've implemented is a helper data structure that tracks priorities for a finite set of paths in a tree-data structure. It is very easy to implement different priority assignments on top of that. I also considered a different algorithm based on name similarity. Essentialy keep a set of interesting paths and use some algorithm to quickly compute a score for any path string based on how similar it is to any of the paths in the set. What I got now seems already to work quite nicely though... You can all play with it next week Another idea... if mylyn is available, maybe the implicit degree of interest model would be an excellent way of prioritizing the files to search in.
        Hide
        Kris De Volder (c) added a comment - - edited

        Remaining TODO items:

        • (DONE) allow case insensitive search via 'triangle menu'.
        • (DONE) details section below table to show some lines before / after current selected match.
        • (DONE) Support * and ? wildcards.
        • (DONE) Can search text be populated with text selection from something thats not an editor (e.g. the Console view... I often like to search for text in error/log messages printed there.
        • (DONE) remember column dimensions if adjusted by user.
        • (DONE) make ignore extensions/paths/names configurable via UI (either a prefs page or via triangle menu)
        • (DONE) forcibly cancel/destroy active search job when dialog closes.
        • (DONE) Adjust column dimensions on resize (mostly for macs where otherwise you get a 'empty' column area after the last column.)
        • (DONE) Put QuickSearch command in the Search menu.
        • (DONE) Use StructuredSelection (i.e. selection in navigator etc.) to prioritize (as suggested above by Andrew).
        • (DONE) Opening Search results is not working correctly for multi-page editors. (E.g if search match is inside pom.xml or plugin.xml). It only opens the editor but navigating to the exact location in the file doesn't seem to work.
        • (DONE) Ignored 'derived' resources in searches.
        • (DONE) Window Title
        • (DONE) Horizontal Scrollbar on details view
        • (DONE) run the regression tests from quicksearch.test plugin on the build server.
        • (DONE) Add optional feature dependencies from STS and GGTS
        Show
        Kris De Volder (c) added a comment - - edited Remaining TODO items: (DONE) allow case insensitive search via 'triangle menu'. (DONE) details section below table to show some lines before / after current selected match. (DONE) Support * and ? wildcards. (DONE) Can search text be populated with text selection from something thats not an editor (e.g. the Console view... I often like to search for text in error/log messages printed there. (DONE) remember column dimensions if adjusted by user. (DONE) make ignore extensions/paths/names configurable via UI (either a prefs page or via triangle menu) (DONE) forcibly cancel/destroy active search job when dialog closes. (DONE) Adjust column dimensions on resize (mostly for macs where otherwise you get a 'empty' column area after the last column.) (DONE) Put QuickSearch command in the Search menu. (DONE) Use StructuredSelection (i.e. selection in navigator etc.) to prioritize (as suggested above by Andrew). (DONE) Opening Search results is not working correctly for multi-page editors. (E.g if search match is inside pom.xml or plugin.xml). It only opens the editor but navigating to the exact location in the file doesn't seem to work. (DONE) Ignored 'derived' resources in searches. (DONE) Window Title (DONE) Horizontal Scrollbar on details view (DONE) run the regression tests from quicksearch.test plugin on the build server. (DONE) Add optional feature dependencies from STS and GGTS

          People

          • Assignee:
            Kris De Volder (c)
            Reporter:
            Kris De Volder (c)
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              First Response Date: