diff --git a/java/java-tests/testSrc/com/intellij/modcommand/ModCommandTest.java b/java/java-tests/testSrc/com/intellij/modcommand/ModCommandTest.java
index 303288596d96..1ee1d1e1a1ef 100644
--- a/java/java-tests/testSrc/com/intellij/modcommand/ModCommandTest.java
+++ b/java/java-tests/testSrc/com/intellij/modcommand/ModCommandTest.java
@@ -81,6 +81,6 @@ public final class ModCommandTest extends LightPlatformCodeInsightTestCase {
IntentionPreviewInfo preview = ModCommandExecutor.getInstance().getPreview(command, ActionContext.from(null, getFile()));
IntentionPreviewInfo.Html html = assertInstanceOf(preview, IntentionPreviewInfo.Html.class);
String actual = html.content().toString();
- assertEquals("
Create directories:
", actual);
+ assertEquals("Create directories:
• a
• a/b
• a/c
", actual);
}
}
diff --git a/platform/analysis-impl/src/com/intellij/lang/impl/modcommand/ModCommandBatchExecutorImpl.java b/platform/analysis-impl/src/com/intellij/lang/impl/modcommand/ModCommandBatchExecutorImpl.java
index a7ca260f1291..cdcd218668de 100644
--- a/platform/analysis-impl/src/com/intellij/lang/impl/modcommand/ModCommandBatchExecutorImpl.java
+++ b/platform/analysis-impl/src/com/intellij/lang/impl/modcommand/ModCommandBatchExecutorImpl.java
@@ -377,8 +377,11 @@ public class ModCommandBatchExecutorImpl implements ModCommandExecutor {
return new IntentionPreviewInfo.Html(text(AnalysisBundle.message("preview.create.directory", createdDirs.get(0))));
}
return new IntentionPreviewInfo.Html(
- tag("p").addText(AnalysisBundle.message("preview.create.directories"))
- .child(tag("ul").children(ContainerUtil.map(createdDirs, text -> tag("li").addText(text))))
+ tag("p").addText(AnalysisBundle.message("preview.create.directories")).children(
+ ContainerUtil.map(createdDirs, text -> new HtmlBuilder().br()
+ .appendRaw("• ") //NON-NLS
+ .append(text)
+ .toFragment()))
);
}
return navigateInfo;
@@ -463,6 +466,9 @@ public class ModCommandBatchExecutorImpl implements ModCommandExecutor {
//noinspection unchecked
return IntentionPreviewInfo.addListOption((List)list, optList.label().label(), value -> !oldList.contains(value)).content();
}
+ if (newValue == null) {
+ throw new IllegalStateException("Null value is not supported");
+ }
throw new IllegalStateException("Value of type " + newValue.getClass() + " is not supported");
}