KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > dialogs > PerspContentProvider


1 /*******************************************************************************
2  * Copyright (c) 2000, 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.dialogs;
12
13 import org.eclipse.jface.viewers.IStructuredContentProvider;
14 import org.eclipse.jface.viewers.Viewer;
15 import org.eclipse.ui.IPerspectiveRegistry;
16
17 public class PerspContentProvider implements IStructuredContentProvider {
18
19     /**
20      * Create a new <code>PerspContentProvider</code>.
21      */

22     public PerspContentProvider() {
23         //no-op
24
}
25
26     /*
27      * (non-Javadoc)
28      *
29      * @see org.eclipse.jface.viewers.IContentProvider#dispose()
30      */

31     public void dispose() {
32         //no-op
33
}
34
35     /*
36      * (non-Javadoc)
37      *
38      * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
39      */

40     public Object JavaDoc[] getElements(Object JavaDoc element) {
41         if (element instanceof IPerspectiveRegistry) {
42             return ((IPerspectiveRegistry) element).getPerspectives();
43         }
44         return null;
45     }
46
47     /*
48      * (non-Javadoc)
49      *
50      * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
51      * java.lang.Object, java.lang.Object)
52      */

53     public void inputChanged(Viewer viewer, Object JavaDoc oldInput, Object JavaDoc newInput) {
54         //no-op
55
}
56 }
57
Popular Tags