Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 370624

Summary: CoreException trying to remove exclusion on a file
Product: [Tools] CDT Reporter: Marc-André Laperle <malaperle>
Component: cdt-buildAssignee: cdt-build-inbox <cdt-build-inbox>
Status: NEW --- QA Contact: Jonah Graham <jonah>
Severity: normal    
Priority: P3 CC: cdtdoug
Version: 8.0.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Attachments:
Description Flags
Test project none

Description Marc-André Laperle CLA 2012-02-03 23:46:17 EST
Using 8.0.1 and 8.0.2 RC2

I'm not sure what the exact steps are yet but I was testing Bug 312165 and I was testing multiple levels of folders with exclusion and was trying to determine how it behaved when trying to override thing in lower levels. The attached project illustrates a bit what I was trying to do. If you try to remove exclusion on the file src/test1/testMinGW.cpp, the you get the exception.

org.eclipse.core.runtime.CoreException: can not create a source entry for individual file
	at org.eclipse.cdt.internal.core.settings.model.ExceptionFactory.createCoreException(ExceptionFactory.java:22)
	at org.eclipse.cdt.core.settings.model.util.CDataUtil.setExcluded(CDataUtil.java:719)
	at org.eclipse.cdt.core.settings.model.util.CDataUtil.setExcluded(CDataUtil.java:668)
	at org.eclipse.cdt.internal.ui.actions.ExcludeFromBuildHandler.setExclude(ExcludeFromBuildHandler.java:172)
	at org.eclipse.cdt.internal.ui.actions.ExcludeFromBuildHandler.openDialog(ExcludeFromBuildHandler.java:241)
	at org.eclipse.cdt.internal.ui.actions.ExcludeFromBuildHandler.execute(ExcludeFromBuildHandler.java:180)
Comment 1 Marc-André Laperle CLA 2012-02-03 23:48:44 EST
Created attachment 210534 [details]
Test project

This project was created with 8.0.2 RC2 first then imported into 8.0.1 to test if the problem also occurred.
Comment 2 Marc-André Laperle CLA 2012-02-04 00:06:06 EST
Steps:

1. Create a Hello world C++ project, call it testHello
2. Inside the src folder, create a regular folder 'test'
3. copy testHello.cpp into the 'test' folder
4. Right-click on test, exclude it from the build
5. Right-click on test/testHello.cpp, try to include it in the build.

It happens on both 8.0.1 and 8.0.2 RC2 with the same steps.