You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2021/04/09 10:26:14 UTC

[isis] branch master updated: ISIS-2602: remove @MemberOrder from java files

This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/master by this push:
     new 42086d1  ISIS-2602: remove @MemberOrder from java files
42086d1 is described below

commit 42086d1928f6ea4d34508d29126a110981847370
Author: ahuber@apache.org <ah...@luna>
AuthorDate: Fri Apr 9 12:26:03 2021 +0200

    ISIS-2602: remove @MemberOrder from java files
---
 .../main/java/org/apache/isis/applib/annotation/ActionLayout.java | 3 ++-
 .../src/main/java/org/apache/isis/applib/annotation/Title.java    | 4 ++--
 .../java/org/apache/isis/applib/layout/component/FieldSet.java    | 3 ++-
 .../main/java/org/apache/isis/applib/services/layout/Style.java   | 6 ++++++
 .../isis/commons/internal/reflection/_AnnotationsLegacy.java      | 1 -
 .../metamodel/services/grid/bootstrap3/GridSystemServiceBS3.java  | 8 ++++----
 .../excel/fixtures/demoapp/todomodule/dom/ExcelDemoToDoItem.java  | 2 +-
 7 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/api/applib/src/main/java/org/apache/isis/applib/annotation/ActionLayout.java b/api/applib/src/main/java/org/apache/isis/applib/annotation/ActionLayout.java
index a3643f2..33830cf 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/annotation/ActionLayout.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/annotation/ActionLayout.java
@@ -177,7 +177,8 @@ public @interface ActionLayout {
 
     /**
      * For actions that are associated with a property (using either
-     * {@link Action#associateWith()} or {@link MemberOrder#name()},
+     * {@link Action#associateWith()} or {@link ActionLayout#fieldSetId()}
+     * or {@link ActionLayout#fieldSetName()},
      * indicates the positioning of the action's button relative to the
      * property.
      *
diff --git a/api/applib/src/main/java/org/apache/isis/applib/annotation/Title.java b/api/applib/src/main/java/org/apache/isis/applib/annotation/Title.java
index ac5f3aa..2d461d0 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/annotation/Title.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/annotation/Title.java
@@ -29,8 +29,8 @@ import java.lang.annotation.Target;
  *
  * <p>
  * If more than one property is used, the order can be specified (using the
- * same Dewey-decimal notation as used by `@MemberOrder`) and the string to
- * use between the components can also be specified.
+ * same Dewey-decimal notation). 
+ * The string to use between the components can also be specified.
  * </p>
  *
  * @since 1.x {@index}
diff --git a/api/applib/src/main/java/org/apache/isis/applib/layout/component/FieldSet.java b/api/applib/src/main/java/org/apache/isis/applib/layout/component/FieldSet.java
index 9547889..1dd08c6 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/layout/component/FieldSet.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/layout/component/FieldSet.java
@@ -28,6 +28,7 @@ import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.XmlType;
 
+import org.apache.isis.applib.annotation.PropertyLayout;
 import org.apache.isis.applib.layout.grid.bootstrap3.BS3Col;
 
 /**
@@ -123,7 +124,7 @@ Serializable {
     private String name;
 
     /**
-     * Corresponds to the {@link MemberOrder#name()} (when applied to properties).
+     * Corresponds to the {@link PropertyLayout#fieldSetName()} (when applied to properties).
      */
     @XmlAttribute(required = false)
     public String getName() {
diff --git a/api/applib/src/main/java/org/apache/isis/applib/services/layout/Style.java b/api/applib/src/main/java/org/apache/isis/applib/services/layout/Style.java
index 680597c..ceed07f 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/services/layout/Style.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/services/layout/Style.java
@@ -28,10 +28,13 @@ import org.apache.isis.applib.layout.grid.Grid;
  * content is assembled. Once a layout file is in place, its layout data takes precedence over any
  * conflicting layout data from annotations.
  * </p>
+ * 
+ * TODO update for v2 - @MemberGroupLayout and @MemberOrder have been removed
  *
  * @since 1.x {@index}
  */
 public enum Style {
+    
     /**
      * The current layout for the domain class.
      * <p>
@@ -42,6 +45,7 @@ public enum Style {
      * also {@link org.apache.isis.applib.services.grid.GridService#normalize(Grid) normalized}.
      */
     CURRENT,
+    
     /**
      * As per {@link #NORMALIZED}, but also with all (non-null) facets for all
      * properties/collections/actions also included included in the grid.
@@ -54,6 +58,7 @@ public enum Style {
      * </ul>
      */
     COMPLETE,
+    
     /**
      * Default, whereby missing properties/collections/actions are added to regions,
      * and unused/empty regions are removed/trimmed.
@@ -67,6 +72,7 @@ public enum Style {
      * </ul>
      */
     NORMALIZED,
+    
     /**
      * As per {@link #NORMALIZED}, but with no properties/collections/actions.
      * <p>
diff --git a/commons/src/main/java/org/apache/isis/commons/internal/reflection/_AnnotationsLegacy.java b/commons/src/main/java/org/apache/isis/commons/internal/reflection/_AnnotationsLegacy.java
index 16016ce..aaa55d1 100644
--- a/commons/src/main/java/org/apache/isis/commons/internal/reflection/_AnnotationsLegacy.java
+++ b/commons/src/main/java/org/apache/isis/commons/internal/reflection/_AnnotationsLegacy.java
@@ -256,7 +256,6 @@ public final class _AnnotationsLegacy  {
 //                    Collection.class,
 //                    CollectionLayout.class,
 //                    Programmatic.class,
-//                    MemberOrder.class,
 //                    Pattern.class,
 //                    javax.annotation.Nullable.class,
 //                    Title.class,
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/bootstrap3/GridSystemServiceBS3.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/bootstrap3/GridSystemServiceBS3.java
index 89b63e9..fd90dcc 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/bootstrap3/GridSystemServiceBS3.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/bootstrap3/GridSystemServiceBS3.java
@@ -126,7 +126,7 @@ public class GridSystemServiceBS3 extends GridSystemServiceAbstract<BS3Grid> {
         final BS3Row propsRow = new BS3Row();
         bs3Grid.getRows().add(propsRow);
 
-        // if no layout hints other than @MemberOrder
+        // if no layout hints
         addFieldSetsToColumn(propsRow, 4, Arrays.asList("General"), true);
 
         final BS3Col col = new BS3Col();
@@ -385,7 +385,7 @@ public class GridSystemServiceBS3 extends GridSystemServiceAbstract<BS3Grid> {
                 }
                 continue;
             }
-            // if the @MemberOrder for the action references a field set (that has bound
+            // if the @ActionLayout for the action references a field set (that has bound
             // associations), then don't mark it as missing, but instead explicitly add it to the
             // list of actions of that field-set.
             final Set<String> boundAssociationIds = boundAssociationIdsByFieldSetId.get(layoutGroupName);
@@ -401,8 +401,8 @@ public class GridSystemServiceBS3 extends GridSystemServiceAbstract<BS3Grid> {
             }
         }
 
-        // ... the missing actions are those in the second tuple, excluding those associated (via @MemberOrder#name)
-        // to a property or collection.
+        // ... the missing actions are those in the second tuple, excluding those associated 
+        // (via @Action#associateWith) to a property or collection. (XXX comment might be outdated)
         final List<String> missingActionIds = _Lists.newArrayList(sortedPossiblyMissingActionIds);
         missingActionIds.removeAll(associatedActionIds);
 
diff --git a/subdomains/excel/fixture/src/main/java/org/apache/isis/subdomains/excel/fixtures/demoapp/todomodule/dom/ExcelDemoToDoItem.java b/subdomains/excel/fixture/src/main/java/org/apache/isis/subdomains/excel/fixtures/demoapp/todomodule/dom/ExcelDemoToDoItem.java
index d68aee1..ab5d74c 100644
--- a/subdomains/excel/fixture/src/main/java/org/apache/isis/subdomains/excel/fixtures/demoapp/todomodule/dom/ExcelDemoToDoItem.java
+++ b/subdomains/excel/fixture/src/main/java/org/apache/isis/subdomains/excel/fixtures/demoapp/todomodule/dom/ExcelDemoToDoItem.java
@@ -438,7 +438,7 @@ public class ExcelDemoToDoItem implements Comparable<ExcelDemoToDoItem> /*, Cale
 //            optionality = Optionality.OPTIONAL,
 //            editing = Editing.DISABLED
 //    )
-//    @MemberOrder(sequence="3")
+//    @PropertyLayout(sequence="3")
 //    public Location getLocation() {
 //        return locationLatitude != null && locationLongitude != null? new Location(locationLatitude, locationLongitude): null;
 //    }