added button to start tests.
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.quantum.sql / src / com / quantum / view / bookmark / BookmarkContentProvider.java
1 package com.quantum.view.bookmark;
2
3 import org.eclipse.jface.viewers.ITreeContentProvider;
4 import org.eclipse.jface.viewers.Viewer;
5
6 public class BookmarkContentProvider implements ITreeContentProvider {
7     
8         public Object[] getChildren(Object element) {
9                 if (element instanceof TreeNode) {
10                         TreeNode node = (TreeNode) element;
11                         return node.getChildren();
12                 }
13                 return BookmarkListNode.EMPTY_ARRAY;
14         }
15         public Object[] getElements(Object inputElement) {
16                 return getChildren(inputElement);
17         }
18
19         public Object getParent(Object element) {
20                 if (element instanceof TreeNode) {
21                         TreeNode node = (TreeNode) element;
22                         return node.getParent();
23                 }
24                 return null;
25         }
26
27         public boolean hasChildren(Object element) {
28                 if (element instanceof TreeNode) {
29                         TreeNode node = (TreeNode) element;
30                         return node.hasChildren();
31                 }
32                 return false;
33         }
34
35         public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
36         }
37         
38         public void dispose() {
39         }
40 }