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