Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to nest packages in Eclipse's Package Explorer? [duplicate]

Tags:

eclipse

I've been searching high and low for an answer. Thanks.

like image 972
Paul Blaine Avatar asked Jul 01 '11 21:07

Paul Blaine


People also ask

Can we have nested packages?

Since all packages are global in scope, nesting of packages is not supported. However, you can have two packages, one called A and another called A::B , to give an illusion of nesting.

How do I copy and paste a package in Eclipse?

Select the package in the project explorer, press Ctrl+C and then Ctrl+V, Eclipse will prompt with a package name conflict warning and ask you to enter a new package name. Just enter it and Eclipse will repackage all copied classes accordingly.

Can we create package within a package in Eclipse?

If you are creating a sub package, before opening the Java Package wizard select the parent package so that name field can have a default value in it.


1 Answers

Open the view menu in Package Explorer. There you can change Package Presentation from Flat to Hierarchical. I guess this is what you're looking for.

like image 137
phlogratos Avatar answered Oct 30 '22 05:10

phlogratos