X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;ds=sidebyside;f=plugins%2Forg.argeo.slc.client.ui%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fclient%2Fui%2Fmodel%2FResultItemsComparator.java;h=30e7baa44a81f062cdd1f011abbfa575b07a4842;hb=018795e1c7fb82445c43dcb28fdc515e8cb624ac;hp=8ea293af1dcbea39d0d5172b1d32c0f0f7226533;hpb=78a1f1f21b5785919ffe25ddb9baf12aadff5f37;p=gpl%2Fargeo-slc.git diff --git a/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/model/ResultItemsComparator.java b/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/model/ResultItemsComparator.java index 8ea293af1..30e7baa44 100644 --- a/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/model/ResultItemsComparator.java +++ b/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/model/ResultItemsComparator.java @@ -72,11 +72,24 @@ public class ResultItemsComparator extends ViewerComparator { } catch (RepositoryException e) { throw new SlcException("Unable to compare date created", e); } - } else - // only remaining objects for the time being - // NT_UNSTRUCTURED that display all result tree structures - // We want the newest folders first - result = super.compare(viewer, e1, e2) * -1; + } else if (e1 instanceof ParentNodeFolder + && e2 instanceof ParentNodeFolder) { + try { + Node an = ((ParentNodeFolder) e1).getNode(); + // under my Result + if (an.isNodeType(SlcTypes.SLC_MY_RESULT_ROOT_FOLDER) + || an.isNodeType(SlcTypes.SLC_RESULT_FOLDER)) { + result = super.compare(viewer, e1, e2); + } else { + // only remaining objects for the time being + // NT_UNSTRUCTURED that display all result tree structures + // We want the newest folders first + result = super.compare(viewer, e1, e2) * -1; + } + } catch (RepositoryException e) { + throw new SlcException("Unable to compare date created", e); + } + } return result; } -} +} \ No newline at end of file