1 11 package org.eclipse.jdt.internal.ui.search; 12 13 import org.eclipse.jface.viewers.IStructuredContentProvider; 14 import org.eclipse.jface.viewers.Viewer; 15 16 public abstract class JavaSearchContentProvider implements IStructuredContentProvider { 17 protected final Object [] EMPTY_ARR= new Object [0]; 18 19 private JavaSearchResult fResult; 20 private JavaSearchResultPage fPage; 21 22 JavaSearchContentProvider(JavaSearchResultPage page) { 23 fPage= page; 24 } 25 26 public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { 27 initialize((JavaSearchResult) newInput); 28 29 } 30 31 protected void initialize(JavaSearchResult result) { 32 fResult= result; 33 } 34 35 public abstract void elementsChanged(Object [] updatedElements); 36 public abstract void clear(); 37 38 public void dispose() { 39 } 41 42 JavaSearchResultPage getPage() { 43 return fPage; 44 } 45 46 JavaSearchResult getSearchResult() { 47 return fResult; 48 } 49 50 } 51 | Popular Tags |