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
- describes the request that is about to be performed@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 June 4 2024. | Copyright © 2017-2024 Apache Software Foundation. All Rights Reserved.