@Override
public void moduleLoaded(final IBackend backend, final IProject project,
final String moduleName) {
try {
final ErlangDebugTarget erlangDebugTarget = debugTargetOfBackend(backend
.getOtpRpc());
if (erlangDebugTarget != null
&& erlangDebugTarget.getInterpretedModules().contains(moduleName)) {
if (isModuleRunningInInterpreter(erlangDebugTarget, backend.getOtpRpc(),
moduleName)) {
abortContinueDialog(erlangDebugTarget);
} else {
final ILaunchConfiguration launchConfiguration = erlangDebugTarget
.getLaunch().getLaunchConfiguration();
final EnumSet<ErlDebugFlags> debugFlags = ErlDebugFlags
.makeSet(launchConfiguration.getAttribute(
ErlRuntimeAttributes.DEBUG_FLAGS, ErlDebugFlags
.getFlag(ErlDebugFlags.DEFAULT_DEBUG_FLAGS)));
final boolean distributed = debugFlags
.contains(ErlDebugFlags.DISTRIBUTED_DEBUG);
erlangDebugTarget.interpret(project, moduleName, distributed, true);
}
}
} catch (final CoreException e) {
ErlLogger.error(e);
}