outputlocation.toFile().mkdirs();
IPath metadatafile = outputlocation.addFileExtension(METADATAFILE_EXT);
if (inplace) {
outputlocation = EclEmmaCorePlugin.getAbsolutePath(location);
}
InstrProcessor processor = InstrProcessor.create();
processor.setInstrPath(new String[] { EclEmmaCorePlugin.getAbsolutePath(
location).toOSString() }, true);
processor.setInstrOutDir(outputlocation.toOSString());
processor.setMetaOutFile(metadatafile.toOSString());
processor.setMetaOutMerge(Boolean.TRUE);
processor.setOutMode(inplace ? OutMode.OUT_MODE_OVERWRITE
: OutMode.OUT_MODE_COPY);
Properties props = new XProperties();
props.put(AppLoggers.PROPERTY_VERBOSITY_LEVEL,
DebugOptions.EMMAVERBOSITYLEVEL);
processor.setPropertyOverrides(props);
processor.run();
monitor.done();
PERFORMANCE.stopTimer("instrumenting " + location); //$NON-NLS-1$
return new Instrumentation(this, inplace, outputlocation, metadatafile);
}