public abstract class AbstractI18nParserMojo extends AbstractI18nMojo implements I18nParserConfiguration
| Modifier and Type | Field and Description |
|---|---|
protected String |
acceptKeyFormat
A regex pattern to accept incoming keys.
|
protected Pattern |
acceptPattern |
protected boolean |
backupGetter
Flag to save previous getter in a backup before doing parsing.
|
protected File |
cp
Build directory (used to know if files in sources are up-to-date).
|
protected I18nSourceEntry[] |
entries
Source entries (src+includes+excludes) to process.
|
protected boolean |
force
To force reparse of all sources.
|
protected org.nuiton.io.SortedProperties |
oldLanguage |
protected org.nuiton.io.SortedProperties |
oldParser |
protected boolean |
showTouchedFiles
Flag to display touched files while parsing.
|
protected long |
t0 |
protected boolean |
treateDefaultEntry
To treat default entry offered by the mojo.
|
artifactId, bundles, encoding, genSrc, locales, out, project, silent, src, strictMode, verbose| Constructor and Description |
|---|
AbstractI18nParserMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addDefaultEntry()
Add the default entry to entries given in configuration.
|
protected void |
doAction() |
protected abstract File |
getDefaultBasedir() |
protected abstract String[] |
getDefaultExcludes() |
protected abstract String[] |
getDefaultIncludes() |
static String |
getLogEntry(String msg,
int nbFiles,
long time,
long all)
Construit une chaine de log formatée.
|
protected abstract String |
getOutGetter() |
org.nuiton.io.SortedProperties |
getResult() |
void |
init() |
boolean |
isForce() |
boolean |
isShowTouchedFiles() |
boolean |
isStrictMode() |
abstract FileParser |
newFileParser(Pattern acceptPattern) |
abstract org.nuiton.io.FileUpdater |
newFileUpdater(SourceEntry entry) |
protected boolean |
onEnterEntry(I18nSourceEntry entry) |
protected void |
saveGetterFile()
Save the result in the getter file.
|
addGetter, backupFile, checkBundle, checkPackaging, getArtifactId, getBackupFile, getEncoding, getGetterFile, getI18nFile, getProject, isSilent, isVerbose, needGeneration, setEncoding, setProject, setVerboseacceptPackaging, addCompileSourceRoots, addDirectoryToUrlsList, addResourceDir, addTestCompileSourceRoots, addTestResourceDir, addUrlToUrlsList, afterExecute, checkEncoding, checkResource, checkRunOnceDone, checkSkip, copyFile, createDirectoryIfNecessary, createNewFile, deleteFile, execute, getFileFromBasedir, getFilesToTreate, getFilesToTreateForRoots, getRootProject, getTemplate, hasClassPath, initClassLoader, isExecutionRoot, isFileNewerThanPomFile, rejectPackaging, removeCompileSourceRoots, removeTestCompileSourceRoots, renameFile, writeFilegetLog, getPluginContext, setLog, setPluginContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLog, isSilent, isVerbose@Parameter(property="i18n.cp",
defaultValue="${basedir}/target/classes")
protected File cp
@Parameter(property="i18n.treateDefaultEntry",
defaultValue="true")
protected boolean treateDefaultEntry
@Parameter(property="i18n.entries") protected I18nSourceEntry[] entries
@Parameter(property="i18n.showTouchedFiles",
defaultValue="${maven.verbose}")
protected boolean showTouchedFiles
true if AbstractI18nMojo.verbose is
set at true.@Parameter(property="i18n.backupGetter",
defaultValue="false")
protected boolean backupGetter
@Parameter(property="i18n.force",
defaultValue="false")
protected boolean force
@Parameter(property="i18n.acceptKeyFormat") protected String acceptKeyFormat
protected Pattern acceptPattern
protected org.nuiton.io.SortedProperties oldParser
protected org.nuiton.io.SortedProperties oldLanguage
protected long t0
protected abstract String getOutGetter()
protected abstract String[] getDefaultIncludes()
protected abstract String[] getDefaultExcludes()
protected abstract File getDefaultBasedir()
public abstract FileParser newFileParser(Pattern acceptPattern)
acceptPattern - optional pattern to accept incoming keyspublic abstract org.nuiton.io.FileUpdater newFileUpdater(SourceEntry entry)
entry - the incoming source entry to attach to the file updaterpublic boolean isStrictMode()
isStrictMode in class AbstractI18nMojopublic boolean isForce()
public void init()
throws Exception
init in class AbstractI18nMojoExceptionprotected boolean onEnterEntry(I18nSourceEntry entry)
protected void doAction()
throws Exception
doAction in class org.nuiton.plugin.AbstractPluginExceptionpublic boolean isShowTouchedFiles()
isShowTouchedFiles in interface I18nParserConfigurationpublic org.nuiton.io.SortedProperties getResult()
getResult in interface I18nParserConfigurationprotected void addDefaultEntry()
protected void saveGetterFile()
throws IOException
IOException - if any io pbpublic static String getLogEntry(String msg, int nbFiles, long time, long all)
msg - le prefix du messagenbFiles - le nombre de fichiers actuellement traitéstime - le time de traitement de ce fichierall - le temps de traitement de tous les fichiersCopyright © 2007–2013 CodeLutin. All rights reserved.