Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse changes project settings timestamp comment after checkout

I have an Eclipse workspace with many (> 50) bundles. Some bundles contains special project settings for, e.g., customer-specific code formatting.

If I set up a new workspace and checkout an existing project with customer-specific code formatting, Eclipse changes the date comment in org.eclipse.jdt.ui.prefs to the current date automatically!

This is the preference file (org.eclipse.jdt.ui.prefs) in SVN:

#Tue Apr 24 09:15:20 CEST 2012
eclipse.preferences.version=1
formatter_profile=_myProfile
formatter_settings_version=12

This is the file (org.eclipse.jdt.ui.prefs) after checkout:

#Tue Apr 24 09:30:25 CEST 2012
eclipse.preferences.version=1
formatter_profile=_myProfile
formatter_settings_version=12

The same happens with the org.eclipse.core.resources.prefs settings file if I set the encoding to UTF-8 for the whole project.

SVN:

#Tue Apr 24 09:26:48 CEST 2012
eclipse.preferences.version=1
encoding/<project>=UTF-8

After checkout:

#Tue Apr 24 09:28:00 CEST 2012
eclipse.preferences.version=1
encoding/<project>=UTF-8

If a project contains both setting files (org.eclipse.core.resources.prefs and org.eclipse.jdt.ui.prefs) only the org.eclipse.core.resources.prefs setting file will be changed!

Does someone know why Eclipse changes this line and how I can avoid it?

like image 689
Tim Avatar asked Apr 24 '12 07:04

Tim


1 Answers

DO NOT store your eclipse settings in subversions!!! It doesn't allow you to have different settings or different eclipse versions. It's gonna be a real pain if you have different environments.

Consider using something like Workspace Mechanics if you want to keep your workspace settings synced.

If this only to share your format settings, export them as XML and store the XML file in your repository. Every developper could import the XML file.

like image 199
noirbizarre Avatar answered Sep 19 '22 21:09

noirbizarre