changeset 22102:4918409846d8

mx eclipseformat: no need to pass a -vm argument to eclipse
author Gilles Duboscq <gilles.m.duboscq@oracle.com>
date Fri, 26 Jun 2015 12:24:47 +0200
parents e2793adeaa43
children 6772b63f4dac
files mxtool/mx.py
diffstat 1 files changed, 3 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- 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: