final ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
final ILaunchConfigurationType type = manager
.getLaunchConfigurationType(IErlangLaunchDelegateConstants.CONFIGURATION_TYPE_INTERNAL);
ILaunchConfigurationWorkingCopy workingCopy;
try {
final RuntimeInfo info = getRuntimeInfo();
final String name = getNodeName();
workingCopy = type.newInstance(null, name);
if (info.getVersion().isReleaseCompatible(new RuntimeVersion(17))) {
workingCopy.setAttribute(DebugPlugin.ATTR_CONSOLE_ENCODING,
Charsets.UTF_8.name());
} else {
workingCopy.setAttribute(DebugPlugin.ATTR_CONSOLE_ENCODING,
Charsets.ISO_8859_1.name());
}
workingCopy.setAttribute(DebugPlugin.ATTR_PROCESS_FACTORY_ID,
"org.erlide.backend.ertsProcessFactory");
workingCopy.setAttribute(ErlRuntimeAttributes.NODE_NAME, getNodeName());
workingCopy.setAttribute(ErlRuntimeAttributes.RUNTIME_NAME, info.getName());
workingCopy.setAttribute(ErlRuntimeAttributes.COOKIE, getCookie());
// workingCopy.setAttribute(ErlLaunchAttributes.CONSOLE,
// !options.contains(BackendOptions.NO_CONSOLE));
workingCopy.setAttribute(ErlRuntimeAttributes.USE_LONG_NAME, hasLongName());
workingCopy.setAttribute(ErlRuntimeAttributes.INTERNAL, isInternal());