comparison mxtool/mx.py @ 13243:68529068f08e

Update eclipse config when files in eclipse-settings have changed
author Gilles Duboscq <duboscq@ssw.jku.at>
date Wed, 04 Dec 2013 14:54:43 +0100
parents 697ef4cf18c0
children e709633d87c6
comparison
equal deleted inserted replaced
13242:65c0f2ec1ad7 13243:68529068f08e
2830 _eclipseinit_suite(args, s, buildProcessorJars, refreshOnly) 2830 _eclipseinit_suite(args, s, buildProcessorJars, refreshOnly)
2831 2831
2832 generate_eclipse_workingsets() 2832 generate_eclipse_workingsets()
2833 2833
2834 def _check_ide_timestamp(suite, timestamp): 2834 def _check_ide_timestamp(suite, timestamp):
2835 """return True if and only if the projects file, imports file, and mx itself are all older than timestamp""" 2835 """return True if and only if the projects file, imports file, eclipse-settings files, and mx itself are all older than timestamp"""
2836 projectsFile = join(suite.mxDir, 'projects') 2836 projectsFile = join(suite.mxDir, 'projects')
2837 projectsFileOlder = not timestamp.isOlderThan(projectsFile) 2837 if timestamp.isOlderThan(projectsFile):
2838 importsFileOlder = not timestamp.isOlderThan(suite.import_timestamp()) 2838 return False
2839 if timestamp.isOlderThan(suite.import_timestamp()):
2840 return False
2839 # Assume that any mx change might imply changes to the generated IDE files 2841 # Assume that any mx change might imply changes to the generated IDE files
2840 mxOlder = not timestamp.isOlderThan(__file__) 2842 if timestamp.isOlderThan(__file__):
2841 return projectsFileOlder and importsFileOlder and mxOlder 2843 return False
2844
2845 eclipseSettingsDir = join(suite.mxDir, 'eclipse-settings')
2846 if exists(eclipseSettingsDir):
2847 for name in os.listdir(eclipseSettingsDir):
2848 path = join(eclipseSettingsDir, name)
2849 if timestamp.isOlderThan(path):
2850 return False
2851 return True
2842 2852
2843 def _eclipseinit_suite(args, suite, buildProcessorJars=True, refreshOnly=False): 2853 def _eclipseinit_suite(args, suite, buildProcessorJars=True, refreshOnly=False):
2844 timestamp = TimeStampFile(join(suite.mxDir, 'eclipseinit.timestamp')) 2854 timestamp = TimeStampFile(join(suite.mxDir, 'eclipseinit.timestamp'))
2845 if refreshOnly and not timestamp.exists(): 2855 if refreshOnly and not timestamp.exists():
2846 return 2856 return