[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] Programmatically import a CDT project
|
Hi Clement,
>> IProject project = root.getProject(projectName) project.open(new NullProgressMonitor())
I would like to read the project name from the .project file. That's how I know which project I am importing.
Also, should we first do a project.create() before project.open() ?
Thanks,
Srividya
-----Original Message-----
From: Clément Hurlin [mailto:clement.hurlin@xxxxxxxxxxxxx]
Sent: Wednesday, May 29, 2019 12:37 AM
To: CDT General developers list. <cdt-dev@xxxxxxxxxxx>; Sundaram, Srividya <srividya.sundaram@xxxxxxxxx>
Cc: Parenteau, Paul A <paul.a.parenteau@xxxxxxxxx>
Subject: Re: [cdt-dev] Programmatically import a CDT project
Hi Srividya,
Importing a project programmatically goes like this:
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
IProject project = root.getProject(projectName) project.open(new NullProgressMonitor())
Until you do something CDT-specific, you can use plain Eclipse APIs.
Best,
Clément
> Hi All,
>
>
>
> I am trying to programmatically import a CDT project into Eclipse workspace.
>
> I found this API -
>
> https://github.com/eclipse-cdt/cdt/blob/cdt_9_7/build/org.eclipse.cdt.
> managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/H
> eadlessBuilder.java
>
> But unfortunately CDT packages an older version of
> *org.eclipse.cdt.managedbuilder.core (8.6)* in which the API I want to
> invoke is "Private".
>
> Is there any other API from CDT that I can extend to programmatically
> implement the logic of File -> Import -> Existing projects into workspace ?
> If not in CDT, maybe in Eclipse source code base?
>
>
>
> Thank you,
>
> Srividya
>
>
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or
> unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/cdt-dev
>