18

By some reason, it seems my Package Explorer is showing the folder structure of my project instead of its package structure. How would I go about "fixing" this? I've tried playing with the filters but it seemed of no avail.

Thanks!

devoured elysium
  • 101,373
  • 131
  • 340
  • 557
  • I guess the problem lied with other unrelated thing. It seems like it wasn't considering this to be a Java Project, at least it wouldn't allow me to use the refactoring capabilities. – devoured elysium Nov 12 '11 at 21:13

13 Answers13

22

enter image description here

From the menu pointed in the image, setting Package Presentation as flat may solve your problem.

Edit: Pointed menu is also available in Package Explorer view.

suat
  • 4,239
  • 3
  • 28
  • 51
17

Do you configure the corresponding folders to be the source folder?

They should be included in the java build path (The project properties--> java build path --> source ) . Eclipse only shows the package structure and provides the necessary stuff such as refactoring capabilities , checking java syntax error for the folders that are included in the java build path.

Ken Chan
  • 84,777
  • 26
  • 143
  • 172
  • I commited my project to Git, then cloned it from another computer. Now path entries are missing, and the actual ones not there (and thus not showing as packages). Did I do something wrong during commiting? – Line Jan 24 '19 at 16:59
6

Navigate-> Show In -> Package Explorer

wahidd
  • 77
  • 1
  • 5
5

Right Click on your top level of your package, go to build path->use as source folder. Will show you what you want.

vivek
  • 51
  • 1
  • 1
4

I am using Eclipse neon, just click on the top right corner button(The one near the bug icon). enter image description here

When you hover over it, hint says 'Java'. That should do the trick!

Mabad
  • 439
  • 1
  • 4
  • 6
1

In my case the folder was already in the build path.

But Excluded was set to **

After I set it to (None) using the remove button it worked.

keiki
  • 3,260
  • 3
  • 30
  • 38
1

Following steps are OK for my teammate :

project properties -> Project Facets -> tick EAR(version 1.3)

Hope it is useful.

Hongbin Wang
  • 1,186
  • 2
  • 14
  • 34
张宇鹏
  • 51
  • 2
1

just follow the below in your Project Explorer !!

1.project presentation --> flat (click Pic 1 & 2 to see images)

2.Top level Elements -->Projects

Pic 1 Pic 2

Savvy
  • 11
  • 3
1

Click on menu view of project explorer -> select working set-> manually select all set.

This works for me.

1

Tried all the above. I deleted the project from eclipse. Restarted eclipse. Re-imported my maven projects and it worked.

Ken
  • 127
  • 2
  • 11
1

In Spring Suite Go to Window --> Show View --> Project Explore

enter image description here

eli
  • 8,571
  • 4
  • 30
  • 40
0

For Me Spring Tool Suite 4

Version: 4.7.2.RELEASE

Build Id: 202009020958 `

There is a back arrow in the project explorer - just click , it solved my issue

enter image description here

F0cus
  • 585
  • 3
  • 18
  • 52
0

Similar problem in Eclipse Spring Tools IDE. This is what i tried it worked for maven project

enter image description here

enter image description here

enter image description here

enter image description here