# HG changeset patch # User Gilles Duboscq # Date 1435314287 -7200 # Node ID 4918409846d81939dc684434eec8f69a58eef65d # Parent e2793adeaa43eacfb6b81e8d0fb9b15ae1e1a3fc mx eclipseformat: no need to pass a -vm argument to eclipse diff -r e2793adeaa43 -r 4918409846d8 mxtool/mx.py --- a/mxtool/mx.py Thu Jun 25 16:00:08 2015 +0200 +++ b/mxtool/mx.py Fri Jun 26 12:24:47 2015 +0200 @@ -3301,9 +3301,8 @@ projects = [project(name) for name in args.projects.split(',')] class Batch: - def __init__(self, settingsDir, javaCompliance): + def __init__(self, settingsDir): self.path = join(settingsDir, 'org.eclipse.jdt.core.prefs') - self.javaCompliance = javaCompliance with open(join(settingsDir, 'org.eclipse.jdt.ui.prefs')) as fp: jdtUiPrefs = fp.read() self.removeTrailingWhitespace = 'sp_cleanup.remove_trailing_whitespaces_all=true' in jdtUiPrefs @@ -3314,7 +3313,7 @@ def __hash__(self): if not self.cachedHash: with open(self.path) as fp: - self.cachedHash = (fp.read(), self.javaCompliance, self.removeTrailingWhitespace).__hash__() + self.cachedHash = (fp.read(), self.removeTrailingWhitespace).__hash__() return self.cachedHash def __eq__(self, other): @@ -3322,8 +3321,6 @@ return False if self.removeTrailingWhitespace != other.removeTrailingWhitespace: return False - if self.javaCompliance != other.javaCompliance: - return False if self.path == other.path: return True with open(self.path) as fp: @@ -3367,7 +3364,7 @@ continue sourceDirs = p.source_dirs() - batch = Batch(join(p.dir, '.settings'), p.javaCompliance) + batch = Batch(join(p.dir, '.settings')) if not exists(batch.path): if _opts.verbose: @@ -3393,7 +3390,6 @@ '-nosplash', '-application', 'org.eclipse.jdt.core.JavaCodeFormatter', - '-vm', java(batch.javaCompliance).java, '-config', batch.path] + [f.path for f in chunk]) for fi in chunk: