Camel-Case Search in Eclipse

by venukb on December 26, 2006

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 !

{ 4 comments… read them below or add one }

Vasuki December 27, 2006 at 9:21 am

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”!

Reply

Venu December 27, 2006 at 8:56 pm

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

Reply

André August 29, 2008 at 12:54 pm

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 ;-)

Reply

Hope durocher December 6, 2009 at 7:44 pm

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

Reply

Leave a Comment

 

{ 1 trackback }

Previous post:

Next post: