File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

In Eclipse, how can I hide empty packages?

 
Kaydell Leavitt
Ranch Hand
Posts: 689
Eclipse IDE Firefox Browser Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • 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 ]
 
Campbell Ritchie
Sheriff
Pie
Posts: 47292
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't know. But you can always delete them if they really are empty . . .
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17627
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • 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: 689
Eclipse IDE Firefox Browser Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • 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: 689
Eclipse IDE Firefox Browser Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • 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 ]
 
Rene Wooller
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Haydar Kadum
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic