Application Version number being changed by Developer Studio

Am am having a very annoying issue where Developer Studio is changing the application version I am setting to the previous value. For example, I open a project in my workspace, open generated.c, change the application version number from say 1.18.0 to 1.19.0. I save generated.c, and close the project. When I open the project again, the version number is set back to 1.18.0! This is extremely annoying, and is resulting in me releasing code with the incorrect version number embedded in the units.

[Edit] This might have something to do with SVN integration. I found that if I change the version number, then commit the code, close the project, re-open it then the version number is correct!


It should not be the case.If version number is changed in generated.c file and saved it.And after closing the project and reopening it,it should be the new(changed) version.

Did you check with other applications built on other OS packages.


generated.c file is generated from metadata persisted in .settings/.ebsdata file.
The behavior you’re describing seems to show that metadata was not correctly saved to disk, making the source file to be re-generated with old metadata when it’s read from disk on project re-opening.
Is your .ebsdata file in read-only mode? (shouldn’t be… Anyway, in such a case DS should warning you with a warning marker on the project)

Doesn’t appear to be.

Is changing the generated file directly supported even?
I mean, does the metadata get updated if you manually change the c file?

Or is changes only supported through the Application Settings page?

I’m pretty sure that any “manual” changes to the generated.* files just get overwritten from the metadata

Indeed, generated.c doesn’t support manual edition.
If the way the code is generated is not suitable for any reason, sections of the files can be enabled/disabled is needed, or the code generation itself can even be completely disabled. But this means that the code usually handled by the Application Settings editor will have to be manually handled.

Can you check if there are exceptions in the workspace log, which could help us to analyze the behavior?
Fastest way to gather information: Help > Build Technical Report, add your project (eventually without the source code if it’s confidential) and export the report archive before posting it here (or in PM)

So can we enable it initially so that a proper “outline” is auto-generated, and then disable it so that the generated.* files can be manually maintained :question:

@daav PM’d you a technical report.

Seem to get this error in the log a lot:

!ENTRY com.wavecom.openat.ide.ebs.core 4 0 2013-04-15 09:46:46.238
!MESSAGE The resource tree is locked for modifications.
org.eclipse.core.internal.resources.ResourceException: The resource tree is locked for modifications.
	at org.eclipse.core.internal.resources.WorkManager.checkIn(
	at org.eclipse.core.internal.resources.Workspace.prepareOperation(
	at org.eclipse.core.internal.resources.Resource.deleteMarkers(
	at com.wavecom.openat.ide.ebs.core.macros.generic.LibraryFilesMacroResolver.getValues(
	at com.wavecom.openat.ide.ebs.core.macros.AbstractGenericMacroResolver.getMacro(
	at org.eclipse.cdt.managedbuilder.internal.dataprovider.ExternalExtensionMacroSupplier.getVariables(
	at org.eclipse.cdt.utils.cdtvariables.SupplierBasedCdtVariableManager.getVariables(
	at org.eclipse.cdt.managedbuilder.internal.dataprovider.BuildVariablesContributor.getVariables(
	at org.eclipse.cdt.internal.core.cdtvariables.BuildSystemVariableSupplier.getMacros(
	at org.eclipse.cdt.internal.core.cdtvariables.CoreMacroSupplierBase.getVariables(
	at org.eclipse.cdt.utils.cdtvariables.SupplierBasedCdtVariableManager.getVariables(
	at org.eclipse.cdt.internal.core.cdtvariables.CdtVariableManager.getVariables(
	at org.eclipse.cdt.internal.core.settings.model.CConfigurationDescriptionCache.loadData(
	at org.eclipse.cdt.internal.core.settings.model.CProjectDescription.loadDatas(
	at org.eclipse.cdt.internal.core.settings.model.xml.XmlProjectDescriptionStorage.loadProjectDescription(
	at org.eclipse.cdt.internal.core.settings.model.xml.XmlProjectDescriptionStorage.getProjectDescription(
	at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescriptionInternal(
	at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescription(
	at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescription(
	at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescription(
	at org.eclipse.cdt.core.CCorePlugin.getProjectDescription(
	at com.swi.cdt.settings.project.AbstractCdtProjectHelper.getDescription(
	at com.swi.cdt.settings.project.AbstractCdtProjectHelper.getConfigHelpers(
	at com.swi.cdt.settings.project.AbstractCdtProjectHelper.refreshDependencies(
	at com.swi.cdt.settings.listener.ProjectDescriptionChangeListener.resourceChanged(
	at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(
	at org.eclipse.core.internal.resources.Workspace.endOperation(
!SUBENTRY 1 org.eclipse.core.resources 4 380 2013-04-15 09:46:46.238
!MESSAGE The resource tree is locked for modifications.

Are you creating new projects so often that it is a pain to disable code generation after each creation?

Got it, and reproduced the issue.
It is not linked to exception, but something is clearly broken in the editor saving mechanism → will ensure it will be fixed for the next version.
Meanwhile, a workaround: save the editor two times! (the second one by simply “forcing” the editor to become dirty, e.g. by entering any character in the version field + deleting it)

Not really - just wondering if that’d be the way to do it?

Ok, will try to remember :slight_smile: