mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
diagnostics info for rake tasks reload script
This commit is contained in:
committed by
Dennis Ushakov
parent
ef275977d8
commit
c29260b7dc
@@ -88,7 +88,7 @@ public class ExecutionHelper {
|
||||
return;
|
||||
}
|
||||
for (final Exception exception : exceptionList) {
|
||||
String[] messages = new String[]{exception.getMessage()};
|
||||
String[] messages = StringUtil.splitByLines(exception.getMessage());
|
||||
if (messages.length == 0) messages = new String[]{"Unknown Error"};
|
||||
errorTreeView.addMessage(MessageCategory.ERROR, messages, file, -1, -1, null);
|
||||
}
|
||||
|
||||
@@ -34,11 +34,13 @@ import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
import java.text.DateFormat;
|
||||
import java.util.*;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
//TeamCity inherits StringUtil: do not add private constructors!!!
|
||||
public class StringUtil {
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.util.text.StringUtil");
|
||||
@NonNls private static final String VOWELS = "aeiouy";
|
||||
private static final Pattern EOL_SPLIT_PATTERN = Pattern.compile(" *(\r|\n|\r\n)+ *");
|
||||
|
||||
public static String replace(@NonNls @NotNull String text, @NonNls @NotNull String oldS, @NonNls @Nullable String newS) {
|
||||
return replace(text, oldS, newS, false);
|
||||
@@ -1600,4 +1602,14 @@ public class StringUtil {
|
||||
public static String tail(@NotNull String s, final int idx) {
|
||||
return idx >= s.length() ? "" : s.substring(idx, s.length());
|
||||
}
|
||||
|
||||
/**
|
||||
* Splits string by lines.
|
||||
*
|
||||
* @param string String to split
|
||||
* @return array of strings
|
||||
*/
|
||||
public static String[] splitByLines(final String string) {
|
||||
return EOL_SPLIT_PATTERN.split(string);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user