# HG changeset patch # User Doug Simon # Date 1332793526 -7200 # Node ID 8ea90b7c858655baf269262d83d48a5d57cd6c53 # Parent 2a3938fac230663580a55a485a00ca39c0bb6b59 made eclipseinit generate Eclipse debug-on-attach launch config in mx/attach-8000.launch diff -r 2a3938fac230 -r 8ea90b7c8586 mxtool/mx.py --- a/mxtool/mx.py Mon Mar 26 22:24:07 2012 +0200 +++ b/mxtool/mx.py Mon Mar 26 22:25:26 2012 +0200 @@ -124,7 +124,7 @@ Property values can use environment variables with Bash syntax (e.g. ${HOME}). """ -import sys, os, errno, time, subprocess, shlex, types, urllib2, contextlib, StringIO, zipfile, signal +import sys, os, errno, time, subprocess, shlex, types, urllib2, contextlib, StringIO, zipfile, signal, xml.sax.saxutils import shutil, fnmatch, re, xml.dom.minidom from collections import Callable from threading import Thread @@ -1379,6 +1379,9 @@ def println(out, obj): out.write(str(obj) + '\n') + source_locator_memento = '\n' + entities = { '"': """, "'": "'", '\n': ' ' } + for p in projects(): if p.native: continue @@ -1492,7 +1495,6 @@ update_file(join(p.dir, '.project'), out.getvalue()) out.close() - out = StringIO.StringIO() settingsDir = join(p.dir, ".settings") if not exists(settingsDir): os.mkdir(settingsDir) @@ -1506,6 +1508,24 @@ content = f.read() content = content.replace('${javaCompliance}', str(p.javaCompliance)) update_file(join(settingsDir, name), content) + + memento = '\n\n' + source_locator_memento += '\n' + + source_locator_memento += '\n' + launch = r""" + + + + + + + + + + +""".format(xml.sax.saxutils.escape(source_locator_memento, entities)) + update_file(join(suite.dir, 'mx', 'attach-8000.launch'), launch) def netbeansinit(args, suite=None): """(re)generate NetBeans project configurations"""