Offer grid row attributes and qualify Archiver folder profile editing

This commit is contained in:
2026-11-25 13:17:24 +01:00
parent ff6ba0a745
commit 9c63b2dd0f
10 changed files with 560 additions and 78 deletions
+2
View File
@@ -95,6 +95,8 @@ Use `--import-form` with `scripts/check-ide-host.py --archiver ../Archiver` and
Use `--management-readers` with the Archiver host check to exercise the two account states, the empty and populated trash, and all five reader toolbars. The check saves and reopens CommandBinding changes in both management forms and an icon and accessible text change in the picture toolbar.
Use `--folder-profiles` with the Archiver host check to rebind the profile buttons and edit mail and book columns against indexed EML and EPUB files. The editable attribute list offers the row attributes used by the current grid.
Use `--folder-actions` with the Archiver host check to edit a text field’s column count, accessible name and controller action, then exercise the folder toolbar’s dismiss handler, full-text search, multiple selection and saved display profiles.
Use `--document-tabs` with the Archiver host check to open the production archive window and select **Archiver · HTML-Dokumenttabs**. The check also opens the production HTML and details FXML files directly, edits the assigned-tag Component and the input prompt through the visual inspector, and reopens the saved files. In the archive window it adds a second tag to the invoice, switches to the delivery note and back, removes the selected tag, and checks each WebView and suggestion popup. Direct examples cover read-only and busy states.
@@ -260,7 +260,23 @@ final class GridDockEditor extends VBox {
"minimumWidth ≤ width ≤ maximumWidth. FXML references are resolved at runtime."));
} else value.setTooltip(null);
value.setPromptText(hint);
value.getItems().setAll(GridDockDocument.options(field));
if ("attribute".equals(field) || "groupAttribute".equals(field)) {
var columns = doc.branches(doc.parentOfType(e, "DataGrid"));
value
.getItems()
.setAll(
columns.stream()
.map(
column ->
column.getAttribute(
column.hasAttribute("attribute") ? "attribute" : "id"))
.filter(name -> !name.isBlank())
.distinct()
.toList());
value.setTooltip(
new Tooltip(
"Row attributes used by this grid. You can also enter another row attribute."));
} else value.getItems().setAll(GridDockDocument.options(field));
value.setValue(e.getAttribute(field));
value.getEditor().setText(e.getAttribute(field));
}
@@ -19,14 +19,14 @@ public final class FolderActionsTargetProbe {
Thread.ofPlatform().daemon().start(() -> Worker.run(Path.of(dir)));
}
private static final class Worker {
private static <T> T fx(Callable<T> action) throws Exception {
static final class Worker {
static <T> T fx(Callable<T> action) throws Exception {
var task = new FutureTask<>(action);
Platform.runLater(task);
return task.get(10, TimeUnit.SECONDS);
}
private static void await(String description, Callable<Boolean> test) throws Exception {
static void await(String description, Callable<Boolean> test) throws Exception {
long end = System.nanoTime() + TimeUnit.SECONDS.toNanos(22);
while (System.nanoTime() < end) {
if (fx(test)) return;
@@ -35,12 +35,11 @@ public final class FolderActionsTargetProbe {
throw new AssertionError(description);
}
private static void require(boolean value, String message) {
static void require(boolean value, String message) {
if (!value) throw new AssertionError(message);
}
private static void run(Path dir) {
try {
static Stage previewStage() throws Exception {
Stage stage = null;
while (stage == null) {
Thread.sleep(120);
@@ -62,7 +61,12 @@ public final class FolderActionsTargetProbe {
} catch (IllegalStateException starting) {
}
}
Stage shown = stage;
return stage;
}
private static void run(Path dir) {
try {
Stage shown = previewStage();
var root =
fx(
() -> {
@@ -140,7 +144,7 @@ public final class FolderActionsTargetProbe {
.orElseThrow();
}
private static boolean visible(Node grid, String column) throws Exception {
static boolean visible(Node grid, String column) throws Exception {
return (boolean)
grid.getClass().getMethod("isColumnVisible", String.class).invoke(grid, column);
}
@@ -283,7 +287,7 @@ public final class FolderActionsTargetProbe {
+ " Dateityp; Kurzansicht restored hidden Dateityp.");
}
private static void image(Node node, Path path) throws Exception {
static void image(Node node, Path path) throws Exception {
var img = node.snapshot(null, null);
int w = (int) img.getWidth(), h = (int) img.getHeight();
var out = new java.awt.image.BufferedImage(w, h, java.awt.image.BufferedImage.TYPE_INT_ARGB);
@@ -0,0 +1,328 @@
package qualification;
import static qualification.FolderActionsTargetProbe.Worker.*;
import java.nio.file.*;
import java.time.*;
import java.time.format.*;
import java.util.*;
import java.util.concurrent.Callable;
import java.util.concurrent.atomic.AtomicInteger;
import javafx.application.Platform;
import javafx.collections.ListChangeListener;
import javafx.scene.*;
import javafx.scene.control.*;
import javafx.stage.Window;
/** Checks rendered folder rows and the ordinary modal profile dialogs in the preview worker. */
public final class FolderProfilesTargetProbe {
public static void premain(String directory) {
if (System.getProperty("sun.java.command", "")
.startsWith("de.neitzel.fxdesigner.target.WorkerMain "))
Thread.ofPlatform().daemon().start(() -> Checks.run(Path.of(directory)));
}
private static final class Checks {
private static void run(Path dir) {
try {
var stage = previewStage();
var root =
fx(
() -> {
stage.setWidth(1360);
stage.setHeight(700);
var r = stage.getScene().getRoot();
r.applyCss();
r.layout();
return r;
});
var attempt = Files.readString(dir.resolve("layout-case"));
var result =
switch (attempt) {
case "profiles", "readonly", "rebound" -> profiles(root, attempt);
case "metadata", "renamed", "recovered" -> metadata(root, attempt, dir);
default -> throw new AssertionError(attempt);
};
Files.writeString(dir.resolve("result-" + attempt), result);
} catch (Throwable failure) {
var trace = new java.io.StringWriter();
failure.printStackTrace(new java.io.PrintWriter(trace));
try {
Files.writeString(dir.resolve("target-error.txt"), trace.toString());
} catch (Exception error) {
error.printStackTrace();
}
}
}
private static DialogPane dialog(String title) {
return Window.getWindows().stream()
.filter(javafx.stage.Stage.class::isInstance)
.map(javafx.stage.Stage.class::cast)
.filter(s -> s.isShowing() && title.equals(s.getTitle()))
.map(s -> (DialogPane) s.getScene().getRoot())
.findFirst()
.orElse(null);
}
private static Button change(DialogPane d) {
return (Button)
d.lookupButton(
d.getButtonTypes().stream()
.filter(t -> t.getButtonData() == ButtonBar.ButtonData.OTHER)
.findFirst()
.orElseThrow());
}
private static void toggle(Node grid, String header) {
var menu = (MenuButton) grid.lookup(".data-grid-column-menu");
menu.show();
var item =
(CheckMenuItem)
menu.getItems().stream()
.filter(i -> header.equals(i.getText()))
.findFirst()
.orElseThrow();
item.setSelected(!item.isSelected());
item.fire();
menu.hide();
}
private static String profiles(Parent root, String attempt) throws Exception {
var grid = fx(() -> root.lookup("#grid"));
var profiles = fx(() -> (ComboBox<String>) root.lookup("#folder-view-profile"));
var save = fx(() -> (Button) root.lookup("#save-folder-view-profile"));
var clear = fx(() -> (Button) root.lookup("#clear-folder-view-layout"));
var manage = fx(() -> (Button) root.lookup("#manage-folder-view-profiles"));
boolean readonly = attempt.equals("readonly"), rebound = attempt.equals("rebound");
await(
"Initial profile",
() -> !manage.isDisabled() && profiles.isDisabled() == readonly && clear.isDisabled());
String name = readonly ? "Metadaten" : "Prüfprofil";
fx(
() -> {
require(
!profiles.getItems().contains("Prüfprofil"),
"New session inherited previous profile");
if (!readonly) profiles.getEditor().setText(name);
require(readonly == save.isDisabled(), "Save availability");
if (!readonly && !rebound) {
save.fire();
require(profiles.getItems().contains(name), "Profile not saved");
}
toggle(grid, "Dateityp");
return null;
});
await("Changed local layout", () -> !clear.isDisabled() && !visible(grid, "type"));
fx(
() -> {
clear.fire();
return null;
});
await("Restored local layout", () -> clear.isDisabled() && visible(grid, "type"));
var openings = new AtomicInteger();
String title = "Anzeigeprofile verwalten";
ListChangeListener<Window> shown =
changes -> {
while (changes.next())
for (Window w : changes.getAddedSubList())
if (w instanceof javafx.stage.Stage s && title.equals(s.getTitle()))
openings.incrementAndGet();
};
fx(
() -> {
Window.getWindows().addListener(shown);
Platform.runLater((rebound ? save : manage)::fire);
return null;
});
await("Profile manager opened", () -> dialog(title) != null);
fx(
() -> {
var d = dialog(title);
var list = (ListView<String>) d.lookup("#archive-display-profiles");
if (rebound) require(!list.getItems().contains(name), "Old save handler also ran");
else {
list.getSelectionModel().select(name);
var action = change(d);
require(action.isDisabled() == readonly, "Profile deletion availability");
if (!readonly) Platform.runLater(action::fire);
}
return null;
});
if (!readonly && !rebound) {
Callable<DialogPane> confirm =
() ->
Window.getWindows().stream()
.filter(Window::isShowing)
.map(w -> w.getScene().getRoot())
.filter(DialogPane.class::isInstance)
.map(DialogPane.class::cast)
.filter(d -> d.getButtonTypes().contains(ButtonType.OK))
.findFirst()
.orElse(null);
await("Delete confirmation", () -> confirm.call() != null);
fx(
() -> {
((Button) confirm.call().lookupButton(ButtonType.OK)).fire();
return null;
});
await("Deleted own profile", () -> !profiles.getItems().contains(name));
}
fx(
() -> {
((Button) dialog(title).lookupButton(ButtonType.CLOSE)).fire();
return null;
});
fx(
() -> {
Window.getWindows().removeListener(shown);
require(
openings.get() == 1 && dialog(title) == null,
"Expected exactly one profile dialog: " + openings);
return null;
});
if (rebound)
return "Fresh session. Rebound Save opened exactly one management dialog, without saving a"
+ " profile.";
if (readonly)
return "Read-only: archive save, selection and deletion disabled. Management and local"
+ " layout change/reset succeeded.";
return "Saved Prüfprofil, hid and restored Dateityp, deleted own profile after confirmation.";
}
private static Label cell(Node grid, String text) {
return grid.lookupAll(".label").stream()
.filter(Label.class::isInstance)
.map(Label.class::cast)
.filter(l -> text.equals(l.getText()))
.findFirst()
.orElseThrow(() -> new AssertionError(text));
}
private static List<Label> row(Node grid, String file) {
return cell(grid, file).getParent().getChildrenUnmodifiable().stream()
.filter(Label.class::isInstance)
.map(Label.class::cast)
.toList();
}
private static String date(String day) {
return DateTimeFormatter.ofLocalizedDateTime(FormatStyle.SHORT)
.withZone(ZoneId.systemDefault())
.format(Instant.parse(day + "T11:00:00Z"));
}
private static void cells(Node grid, String file, String... expected) {
var labels = row(grid, file);
var actual = labels.stream().limit(10).map(Label::getText).toList();
var values = new ArrayList<>(List.of(file));
values.addAll(List.of(expected));
require(actual.equals(values), file + " rendered " + actual + " expected " + values);
require(
labels.get(4).getPrefWidth() == 182 && labels.get(5).getPrefWidth() == 168,
"Profile widths: " + labels.get(4).getPrefWidth() + ", " + labels.get(5).getPrefWidth());
}
private static String metadata(Parent root, String attempt, Path dir) throws Exception {
var grid = fx(() -> root.lookup("#grid"));
var profiles = fx(() -> (ComboBox<String>) root.lookup("#folder-view-profile"));
boolean renamed = !attempt.equals("metadata");
String sent = renamed ? "versand" : "mailSent";
await(
"Loaded saved metadata profile",
() -> visible(grid, sent) && visible(grid, "bookTitle") && !profiles.isDisabled());
fx(
() -> {
require(
"Metadaten".equals(profiles.getValue()), "Initial profile " + profiles.getValue());
String january = "Z-Anfrage.eml", december = "A-Zusage.eml";
cells(
grid,
january,
"Anfrage",
"ada@example.org",
"archiv@example.org",
"kopie@example.org",
date("2026-01-01"),
"",
"",
"",
"");
cells(
grid,
december,
"Zusage",
"ada@example.org",
"archiv@example.org",
"kopie@example.org",
date("2026-12-01"),
"",
"",
"",
"");
cells(
grid,
"Lesebuch.epub",
"",
"",
"",
"",
"",
renamed ? "Nordverlag" : "Das Lesebuch",
"Ada Berg, Eva Tal",
"Nordverlag",
"de");
cells(grid, "Notiz.txt", "", "", "", "", "", "", "", "", "");
require(
cell(grid, january).localToScene(0, 0).getY()
< cell(grid, december).localToScene(0, 0).getY(),
"Mail date sort order");
var setup = grid.getClass().getMethod("snapshotSetup").invoke(grid);
require(
setup
.getClass()
.getMethod("sort")
.invoke(setup)
.toString()
.contains(sent + ", direction=ASCENDING"),
"Sort after restoration: " + setup);
if (renamed) {
cell(grid, "Buchverlag");
require(
root.lookupAll(".label").stream()
.anyMatch(
n -> n instanceof Label l && l.getText().contains("mailSent → versand")),
"Missing profile mapping");
image(root, dir.resolve("folder-metadata.png"));
}
profiles.getSelectionModel().select("\0STANDARD");
return null;
});
await(
"Standard hides metadata",
() -> !visible(grid, sent) && !visible(grid, "mailCc") && !profiles.isDisabled());
fx(
() -> {
profiles.getSelectionModel().select("\0EMAIL");
return null;
});
await(
"Email shows date and CC",
() ->
visible(grid, sent)
&& visible(grid, "mailCc")
&& !visible(grid, "bookTitle")
&& !profiles.isDisabled());
fx(
() -> {
profiles.getSelectionModel().select("Metadaten");
return null;
});
await("Return to saved profile", () -> visible(grid, "bookTitle") && !profiles.isDisabled());
return "Rendered two mails, EPUB and plain text. Nine metadata cells per row; sort "
+ sent
+ " ascending, CC 182 px, date 168 px. Standard → Email → Metadaten."
+ (renamed ? " Retained date source and bookPublisher in Buchverlag." : "");
}
}
}
@@ -0,0 +1,109 @@
package qualification;
import static qualification.WorkflowProbe.*;
import com.intellij.openapi.project.Project;
import java.nio.file.Files;
import java.util.List;
import javafx.embed.swing.SwingFXUtils;
import javafx.scene.control.*;
import javax.imageio.ImageIO;
/** Saves profile bindings and column declarations in the registered FolderTab editor. */
public final class FolderProfilesWorkflowProbe extends DeclarationWorkflowProbe {
@Override
void verify(Project project) throws Exception {
this.project = project;
open("FolderTab");
build("folder-actions");
interactive("folder-actions", "profiles");
interactive("folder-readonly", "readonly");
interactive("folder-metadata", "metadata");
for (var id : List.of("saveProfile", "clearLayout", "manageProfiles")) commands(id, id, 4);
commands("saveProfile", "saveProfile", 4);
click(pane, "Discover / Validate Commands");
await(
() ->
fx(
() ->
((Label) pane.lookup("#command-status"))
.getText()
.contains("No detected binding errors.")));
fx(
() -> {
var choices =
pane.lookup("#command-path").getParent().getChildrenUnmodifiable().stream()
.filter(
n -> Integer.valueOf(1).equals(javafx.scene.layout.GridPane.getRowIndex(n)))
.filter(ComboBox.class::isInstance)
.map(ComboBox.class::cast)
.filter(
box ->
box.getItems()
.containsAll(List.of("manageProfiles", "saveProfile", "clearLayout")))
.findFirst()
.orElseThrow();
choices.getSelectionModel().select("manageProfiles");
return null;
});
click(pane, "Apply Command binding");
String bound = "control=\"saveProfile\" path=\"manageProfiles\"";
await(() -> source().contains(bound));
inspector(true);
select("DataGridColumn", "mailSent");
applySetting("id", "versand");
select("DataGridColumn", "bookTitle");
combo("declaration-property", "attribute");
choose("declaration-value", "bookPublisher");
edit("Apply setting", "attribute=\"bookPublisher\"");
applySetting("header", "Buchverlag");
reopen("FolderTab", "header=\"Buchverlag\"");
if (!source().contains(bound) || !source().contains("attribute=\"mailSent\""))
throw new AssertionError(source());
build("folder-actions");
choose("preview-example", "folder-actions");
await(
() ->
fx(
() ->
((Label) pane.lookup("#preview-state"))
.getText()
.contains("Suche und Anzeigeprofile")
&& ((javafx.scene.image.ImageView) pane.lookup("#full-preview-image"))
.getImage()
!= null));
commands("saveProfile", "manageProfiles", 4);
fx(
() -> {
ImageIO.write(
SwingFXUtils.fromFXImage(pane.snapshot(null, null), null),
"png",
output.resolve("intellij.png").toFile());
return null;
});
interactive("folder-actions", "rebound");
interactive("folder-metadata", "renamed");
for (String invalid : List.of("keinFeld", "bookPublisher")) {
inspector(true);
select("DataGridColumn", "versand");
applySetting("attribute", invalid);
click(pane, "Form preview");
click(pane, "Render drafts");
await(
() ->
fx(
() -> {
var message = ((Label) pane.lookup("#preview-state")).getText();
return message.contains("versand")
&& message.contains(invalid)
&& message.contains(
invalid.equals("keinFeld") ? "unbekanntes Zeilenattribut" : "INTEGER");
}));
step("Preview diagnosed " + invalid + " on INTEGER column versand");
click(pane, "Undo");
await(() -> source().contains("attribute=\"mailSent\""));
}
interactive("folder-metadata", "recovered");
Files.writeString(output.resolve("SUCCESS.txt"), Files.readString(output.resolve("steps.txt")));
}
}
@@ -140,5 +140,38 @@ abstract class FormWorkflowProbe implements StartupActivity.DumbAware {
});
}
void commands(String control, String path, int count) throws Exception {
fx(
() -> {
var group =
(TitledPane)
pane.lookupAll(".titled-pane").stream()
.filter(n -> n instanceof TitledPane t && "Bindings".equals(t.getText()))
.findFirst()
.orElseThrow();
group.setAnimated(false);
group.setExpanded(true);
var tabs = (TabPane) group.getContent();
tabs.getSelectionModel()
.select(
tabs.getTabs().stream()
.filter(t -> t.getText().equals("Command bindings"))
.findFirst()
.orElseThrow());
pane.applyCss();
pane.layout();
var list = (ListView<?>) pane.lookup("#command-bindings");
if (list.getItems().size() != count) throw new AssertionError(list.getItems());
for (int i = 0; i < count; i++) {
if (list.getItems().get(i).toString().startsWith(control + " ←"))
list.getSelectionModel().select(i);
}
if (!control.equals(((TextField) pane.lookup("#command-control")).getText())
|| !path.equals(((TextField) pane.lookup("#command-path")).getText()))
throw new AssertionError(control + " → " + path);
return null;
});
}
abstract void verify(Project project) throws Exception;
}
+26 -10
View File
@@ -16,13 +16,13 @@ import javax.imageio.ImageIO;
public final class ImportWorkflowProbe extends FormWorkflowProbe {
@Override
void verify(Project project) throws Exception {
open(project, "ConnectionForm", 2);
open(project, "ConnectionForm");
discover();
target("securityChoices", "view", "security", "items", "COMPATIBLE");
target("protocol", "both", "protocol", "value", "COMPATIBLE");
target("security", "both", "security", "value", "COMPATIBLE");
open(project, "FolderTab", 2);
open(project, "FolderTab");
discover();
target("view", "both", "view", "value", "COMPATIBLE");
target("grouping", "both", "grouping", "value", "COMPATIBLE");
@@ -31,20 +31,20 @@ public final class ImportWorkflowProbe extends FormWorkflowProbe {
target("rows", "view", "clearLayout", "accessibleHelp", "INCOMPATIBLE");
target("view", "both", "untypedPick", "value", "UNRESOLVED");
target("rows", "view", "grid", "items", "COMPATIBLE");
applyAndReopen(project, "FolderTab", 2, "grid", "items", "rows", "view");
applyAndReopen(project, "FolderTab", "grid", "items", "rows", "view");
preview("archive-folder", "import-grid");
open(project, "ImportForm", 3);
open(project, "ImportForm");
discover();
target("folder", "both", "folders", "value", "COMPATIBLE");
applyAndReopen(project, "ImportForm", 3, "folders", "value", "folder", "both");
applyAndReopen(project, "ImportForm", "folders", "value", "folder", "both");
preview("import-free", "import-free");
preview("import-collision", "import-collision");
preview("import-busy", "import-busy");
Files.writeString(output.resolve("SUCCESS.txt"), Files.readString(output.resolve("steps.txt")));
}
private void open(Project project, String form, int count) throws Exception {
private void open(Project project, String form) throws Exception {
var path =
Path.of(project.getBasePath(), "src/main/resources/de/neitzel/archiver/ui", form + ".fxml");
file = edt(() -> LocalFileSystem.getInstance().refreshAndFindFileByNioFile(path));
@@ -52,8 +52,24 @@ public final class ImportWorkflowProbe extends FormWorkflowProbe {
fx(pane::flush).toCompletableFuture().get(10, java.util.concurrent.TimeUnit.SECONDS);
click(pane, "Form preview");
click(pane, "Build and Refresh");
var required =
switch (form) {
case "FolderTab" -> java.util.List.of("archive-folder", "folder-actions");
case "ConnectionForm" -> java.util.List.of("connection-imap", "connection-jmap");
case "ImportForm" -> java.util.List.of("import-free", "import-collision", "import-busy");
default -> throw new IllegalArgumentException(form);
};
await(
() -> fx(() -> ((ComboBox<?>) pane.lookup("#preview-example")).getItems().size() == count));
() ->
fx(
() ->
((ComboBox<?>) pane.lookup("#preview-example"))
.getItems().stream()
.map(
de.neitzel.fxdesigner.workflow.DesignerWorkflow.Example.class::cast)
.map(de.neitzel.fxdesigner.workflow.DesignerWorkflow.Example::id)
.toList()
.containsAll(required)));
// The initial native document sync invalidates discovery while the first preview is loading.
// Wait for the displayed revision before selecting a source in the inspector.
await(
@@ -73,7 +89,7 @@ public final class ImportWorkflowProbe extends FormWorkflowProbe {
return ((ImageView) pane.lookup("#full-preview-image")).getImage() != null
&& state.contains("revision");
}));
step("Opened " + form + " with " + count + " examples");
step("Opened " + form + " with " + required);
}
private void discover() throws Exception {
@@ -161,7 +177,7 @@ public final class ImportWorkflowProbe extends FormWorkflowProbe {
}
private void applyAndReopen(
Project project, String form, int count, String id, String prop, String path, String dir)
Project project, String form, String id, String prop, String path, String dir)
throws Exception {
click(pane, "Use selected target");
if (!fx(
@@ -188,7 +204,7 @@ public final class ImportWorkflowProbe extends FormWorkflowProbe {
FileEditorManager.getInstance(project).closeFile(file);
return null;
});
open(project, form, count);
open(project, form);
if (!source().contains(declaration)) throw new AssertionError("Binding was lost on reopen");
step("Applied, saved and reopened " + declaration);
}
@@ -106,38 +106,6 @@ public final class ManagementReadersWorkflowProbe extends FormWorkflowProbe {
if (!source().contains(saved)) throw new AssertionError("Reopened " + form);
}
private void commands(String control, String path, int count) throws Exception {
fx(
() -> {
var group =
(TitledPane)
pane.lookupAll(".titled-pane").stream()
.filter(n -> n instanceof TitledPane t && "Bindings".equals(t.getText()))
.findFirst()
.orElseThrow();
group.setExpanded(true);
var tabs = (TabPane) group.getContent();
tabs.getSelectionModel()
.select(
tabs.getTabs().stream()
.filter(t -> t.getText().equals("Command bindings"))
.findFirst()
.orElseThrow());
pane.applyCss();
pane.layout();
var list = (ListView<?>) pane.lookup("#command-bindings");
if (list.getItems().size() != count) throw new AssertionError(list.getItems());
for (int i = 0; i < count; i++) {
if (list.getItems().get(i).toString().startsWith(control + " ←"))
list.getSelectionModel().select(i);
}
if (!control.equals(((TextField) pane.lookup("#command-control")).getText())
|| !path.equals(((TextField) pane.lookup("#command-path")).getText()))
throw new AssertionError(control + " → " + path);
return null;
});
}
private void management(
String form,
String data,
+4 -3
View File
@@ -29,12 +29,13 @@ forms.add_argument("--grid-docking", type=Path, metavar="REFERENCE_FXML", help="
forms.add_argument("--dock-rules", action="store_true", help="Verify group minima, split directions and persistence in the Archiver")
forms.add_argument("--media-layout-grid", action="store_true", help="Verify media permissions, form destinations and grid setups in the Archiver")
forms.add_argument("--management-readers", action="store_true", help="Verify account and trash commands and the five reader toolbars")
forms.add_argument("--folder-profiles", action="store_true", help="Check the Archiver profile commands and metadata columns")
forms.add_argument("--folder-actions", action="store_true", help="Check visual event references, folder search, selection and display profiles")
forms.add_argument("--import-form", action="store_true", help="Check generic binding types and the Archiver import collision")
forms.add_argument("--document-tabs", action="store_true", help="Qualify the production Archiver HTML document tabs")
forms.add_argument("--saved-document", action="store_true", help="Open the Archiver saved HTML and tag example")
args = p.parse_args()
if (args.connection_form or args.grid_docking or args.saved_document or args.document_tabs or args.import_form or args.folder_actions or args.management_readers or args.media_layout_grid or args.dock_rules) and not args.archiver:
if (args.connection_form or args.grid_docking or args.saved_document or args.document_tabs or args.import_form or args.folder_actions or args.folder_profiles or args.management_readers or args.media_layout_grid or args.dock_rules) and not args.archiver:
p.error("Selecting an Archiver view requires --archiver")
if args.repeat < 1:
p.error("--repeat must be positive")
@@ -46,7 +47,7 @@ modes = ("classpath",) if args.archiver else (("classpath", "modulepath") if arg
for run_number, mode in ((n, mode) for n in range(1, args.repeat + 1) for mode in modes):
crashes = NativeCrashGuard(ROOT)
launch = subprocess.run([sys.executable, ROOT / "scripts/run-fixture-host.py", "intellij",
"--check", *(["--dock-rules"] if args.dock_rules else []), *(["--media-layout-grid"] if args.media_layout_grid else []), *(["--management-readers"] if args.management_readers else []), *(["--folder-actions"] if args.folder_actions else []), *(["--import-form"] if args.import_form else []), *(["--document-tabs"] if args.document_tabs else []), *(["--saved-document"] if args.saved_document else []), *(["--grid-docking", str(args.grid_docking.resolve())] if args.grid_docking else []), *(["--connection-form"] if args.connection_form else []), *(["--archiver", str(args.archiver.resolve())] if args.archiver else []), "--mode", mode, "--java-home", args.java_home,
"--check", *(["--folder-profiles"] if args.folder_profiles else []), *(["--dock-rules"] if args.dock_rules else []), *(["--media-layout-grid"] if args.media_layout_grid else []), *(["--management-readers"] if args.management_readers else []), *(["--folder-actions"] if args.folder_actions else []), *(["--import-form"] if args.import_form else []), *(["--document-tabs"] if args.document_tabs else []), *(["--saved-document"] if args.saved_document else []), *(["--grid-docking", str(args.grid_docking.resolve())] if args.grid_docking else []), *(["--connection-form"] if args.connection_form else []), *(["--archiver", str(args.archiver.resolve())] if args.archiver else []), "--mode", mode, "--java-home", args.java_home,
"--target-java-home", args.target_java_home, "--idea-home", args.idea_home],
cwd=ROOT, text=True, capture_output=True, timeout=60)
if launch.returncode:
@@ -90,7 +91,7 @@ for run_number, mode in ((n, mode) for n in range(1, args.repeat + 1) for mode i
shutil.copyfile(base / "intellij.png", output / (mode + ".png"))
(evidence / "proof.json").write_text(json.dumps(proof, indent=2) + "\n")
finally:
for name in ("dock-horizontal.png", "dock-vertical.png", "dock-empty-kept.png", "dock-empty-removed.png", "media-granted.png", "details-moved.png", "trash-split.png", "grid-group.png", "reader-pdf.png", "reader-epub.png", "reader-slides.png", "reader-attachment.png", "management-accounts.png", "management-trash.png", "reader-icon.png", "folder-events.png", "folder-search.png", "folder-profile.png", "result-folder-actions", "result-detail-action", "details-invoice-tags.png", "details-delivery-tags.png", "details-invoice.png", "details-delivery.png", "details-readonly.png", "details-busy.png", "html-invoice.png", "html-delivery.png", "rechnung-zwei-tags.png", "import-collision.png", "import-accepted.png", "result-import-free", "result-import-busy", "result-import-collision", "result-import-grid", "SUCCESS.txt", "FAILURE.txt", "ui-state.txt", "launcher.log", "steps.txt", "target-error.txt", "preview-restored.png", "imap.png", "jmap.png", "invoice.png", "delivery.png", "saved-document-result", "saved-bindings.fxml", "binding-article.png", "binding-dynamic.png", "tags-Pr.png", "tags-Re.png", "tags-Li.png", "document-tabs-result", "rechnung-tab.png", "lieferschein-tab.png", "rechnung-tab-tags.png", "lieferschein-tab-tags.png", "folder.png", "right.png", "bottom.png", "result-folder", "result-right", "result-bottom", "intellij.png"):
for name in ("folder-metadata.png", "dock-horizontal.png", "dock-vertical.png", "dock-empty-kept.png", "dock-empty-removed.png", "media-granted.png", "details-moved.png", "trash-split.png", "grid-group.png", "reader-pdf.png", "reader-epub.png", "reader-slides.png", "reader-attachment.png", "management-accounts.png", "management-trash.png", "reader-icon.png", "folder-events.png", "folder-search.png", "folder-profile.png", "result-folder-actions", "result-detail-action", "details-invoice-tags.png", "details-delivery-tags.png", "details-invoice.png", "details-delivery.png", "details-readonly.png", "details-busy.png", "html-invoice.png", "html-delivery.png", "rechnung-zwei-tags.png", "import-collision.png", "import-accepted.png", "result-import-free", "result-import-busy", "result-import-collision", "result-import-grid", "SUCCESS.txt", "FAILURE.txt", "ui-state.txt", "launcher.log", "steps.txt", "target-error.txt", "preview-restored.png", "imap.png", "jmap.png", "invoice.png", "delivery.png", "saved-document-result", "saved-bindings.fxml", "binding-article.png", "binding-dynamic.png", "tags-Pr.png", "tags-Re.png", "tags-Li.png", "document-tabs-result", "rechnung-tab.png", "lieferschein-tab.png", "rechnung-tab-tags.png", "lieferschein-tab-tags.png", "folder.png", "right.png", "bottom.png", "result-folder", "result-right", "result-bottom", "intellij.png"):
if (base / name).exists():
shutil.copyfile(base / name, evidence / name)
workers = descendant_workers(pid)
+9 -4
View File
@@ -25,12 +25,13 @@ forms.add_argument("--grid-docking", type=Path, metavar="REFERENCE_FXML", help="
forms.add_argument("--dock-rules", action="store_true", help="Verify group minima, split directions and persistence in the Archiver")
forms.add_argument("--media-layout-grid", action="store_true", help="Verify media permissions, form destinations and grid setups in the Archiver")
forms.add_argument("--management-readers", action="store_true", help="Verify account and trash commands and the five reader toolbars")
forms.add_argument("--folder-profiles", action="store_true", help="Check the Archiver profile commands and metadata columns")
forms.add_argument("--folder-actions", action="store_true", help="Check visual event references, folder search, selection and display profiles")
forms.add_argument("--import-form", action="store_true", help="Check generic binding types and the Archiver import collision")
forms.add_argument("--document-tabs", action="store_true", help="Qualify the production Archiver HTML document tabs")
forms.add_argument("--saved-document", action="store_true", help="Open the Archiver saved HTML and tag example")
args = p.parse_args()
if (args.connection_form or args.grid_docking or args.saved_document or args.document_tabs or args.import_form or args.folder_actions or args.management_readers or args.media_layout_grid or args.dock_rules) and not args.archiver:
if (args.connection_form or args.grid_docking or args.saved_document or args.document_tabs or args.import_form or args.folder_actions or args.folder_profiles or args.management_readers or args.media_layout_grid or args.dock_rules) and not args.archiver:
p.error("Selecting an Archiver view requires --archiver")
base = Path(tempfile.mkdtemp(prefix="neitzel-designer-host-")).resolve()
project = base / "project"
@@ -45,6 +46,8 @@ if args.archiver:
view = "HtmlDocument"
if args.management_readers:
view = "MailControls"
if args.folder_profiles:
view = "FolderTab"
if args.folder_actions:
view = "DocumentDetails" if args.check else "FolderTab"
if args.document_tabs and args.check:
@@ -116,6 +119,8 @@ else:
suite = "MediaLayoutGrid"
elif args.management_readers:
suite = "ManagementReaders"
elif args.folder_profiles:
suite = "FolderProfiles"
elif args.folder_actions:
suite = "FolderActions"
elif args.import_form:
@@ -126,9 +131,9 @@ else:
suite = "SavedDocument"
probe = f"{suite}WorkflowProbe" if args.archiver else "WorkflowProbe"
files = [sources / "WorkflowProbe.java"]
if args.connection_form or args.saved_document or args.document_tabs or args.import_form or args.folder_actions or args.management_readers or args.media_layout_grid or args.dock_rules:
if args.connection_form or args.saved_document or args.document_tabs or args.import_form or args.folder_actions or args.folder_profiles or args.management_readers or args.media_layout_grid or args.dock_rules:
files.append(sources / "FormWorkflowProbe.java")
if args.media_layout_grid or args.dock_rules:
if args.media_layout_grid or args.dock_rules or args.folder_profiles:
files.append(sources / "DeclarationWorkflowProbe.java")
if args.archiver:
files.append(sources / f"{probe}.java")
@@ -136,7 +141,7 @@ else:
agent_classes = base / "agent-classes"
agent_classes.mkdir()
subprocess.run([args.java_home / "bin/javac", "-cp", os.pathsep.join(map(str,jars)), "-d", agent_classes,
sources / f"{target_probe}.java"], check=True)
sources / f"{target_probe}.java", *([sources / "FolderActionsTargetProbe.java"] if args.folder_profiles else [])], check=True)
agent = base / "archiver-ui-check.jar"
with zipfile.ZipFile(agent, "w") as archive:
archive.writestr("META-INF/MANIFEST.MF", f"Manifest-Version: 1.0\nPremain-Class: qualification.{target_probe}\n\n")