# HG changeset patch # User Doug Simon # Date 1389976007 -3600 # Node ID c4ff08d2aa0dd5208587eb607bdd48d7fb2e7c13 # Parent 927349daa531f977b9171a1b354f55a1b73186ea fixed problem in netbeansinit that generated invalid annotation processor paths for projects diff -r 927349daa531 -r c4ff08d2aa0d mxtool/mx.py --- a/mxtool/mx.py Fri Jan 17 16:36:51 2014 +0100 +++ b/mxtool/mx.py Fri Jan 17 17:26:47 2014 +0100 @@ -2866,23 +2866,24 @@ generate_eclipse_workingsets() -def _check_ide_timestamp(suite, timestamp): - """return True if and only if the projects file, imports file, eclipse-settings files, and mx itself are all older than timestamp""" +def _check_ide_timestamp(suite, configZip, ide): + """return True if and only if the projects file, imports file, eclipse-settings files, and mx itself are all older than configZip""" projectsFile = join(suite.mxDir, 'projects') - if timestamp.isOlderThan(projectsFile): + if configZip.isOlderThan(projectsFile): return False - if timestamp.isOlderThan(suite.import_timestamp()): + if configZip.isOlderThan(suite.import_timestamp()): return False # Assume that any mx change might imply changes to the generated IDE files - if timestamp.isOlderThan(__file__): + if configZip.isOlderThan(__file__): return False - eclipseSettingsDir = join(suite.mxDir, 'eclipse-settings') - if exists(eclipseSettingsDir): - for name in os.listdir(eclipseSettingsDir): - path = join(eclipseSettingsDir, name) - if timestamp.isOlderThan(path): - return False + if ide == 'eclipse': + eclipseSettingsDir = join(suite.mxDir, 'eclipse-settings') + if exists(eclipseSettingsDir): + for name in os.listdir(eclipseSettingsDir): + path = join(eclipseSettingsDir, name) + if configZip.isOlderThan(path): + return False return True def _eclipseinit_suite(args, suite, buildProcessorJars=True, refreshOnly=False): @@ -2891,7 +2892,7 @@ if refreshOnly and not configZip.exists(): return - if _check_ide_timestamp(suite, configZip): + if _check_ide_timestamp(suite, configZip, 'eclipse'): logv('[Eclipse configurations are up to date - skipping]') return @@ -3351,7 +3352,7 @@ if refreshOnly and not configZip.exists(): return - if _check_ide_timestamp(suite, configZip): + if _check_ide_timestamp(suite, configZip, 'netbeans'): logv('[NetBeans configurations are up to date - skipping]') return @@ -3561,11 +3562,10 @@ javacClasspath.append('${' + ref + '}') else: annotationProcessorReferences.append('${' + ref + '}') - annotationProcessorReferences += ":\\\n ${" + ref + "}" print >> out, 'javac.classpath=\\\n ' + (os.pathsep + '\\\n ').join(javacClasspath) - print >> out, 'javac.test.processorpath=${javac.test.classpath}\\\n ' + (os.pathsep + '\\\n ').join(annotationProcessorReferences) - print >> out, 'javac.processorpath=${javac.classpath}\\\n ' + (os.pathsep + '\\\n ').join(annotationProcessorReferences) + print >> out, 'javac.processorpath=' + (os.pathsep + '\\\n ').join(['${javac.classpath}'] + annotationProcessorReferences) + print >> out, 'javac.test.processorpath=' + (os.pathsep + '\\\n ').join(['${javac.test.classpath}'] + annotationProcessorReferences) updated = update_file(join(p.dir, 'nbproject', 'project.properties'), out.getvalue()) or updated out.close()