KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > navigator > extensions > SkeletonTreeContentProvider


1 /*******************************************************************************
2  * Copyright (c) 2003, 2006 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.ui.internal.navigator.extensions;
12
13 import org.eclipse.jface.viewers.Viewer;
14 import org.eclipse.ui.IMemento;
15 import org.eclipse.ui.navigator.ICommonContentExtensionSite;
16 import org.eclipse.ui.navigator.ICommonContentProvider;
17
18 /**
19  * @since 3.2
20  */

21 public final class SkeletonTreeContentProvider implements ICommonContentProvider {
22
23     /**
24      * The initialized singleton instance.
25      */

26     public static final SkeletonTreeContentProvider INSTANCE = new SkeletonTreeContentProvider();
27
28     private static final Object JavaDoc[] NO_CHILDREN = new Object JavaDoc[0];
29
30     private SkeletonTreeContentProvider() {
31         super();
32     }
33
34     /*
35      * (non-Javadoc)
36      *
37      * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
38      */

39     public Object JavaDoc[] getChildren(Object JavaDoc parentElement) {
40
41         return NO_CHILDREN;
42     }
43
44     /*
45      * (non-Javadoc)
46      *
47      * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
48      */

49     public Object JavaDoc getParent(Object JavaDoc element) {
50
51         return null;
52     }
53
54     /*
55      * (non-Javadoc)
56      *
57      * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
58      */

59     public boolean hasChildren(Object JavaDoc element) {
60         return false;
61     }
62
63     /*
64      * (non-Javadoc)
65      *
66      * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
67      */

68     public Object JavaDoc[] getElements(Object JavaDoc inputElement) {
69
70         return NO_CHILDREN;
71     }
72
73     /*
74      * (non-Javadoc)
75      *
76      * @see org.eclipse.jface.viewers.IContentProvider#dispose()
77      */

78     public void dispose() {
79     }
80
81     /*
82      * (non-Javadoc)
83      *
84      * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
85      * java.lang.Object, java.lang.Object)
86      */

87     public void inputChanged(Viewer viewer, Object JavaDoc oldInput, Object JavaDoc newInput) {
88     }
89
90     public void restoreState(IMemento aMemento) {
91
92     }
93
94     public void saveState(IMemento aMemento) {
95
96     }
97
98     public void init(ICommonContentExtensionSite aConfig) {
99
100     }
101
102 }
103
Popular Tags