I am using api System.out.println(ResourcesPlugin.getWorkspace(). getRoot().getProjects().length);
but i am unable to get any projects although i have projects in my workspace .
Printable View
I am using api System.out.println(ResourcesPlugin.getWorkspace(). getRoot().getProjects().length);
but i am unable to get any projects although i have projects in my workspace .
Have a look here: Eclipse JDT - Abstract Syntax Tree (AST) and the Java Model - Tutorial
The first example in the article reads all projects in the workspace and prints out some information about the projects.
thanx it will solve my problem.:)