Package org.omegat.gui.matches
Class MatchesVarExpansion
This class is used to convert a NearString to a text visible in the
MatchesTextArea according to the given template containing variables.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classClass to store formatted text and indications for other treatments -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Patternstatic final Patternstatic final Stringstatic final Stringstatic final StringDeprecated.static final StringDeprecated.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class org.omegat.util.VarExpansion
PATTERN_BUNDLE_ENTRY, VAR_FILE_EXTENSION, VAR_FILE_NAME, VAR_FILE_NAME_ONLY, VAR_FILE_PATH, VAR_FILE_SHORT_PATH, VAR_PROJECT_SOURCE_LANG, VAR_PROJECT_SOURCE_LANG_CODE, VAR_PROJECT_TARGET_LANG, VAR_PROJECT_TARGET_LANG_CODE, VAR_SOURCE_TEXT, VAR_TARGET_TEXT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(NearString match, int id) expandProperties(String localTemplate, List<TMXProp> props) Replace property calls by the corresponding value
Format : @{PropertyName} in this case, retreive only the property value, name is elsewhere.expandVariables(NearString match) Methods inherited from class org.omegat.util.VarExpansion
expandFileName, expandFileNames
-
Field Details
-
VAR_ID
- See Also:
-
VAR_SCORE_BASE
- See Also:
-
VAR_SCORE_NOSTEM
- See Also:
-
VAR_SCORE_ADJUSTED
- See Also:
-
VAR_CREATION_ID
Deprecated.For backwards compatibility, this variable is an alias forVAR_CHANGED_ID. For the actual creation ID, useVAR_INITIAL_CREATION_ID.- See Also:
-
VAR_CREATION_DATE
Deprecated.For backwards compatibility, this variable is an alias forVAR_CHANGED_DATE. For the actual creation date, useVAR_INITIAL_CREATION_DATE.- See Also:
-
VAR_INITIAL_CREATION_ID
- See Also:
-
VAR_INITIAL_CREATION_DATE
- See Also:
-
VAR_CHANGED_ID
- See Also:
-
VAR_CHANGED_DATE
- See Also:
-
VAR_FUZZY_FLAG
- See Also:
-
VAR_DIFF
- See Also:
-
VAR_DIFF_REVERSED
- See Also:
-
VAR_SOURCE_LANGUAGE
- See Also:
-
VAR_TARGET_LANGUAGE
- See Also:
-
VAR_MATCH_SOURCE
- See Also:
-
DEFAULT_TEMPLATE
- See Also:
-
PATTERN_SINGLE_PROPERTY
-
PATTERN_PROPERTY_GROUP
-
-
Constructor Details
-
MatchesVarExpansion
-
-
Method Details
-
getMatchesVariables
-
expandProperties
Replace property calls by the corresponding value
Format : @{PropertyName} in this case, retreive only the property value, name is elsewhere.
Format : @[Property name with *][separator 1][separator2] in this case, return all properties matching the 1st pattern, as key=value pairs where = is replaced by separator1 and use separator2 between entries.
Expression \n for new line is accepted in separators.- Parameters:
localTemplate- Initial templateprops- Map of properties- Returns:
- Expanded template
-
expandVariables
- Specified by:
expandVariablesin classVarExpansion<NearString>
-
apply
-