Results 1 to 2 of 2
  1. #1
    trax is offline Member
    Join Date
    Mar 2009
    Rep Power

    Default Accessing eclipse workspace

    I want to access the projects of my workspace using Iworkspace and Iprojects but I am unable to do so as workspace it returning no projects I am using this code:

    IWorkspace workspace = ResourcesPlugin.getWorkspace();
    IProject[] projects = workspace.getRoot().getProjects();

    but it is retuning 0 projects although , i am having projects in my workspace.
    Can someone tell me where i am going wrong

    Thanks in advance

  2. #2
    vogella is offline Member
    Join Date
    Aug 2009
    Rep Power


    Hm... I have the feeling that I answered that question already but I do not see my reply.

    Anyhow: Your question is described here, please see the first example Eclipse JDT - Abstract Syntax Tree (AST) and the Java Model - Tutorial

Similar Threads

  1. Accessing libraries in Eclipse
    By JL4 in forum New To Java
    Replies: 0
    Last Post: 12-26-2008, 04:11 PM
  2. Problems with accessing my workspace
    By Manoeuvre in forum Eclipse
    Replies: 0
    Last Post: 11-24-2008, 11:40 AM
  3. Replies: 0
    Last Post: 08-07-2008, 01:29 AM
  4. Opening a workspace twice
    By javaplus in forum Eclipse
    Replies: 0
    Last Post: 01-08-2008, 10:56 AM
  5. Smilehouse Workspace 1.8.3
    By Jamie in forum Java Software
    Replies: 0
    Last Post: 06-14-2007, 02:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts