In a typical project of mine, I have several source directories, each with the usual special icon in the package explorer.
Since these are maven projects, some are full of Java code, and some are full of resources.
Some of the resource trees show the subdirs as packages, but others just show them as folders.
Anyone know how to get them all to show as packages?
Upon running Eclipse you should see a pane labeled 'Package Explorer', probably on the left. If you do not see one, you can open it up by going to the Window menu, selecting Show View and Package Explorer. If it doesn't show up under Show View, select Other, then 'Java', then 'Package Explorer'.
Eclipse offers the Navigator view which will display your project in the way you are asking. To open this view select Window > Show View > Navigator .
To view the project explorer, click on Window menu then, click on Show View and select Project Explorer. There is simpler way to open project explorer, when you are in the editor press alt + shift + w and select project explorer.
In the Package Explorer, right-click on the folder and choose Build Path / Use As Source Folder. The contents of that folder will now be included in the Eclipse build, however.
Edit
If it is a nested folder, it has probably been excluded from the build. If so, you can choose Build Path / Include -- but once again it will now be part of the build. An included subfolder can be excluded again using Build Path / Exclude.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With