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