Thursday, April 21, 2011

Eclipse: Find/Replace Bar

I prefer NetBeans style Incremental Search Bar interface instead of the usual Find/Replace Dialog. Eclipse only has the Find/Replace Dialog. So I implemented a similar Find/Replace Bar for Eclipse. Here are the screenshots:



Known issue: If you have customized the perspective, the Find bar view will be shown with a tab unlike the above screenshot. Try resetting the perspective and the tab may go away. I had mixed success with that though.

Find/Replace Bar Plug-in is on Eclipse Marketplace !

Currently the Find/Replace Bar supports the following features:
  • Find as you type
  • Find Next/Find Previous
    • same key bindings as Eclipse
  • Show the total number of occurrences in the document
  • Case sensitive mode
  • Whole word only mode
  • Regular Expression mode
    • Indicate illegal regular expression
  • Show Find/Replace dialog by pressing CTRL+F on Windows and Linux and COMMAND+F on Mac
  • Enable/Disable Find/Replace Bar using preferences
    • Show Preferences button on the Find/Replace Bar
  • Optionally override the standard Find/Replace Dialog of Eclipse. Control the override through preference page.
  • Press CTRL+F on Windows and Linux and COMMAND+F on Mac to show the Find/Replace Bar
    • Press ESCAPE to hide the Find/Replace bar
    • Find/Replace Bar works with text editors inside a Multi page editor e.g. plugin.xml XML editor inside the Plug-in Manifest editor.
    • Show the preceding and succeeding match count
    • Show text matching groups in regular expressions in a combobox
    I am planning to implement the following enhancements:
    • Full Replace/Find,Replace and Replace All support
    • Find in selection
    • Highlight current and other occurrences of the matched text
      • Highlight groups in regular expressions in different colors
    • Show current line number and column range of the match
    • Make it work in Console and other views where Find/Replace dialog is applicable
      You can install it from the plug-in's update site:

      http://sandipchitaleseclipseplugins.googlecode.com/svn/trunk/FindReplaceBarUpdateSite/

      Please file any issues at:

      http://code.google.com/p/sandipchitaleseclipseplugins/issues/list

      After installing the plug-in, go the Find/Replace Bar preferences page to enable the Find/Replace Bar as shown in the screenshot below:



      Works on Eclipse 3.6 and 3.5.2

      Enjoy!