mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Message can be null.
This commit is contained in:
@@ -76,8 +76,7 @@ public class ExecutionHelper {
|
||||
@NotNull final Project myProject,
|
||||
@NotNull final List<? extends Exception> errors,
|
||||
@NotNull final String tabDisplayName,
|
||||
@Nullable final VirtualFile file)
|
||||
{
|
||||
@Nullable final VirtualFile file) {
|
||||
showExceptions(myProject, errors, Collections.<Exception>emptyList(), tabDisplayName, file);
|
||||
}
|
||||
|
||||
@@ -86,8 +85,7 @@ public class ExecutionHelper {
|
||||
@NotNull final List<? extends Exception> errors,
|
||||
@NotNull final List<? extends Exception> warnings,
|
||||
@NotNull final String tabDisplayName,
|
||||
@Nullable final VirtualFile file)
|
||||
{
|
||||
@Nullable final VirtualFile file) {
|
||||
if (ApplicationManager.getApplication().isUnitTestMode() && !errors.isEmpty()) {
|
||||
throw new RuntimeException(errors.get(0));
|
||||
}
|
||||
@@ -133,12 +131,13 @@ public class ExecutionHelper {
|
||||
@NotNull final List<? extends Exception> exceptions,
|
||||
@NotNull ErrorViewPanel errorTreeView,
|
||||
@Nullable final VirtualFile file,
|
||||
@NotNull final String defaultMessage)
|
||||
{
|
||||
@NotNull final String defaultMessage) {
|
||||
for (final Exception exception : exceptions) {
|
||||
String[] messages = StringUtil.splitByLines(exception.getMessage());
|
||||
String message = exception.getMessage();
|
||||
|
||||
String[] messages = StringUtil.isNotEmpty(message) ? StringUtil.splitByLines(message) : ArrayUtil.EMPTY_STRING_ARRAY;
|
||||
if (messages.length == 0) {
|
||||
messages = new String[] { defaultMessage };
|
||||
messages = new String[]{defaultMessage};
|
||||
}
|
||||
errorTreeView.addMessage(messageCategory, messages, file, -1, -1, null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user