Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » List sub packages of a IPackageFragment
List sub packages of a IPackageFragment [message #880862] Sun, 03 June 2012 07:18 Go to next message
Davide M is currently offline Davide MFriend
Messages: 17
Registered: April 2012
Junior Member
Hi,

is possible to have the list of direct sub packages of a IPackageFragment?
Or I need to browse all the IPackageFragment in a project and
check if it is a direct subpackage?

Thanks in advance for any help!

Re: List sub packages of a IPackageFragment [message #880900 is a reply to message #880862] Sun, 03 June 2012 09:51 Go to previous message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
Davide M wrote on Sun, 03 June 2012 09:18
is possible to have the list of direct sub packages of a IPackageFragment?

The Java model doesn't have this information since semantically speaking Java doesn't have a concept of "sub packages".

Davide M wrote
Or I need to browse all the IPackageFragment in a project and
check if it is a direct subpackage?


Exactly. This is what, e.g., the package explorer does, see method getHierarchicalPackageChildren() in http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/tree/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerContentProvider.java

Stephan
Previous Topic:New to Eclipse, not sure what version is right for my app.
Next Topic:Unexpected binding returned
Goto Forum:
  


Current Time: Fri May 10 05:04:58 GMT 2024

Powered by FUDForum. Page generated in 0.02860 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top