SourceMapper existingMapper = root.getSourceMapper();
if (existingMapper instanceof RealignmentJDSourceMapper)
{
// Remove decompiler attachment
RealignmentJDSourceMapper jdSourceMapper = (RealignmentJDSourceMapper) existingMapper;
root.setSourceMapper(null);
RealignmentJDSourceMapper.clearDecompiled(jdSourceMapper);
// Re-attach any source which was previously attached
SourceAttachmentDetails details = jdSourceMapper.sourceDetails;