7

Possible Duplicate:
How do I hide .class files from the Open Resource dialog in Eclipse?

A direct question:

How to filter *.class in Open Resource dialog (Ctrl+Shift+R) in Eclipse ?


UPDATE:

Explain better: I need to HIDE all *.class files...I'm programing in groovy/grails. So, when I do Ctrl+Shift+R to open Order.groovy (for example), I see Order.class too...and sometimes I open the wrong file.

My Eclipse is the STS (Spring Tool Suite)

Community
  • 1
  • 1
Topera
  • 12,223
  • 15
  • 67
  • 104

3 Answers3

6

Not possible, to my knowledge.

But that should rarely be a problem - you usually use this dialog if you know the name of the resource, and they should rarely coincide with class names.

And if you want to open .java files, just use CTRL + SHIFT + T

Bozho
  • 588,226
  • 146
  • 1,060
  • 1,140
3

That's a naive answer, but it does what you asked for. But probably not what you are after...

How about typing *.class in the Ctrl+Shift+R dialog?

There's one catch with this approach. Typically you won't see the .class files there, because they are so called derived resources (generated by Eclipse in compilation process from your .java files). But you can make the Ctrl+Shift+R dialog show them too by checking the option "Show derived resources" in the configuration menu there: Eclipse screenshot

Grzegorz Oledzki
  • 23,614
  • 16
  • 68
  • 106
  • I guess classes are not consider derived, because here I see them in the resource dialog even though the 'show derived classes' is unchecked. – Bozho May 11 '11 at 21:41
  • That's strange, because they do disappear if I uncheck 'derived' on my computer. – Grzegorz Oledzki May 11 '11 at 21:58
  • Odd. It might be because mine are generated by maven/ant, and not the eclipse compiler. But in fact some of them should be generated by eclipse – Bozho May 11 '11 at 22:01
  • anyway, I think it is unchecked by default, so perhaps his case is the same as mine.. – Bozho May 11 '11 at 22:01
  • It was unchecked in my Eclipse too. – Grzegorz Oledzki May 11 '11 at 22:02
  • 1
    note the he wants to hide them, not show them (at least this is how I understand the question) – Bozho May 11 '11 at 22:07
  • That's funny. I understood he wants to focus only `.class` files. But now I see your point and you are probably right in your interpretation. That would make sense to hide all the `class` files junk. – Grzegorz Oledzki May 11 '11 at 22:13
  • I need to HIDE *.class... I've updated the question...by the way, thanks a lot! – Topera May 12 '11 at 02:56
  • 9
    This is close - you want to hide derived files. But you need to right-click on the 'target' folder and go to Properties and check the checkbox indicating it's derived. – Burt Beckwith May 12 '11 at 03:41
  • Man! It works! I just mark "derived" in checkbox (in folder properties) and works! Thanks a lot! – Topera May 12 '11 at 18:27
  • Doesn't work for multi module maven eclipse projects – nir Jul 11 '17 at 19:32
1

By creating a working set selecting only your class folders. It's not a ready made solution, but easy to do with few projects.

terry
  • 133
  • 1
  • 12