private GeneralCommandLine getCommandForNeko(Sdk sdk, HaxeModuleSettings settings) throws ExecutionException {
final HaxeSdkData sdkData = sdk.getSdkAdditionalData() instanceof HaxeSdkData ? (HaxeSdkData)sdk.getSdkAdditionalData() : null;
if (sdkData == null) {
throw new ExecutionException(HaxeCommonBundle.message("invalid.haxe.sdk"));
}
final GeneralCommandLine commandLine = new GeneralCommandLine();
commandLine.setWorkDirectory(PathUtil.getParentPath(module.getModuleFilePath()));
final String haxelibPath = sdkData.getHaxelibPath();
if (haxelibPath == null || haxelibPath.isEmpty()) {
throw new ExecutionException(HaxeCommonBundle.message("no.haxelib.for.sdk", sdk.getName()));
}
commandLine.setExePath(haxelibPath);
commandLine.addParameter("run");
commandLine.addParameter("lime");
commandLine.addParameter(myRunInTest ? "test" : "run");
if(!StringUtil.isEmpty(settings.getOpenFLXmlPath())) {
commandLine.addParameter(settings.getOpenFLXmlPath());
}
for (String flag : settings.getOpenFLTarget().getFlags()) {
commandLine.addParameter(flag);
}
commandLine.addParameter("-verbose");
if (myDebug) {
commandLine.addParameter("-Ddebug");
commandLine.addParameter("-debug");
if (settings.getOpenFLTarget() == OpenFLTarget.FLASH) {
commandLine.addParameter("-Dfdb");
}
}
final StringTokenizer flagsTokenizer = new StringTokenizer(settings.getOpenFLFlags());
while (flagsTokenizer.hasMoreTokens()) {
commandLine.addParameter(flagsTokenizer.nextToken());
}
final TextConsoleBuilder consoleBuilder = TextConsoleBuilderFactory.getInstance().createBuilder(module.getProject());
setConsoleBuilder(consoleBuilder);
return commandLine;