Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 355488 - Cannot delete variables from C/C++ build environment
Summary: Cannot delete variables from C/C++ build environment
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Target Milestone: 8.2   Edit
Assignee: Andrew Gvozdev CLA
QA Contact: Andrew Gvozdev CLA
URL:
Whiteboard:
Keywords:
: 319738 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-08-23 06:56 EDT by Martin Runge CLA
Modified: 2013-02-27 12:16 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Runge CLA 2011-08-23 06:56:26 EDT
Build Identifier: 20110615-0604

With CDT8 (Indigo) I can not remove environment variables from Window->Preferences->C/C++->Build->Environment any more. I can set them and change them, but I cannot delete them. 

Reproducible: Always

Steps to Reproduce:
1. Add an new environment variable to "Window->Preferences->C/C++->Build->Environment"
2. Restart Eclipse => variable is still there, as expected.
3. Delete that Variable from "Window->Preferences->C/C++->Build->Environment"
4. Restart Eclipse
5. Variable is still present. 

You have to delete it manually from
.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.core.prefs
to get rid of it.
Comment 1 Andrew Gvozdev CLA 2011-08-23 09:21:41 EDT
I also managed induce an exception acting randomly in UI on variable like that, in particular trying to edit and "Apply":
java.lang.NullPointerException
	at org.eclipse.cdt.ui.newui.EnvironmentTab.handleEnvDelButtonSelected(EnvironmentTab.java:449)
	at org.eclipse.cdt.ui.newui.EnvironmentTab.buttonPressed(EnvironmentTab.java:282)
	at org.eclipse.cdt.ui.newui.AbstractCPropertyTab.buttonPressed(AbstractCPropertyTab.java:269)
	at org.eclipse.cdt.ui.newui.AbstractCPropertyTab.access$0(AbstractCPropertyTab.java:266)
	at org.eclipse.cdt.ui.newui.AbstractCPropertyTab$1.widgetSelected(AbstractCPropertyTab.java:216)
	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:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
	at org.eclipse.jface.window.Window.open(Window.java:801)
	at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog.open(WorkbenchPreferenceDialog.java:215)
	at org.eclipse.ui.internal.handlers.ShowPreferencePageHandler.execute(ShowPreferencePageHandler.java:54)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
	at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
	at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Comment 2 Christian Schneider CLA 2013-02-19 11:28:52 EST
i have the very same issue.

Running Juno SR1 with cdt 8.1.1 on SLES 64bit. Appareantly the Issue also arises when adding a Diff Viewer to SVN which also does not get persistet.
Comment 3 Andrew Gvozdev CLA 2013-02-24 15:37:44 EST
Fixed on master (CDT 8.2).
Comment 4 Andrew Gvozdev CLA 2013-02-24 17:56:55 EST
*** Bug 319738 has been marked as a duplicate of this bug. ***
Comment 5 CDT Genie CLA 2013-02-27 12:16:30 EST
*** cdt git genie on behalf of Andrew Gvozdev ***

    bug 355488: Cannot delete variables from C/C++ build environment

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=6e5ac901f4c2d0af7882887dcf0ddff3cdcd6824