[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] Missing CDT project type extension
|
I have some Junit tests for PTP's PLDT in org.eclipse.ptp.pldt.tests, and while I don't have managedbuild projects in them,
I do have this line after the project setup:
CoreModel.getDefault().getCModel().makeConsistent(new NullProgressMonitor());
I think it's doing some consistency/catch-up work that i needed to make sure the project was complete/ready.
The javadoc says
/** Makes this element consistent with its underlying resource or buffer
** by updating the element's structure and properties as necessary.
*/
I don't remember the error I had before that but it something like what you reported.
Hope this helps.
...Beth
Beth Tibbitts
Eclipse Parallel Tools Platform http://eclipse.org/ptp
IBM STG Communications Protocols and Tools
Mailing Address: IBM Corp., Coldstream Research Campus, 745 West New Circle Road, Lexington, KY 40511
HenryMathieu ---10/07/2010 05:47:41 AM---Hi, I'm new to Eclipse and CDT development. In my project I need to
![]()
From: | ![]()
HenryMathieu <hen.mathieu@xxxxxxxxx> |
![]()
To: | ![]()
cdt-dev@xxxxxxxxxxx |
![]()
Date: | ![]()
10/07/2010 05:47 AM |
![]()
Subject: | ![]()
[cdt-dev] Missing CDT project type extension |
![]()
Sent by: | ![]()
cdt-dev-bounces@xxxxxxxxxxx |
Hi,
I'm new to Eclipse and CDT development. In my project I need to
programatically create a CDT managed build project for my unit tests. The
creation of the project works fine when I execute the code in Eclipse as a
"JUnit Plug-in Test". The problem is that when I run my tests in my build
with Maven Surfire on a Linux workstation all my tests are failing because
the method
ManagedBuildManager.getExtensionProjectType("cdt.managedbuild.target.gnu.exe")
returns null! Here's the code:
ICProjectDescriptionManager mgr =
CoreModel.getDefault().getProjectDescriptionManager();
ICProjectDescription des = mgr.getProjectDescription(project, true);
IManagedBuildInfo info = ManagedBuildManager.createBuildInfo(project);
IProjectType projType =
ManagedBuildManager.getExtensionProjectType("cdt.managedbuild.target.gnu.exe");
// RETURNS NULL
IToolChain toolChain =
ManagedBuildManager.getExtensionToolChain("cdt.managedbuild.toolchain.gnu.exe.debug");
ManagedProject mProj = new ManagedProject(project, projType); // CAUSES
NullPointerException
info.setManagedProject(mProj);
IConfiguration[] configs =
ManagedBuildManager.getExtensionConfigurations(toolChain, projType);
Do you have any idea why this code only works in Eclipse itself?
Thanks a lot,
Henry
--
View this message in context: http://old.nabble.com/Missing-CDT-project-type-extension-tp29904674p29904674.html
Sent from the Eclipse CDT - Development mailing list archive at Nabble.com.
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev

