Mercurial > hg > truffle
comparison mxtool/mx.py @ 8181:989e0582a30f
enabled Eclipse builders to use console logging
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 08 Mar 2013 15:57:41 +0100 |
parents | 0934903d28f3 |
children | e0db99483b35 |
comparison
equal
deleted
inserted
replaced
8180:0934903d28f3 | 8181:989e0582a30f |
---|---|
2182 _genEclipseBuilder(out, p, 'Jar.launch', 'archive ' + p.name, refresh = False, async = False) | 2182 _genEclipseBuilder(out, p, 'Jar.launch', 'archive ' + p.name, refresh = False, async = False) |
2183 _genEclipseBuilder(out, p, 'Refresh.launch', '', refresh = True, async = True) | 2183 _genEclipseBuilder(out, p, 'Refresh.launch', '', refresh = True, async = True) |
2184 | 2184 |
2185 if projToDist.has_key(p.name): | 2185 if projToDist.has_key(p.name): |
2186 dist, distDeps = projToDist[p.name] | 2186 dist, distDeps = projToDist[p.name] |
2187 _genEclipseBuilder(out, p, 'Create' + dist.name + 'Dist.launch', 'archive @' + dist.name, refresh=False, async=True) | 2187 _genEclipseBuilder(out, p, 'Create' + dist.name + 'Dist.launch', 'archive @' + dist.name, refresh=False, async=True, logToConsole=True) |
2188 | 2188 |
2189 out.close('buildSpec') | 2189 out.close('buildSpec') |
2190 out.open('natures') | 2190 out.open('natures') |
2191 out.element('nature', data='org.eclipse.jdt.core.javanature') | 2191 out.element('nature', data='org.eclipse.jdt.core.javanature') |
2192 if exists(csConfig): | 2192 if exists(csConfig): |
2259 if p in deps: | 2259 if p in deps: |
2260 return True | 2260 return True |
2261 | 2261 |
2262 return False | 2262 return False |
2263 | 2263 |
2264 def _genEclipseBuilder(dotProjectDoc, p, name, mxCommand, refresh=True, async=False): | 2264 def _genEclipseBuilder(dotProjectDoc, p, name, mxCommand, refresh=True, async=False, logToConsole=False): |
2265 launchOut = XMLDoc(); | 2265 launchOut = XMLDoc(); |
2266 consoleOn = 'true' if logToConsole else 'false' | |
2266 launchOut.open('launchConfiguration', {'type' : 'org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType'}) | 2267 launchOut.open('launchConfiguration', {'type' : 'org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType'}) |
2267 if refresh: | 2268 if refresh: |
2268 launchOut.element('stringAttribute', {'key' : 'org.eclipse.debug.core.ATTR_REFRESH_SCOPE', 'value': '${project}'}) | 2269 launchOut.element('stringAttribute', {'key' : 'org.eclipse.debug.core.ATTR_REFRESH_SCOPE', 'value': '${project}'}) |
2269 launchOut.element('booleanAttribute', {'key' : 'org.eclipse.debug.core.capture_output', 'value': 'false'}) | 2270 launchOut.element('booleanAttribute', {'key' : 'org.eclipse.debug.ui.ATTR_CONSOLE_OUTPUT_ON', 'value': consoleOn}) |
2270 launchOut.element('booleanAttribute', {'key' : 'org.eclipse.debug.ui.ATTR_CONSOLE_OUTPUT_ON', 'value': 'false'}) | 2271 launchOut.element('booleanAttribute', {'key' : 'org.eclipse.debug.core.capture_output', 'value': consoleOn}) |
2271 if async: | 2272 if async: |
2272 launchOut.element('booleanAttribute', {'key' : 'org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND', 'value': 'true'}) | 2273 launchOut.element('booleanAttribute', {'key' : 'org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND', 'value': 'true'}) |
2273 | 2274 |
2274 baseDir = dirname(dirname(os.path.abspath(__file__))) | 2275 baseDir = dirname(dirname(os.path.abspath(__file__))) |
2275 | 2276 |