1 11 package org.eclipse.jface.text.templates; 12 13 import java.util.Iterator ; 14 import java.util.LinkedHashMap ; 15 import java.util.Map ; 16 17 27 public class ContextTypeRegistry { 28 29 30 private final Map fContextTypes= new LinkedHashMap (); 31 32 38 public void addContextType(TemplateContextType contextType) { 39 fContextTypes.put(contextType.getId(), contextType); 40 } 41 42 48 public TemplateContextType getContextType(String id) { 49 return (TemplateContextType) fContextTypes.get(id); 50 } 51 52 57 public Iterator contextTypes() { 58 return fContextTypes.values().iterator(); 59 } 60 } 61 | Popular Tags |