Skip to main content

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

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

IProject project = ...;
CProjectNature.addCNature(project, null);
ICProject cproject = (ICProject)CoreModel.getDefault().create(project);

Or from the root:

String projectName = "MyProject";
ICModel cModel = CoreMode.getDefault().getCModel();
ICProject cproject = cModel.getCProject(projectName);




Back to the top