1

I've realized that the Eclipse IDE puts all packages in a project (at least in a Java one) at the same level, e.g.:

packages at same level

However, browsing the file system, you can find that packages are treated in the expected multi-leveled way. Does this have any logical explanation?

TylerH
  • 20,799
  • 66
  • 75
  • 101

2 Answers2

4

This is just a presentation feature. You can click on the little down arrow you see on the left of your screen shot and select Package Presentation -> Hierarchical to have it like your filesystem.

You can see this answer for more information.

Community
  • 1
  • 1
benzonico
  • 10,635
  • 5
  • 42
  • 50
  • Certainly it's a hard to find option. Thanks for letting known. Upvoting for that. Didn't yet find a "reasonable reason" for this to be the default view, but since what PSIXO says, as you pointed out, is wrong (I think I remember this view was in eclipse IDE prior to Android), I'm marking yours as accepted answer. – Jorge Antonio Díaz-Benito Mar 12 '13 at 13:34
0

I asked the same question a couple of times and found the link in above answer helpful in order to change the presentation because it's an option hard to find.

About the Why part, I think it's because of Eclipse being DE-facto standard IDE for Android development and having the packages organized this way is more useful and it forces you to think about a way your classes are organized according to Android project guidelines. It also looks quite like help files on http://developer.android.com/guide to me personally. Also another argument for this might be that in old versions of Eclipse (pre Android time) default view was different.

Igor Čordaš
  • 5,785
  • 4
  • 42
  • 54
  • 1
    The justification of this presentation because of android does not seem right as this presentation has been in Eclipse long before Android. To me, it just a matter of presentation, some likes it some don't : your pick ! The advantage of this presentation is if you have a lot of packages with deep level and not a lot of leafs. – benzonico Mar 12 '13 at 13:21