X-Git-Url: http://git.phpeclipse.com diff --git a/archive/net.sourceforge.phpeclipse.quantum.sql/src/com/quantum/view/bookmark/BookmarkContentProvider.java b/archive/net.sourceforge.phpeclipse.quantum.sql/src/com/quantum/view/bookmark/BookmarkContentProvider.java new file mode 100644 index 0000000..2335110 --- /dev/null +++ b/archive/net.sourceforge.phpeclipse.quantum.sql/src/com/quantum/view/bookmark/BookmarkContentProvider.java @@ -0,0 +1,40 @@ +package com.quantum.view.bookmark; + +import org.eclipse.jface.viewers.ITreeContentProvider; +import org.eclipse.jface.viewers.Viewer; + +public class BookmarkContentProvider implements ITreeContentProvider { + + public Object[] getChildren(Object element) { + if (element instanceof TreeNode) { + TreeNode node = (TreeNode) element; + return node.getChildren(); + } + return BookmarkListNode.EMPTY_ARRAY; + } + public Object[] getElements(Object inputElement) { + return getChildren(inputElement); + } + + public Object getParent(Object element) { + if (element instanceof TreeNode) { + TreeNode node = (TreeNode) element; + return node.getParent(); + } + return null; + } + + public boolean hasChildren(Object element) { + if (element instanceof TreeNode) { + TreeNode node = (TreeNode) element; + return node.hasChildren(); + } + return false; + } + + public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { + } + + public void dispose() { + } +}