Keep form edits anchored across native autosaves
This commit is contained in:
@@ -127,6 +127,25 @@ public final class ConnectionWorkflowProbe implements StartupActivity.DumbAware
|
||||
choose("form-palette", type);
|
||||
choose("form-destination", destination);
|
||||
String before = source();
|
||||
fx(
|
||||
() -> {
|
||||
var b =
|
||||
(Button)
|
||||
pane.lookupAll(".button").stream()
|
||||
.filter(n -> n instanceof Button bt && bt.getText().equals("Insert control"))
|
||||
.findFirst()
|
||||
.orElseThrow();
|
||||
if (b.isDisabled())
|
||||
throw new AssertionError("Insert control disabled for " + destination);
|
||||
step(
|
||||
"Selected insert "
|
||||
+ ((ComboBox<?>) pane.lookup("#form-palette")).getValue()
|
||||
+ " / "
|
||||
+ ((ComboBox<?>) pane.lookup("#form-destination")).getValue()
|
||||
+ " at "
|
||||
+ ((Spinner<?>) pane.lookup("#form-position")).getValue());
|
||||
return null;
|
||||
});
|
||||
click(pane, "Insert control");
|
||||
edited(before, "fx:id=\"" + id + "\"");
|
||||
step("Inserted " + type + " into " + destination);
|
||||
@@ -208,6 +227,25 @@ public final class ConnectionWorkflowProbe implements StartupActivity.DumbAware
|
||||
file = edt(() -> LocalFileSystem.getInstance().refreshAndFindFileByNioFile(path));
|
||||
pane = openDesigner(project, file);
|
||||
step("Opened registered Neitzel Designer");
|
||||
fx(
|
||||
() -> {
|
||||
for (var n : pane.lookupAll(".label"))
|
||||
if (n instanceof Label label
|
||||
&& (label.getText() != null && label.getText().startsWith("Context ")
|
||||
|| "form-message".equals(label.getId()))) {
|
||||
label
|
||||
.textProperty()
|
||||
.addListener(
|
||||
(o, a, b) -> {
|
||||
try {
|
||||
step("Editor: " + b);
|
||||
} catch (Exception e) {
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
return null;
|
||||
});
|
||||
controls(true);
|
||||
String grid = "GridPane [0] / children";
|
||||
add("StatusBar", grid, "statusBar");
|
||||
|
||||
Reference in New Issue
Block a user