Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 367895 - Cannot save folder-specific settings when exporting settings
Summary: Cannot save folder-specific settings when exporting settings
Status: RESOLVED DUPLICATE of bug 341591
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build (show other bugs)
Version: 8.1.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-build-inbox@eclipse.org CLA
QA Contact: Andrew Gvozdev CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-04 16:51 EST by Steven R. Brandt CLA
Modified: 2012-02-23 11:30 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steven R. Brandt CLA 2012-01-04 16:51:13 EST
Build Identifier: M20110909-1335

I am unable to export folder-specific settings (defines or include paths) when I do an export settings from project->Properties->C/C++ General->Paths and Symbols

Things tried:
1) Clicking the "export settings" button in the subfolder. No effect.

Clicking the "export settings" button on the project. Only global settings are saved.

Marking the specific settings in the subfolders as "Export", then clicking "export settings" on the project. Settings are not exported.

Reproducible: Always

Steps to Reproduce:
1. Create a setting (include or define) in a folder inside a project
2. Click on project->Properties->C/C++ General->Paths and Symbols->export settings
3. Examine the contents of the exported file
Comment 1 Doug Schaefer CLA 2012-01-04 16:56:16 EST
I'm wondering how well our folder settings are working. I'm running into troubles with a compiler integration I'm working on as well.
Comment 2 Andrew Gvozdev CLA 2012-01-04 17:13:48 EST
Do you get any exception in file .metadata/.log ?
Comment 3 Steven R. Brandt CLA 2012-01-04 17:21:14 EST
First, let me state that I'd like to see all the folder-specfic settings get saved when I export from the project root, and I hope that's the fix that happens. No exceptions occur in this case.

One of the things I tried, however, was exporting settings from a specific subfolder. In this case I get this exception in the log:

java.lang.ClassCastException: org.eclipse.core.internal.resources.Folder cannot be cast to org.eclipse.core.resources.IProject
    at org.eclipse.cdt.internal.ui.wizards.settingswizards.ProjectSettingsWizard.addPages(ProjectSettingsWizard.java:38)
    at org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:605)
    at org.eclipse.jface.window.Window.create(Window.java:431)
    at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
    at org.eclipse.cdt.ui.newui.ImportExportWizardButtons.launchWizard(ImportExportWizardButtons.java:87)
    at org.eclipse.cdt.ui.newui.ImportExportWizardButtons.access$0(ImportExportWizardButtons.java:78)
    at org.eclipse.cdt.ui.newui.ImportExportWizardButtons$2.widgetSelected(ImportExportWizardButtons.java:71)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
Comment 4 Andrew Gvozdev CLA 2012-01-04 17:50:04 EST
This report looks more and more similar to bug 341591.

*** This bug has been marked as a duplicate of bug 341591 ***