01: package org.drools.eclipse.debug;
02:
03: import java.util.List;
04:
05: import org.drools.eclipse.debug.AuditView.Event;
06:
07: public class AuditViewContentProvider extends
08: DroolsDebugViewContentProvider {
09:
10: protected String getEmptyString() {
11: return "The selected audit log is empty.";
12: }
13:
14: public Object[] getChildren(Object obj) {
15: if (obj instanceof List) {
16: return ((List) obj).toArray();
17: }
18: if (obj instanceof Event) {
19: return ((Event) obj).getSubEvents();
20: }
21: return new Object[0];
22: }
23:
24: public boolean hasChildren(Object obj) {
25: if (obj instanceof Event) {
26: return ((Event) obj).hasSubEvents();
27: }
28: return false;
29: }
30: }
|