org.netbeans.spi.editor.codegen
Interface CodeGenerator.Factory
- Enclosing interface:
- CodeGenerator
@MimeLocation(subfolderName="CodeGenerators")
public static interface CodeGenerator.Factory
Factory creating code generators.
The factory instances are looked up
by the MimeLookup
so they
should be registered in an xml-layer in
Editors/<mime-type>/CodeGenerators directory.
- Since:
- 1.8
create
List<? extends CodeGenerator> create(Lookup context)
- Creates code generators valid for the particular context.
- Parameters:
context
- Contains an instance of
JTextComponent
by default. Additonal content
could be added by the CodeGeneratorContextProvider
registered
for the mime type.
- Returns:
- the list of created code generators. An empty list should be
returned if no generator could be created in the particular context.
- Since:
- 1.8