Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » list of all available projects in eclipse workspace
list of all available projects in eclipse workspace [message #1062307] Fri, 07 June 2013 07:00 Go to next message
no name no name is currently offline no name no nameFriend
Messages: 28
Registered: February 2012
Junior Member
Hi all,
How can I get list of all projects irrespective of whether project is close or open present in eclipse workspace?
Please help.
Thanks in advance.
Re: list of all available projects in eclipse workspace [message #1062475 is a reply to message #1062307] Fri, 07 June 2013 22:12 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
If your question is about doing this programmatically in a plug-in
then the answer is org.eclipse.core.resources.IWorkspaceRoot.getProjects()
Re: list of all available projects in eclipse workspace [message #1062615 is a reply to message #1062475] Mon, 10 June 2013 05:06 Go to previous messageGo to next message
no name no name is currently offline no name no nameFriend
Messages: 28
Registered: February 2012
Junior Member
Thanks for the quick reply Stephan
Yes I want to get all the list of projects programatically
but how can I get leaf level elements from a project.
Here is the scenario, in your workspace you will be having a Dynamic web project and want to get all its jsp files.
can you please suggest some apis to get these files programatically?
Re: list of all available projects in eclipse workspace [message #1062617 is a reply to message #1062615] Mon, 10 June 2013 05:17 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Have a look at org.eclipse.core.resources.IResourceVisitor. Note these
really aren't JDT questions but rather questions about the Eclipse
platform...


On 10/06/2013 7:06 AM, sonam sonam wrote:
> Thanks for the quick reply Stephan Yes I want to get all the list of
> projects programatically
> but how can I get leaf level elements from a project.
> Here is the scenario, in your workspace you will be having a Dynamic
> web project and want to get all its jsp files.
> can you please suggest some apis to get these files programatically?
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: list of all available projects in eclipse workspace [message #1062620 is a reply to message #1062617] Mon, 10 June 2013 06:30 Go to previous messageGo to next message
no name no name is currently offline no name no nameFriend
Messages: 28
Registered: February 2012
Junior Member
Yes I am aware about this forum ,my question is how can I fire all the actions like FormatAllAction,GenrateGetterSetter, OrganisedImports etc, on IResource like java files jsp files and others programmatically , as these actions are implemented by JDT ?

[Updated on: Mon, 10 June 2013 09:27]

Report message to a moderator

Re: list of all available projects in eclipse workspace [message #1063051 is a reply to message #1062620] Tue, 11 June 2013 22:28 Go to previous message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
JDT only supports Java, jsp etc. are handled in some WTP sub-project.

Speaking for JDT you would perhaps want to traverse the JavaModel [1] instead of IResources.
I don't know if there's s.t. similar for jsp, and I don't know what their actions require as input.

[1] http://help.eclipse.org/juno/topic/org.eclipse.jdt.doc.isv/guide/jdt_int_model.htm?cp=3_0_0_0
Previous Topic:Can I store multiple executable classes in one project?
Next Topic:Modify TypeDeclaration (class) with AST
Goto Forum:
  


Current Time: Thu Mar 28 20:09:28 GMT 2024

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

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

Back to the top