public abstract class CreateFromTemplateHandler extends Object
FileBuilder.build()
and handle them themselves. The NetBeans IDE provides default
implementation that allows use of Freemarker templating engine.
Read more in the howto document.
An implementation of CreateHandler should honor CreateDescriptor.hasFreeExtension()
and
CreateDescriptor.isPreformatted()
.Constructor and Description |
---|
CreateFromTemplateHandler() |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
accept(CreateDescriptor desc)
Method that allows a handler to reject a file.
|
protected abstract List<FileObject> |
createFromTemplate(CreateDescriptor desc)
Handles the creation of new files.
|
protected abstract boolean accept(CreateDescriptor desc)
FileBuilder.createFromTemplate(org.openide.filesystems.FileObject, org.openide.filesystems.FileObject, java.lang.String, java.util.Map, org.netbeans.api.templates.FileBuilder.Mode)
is going to take place.desc
- @NonNull protected abstract List<FileObject> createFromTemplate(CreateDescriptor desc) throws IOException
desc
- command objects that describes the file creation requestIOException
- if something goes wrong with I/OBuilt on December 31 2015. | Portions Copyright 1997-2015 Oracle. All rights reserved.