Click here to Skip to main content
15,923,852 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
IWorkspaceRoot myWorkspaceRoot = ResourcesPlugin.getWorkspace().getRoot();

IProject[] projects = myWorkspaceRoot.getProjects();
System.out.println("projects[].length "+ projects.length);


but the project length i am getting as output is zero.

I have tried this solution
"
Either you can create a new project in the runtime-workspace, or you can import one that's in yours using File->Import->Existing project into workspace. If you're running with the defaults of everything, that should be '../workspace/ProjectName'." as proposed in http://www.eclipse.org/forums/index.php?t=msg&goto=443901&
When i did the above solution, it did not allow me to do and said projects are already present in workspace and no project to import.

any solution???
Posted

1 solution

As you appear to be following a set of instructions posted in the eclipse forums, you may find that you would get a better answer there.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900