Difference between revisions of "Eclipse search plugin: providing a better, faster, more relevant Eclipse search."
(→Getting and Building the Source Code)
m (→Update Site: cat)
|Line 184:||Line 184:|
Latest revision as of 16:40, 14 October 2007
Student: Çağatay Çallı (IRC: kynes)
Mentor: Francois Granade (IRC: farialima)
This project is part of the Summer of Code 2007
One of the most frequently used features of an IDE is find/replace and search features. Even though the search facilities, especially find/replace features in Eclipse are adequate for most developers, there are still plenty of usability issues and enhancement requests arising in Bugzilla. This project aims to fix a few of these usability issues.
- Unifying "Search" facilities so that there won't be 3 different search (and replace) functionalities in Eclipse
Unifying Ctrl+F (Find/Replace dialog) and Ctrl+J (Incremental Search) by mostly behaving like Ctrl+J. Providing better UI utilization by not showing modal dialogs if the user doesn't request wider options. Summary of the idea: Firefox-style "Find" with enhancements. = a lightweight Find/Replace. Our main goal here is providing all functionality available in Ctrl+F with this lightweight Find/Replace. Here's the related Bugzilla entry: https://bugs.eclipse.org/bugs/show_bug.cgi?id=99294
Implementing "Highlight All". This is going to be finished after implementing raw highlighting for FindReplace targets that don't support annotations. https://bugs.eclipse.org/bugs/show_bug.cgi?id=29692
Implementing "Case Sensitive Replace". This is formed as IFindReplaceTargetExtension4 and is ready. Waiting for code review. https://bugs.eclipse.org/bugs/show_bug.cgi?id=28949
Fixing bug 64584 in Find/Replace - "After first search selection effitiently lost and dialog set to Scope=All (while user is not aware about it)" . This patch is ready. Waiting for code review. https://bugs.eclipse.org/bugs/show_bug.cgi?id=64584
Providing "bridges" between Ctrl+F and Ctrl+H. This means carrying query information and search parameters back and forth between them when it's possible. --- To explain it better, it doesn't mean "sharing" input/settings, it is enabling the user to transfer "Find/Replace" input/settings to "Search" easily and extend his/her current search scope & query.
Investigate better presentation of the search results in Ctrl+H ( adding an alternative view like Problems view - results in a table - might be a good idea to show result lines and numbers, paths etc. )
Solving usability issues
A few of the following ideas are already a part of the specific project goals above.
Initial Ideas about Usability
1 - Improve Ctrl-J search:
- Ctrl-J : have Ctrl-V paste the current ring in it
- Ctrl-J : if there's a selection, have a second Ctrl-J take this selection as search string. This enhancement is ready but it won't be included because of same functionality with Ctrl-K. https://bugs.eclipse.org/bugs/show_bug.cgi?id=200554
- Ctrl-J followed by Ctl-R would switch to regex search
- Ctrl-J to global search: transform a Ctrl-J to to a global search actually, drive all searches from the keyboard incremental search would be good: there should be a set of keyboard shortcuts on Ctrl-J to set up a complete search, and then execute it globally.
2 - Display search results. the view that displays the search results is very poor currently. Probably a tree view is not perfect. It should show the matches, for example. It should have more shortcuts...
3 - Improve the search dialog (Ctrl+H). More TBD
- Would it make sense to always display the last search when opening the dialog ?
- Not only should it be possible to remember the results of previous searches, but also be possible to refine (edit the criteria, etc) and re-run them
4 - Better multi-file search/replace (here, we are talking about Ctrl+H, "File Search" tab, and "Replace..." button, not Ctrl+F)
- Usability: it is not clear how the search/replace works (what does it apply to ? What is the "Stale matches" dialog ?
- User Interface quality: accessing search/replace is a modal dialog (modal dialog are never very good) that is accessed from another modal dialog (idem). Which means that the user need to complete multiple step, with complex UI, to access a functionality that's a basic Editor functionality. At least, for example, "Search/Replace" should appear in the "Search" menu, as usual most tools
- selective (based on language elements...)
Bugzilla Reports Related with Usability
1. find/replace search should have a tick-box for "ignore comments" (enhancement request) bug 161398
2. Show as package tree bug 160481 (enhancement request)
3. Store Previous Searches for Startup (enhancement request) bug 169252
4. Search dialog "Java Search" Scope should include Hierarchy (WONTFIX bug) bug 110252
5. New text search shown line not a great help (LATER) bug 127672 (This bug is waiting for applying styles on a tree item.)
6. Result in Table (LATER) bug 129185
These two are related:
7. Search shows duplicate results in nested projects (LATER) bug 144959
8. Resource exclusion filters bug 84988
(read together with: bug 144959 - about duplicate results for nested folder structures)
9. Search Enhancements bug 108223
10. Search in files: see matched lines https://bugs.eclipse.org/bugs/show_bug.cgi?id=72575
Getting and Building the Source Code
I've committed my work as a patch to "soc-search" module in "eclipse-incub". It's very primitive right now but you can checkout anytime and see what I'm doing.
Repository path: /cvsroot/eclipse-incub
Module name: soc-search
To build this project, do the following in order:
1. Checkout these items from Eclipse HEAD:
2. Choose a patch from "findreplace" folder and apply it to given packages.
- findreplace-editorbar.diff ( apply to "org.eclipse.ui.workbench" )
Patches "org.eclipse.ui.workbench" in order to add a composite containing a Label and a Text widget, to the bottom of the editor.
- findreplace-editorbar-optioncombo.diff ( apply to "org.eclipse.ui.workbench" )
Similar to findreplace-editorbar.diff except that it tries to save space by combining Find/Replace options in a combobox and one checkbox for all the options contained in this combobox.
- findreplace-incremental-copypaste.diff ( apply to "org.eclipse.ui.workbench.texteditor" )
Patches "org.eclipse.ui.workbench.texteditor" in order to replace "Incremental Find"s Label widget with a Text widget. This Text widget is capable of accepting cut/copy/paste events. This patch is currently experimental (partially breaks Incremental Find features).
- findreplace-retaincaps.diff (apply to "org.eclipse.ui.workbench.texteditor" )
Patches "org.eclipse.text", "org.eclipse.jface.text" and "org.eclipse.ui.workbench.texteditor" in order to implement the enhancement mentioned in https://bugs.eclipse.org/bugs/show_bug.cgi?id=28949 . [find/replace] retain caps when replaceing
- findreplace-highlightall.diff ( apply to "org.eclipse.ui.workbench.texteditor" and copy "icons" folder from "highlightallpatch-icons.zip" file to "org.eclipse.jface.text" plugin folder )
Patches "org.eclipse.jface.text" and "org.eclipse.ui.workbench.texteditor" in order to implement the enhancement mentioned in https://bugs.eclipse.org/bugs/show_bug.cgi?id=29692 . [find/replace] Highlight all matches in editor
- findreplace-incremental-useselection.diff ( apply to "org.eclipse.ui.workbench.texteditor" )
Patches "org.eclipse.ui.workbench.texteditor" in order to implement the enhancement mentioned in https://bugs.eclipse.org/bugs/show_bug.cgi?id=200554 . [IncrementalFind] if there's a selection, have a second Ctrl-J take this selection as search string
- findreplace-rememberdirection.diff ( apply to "org.eclipse.ui.workbench.texteditor" )
Patches "org.eclipse.ui.workbench.texteditor" to fix https://bugs.eclipse.org/bugs/show_bug.cgi?id=105147 . This won't make it to the HEAD as is but may get to the HEAD if users are given an option to enable/disable this behaviour.
- findreplace-scopechange.diff ( apply to "org.eclipse.workbench.texteditor" )
Patches "org.eclipse.ui.workbench.texteditor" to fix https://bugs.eclipse.org/bugs/show_bug.cgi?id=64584 . This patch is ready and waiting for code review.
That should be enough. You can test it by running corresponding project as an Eclipse application.
You can also install the project using Eclipse "Software Update". The update site address is as follows: