X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=eclipse%2Fplugins%2Forg.argeo.slc.client.ui%2Fsrc%2Forg%2Fargeo%2Fslc%2Fclient%2Fui%2Fviews%2FResultListView.java;h=e86459ebc798d1734afbfffdf11eaaf91c969d3d;hb=8a70a3ad35fda3a586149a0144659a06b8acd2a4;hp=b4c0f04b9c35c4be3ca9361911994576249c2450;hpb=cc87b3aaaf8dbd29fb985f8f01cf87c541a082fe;p=gpl%2Fargeo-slc.git diff --git a/eclipse/plugins/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/views/ResultListView.java b/eclipse/plugins/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/views/ResultListView.java index b4c0f04b9..e86459ebc 100644 --- a/eclipse/plugins/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/views/ResultListView.java +++ b/eclipse/plugins/org.argeo.slc.client.ui/src/org/argeo/slc/client/ui/views/ResultListView.java @@ -1,5 +1,7 @@ package org.argeo.slc.client.ui.views; +import java.util.List; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.argeo.slc.core.test.tree.ResultAttributes; @@ -61,7 +63,7 @@ public class ResultListView extends ViewPart { return table; } - protected class ViewContentProvider implements IStructuredContentProvider { + protected static class ViewContentProvider implements IStructuredContentProvider { // private List lst; public void inputChanged(Viewer arg0, Object arg1, Object arg2) { @@ -74,12 +76,19 @@ public class ResultListView extends ViewPart { public void dispose() { } + @SuppressWarnings("unchecked") public Object[] getElements(Object obj) { // if (lst == null) // return new Object[0]; // else // return lst.toArray(); - return testResultCollectionDao.listResultAttributes(null).toArray(); + if (obj instanceof List) { + return ((List) obj).toArray(); + } else { + return new Object[0]; + } + // return + // testResultCollectionDao.listResultAttributes(null).toArray(); } } @@ -108,11 +117,12 @@ public class ResultListView extends ViewPart { public void retrieveResults() { try { - // List lst = testResultCollectionDao - // .listResultAttributes(null); - // log.info("result count: " + lst.size()); - // viewer.setInput(lst); - viewer.refresh(); + List lst = testResultCollectionDao + .listResultAttributes(null); + if (log.isTraceEnabled()) + log.trace("Result attributes count: " + lst.size()); + viewer.setInput(lst); + // viewer.refresh(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace();