2

I have a problem when switching to my Java EE perspective in eclipse indigo.

In my Java perspective I have this layout:

Non-collapsed package layout

But when I switch to Java EE perspective I get this:

Collapsed package layout

I have tried this and this unsuccessfully. I want to have the first layout in the Java EE perspective. Is there a way to do it?

Community
  • 1
  • 1
Eugenio Cuevas
  • 10,858
  • 3
  • 29
  • 51

5 Answers5

5

Package presentation can be found here :

enter image description here

Ashutosh Jindal
  • 18,501
  • 4
  • 62
  • 91
1

These are my settings in eclipse 4.2 which result in the layout you want:

- folder presentation: grouped
- package presentation: flat
Alexander
  • 3,019
  • 1
  • 20
  • 24
  • I can find package presentation, but where is folder presentation?? – Eugenio Cuevas Aug 02 '12 at 07:44
  • 2
    You need to select the project for the folder presentation. Actually it works only with the package presentation as show by Flashpix. EDIT: Looks like you are using the spring toolsuite instead of eclipse. Similar problem reported here http://forum.springsource.org/showthread.php?96485-Odd-behavior-with-hierarchical-package-presentation – Alexander Aug 02 '12 at 08:01
  • that is true, I installed STS, could this be the matter? – Eugenio Cuevas Aug 02 '12 at 08:25
  • I would think so. Just installed a clean eclipse indigo, imported a project and the presentation works. I suggest u try it to be sure. – Alexander Aug 02 '12 at 08:43
1

You can switch this using the "Package Presentation -> Flat" from the drop down menu in the project explorer.

Package Presentation Snap

Flashpix
  • 166
  • 9
1

You can also import your project by using "import existing maven projects" . It will then configure the folders to be flat.

Priyesh Patel
  • 166
  • 2
  • 6
0

The above answers do not really solve the real problem that most noobs experience in Eclipse. So I thought I would add an answer to this question since the questioner resolved to reinstalling eclipse which is not necessary nor a viable solution. The real issue is that when you created or rather imported this project, you picked the option to create a Project in eclipse, not a Java Project. If you pick Project, it creates it as a filesystem looking directory structure similar to what you see in windows explorer. To fix this, just re-import your project from the workspace as a "Java Project" and you can change the package structure as flat or hierarchical as per your viewing pleasure.. Hope this helps.

Horse Voice
  • 8,138
  • 15
  • 69
  • 120