incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1096874 - in /incubator/isis/trunk/core/metamodel: org.apache.isis.core.metamodel.vpdm/ src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/ src/main/java/org/apache/isis/core/metamodel/layout/ordermethod/
Date Tue, 26 Apr 2011 19:48:46 GMT
Author: danhaywood
Date: Tue Apr 26 19:48:45 2011
New Revision: 1096874

URL: http://svn.apache.org/viewvc?rev=1096874&view=rev
Log:
ISIS-22 code cleanup for core.metamodel

Removed:
    incubator/isis/trunk/core/metamodel/org.apache.isis.core.metamodel.vpdm/
Modified:
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/DeweyOrderSet.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/MemberIdentifierComparator.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/MemberLayoutArrangerUsingMemberOrderFacet.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/MemberOrderComparator.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/OrderSetGroupNameComparator.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/ordermethod/SimpleOrderSet.java

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/DeweyOrderSet.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/DeweyOrderSet.java?rev=1096874&r1=1096873&r2=1096874&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/DeweyOrderSet.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/DeweyOrderSet.java
Tue Apr 26 19:48:45 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.core.metamodel.layout.memberorderfacet;
 
 import java.util.Iterator;
@@ -32,14 +31,12 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.member.ordering.MemberOrderFacet;
 import org.apache.isis.core.metamodel.layout.OrderSet;
 
-
 /**
  * Represents a nested hierarchy of ordered members.
  * 
  * <p>
- * At each level the elements are either {@link FacetedMethod}s or they are instances of
- * {@link OrderSet} represent a group of {@link FacetedMethod}s that have a {@link MemberOrderFacet}
- * of the same name.
+ * At each level the elements are either {@link FacetedMethod}s or they are instances of
{@link OrderSet} represent a
+ * group of {@link FacetedMethod}s that have a {@link MemberOrderFacet} of the same name.
  * 
  * <p>
  * With no name, (ie <tt>name=""</tt> is the default), at the top level
@@ -74,7 +71,7 @@ public class DeweyOrderSet extends Order
 
         // spin over all the members and put them into a Map of SortedSets
         // any non-annotated members go into additional nonAnnotatedGroup set.
-        for (FacetedMethod member : members) {
+        for (final FacetedMethod member : members) {
             final MemberOrderFacet memberOrder = member.getFacet(MemberOrderFacet.class);
             if (memberOrder == null) {
                 nonAnnotatedGroup.add(member);
@@ -115,8 +112,8 @@ public class DeweyOrderSet extends Order
     }
 
     /**
-     * Recursively creates parents all the way up to root (<tt>""</tt>), along
the way associating each child
-     * with its parent and adding the child as an element of its parent.
+     * Recursively creates parents all the way up to root (<tt>""</tt>), along
the way associating each child with its
+     * parent and adding the child as an element of its parent.
      * 
      * @param orderSetsByGroup
      * @param deweyOrderSet
@@ -167,14 +164,13 @@ public class DeweyOrderSet extends Order
     /**
      * Format is: <tt>abc,def:XXel/YYm/ZZch</tt>
      * <p>
-     * where <tt>abc,def</tt> is group name, <tt>XX</tt> is number
of elements,
-     * <tt>YY is number of members, and 
+     * where <tt>abc,def</tt> is group name, <tt>XX</tt> is number
of elements, <tt>YY is number of members, and 
      * <tt>ZZ</tt> is number of child order sets.
      */
     @Override
     public String toString() {
-        return getGroupFullName() + ":" + size() + "el/" + (size() - childOrderSets.size())
+ "m/" + childOrderSets.size() + "ch";
+        return getGroupFullName() + ":" + size() + "el/" + (size() - childOrderSets.size())
+ "m/"
+            + childOrderSets.size() + "ch";
     }
 
 }
-

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/MemberIdentifierComparator.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/MemberIdentifierComparator.java?rev=1096874&r1=1096873&r2=1096874&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/MemberIdentifierComparator.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/MemberIdentifierComparator.java
Tue Apr 26 19:48:45 2011
@@ -17,28 +17,27 @@
  *  under the License.
  */
 
+package org.apache.isis.core.metamodel.layout.memberorderfacet;
 
-package org.apache.isis.core.metamodel.layout.memberorderfacet;
-
 import java.io.Serializable;
 import java.util.Comparator;
 
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.core.metamodel.facets.FacetedMethod;
-
-
-/**
- * Compares {@link FacetedMethod}) by {@link FacetedMethod#getIdentifier()}
- *
- */
-public class MemberIdentifierComparator implements Comparator<FacetedMethod>, Serializable
{
-
-    private static final long serialVersionUID = 1L;
-
-    public int compare(final FacetedMethod o1, final FacetedMethod o2) {
-        final Identifier identifier1 = o1.getIdentifier();
-        final Identifier identifier2 = o2.getIdentifier();
-        return identifier1.compareTo(identifier2);
-    }
-
-}
+
+/**
+ * Compares {@link FacetedMethod}) by {@link FacetedMethod#getIdentifier()}
+ * 
+ */
+public class MemberIdentifierComparator implements Comparator<FacetedMethod>, Serializable
{
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public int compare(final FacetedMethod o1, final FacetedMethod o2) {
+        final Identifier identifier1 = o1.getIdentifier();
+        final Identifier identifier2 = o2.getIdentifier();
+        return identifier1.compareTo(identifier2);
+    }
+
+}

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/MemberLayoutArrangerUsingMemberOrderFacet.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/MemberLayoutArrangerUsingMemberOrderFacet.java?rev=1096874&r1=1096873&r2=1096874&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/MemberLayoutArrangerUsingMemberOrderFacet.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/MemberLayoutArrangerUsingMemberOrderFacet.java
Tue Apr 26 19:48:45 2011
@@ -18,52 +18,51 @@ package org.apache.isis.core.metamodel.l
 
 import java.util.List;
 
-import org.apache.log4j.Logger;
-
 import org.apache.isis.core.metamodel.facets.FacetedMethod;
 import org.apache.isis.core.metamodel.layout.MemberLayoutArranger;
 import org.apache.isis.core.metamodel.layout.OrderSet;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.log4j.Logger;
 
 public class MemberLayoutArrangerUsingMemberOrderFacet implements MemberLayoutArranger {
-    
-    private static final Logger LOG = Logger.getLogger(MemberLayoutArrangerUsingMemberOrderFacet.class);
-
 
+    private static final Logger LOG = Logger.getLogger(MemberLayoutArrangerUsingMemberOrderFacet.class);
 
     // ////////////////////////////////////////////////////////////////////////////
     // constructor
     // ////////////////////////////////////////////////////////////////////////////
 
-    public MemberLayoutArrangerUsingMemberOrderFacet() { }
-
+    public MemberLayoutArrangerUsingMemberOrderFacet() {
+    }
 
     // ////////////////////////////////////////////////////////////////////////////
     // associations
     // ////////////////////////////////////////////////////////////////////////////
 
-
     @Override
-    public OrderSet createAssociationOrderSetFor(ObjectSpecification spec, final List<FacetedMethod>
associationMethods) {
+    public OrderSet createAssociationOrderSetFor(final ObjectSpecification spec,
+        final List<FacetedMethod> associationMethods) {
         if (LOG.isDebugEnabled()) {
-            LOG.debug("MemberLayoutArrangerUsingMemberOrderFacet: createAssociationOrderSetFor
" + spec.getFullIdentifier());
+            LOG.debug("MemberLayoutArrangerUsingMemberOrderFacet: createAssociationOrderSetFor
"
+                + spec.getFullIdentifier());
         }
-        
+
         return DeweyOrderSet.createOrderSet(associationMethods);
     }
 
-
     // ////////////////////////////////////////////////////////////////////////////
     // actions
     // ////////////////////////////////////////////////////////////////////////////
-    
+
     @Override
-    public OrderSet createActionOrderSetFor(ObjectSpecification spec, List<FacetedMethod>
actionFacetedMethodList) {
+    public OrderSet createActionOrderSetFor(final ObjectSpecification spec,
+        final List<FacetedMethod> actionFacetedMethodList) {
         if (LOG.isDebugEnabled()) {
-            LOG.debug("MemberLayoutArrangerUsingMemberOrderFacet: createAssociationOrderSetFor
" + spec.getFullIdentifier());
+            LOG.debug("MemberLayoutArrangerUsingMemberOrderFacet: createAssociationOrderSetFor
"
+                + spec.getFullIdentifier());
         }
 
         return DeweyOrderSet.createOrderSet(actionFacetedMethodList);
     }
-    
+
 }

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/MemberOrderComparator.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/MemberOrderComparator.java?rev=1096874&r1=1096873&r2=1096874&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/MemberOrderComparator.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/MemberOrderComparator.java
Tue Apr 26 19:48:45 2011
@@ -17,9 +17,8 @@
  *  under the License.
  */
 
+package org.apache.isis.core.metamodel.layout.memberorderfacet;
 
-package org.apache.isis.core.metamodel.layout.memberorderfacet;
-
 import java.util.Comparator;
 import java.util.StringTokenizer;
 
@@ -27,127 +26,127 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.FacetedMethod;
 import org.apache.isis.core.metamodel.facets.member.ordering.MemberOrderFacet;
 import org.apache.isis.core.metamodel.layout.OrderSet;
-
-
-/**
- * Compares by {@link MemberOrderFacet} obtained from each {@link FacetedMethod}).
- *
- * <p>
- * Will also compare {@link OrderSet}s; these are put after any {@link FacetedMethod}s. If
there is
- * more than one OrderSet then these are compared by an {@link OrderSetGroupNameComparator}.
- *
- * <p>
- * If there is no annotation on either member, then will compare the members by name instead.
- *
- * <p>
- * Can specify if requires that members are in the same (group) name.
- */
-public class MemberOrderComparator implements Comparator {
-
-    private final boolean ensureInSameGroup;
-
-    /**
-     *
-     * @param ensureGroupIsSame
-     */
-    public MemberOrderComparator(final boolean ensureGroupIsSame) {
-        this.ensureInSameGroup = ensureGroupIsSame;
-    }
-
-    private final MemberIdentifierComparator fallbackComparator = new MemberIdentifierComparator();
-    private final OrderSetGroupNameComparator orderSetComparator = new OrderSetGroupNameComparator(true);
-
-    public int compare(final Object o1, final Object o2) {
-        if (o1 instanceof FacetedMethod && o2 instanceof FacetedMethod) {
-            return compare((FacetedMethod) o1, (FacetedMethod) o2);
-        }
-        if (o1 instanceof OrderSet && o2 instanceof OrderSet) {
-            return orderSetComparator.compare((OrderSet)o1, (OrderSet)o2);
-        }
-        if (o1 instanceof FacetedMethod && o2 instanceof OrderSet) {
-            return -1; // members before OrderSets.
-        }
-        if (o1 instanceof OrderSet && o2 instanceof FacetedMethod) {
-            return +1; // members before OrderSets.
-        }
-        throw new IllegalArgumentException("can only compare MemberPeers and OrderSets");
-    }
-
-    public int compare(final FacetedMethod o1, final FacetedMethod o2) {
-        final MemberOrderFacet m1 = getMemberOrder(o1);
-        final MemberOrderFacet m2 = getMemberOrder(o2);
-
-        if (m1 == null && m2 == null) {
-            return fallbackComparator.compare(o1, o2);
-        }
-
-        if (m1 == null && m2 != null) {
-            return +1; // annotated before non-annotated
-        }
-        if (m1 != null && m2 == null) {
-            return -1; // annotated before non-annotated
-        }
-
-        if (ensureInSameGroup && !m1.name().equals(m2.name())) {
-            throw new IllegalArgumentException("Not in same group");
-        }
-
-        final StringTokenizer tokens1 = new StringTokenizer(m1.sequence(), ".", false);
-        final String[] components1 = new String[tokens1.countTokens()];
-        for (int i = 0; tokens1.hasMoreTokens(); i++) {
-            components1[i] = tokens1.nextToken();
-        }
-        final StringTokenizer tokens2 = new StringTokenizer(m2.sequence(), ".", false);
-        final String[] components2 = new String[tokens2.countTokens()];
-        for (int i = 0; tokens2.hasMoreTokens(); i++) {
-            components2[i] = tokens2.nextToken();
-        }
-
-        final int length1 = components1.length;
-        final int length2 = components2.length;
-
-        // shouldn't happen but just in case.
-        if (length1 == 0 && length2 == 0) {
-            return fallbackComparator.compare(o1, o2);
-        }
-
-        // continue to loop until we run out of components.
-        int n = 0;
-        while (true) {
-            final int length = n + 1;
-            // check if run out of components in either side
-            if (length1 < length && length2 >= length) {
-                return -1; // o1 before o2
-            }
-            if (length2 < length && length1 >= length) {
-                return +1; // o2 before o1
-            }
-            if (length1 < length && length2 < length) {
-                // run out of components
-                return fallbackComparator.compare(o1, o2);
-            }
-            // we have this component on each side
-
-            int componentCompare = 0;
-            try {
-                final Integer c1 = Integer.valueOf(components1[n]);
-                final Integer c2 = Integer.valueOf(components2[n]);
-                componentCompare = c1.compareTo(c2);
-            } catch (final NumberFormatException nfe) {
-                // not integers compare as strings}
-                componentCompare = components1[n].compareTo(components2[n]);
-            }
-
-            if (componentCompare != 0) {
-                return componentCompare;
-            }
-            // this component is the same; lets look at the next
-            n++;
-        }
-    }
-
-    private MemberOrderFacet getMemberOrder(final FacetHolder facetHolder) {
-        return facetHolder.getFacet(MemberOrderFacet.class);
-    }
-
-}
+
+/**
+ * Compares by {@link MemberOrderFacet} obtained from each {@link FacetedMethod}).
+ * 
+ * <p>
+ * Will also compare {@link OrderSet}s; these are put after any {@link FacetedMethod}s. If
there is more than one
+ * OrderSet then these are compared by an {@link OrderSetGroupNameComparator}.
+ * 
+ * <p>
+ * If there is no annotation on either member, then will compare the members by name instead.
+ * 
+ * <p>
+ * Can specify if requires that members are in the same (group) name.
+ */
+public class MemberOrderComparator implements Comparator {
+
+    private final boolean ensureInSameGroup;
+
+    /**
+     * 
+     * @param ensureGroupIsSame
+     */
+    public MemberOrderComparator(final boolean ensureGroupIsSame) {
+        this.ensureInSameGroup = ensureGroupIsSame;
+    }
+
+    private final MemberIdentifierComparator fallbackComparator = new MemberIdentifierComparator();
+    private final OrderSetGroupNameComparator orderSetComparator = new OrderSetGroupNameComparator(true);
+
+    @Override
+    public int compare(final Object o1, final Object o2) {
+        if (o1 instanceof FacetedMethod && o2 instanceof FacetedMethod) {
+            return compare((FacetedMethod) o1, (FacetedMethod) o2);
+        }
+        if (o1 instanceof OrderSet && o2 instanceof OrderSet) {
+            return orderSetComparator.compare((OrderSet) o1, (OrderSet) o2);
+        }
+        if (o1 instanceof FacetedMethod && o2 instanceof OrderSet) {
+            return -1; // members before OrderSets.
+        }
+        if (o1 instanceof OrderSet && o2 instanceof FacetedMethod) {
+            return +1; // members before OrderSets.
+        }
+        throw new IllegalArgumentException("can only compare MemberPeers and OrderSets");
+    }
+
+    public int compare(final FacetedMethod o1, final FacetedMethod o2) {
+        final MemberOrderFacet m1 = getMemberOrder(o1);
+        final MemberOrderFacet m2 = getMemberOrder(o2);
+
+        if (m1 == null && m2 == null) {
+            return fallbackComparator.compare(o1, o2);
+        }
+
+        if (m1 == null && m2 != null) {
+            return +1; // annotated before non-annotated
+        }
+        if (m1 != null && m2 == null) {
+            return -1; // annotated before non-annotated
+        }
+
+        if (ensureInSameGroup && !m1.name().equals(m2.name())) {
+            throw new IllegalArgumentException("Not in same group");
+        }
+
+        final StringTokenizer tokens1 = new StringTokenizer(m1.sequence(), ".", false);
+        final String[] components1 = new String[tokens1.countTokens()];
+        for (int i = 0; tokens1.hasMoreTokens(); i++) {
+            components1[i] = tokens1.nextToken();
+        }
+        final StringTokenizer tokens2 = new StringTokenizer(m2.sequence(), ".", false);
+        final String[] components2 = new String[tokens2.countTokens()];
+        for (int i = 0; tokens2.hasMoreTokens(); i++) {
+            components2[i] = tokens2.nextToken();
+        }
+
+        final int length1 = components1.length;
+        final int length2 = components2.length;
+
+        // shouldn't happen but just in case.
+        if (length1 == 0 && length2 == 0) {
+            return fallbackComparator.compare(o1, o2);
+        }
+
+        // continue to loop until we run out of components.
+        int n = 0;
+        while (true) {
+            final int length = n + 1;
+            // check if run out of components in either side
+            if (length1 < length && length2 >= length) {
+                return -1; // o1 before o2
+            }
+            if (length2 < length && length1 >= length) {
+                return +1; // o2 before o1
+            }
+            if (length1 < length && length2 < length) {
+                // run out of components
+                return fallbackComparator.compare(o1, o2);
+            }
+            // we have this component on each side
+
+            int componentCompare = 0;
+            try {
+                final Integer c1 = Integer.valueOf(components1[n]);
+                final Integer c2 = Integer.valueOf(components2[n]);
+                componentCompare = c1.compareTo(c2);
+            } catch (final NumberFormatException nfe) {
+                // not integers compare as strings}
+                componentCompare = components1[n].compareTo(components2[n]);
+            }
+
+            if (componentCompare != 0) {
+                return componentCompare;
+            }
+            // this component is the same; lets look at the next
+            n++;
+        }
+    }
+
+    private MemberOrderFacet getMemberOrder(final FacetHolder facetHolder) {
+        return facetHolder.getFacet(MemberOrderFacet.class);
+    }
+
+}

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/OrderSetGroupNameComparator.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/OrderSetGroupNameComparator.java?rev=1096874&r1=1096873&r2=1096874&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/OrderSetGroupNameComparator.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/OrderSetGroupNameComparator.java
Tue Apr 26 19:48:45 2011
@@ -17,41 +17,39 @@
  *  under the License.
  */
 
+package org.apache.isis.core.metamodel.layout.memberorderfacet;
 
-package org.apache.isis.core.metamodel.layout.memberorderfacet;
-
 import java.io.Serializable;
 import java.util.Comparator;
 
 import org.apache.isis.core.metamodel.layout.OrderSet;
 
-
-
-/**
- * Compares by (simple) group name of each {@link OrderSet}.
- *
- * <p>
- * Note that it only makes sense to use this comparator for {@link OrderSet}s that are known
to have the same
- * parent {@link OrderSet}s.
- */
-public class OrderSetGroupNameComparator implements Comparator<OrderSet>, Serializable
{
-
-    private static final long serialVersionUID = 1L;
-
-    public OrderSetGroupNameComparator(final boolean ensureInSameGroupPath) {
-        this.ensureInSameGroupPath = ensureInSameGroupPath;
-    }
-
-    private final boolean ensureInSameGroupPath;
-
-    public int compare(final OrderSet o1, final OrderSet o2) {
-        if (ensureInSameGroupPath && !o1.getGroupPath().equals(o2.getGroupPath()))
{
-            throw new IllegalArgumentException("OrderSets being compared do not have the
same group path");
-        }
-
-        final String groupName1 = o1.getGroupName();
-        final String groupName2 = o2.getGroupName();
-
-        return groupName1.compareTo(groupName2);
-    }
-}
+/**
+ * Compares by (simple) group name of each {@link OrderSet}.
+ * 
+ * <p>
+ * Note that it only makes sense to use this comparator for {@link OrderSet}s that are known
to have the same parent
+ * {@link OrderSet}s.
+ */
+public class OrderSetGroupNameComparator implements Comparator<OrderSet>, Serializable
{
+
+    private static final long serialVersionUID = 1L;
+
+    public OrderSetGroupNameComparator(final boolean ensureInSameGroupPath) {
+        this.ensureInSameGroupPath = ensureInSameGroupPath;
+    }
+
+    private final boolean ensureInSameGroupPath;
+
+    @Override
+    public int compare(final OrderSet o1, final OrderSet o2) {
+        if (ensureInSameGroupPath && !o1.getGroupPath().equals(o2.getGroupPath()))
{
+            throw new IllegalArgumentException("OrderSets being compared do not have the
same group path");
+        }
+
+        final String groupName1 = o1.getGroupName();
+        final String groupName2 = o2.getGroupName();
+
+        return groupName1.compareTo(groupName2);
+    }
+}

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/ordermethod/SimpleOrderSet.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/ordermethod/SimpleOrderSet.java?rev=1096874&r1=1096873&r2=1096874&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/ordermethod/SimpleOrderSet.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/ordermethod/SimpleOrderSet.java
Tue Apr 26 19:48:45 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.core.metamodel.layout.ordermethod;
 
 import java.util.List;
@@ -27,7 +26,6 @@ import org.apache.isis.core.commons.lang
 import org.apache.isis.core.metamodel.facets.FacetedMethod;
 import org.apache.isis.core.metamodel.layout.OrderSet;
 
-
 public class SimpleOrderSet extends OrderSet {
     public static SimpleOrderSet createOrderSet(final String order, final List<FacetedMethod>
members) {
         SimpleOrderSet set = new SimpleOrderSet(members);
@@ -67,11 +65,8 @@ public class SimpleOrderSet extends Orde
         parent = null;
     }
 
-    private SimpleOrderSet(
-            final SimpleOrderSet set,
-            final String groupName,
-            final String name,
-            final List<FacetedMethod> members) {
+    private SimpleOrderSet(final SimpleOrderSet set, final String groupName, final String
name,
+        final List<FacetedMethod> members) {
         super(groupName);
         parent = set;
         parent.addElement(this);
@@ -89,7 +84,7 @@ public class SimpleOrderSet extends Orde
     private void addAnyRemainingMember() {
         for (int i = 0; i < members.size(); i++) {
             if (members.get(i) != null) {
-                FacetedMethod member = members.get(i);
+                final FacetedMethod member = members.get(i);
                 addElement(member);
             }
         }
@@ -116,4 +111,3 @@ public class SimpleOrderSet extends Orde
     }
 
 }
-



Mime
View raw message