net.sourceforge.plantuml.SourceFileReaderHardFile Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plantuml-mit Show documentation
Show all versions of plantuml-mit Show documentation
PlantUML is a component that allows to quickly write diagrams from text.
// THIS FILE HAS BEEN GENERATED BY A PREPROCESSOR.
package net.sourceforge.plantuml;
import java.io.File;
import java.io.IOException;
import java.util.List;
import net.sourceforge.plantuml.file.SuggestedFile;
import net.sourceforge.plantuml.preproc.Defines;
import net.sourceforge.plantuml.security.SFile;
public class SourceFileReaderHardFile extends SourceFileReaderAbstract implements ISourceFileReader {
// ::remove file when __CORE__
// ::remove file when __HAXE__
private final File outputFile;
public SourceFileReaderHardFile(Defines defines, final File file, File outputFile, List config,
String charset, FileFormatOption fileFormatOption) throws IOException {
super(file, fileFormatOption, defines, config, charset);
this.outputFile = outputFile;
FileSystem.getInstance().setCurrentDir(SFile.fromFile(file.getAbsoluteFile().getParentFile()));
}
@Override
protected SuggestedFile getSuggestedFile(BlockUml blockUml) {
final SuggestedFile suggested = SuggestedFile.fromOutputFile(outputFile, getFileFormatOption().getFileFormat());
return suggested;
}
}