Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Missing CDT project type extension

Hi,

I finally figured out what caused my problems: It was a missing runtime plug-in dependency to org.eclipse.cdt.managedbuilder.gnu.ui which defines the project types for the extension point org.eclipse.cdt.managedbuilder.core.buildDefinitions. Silly me...

Regards,
Henry


2010/10/8 Henry Mathieu <hen.mathieu@xxxxxxxxx>
Hello Beth,

Thank you for your suggestion. I tried to call

CoreModel.getDefault().getCModel().makeConsistent(new NullProgressMonitor());

right after creating my project and before doing the stuff mentioned in my previous email (CreateBuildInfo etc.). Unfortunately it didn't make any difference. When do you exactly call makeConsistent?

As another test I tried to execute ManagedBuildManager.getDefinedProjectTypes() and I didn't get any project types at all when I run my unit tests outside of Eclipse (with Maven and the Surfire plugin)! But when I call my tests with the JUnit Plugin test in Eclipse, I get a whole bunch of project types: 

cdt.managedbuild.target.gnu.exe, name: Executable
cdt.managedbuild.target.gnu.so, name: Shared Library
cdt.managedbuild.target.gnu.lib, name: Static Library
cdt.managedbuild.target.gnu.cygwin.exe, name: Executable
cdt.managedbuild.target.gnu.cygwin.lib, name: Static Library
cdt.managedbuild.target.gnu.mingw.exe, name: Executable
cdt.managedbuild.target.gnu.mingw.lib, name: Static Library
cdt.managedbuild.target.macosx.exe, name: Executable
cdt.managedbuild.target.macosx.so, name: Shared Library
cdt.managedbuild.target.macosx.lib, name: Static Library
cdt.managedbuild.target.gnu.solaris.exe, name: Executable
cdt.managedbuild.target.gnu.solaris.lib, name: Static Library



So there seems to be definitely something wrong here....

Any suggestions?

Thanks,
Henry

CoreModel.getDefault().getCModel().makeConsistent(new NullProgressMonitor());

2010/10/8 Beth Tibbitts <tibbitts@xxxxxxxxxx>

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

Inactive hide details for HenryMathieu ---10/07/2010 05:47:41 AM---Hi, I'm new to Eclipse and CDT development. In my project I 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



_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev




Back to the top