public abstract static class FileEntry.Format extends FileEntry
FileEntry.Format.createFormat(org.openide.filesystems.FileObject, java.lang.String, java.lang.String)
and return a valid text format that
will be used for converting the lines of the original file
to lines in the newly created one.FileEntry.Folder, FileEntry.Format, FileEntry.Numb
Constructor and Description |
---|
Format(MultiDataObject obj,
FileObject fo)
Create a new entry initially attached to a given file object.
|
Modifier and Type | Method and Description |
---|---|
protected abstract Format |
createFormat(FileObject target,
String n,
String e)
Provide a suitable format for
substitution of lines.
|
FileObject |
createFromTemplate(FileObject f,
String name)
Called when the entry is to be created from a template.
|
equals, getDataObject, getFile, hashCode, isImportant, isLocked, takeLock, writeReplace
public Format(MultiDataObject obj, FileObject fo)
obj
- the data object this entry belongs tofo
- the file object for the entrypublic FileObject createFromTemplate(FileObject f, String name) throws IOException
MultiDataObject.Entry
FileObject
,
or do nothing (if it cannot be copied).createFromTemplate
in class FileEntry
f
- the folder to create this entry inname
- the new name to useFileObject
or null
if it cannot be copiedIOException
- when the operation failsprotected abstract Format createFormat(FileObject target, String n, String e)
target
- the target folder of the installationn
- the name the file will havee
- the extension the file will have