Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

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
  • 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: 67435
257
  • 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 . . .
 
Saloon Keeper
Posts: 21591
146
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • 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: 694
Mac OS X Eclipse IDE Firefox Browser
  • 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
 
author
Posts: 14112
  • 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: 694
Mac OS X Eclipse IDE Firefox Browser
  • 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 ]
 
Greenhorn
Posts: 2
  • 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.
 
Greenhorn
Posts: 3
  • 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
 
Why am I so drawn to cherry pie? I can't seem to stop. Save me tiny ad!
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!