views:

28

answers:

2

I am using eclipse 3.4.I often keep searching for files in my project.I wanted to create a file search with filter.Like i should be able to configure the filter in preferences.later when i press ctrl+shift+ F (Assuming this is what i give the shortcut) it should display only those files. Why i came up with this is bcos i might want to avoid java files while searching.So life becomes little easier.

A: 

You can open the "Search" dialog and select the "File Search" tab. In File name patterns, you can fill this field by "choose" button without *.java, such as:

*.ant, *.class, *.cmof, *.confluence, *.css, *.dtd, *.ecore, *.ecore2xml, *.eimperativeocl, *.emof, *.ent, *.exsd, *.genmodel, *.gmfgen, *.gmfgraph, *.gmfmap, *.gmftool, *.htm, *.html, *.htpl, *.jardesc, *.jpage, *.log, *.macrodef, *.mediawiki, *.mod, *.oclecore, *.ocluml, *.oclxmi, *.pom, *.prefs, *.product, *.properties, *.shtm, *.shtml, *.target, *.textile, *.tracwiki, *.twiki, *.txt, *.uml, *.uml2, *.umlact, *.umlactivity_diagram, *.umlclass, *.umlclass_diagram, *.umlcomp, *.umlcomponent_diagram, *.umlcompositestructures_diagram, *.umlcsd, *.umldepl, *.umldeployment_diagram, *.umlprofile, *.umlprofile_diagram, *.umlseq, *.umlsequence_diagram, *.umlstatemachine_diagram, *.umlstm, *.umlusc, *.umlusecase_diagram, *.wml, *.wsdl, *.xhtml, *.xmi, *.xml, *.xpt, *.xsd, *.xsl, *.xslt

qrtt1
appreciate your help.But what this does is searches for contents of file.My question is to find the file itself
Ravisha
leaves the search content blank is enough
qrtt1
It does list all the files with the extension specified,but what it does not is open the particular file i want it to.
Ravisha
+1  A: 

I use the open resource dialog, it's bound to Ctrl + Shift + R by default. It doesn't filter resources by type, but you can search by a sort of regular expression (so you can search for *test*.xml). It's really fast as well, powered by a lucene search index.

Geoff
Is there a way to configure this search so as to filter files (for eg *.xml ) by default????
Ravisha
I don't think so, your best bet in that dialog is to add the suffix, so you'd have to use something like blah*.xml instead of just blah to find xml files. I normally find that if you know the name (or part of the name) of a file that you can usually find it in the list, even if all file types are shown, then of course you can specify an extension suffix if necessary when you can't find it.
Geoff
Well thats what i have been doing so far,was wondering how to customize or extend it.Any way its a pity i cant.Thanks for help
Ravisha