Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Handling selections on source folders(How do you get only the children of the selected source folder?)
Handling selections on source folders [message #1014388] Mon, 25 February 2013 13:05 Go to next message
Bill Conner is currently offline Bill Conner
Messages: 2
Registered: February 2013
Junior Member
I've been working on a plug-in that walks the AST Tree but I'm having an issue getting the correct compilation units for a project that has more than one source folder. When the user selects the source folder, the menu selection returns the IPackageFragmentRoot and it's children show ALL source folders.

How do I filter the tree to only see the children on the selection?

Thanks.
Re: Handling selections on source folders [message #1014442 is a reply to message #1014388] Mon, 25 February 2013 15:51 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan Herrmann
Messages: 984
Registered: July 2009
Senior Member
this sounds wrong, an IPackageFragmentRoot already represents a source folder (or a library, or...), its children are package fragments, never other source folders. Do you really see other IPackageFragmentRoot instances in the result of IPackageFragmentRoot.getChildren()?


Re: Handling selections on source folders [message #1014447 is a reply to message #1014442] Mon, 25 February 2013 15:59 Go to previous message
Bill Conner is currently offline Bill Conner
Messages: 2
Registered: February 2013
Junior Member
Thanks for the response, it's working now. I'm not sure what the issue was. I was fighting it for two days but now it's magically working and I didn't change any code. I hate issues like this Sad
Previous Topic:Create an external tool
Next Topic:How to always include jars into all new projects in Eclipse
Goto Forum:
  


Current Time: Wed Jul 30 15:17:29 EDT 2014

Powered by FUDForum. Page generated in 0.02385 seconds