Edit form controls and render localized application previews in the IntelliJ designer

This commit is contained in:
2026-11-24 15:13:31 +01:00
parent 73da1f985e
commit 93a9f04b11
18 changed files with 1623 additions and 63 deletions
@@ -45,25 +45,6 @@ public final class ArchiveWorkflowProbe implements StartupActivity.DumbAware {
});
}
private static void open(Project project, VirtualFile file) throws Exception {
var editor =
edt(
() -> {
var manager = FileEditorManager.getInstance(project);
var all = manager.openFile(file, true);
manager.setSelectedEditor(file, "neitzel-fx-designer");
return java.util.Arrays.stream(all)
.filter(e -> e.getName().equals("Neitzel Designer"))
.findFirst()
.orElseThrow();
});
await(() -> edt(() -> bridge(editor.getComponent()) != null));
var panel = edt(() -> bridge(editor.getComponent()));
await(() -> fx(() -> panel.getScene() != null));
pane = fx(() -> (DesignerPane) panel.getScene().getRoot());
await(() -> fx(() -> pane.kit().editor().getFxomDocument() != null));
}
private static void tab(String name) throws Exception {
fx(
() -> {
@@ -131,7 +112,7 @@ public final class ArchiveWorkflowProbe implements StartupActivity.DumbAware {
tab("Structure");
select("structure-nodes", "openExample :");
click(pane, "Copy subtree");
open(project, destination);
pane = openDesigner(project, destination);
click(pane, "Preview last successful");
await(
() ->
@@ -164,7 +145,7 @@ public final class ArchiveWorkflowProbe implements StartupActivity.DumbAware {
FileEditorManager.getInstance(project).closeFile(destination);
return null;
});
open(project, original);
pane = openDesigner(project, original);
step("Cross-View paste rejected at missing Command getter before writing");
}
@@ -178,7 +159,7 @@ public final class ArchiveWorkflowProbe implements StartupActivity.DumbAware {
+ "<BorderPane xmlns:fx='http://javafx.com/fxml/1'><top><MenuBar><menus>"
+ "<Menu fx:id='recent'/></menus></MenuBar></top></BorderPane>");
var file = edt(() -> LocalFileSystem.getInstance().refreshAndFindFileByNioFile(path));
open(project, file);
pane = openDesigner(project, file);
fx(
() -> {
var root =
@@ -245,7 +226,7 @@ public final class ArchiveWorkflowProbe implements StartupActivity.DumbAware {
FileEditorManager.getInstance(project).closeFile(file);
return null;
});
open(project, file);
pane = openDesigner(project, file);
click(pane, "Build and Refresh");
await(
() ->
@@ -302,7 +283,7 @@ public final class ArchiveWorkflowProbe implements StartupActivity.DumbAware {
FileEditorManager.getInstance(project).closeFile(file);
return null;
});
open(project, file);
pane = openDesigner(project, file);
click(pane, "Build and Refresh");
await(
() ->