Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
AW: [cdt-dev] Getting the CProject from the Project

Roopa,
 
thanks for your answer but how do I get from the project nature to the org.eclipse.cdt.core.model.ICProject?
 
 
Norbert


Von: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] Im Auftrag von Roopa Mahishi
Gesendet: Donnerstag, 21. April 2005 10:49
An: CDT General developers list.
Betreff: Re: [cdt-dev] Getting the CProject from the Project


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

         try{
              for(int i=0;i<projects.length;i++)
              {    
                    IProjectNature cProjectNature =  projects[i].getNature("org.eclipse.cdt.core.cnature");
                   // If you wnat a C++ type of project then use    projects[i].getNature("org.eclipse.cdt.core.ccnature");
               }
        } catch(Exception e) {}
               
           
Rgds,
Roopa








"Ploett Norbert" <norbert.ploett@xxxxxxxxxxx>

Sent by:
cdt-dev-bounces@xxxxxxxxxxx

04/21/2005 01:27 PM
Please respond to "CDT General developers list."

       
        To:        "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
        cc:        (bcc: Roopa Mahishi/BTC/SC/PHILIPS)
        Subject:        [cdt-dev] Getting the CProject from the Project

        Classification:        




Hello all,
 
can somebody help me to figure out how to do this:
 
I have the org.eclipse.core.resources.IProject of a project and want to get the org.eclipse.cdt.core.model.ICProject - provided that it actually is a CDT project.
 
I cannot quite figure out how to do it. I feel that I should use the project natures, but how ...
 
 
Thanks for any hints
 
 
Norbert
 _______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top