1 11 package org.eclipse.jdt.internal.ui.text.template.preferences; 12 13 import org.eclipse.jface.viewers.IStructuredContentProvider; 14 import org.eclipse.jface.viewers.Viewer; 15 16 import org.eclipse.jdt.internal.corext.template.java.TemplateSet; 17 18 19 public class TemplateContentProvider implements IStructuredContentProvider { 20 21 private TemplateSet fTemplateSet; 22 23 26 public Object [] getElements(Object input) { 27 return fTemplateSet.getTemplates(); 28 } 29 30 33 public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { 34 fTemplateSet= (TemplateSet) newInput; 35 } 36 37 40 public void dispose() { 41 fTemplateSet= null; 42 } 43 44 } 45 46 | Popular Tags |