• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

In Eclipse, how can I hide empty packages?

 
Ranch Hand
Posts: 694
Mac OS X Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In Eclipse, in the package explorer, a number of empty packages are showing up. How can I hide them?

Thanks.

Kaydell


[ July 06, 2007: Message edited by: Kaydell Leavitt ]
 
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Don't know. But you can always delete them if they really are empty . . .
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's an option to present package names as either flat or hierarchical. You might want to lool at that.

Caution: Although a package may show as "empty", what the unshaded icon really means is that no Java classes are in it. There might be images or other non-java resources in there.
 
Kaydell Leavitt
Ranch Hand
Posts: 694
Mac OS X Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've tried to delete the empty package but nothing happens. I used to get an error message that said "out of synch with the file-system" but that's not happening anymore.

I'll try to find the preference that you're referring too.

I could start a new workspace and setup my preferences again.

Thanks for your help.

Kaydell
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Kaydell Leavitt:
I've tried to delete the empty package but nothing happens.



In your screenshot, the packages aren't empty - the don't contain classes, but subpackages. That's why you can't delete them.

Take a look at the menu of the package explorer (the black triangle at its right top, if I remember correctly). If I remember correctly, there is a layout entry where you can change from "flat" to "tree". There might even be an option to filter empty packages in the flat view, I'm not sure.
 
Kaydell Leavitt
Ranch Hand
Posts: 694
Mac OS X Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ilja, filtering out empty packages did the trick. Now, I feel organized again.

Kaydell


[ July 07, 2007: Message edited by: Kaydell Leavitt ]
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found I was able to permanently remove them, not just filter them if I removed the packages from the build path first. If I didn't remove them from the build path, they would pop back, and it was playing havoc with my war export.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To hide empty packages:

Select the Filters command from the Package Explorer's drop-down menu.
In the exclude list select the checkbox for Empty packages.


Source(IBM): http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/org.eclipse.jdt.doc.user/tasks/tasks-183.htm
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic