KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > search > internal > ui > SearchResultContentProvider


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.search.internal.ui;
12
13 import java.util.ArrayList JavaDoc;
14
15 import org.eclipse.jface.viewers.IStructuredContentProvider;
16 import org.eclipse.jface.viewers.Viewer;
17
18 /**
19  * @deprecated old search
20  */

21 class SearchResultContentProvider implements IStructuredContentProvider {
22     
23     private static final Object JavaDoc[] fgEmptyArray= new Object JavaDoc[0];
24     
25     public void inputChanged(Viewer viewer, Object JavaDoc oldInput, Object JavaDoc newInput) {
26         // Do nothing since the viewer listens to resource deltas
27
}
28     
29     public void dispose() {
30     }
31     
32     public boolean isDeleted(Object JavaDoc element) {
33         return false;
34     }
35     
36     public Object JavaDoc[] getElements(Object JavaDoc element) {
37         if (element instanceof ArrayList JavaDoc)
38             return ((ArrayList JavaDoc)element).toArray();
39         return fgEmptyArray;
40     }
41 }
42
Popular Tags