01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.runtime.logview;
11:
12: import org.eclipse.jface.viewers.ITreeContentProvider;
13: import org.eclipse.jface.viewers.Viewer;
14:
15: public class LogViewContentProvider implements ITreeContentProvider {
16: private LogView logView;
17:
18: public LogViewContentProvider(LogView logView) {
19: this .logView = logView;
20: }
21:
22: public void dispose() {
23: }
24:
25: public Object[] getChildren(Object element) {
26: return ((LogEntry) element).getChildren(element);
27: }
28:
29: public Object[] getElements(Object element) {
30: return logView.getLogs();
31: }
32:
33: public Object getParent(Object element) {
34: return ((LogEntry) element).getParent(element);
35: }
36:
37: public boolean hasChildren(Object element) {
38: return ((LogEntry) element).hasChildren();
39: }
40:
41: public void inputChanged(Viewer viewer, Object oldInput,
42: Object newInput) {
43: }
44:
45: public boolean isDeleted(Object element) {
46: return false;
47: }
48: }
|