Added support project settings in old kotlin2js compiler and made minor refactoring.

This commit is contained in:
Zalim Bashorov
2013-10-16 16:04:24 +04:00
parent fb8c9c2ef9
commit 5a28f4e158
11 changed files with 92 additions and 139 deletions
@@ -16,6 +16,8 @@
package com.sampullara.cli;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.util.Function;
import com.intellij.util.containers.ComparatorUtil;
import org.jetbrains.annotations.NotNull;
@@ -66,12 +68,19 @@ public class ArgumentUtils {
name = Args.getName(argument, field);
}
Class<?> fieldType = field.getType();
if (fieldType.isArray()) {
Object[] values = (Object[]) value;
if (values.length == 0) continue;
value = StringUtil.join(values, Function.TO_STRING, argument.delimiter());
}
result.add(argument.prefix() + name);
Class<?> fieldType = field.getType();
if (fieldType != boolean.class && fieldType != Boolean.class) {
result.add(value.toString());
}
if (fieldType == boolean.class || fieldType == Boolean.class) continue;
result.add(value.toString());
}
}