1 package com.quantum.view.bookmark;
3 import org.eclipse.jface.viewers.ITreeContentProvider;
4 import org.eclipse.jface.viewers.Viewer;
6 public class BookmarkContentProvider implements ITreeContentProvider {
8 public Object[] getChildren(Object element) {
9 if (element instanceof TreeNode) {
10 TreeNode node = (TreeNode) element;
11 return node.getChildren();
13 return BookmarkListNode.EMPTY_ARRAY;
15 public Object[] getElements(Object inputElement) {
16 return getChildren(inputElement);
19 public Object getParent(Object element) {
20 if (element instanceof TreeNode) {
21 TreeNode node = (TreeNode) element;
22 return node.getParent();
27 public boolean hasChildren(Object element) {
28 if (element instanceof TreeNode) {
29 TreeNode node = (TreeNode) element;
30 return node.hasChildren();
35 public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
38 public void dispose() {