How can I make a child package inside a package in eclipse project explorer?
I already tried..
com.proj.test
then I create a new package
com.proj.test.child
to add a child package at package
com.proj.test
,
but did not succeed
Right-click on new packages and select "New package" again. New java package window opens with the name of parent package pre-populated in the name field. Add a dot after the pre-populated name and type the name for the new package and click "Okay". The package will be created but there will be no hierarchical view.
You can add a new package in Eclipse by right-clicking on your project and selecting New > Package. Note that a package doesn't really exist until you create some class or interface in that package. The more logical way to do this is to simply define a package when creating a new class.
Press: CTRL + SHIFT + O and you should see below dialog boxes. Choose your desired import package and click next. It will prompt you for your next import and thats it. You are done.
To enable hierarchical visualization in the eclipse package explorer do these following steps:
In The Package Explorer View / View Menu (An arrow pointing down on top right) Go to Package Presentation and set type to Hierarchical.
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