KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > search > internal > ui > text > FileContentProvider


1 /*******************************************************************************
2  * Copyright (c) 2000, 2004 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.search.internal.ui.text;
12 import org.eclipse.jface.viewers.IStructuredContentProvider;
13 import org.eclipse.jface.viewers.Viewer;
14
15 import org.eclipse.search.ui.text.AbstractTextSearchResult;
16 public abstract class FileContentProvider implements IStructuredContentProvider {
17     protected final Object JavaDoc[] EMPTY_ARR= new Object JavaDoc[0];
18     protected AbstractTextSearchResult fResult;
19     public void dispose() {
20         // nothing to do
21
}
22     public void inputChanged(Viewer viewer, Object JavaDoc oldInput, Object JavaDoc newInput) {
23         if (newInput instanceof FileSearchResult) {
24             initialize((FileSearchResult) newInput);
25         }
26     }
27     protected void initialize(AbstractTextSearchResult result) {
28         fResult= result;
29     }
30     
31     public abstract void elementsChanged(Object JavaDoc[] updatedElements);
32     public abstract void clear();
33 }
34
Popular Tags