File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes In Eclipse, how can I hide empty packages? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "In Eclipse, how can I hide empty packages?" Watch "In Eclipse, how can I hide empty packages?" New topic
Author

In Eclipse, how can I hide empty packages?

Kaydell Leavitt
Ranch Hand

Joined: Nov 18, 2006
Posts: 688

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

Joined: Oct 13, 2005
Posts: 36478
    
  16
Don't know. But you can always delete them if they really are empty . . .
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15632
    
  15

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Kaydell Leavitt
Ranch Hand

Joined: Nov 18, 2006
Posts: 688

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

Joined: Jul 11, 2001
Posts: 14112
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.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Kaydell Leavitt
Ranch Hand

Joined: Nov 18, 2006
Posts: 688

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

Joined: Oct 06, 2010
Posts: 2
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

Joined: Jul 01, 2011
Posts: 3
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
 
subject: In Eclipse, how can I hide empty packages?
 
Similar Threads
Stepping into the APIs using Eclipse
problem in paging using javascript
How to hide EditorPart(RCP)
Which IDE is in demand for Java ?
How Do I Create An EJB Class In Eclipse