IPath framesDirPath = getFramesDirPath(resource, sourceDirPath);
IContainer[] outputContainers = resource.getWorkspace().getRoot()
.findContainersForLocationURI(outputDirPath.toFile().toURI());
boolean outputInWorkspace = outputContainers.length != 0; // mapping useful?
Mapping mapping = outputInWorkspace ? new Mapping() : null;
// execute Coco
List<CocoError> errors = execute(filePath.toOSString(),
framesDirPath.toOSString(), outputDirPath.toOSString(),
getPackageName(resource, outputDirPath), getTraceString(resource), mapping);