1 19 20 package org.netbeans.lib.editor.codetemplates; 21 22 import org.netbeans.lib.editor.codetemplates.api.CodeTemplate; 23 import org.netbeans.lib.editor.codetemplates.api.CodeTemplateManager; 24 import org.netbeans.lib.editor.codetemplates.spi.CodeTemplateProcessor; 25 26 27 33 34 public abstract class CodeTemplateApiPackageAccessor { 35 36 private static CodeTemplateApiPackageAccessor INSTANCE; 37 38 public static CodeTemplateApiPackageAccessor get() { 39 return INSTANCE; 40 } 41 42 48 public static void register(CodeTemplateApiPackageAccessor accessor) { 49 if (INSTANCE != null) { 50 throw new IllegalStateException ("Already registered"); } 52 INSTANCE = accessor; 53 } 54 55 public abstract CodeTemplateManager createCodeTemplateManager( 56 CodeTemplateManagerOperation operation); 57 58 public abstract CodeTemplateManagerOperation getOperation( 59 CodeTemplateManager manager); 60 61 public abstract CodeTemplateManagerOperation getOperation( 62 CodeTemplate codeTemplate); 63 64 public abstract CodeTemplate createCodeTemplate( 65 CodeTemplateManagerOperation managerOperation, 66 String abbreviation, String description, String parametrizedText); 67 68 } 69 | Popular Tags |