001: /*******************************************************************************
002: * Copyright (c) 2003, 2006 IBM Corporation and others.
003: * All rights reserved. This program and the accompanying materials
004: * are made available under the terms of the Eclipse Public License v1.0
005: * which accompanies this distribution, and is available at
006: * http://www.eclipse.org/legal/epl-v10.html
007: *
008: * Contributors:
009: * IBM Corporation - initial API and implementation
010: *******************************************************************************/package org.eclipse.ui.internal.navigator.extensions;
011:
012: import org.eclipse.jface.viewers.Viewer;
013: import org.eclipse.ui.IMemento;
014: import org.eclipse.ui.navigator.ICommonContentExtensionSite;
015: import org.eclipse.ui.navigator.ICommonContentProvider;
016:
017: /**
018: * @since 3.2
019: */
020: public final class SkeletonTreeContentProvider implements
021: ICommonContentProvider {
022:
023: /**
024: * The initialized singleton instance.
025: */
026: public static final SkeletonTreeContentProvider INSTANCE = new SkeletonTreeContentProvider();
027:
028: private static final Object[] NO_CHILDREN = new Object[0];
029:
030: private SkeletonTreeContentProvider() {
031: super ();
032: }
033:
034: /*
035: * (non-Javadoc)
036: *
037: * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
038: */
039: public Object[] getChildren(Object parentElement) {
040:
041: return NO_CHILDREN;
042: }
043:
044: /*
045: * (non-Javadoc)
046: *
047: * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
048: */
049: public Object getParent(Object element) {
050:
051: return null;
052: }
053:
054: /*
055: * (non-Javadoc)
056: *
057: * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
058: */
059: public boolean hasChildren(Object element) {
060: return false;
061: }
062:
063: /*
064: * (non-Javadoc)
065: *
066: * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
067: */
068: public Object[] getElements(Object inputElement) {
069:
070: return NO_CHILDREN;
071: }
072:
073: /*
074: * (non-Javadoc)
075: *
076: * @see org.eclipse.jface.viewers.IContentProvider#dispose()
077: */
078: public void dispose() {
079: }
080:
081: /*
082: * (non-Javadoc)
083: *
084: * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
085: * java.lang.Object, java.lang.Object)
086: */
087: public void inputChanged(Viewer viewer, Object oldInput,
088: Object newInput) {
089: }
090:
091: public void restoreState(IMemento aMemento) {
092:
093: }
094:
095: public void saveState(IMemento aMemento) {
096:
097: }
098:
099: public void init(ICommonContentExtensionSite aConfig) {
100:
101: }
102:
103: }
|