1 11 package org.eclipse.ltk.internal.ui.refactoring; 12 13 import org.eclipse.jface.viewers.ITreeContentProvider; 14 import org.eclipse.jface.viewers.Viewer; 15 16 20 class ChangeElementContentProvider implements ITreeContentProvider { 21 22 25 public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { 26 } 28 29 32 public Object [] getChildren(Object o) { 33 PreviewNode element= (PreviewNode)o; 34 return element.getChildren(); 35 } 36 37 40 public Object getParent(Object element){ 41 return ((PreviewNode)element).getParent(); 42 } 43 44 47 public boolean hasChildren(Object element){ 48 Object [] children= getChildren(element); 49 return children != null && children.length > 0; 50 } 51 52 55 public void dispose(){ 56 } 57 58 61 public Object [] getElements(Object element){ 62 return getChildren(element); 63 } 64 } 65 | Popular Tags |