You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by ah...@apache.org on 2026/05/19 09:10:10 UTC
(causeway) branch main updated: CAUSEWAY-3997: col. ord. patch final polishing
This is an automated email from the ASF dual-hosted git repository.
andi-huber pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/causeway.git
The following commit(s) were added to refs/heads/main by this push:
new ce006c784d6 CAUSEWAY-3997: col. ord. patch final polishing
ce006c784d6 is described below
commit ce006c784d676bd8ccd6aa2d91c93b378aa88699
Author: andi-huber <ah...@apache.org>
AuthorDate: Tue May 19 11:10:02 2026 +0200
CAUSEWAY-3997: col. ord. patch final polishing
---
.../applib/services/columnorder/Object_patchColumnOrder.java | 4 +++-
.../src/main/java/org/apache/causeway/applib/util/Listing.java | 9 +++++++++
.../test/java/org/apache/causeway/applib/util/ListingTest.java | 4 ++--
3 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/api/applib/src/main/java/org/apache/causeway/applib/services/columnorder/Object_patchColumnOrder.java b/api/applib/src/main/java/org/apache/causeway/applib/services/columnorder/Object_patchColumnOrder.java
index 2850bb51792..c23e1a5467f 100644
--- a/api/applib/src/main/java/org/apache/causeway/applib/services/columnorder/Object_patchColumnOrder.java
+++ b/api/applib/src/main/java/org/apache/causeway/applib/services/columnorder/Object_patchColumnOrder.java
@@ -98,7 +98,9 @@ public static class ActionDomainEvent
final ApplicationFeatureId featureId,
@Parameter(precedingParamsPolicy = PrecedingParamsPolicy.RESET)
- @ParameterLayout(multiLine = 20)
+ @ParameterLayout(multiLine = 20, describedAs = "Automaticly filled in are all currently enabled and available "
+ + "column-ids, one per line. Those available (but not enabled) are commented out. "
+ + "Reorder or remove column-ids as desired.")
final String columnListing) {
var identifier = applicationFeatureRepository.asIdentifier(featureId)
diff --git a/api/applib/src/main/java/org/apache/causeway/applib/util/Listing.java b/api/applib/src/main/java/org/apache/causeway/applib/util/Listing.java
index 22f8e5f272d..15ea8fd8164 100644
--- a/api/applib/src/main/java/org/apache/causeway/applib/util/Listing.java
+++ b/api/applib/src/main/java/org/apache/causeway/applib/util/Listing.java
@@ -254,6 +254,15 @@ public enum MergePolicy {
ADD_NEW_AS_DISABLED
}
+ /**
+ * Same as {@link #merge(MergePolicy, Listing, String)} using fixed merge-header '#AVAILABLE'.
+ *
+ * @see #merge(MergePolicy, Listing, String)
+ */
+ public <K> Listing<T> merge(@NonNull final MergePolicy policy, @Nullable final Listing<T> newerVersion) {
+ return merge(policy, newerVersion, "#AVAILABLE");
+ }
+
/**
* Say this listing was edited by a human,
* but needs to be synchronized with a newer version originating from some system process,
diff --git a/api/applib/src/test/java/org/apache/causeway/applib/util/ListingTest.java b/api/applib/src/test/java/org/apache/causeway/applib/util/ListingTest.java
index b995bcb2e39..a49382ff150 100644
--- a/api/applib/src/test/java/org/apache/causeway/applib/util/ListingTest.java
+++ b/api/applib/src/test/java/org/apache/causeway/applib/util/ListingTest.java
@@ -106,7 +106,7 @@ void merging() {
[d] Martha
""";
var updateListing = lineAdapter.parseListing(upd);
- var merged = listing.merge(MergePolicy.ADD_NEW_AS_DISABLED, updateListing, "#MERGED");
+ var merged = listing.merge(MergePolicy.ADD_NEW_AS_DISABLED, updateListing);
String expectedOutputAfterMerge = """
# this is a regular comment
[a] Jeff
@@ -117,7 +117,7 @@ void merging() {
#REMOVED [b] Jane
- #MERGED
+ #AVAILABLE
#[d] Martha""";
//debug
//System.err.printf("%s%n", merged);