Package eu.simuline.m2latex.core
Class AbstractLatexProcessor
- java.lang.Object
-
- eu.simuline.m2latex.core.AbstractLatexProcessor
-
- Direct Known Subclasses:
LatexPreProcessor,LatexProcessor
abstract class AbstractLatexProcessor extends Object
Describe class AbstractLatexProcessor here. Created: Thu Nov 17 12:29:36 2016- Version:
- 1.0
- Author:
- Ernst Reissner
-
-
Field Summary
Fields Modifier and Type Field Description protected CommandExecutorexecutorprotected TexFileUtilsfileUtilsprotected LogWrapperlogprotected Settingssettings(package private) static StringSUFFIX_FLS(package private) static StringSUFFIX_LOG(package private) static StringSUFFIX_PDF(package private) static StringSUFFIX_VOID
-
Constructor Summary
Constructors Constructor Description AbstractLatexProcessor(Settings settings, CommandExecutor executor, LogWrapper log, TexFileUtils fileUtils)Creates a newAbstractLatexProcessorinstance.
-
Method Summary
Modifier and Type Method Description protected static String[]buildArguments(String options, File file)Returns an array of strings, each entry with a single option given byoptionsexcept the last one which is the name offile.protected booleanhasErrsWarns(File logFile, String pattern)Logging: WFU03 cannot close WAP04 iflogFileis not readable.protected voidlogErrs(File logFile, String command, String pattern)Logs if an error occurred runningcommandby detecting that the log filelogFilehas not been created or by detecting the error patternpatterninlogFile.protected voidlogWarn(File logFile, String command)Logging: WAP03 Runningcommandemitted warnings.protected voidlogWarns(File logFile, String command, String pattern)Logs if a warning occurred runningcommandby detecting the warning patternpatterninlogFile.protected booleanupdate(File source, File target)
-
-
-
Field Detail
-
SUFFIX_FLS
static final String SUFFIX_FLS
- See Also:
- Constant Field Values
-
SUFFIX_LOG
static final String SUFFIX_LOG
- See Also:
- Constant Field Values
-
SUFFIX_PDF
static final String SUFFIX_PDF
- See Also:
- Constant Field Values
-
SUFFIX_VOID
static final String SUFFIX_VOID
- See Also:
- Constant Field Values
-
settings
protected final Settings settings
-
executor
protected final CommandExecutor executor
-
log
protected final LogWrapper log
-
fileUtils
protected final TexFileUtils fileUtils
-
-
Constructor Detail
-
AbstractLatexProcessor
public AbstractLatexProcessor(Settings settings, CommandExecutor executor, LogWrapper log, TexFileUtils fileUtils)
Creates a newAbstractLatexProcessorinstance.
-
-
Method Detail
-
logErrs
protected void logErrs(File logFile, String command, String pattern)
Logs if an error occurred runningcommandby detecting that the log filelogFilehas not been created or by detecting the error patternpatterninlogFile.Logging:
- EAP01 Running
commandfailed. For details... - EAP02 Running
commandfailed. No log file - WAP04 if
logFileis not readable. - WFU03 cannot close
- See Also:
logWarns(File, String, String)
- EAP01 Running
-
logWarns
protected void logWarns(File logFile, String command, String pattern)
Logs if a warning occurred runningcommandby detecting the warning patternpatterninlogFile. IflogFilethen an error occurred making detection of warnings obsolete.Logging:
- WAP03 Running
commandemitted warnings. - WAP04 if
logFileis not readable. - WFU03 cannot close
- See Also:
logErrs(File, String, String)
- WAP03 Running
-
logWarn
protected void logWarn(File logFile, String command)
Logging: WAP03 Running
commandemitted warnings.
-
hasErrsWarns
protected boolean hasErrsWarns(File logFile, String pattern)
Logging:- WFU03 cannot close
- WAP04 if
logFileis not readable.
-
buildArguments
protected static String[] buildArguments(String options, File file)
Returns an array of strings, each entry with a single option given byoptionsexcept the last one which is the name offile.- Parameters:
options- the options string. The individual options are expected to be separated by a single blank.file- the file argument- Returns:
- An array of strings:
The 0th entry is the file name,
The others, if
optionsis not empty, are the options inoptions.
-
-