Camel-Case Search in Eclipse


I have extensively used Eclipse for the past 2 years and as with every other IDE, the first thing I do is to find out/use the keyboard shortcuts in the application.

Eclipse is a great IDE to work with and I should probably start a series of posts which might help me and others in becoming a Eclipse “power user” πŸ™‚

R.J. Lorimer has an interesting post on how to use the Camel-Case search in Eclipse.

Many users struggle with the Search Dialog in Eclipse to find a class. In fact you can quickly lookup/Search a class using “Open Type” (Ctrl+Shift+T) dialog.

Till now the only filters I was using was the ? and the * as mentioned in the dialog (To be honest, never used ? pattern πŸ™‚ )

RJ points out that you could search a class via the capital letter patterns commonly used in naming conventions for classes. So in order to search for ArrayIndexOutOfBoundsException, I could just type AIOOB. Also you can mix the normal characters if there is more than one match on the camel case combination.

For E.g. If I type HM in search for a HashMap, I might end up with a long list of classes. The list can be shortened by using a combination say HaMa

You can even use this feature as part of the Code Assist !

On the downside this feature doesn’t work with the “Open Resource” dialog (Ctrl+Shift+R). Resource dialog can also be used to search for the classes within your project and I am not sure why “Camel case” search is not supported in this dialog !

Comments on this entry are closed.

  • Vasuki Dec 27, 2006 Link

    This feature was present in IntelliJ from a long time, good that it was implemented in Eclipse.
    Even I was wondering why this feature is implemented only in “Open Type” and not in “Open Resource”!

  • Venu Dec 27, 2006 Link

    Oh I never used IntelliJ but heard about it a lot ! Any feature you like in IJ missing in Eclipse ?

  • AndrΓ© Aug 29, 2008 Link

    One annoyance in eclipse is that in order to use it you actually have to start with a capital letter. I.e. you will not find HashMap by typing haMa. That works in IDEA. Maybe just me being used to IDEA but why shouldn’t this work?
    And BTW, this is just one of dozens of annoyances in eclipse compared to IDEA. I begin to understand why eclipse is free πŸ˜‰

  • Hope durocher Dec 6, 2009 Link

    I was thinking that you was ecliptse from twilite, braking dawn or new moon