01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.internal.dialogs;
11:
12: import org.eclipse.jface.viewers.IStructuredContentProvider;
13: import org.eclipse.jface.viewers.Viewer;
14: import org.eclipse.ui.IPerspectiveRegistry;
15:
16: public class PerspContentProvider implements IStructuredContentProvider {
17:
18: /**
19: * Create a new <code>PerspContentProvider</code>.
20: */
21: public PerspContentProvider() {
22: //no-op
23: }
24:
25: /*
26: * (non-Javadoc)
27: *
28: * @see org.eclipse.jface.viewers.IContentProvider#dispose()
29: */
30: public void dispose() {
31: //no-op
32: }
33:
34: /*
35: * (non-Javadoc)
36: *
37: * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
38: */
39: public Object[] getElements(Object element) {
40: if (element instanceof IPerspectiveRegistry) {
41: return ((IPerspectiveRegistry) element).getPerspectives();
42: }
43: return null;
44: }
45:
46: /*
47: * (non-Javadoc)
48: *
49: * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
50: * java.lang.Object, java.lang.Object)
51: */
52: public void inputChanged(Viewer viewer, Object oldInput,
53: Object newInput) {
54: //no-op
55: }
56: }
|