X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=plugins%2Forg.argeo.slc.client.ui%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fclient%2Fui%2Fmodel%2FResultItemsComparator.java;h=30e7baa44a81f062cdd1f011abbfa575b07a4842;hb=fd6362dda19f29ca746ecefae779694e6cb43dd4;hp=d36a9ca0c387c23708a168d3114b661cce60909d;hpb=e797ab69fbb9d6a4abe901155108ab8155ceba5b;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 d36a9ca0c..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