Class Preferences
Initially this class was implemented with static members and methods directly implementing the interface, backed by XML storage. However, this was bad for testing and extensibility, or allowing different persistence formats.
This class's static methods remain for compatibility, but now they wrap a
singleton instance of a concrete implementation of Preferences.IPreferences.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringautotext auto-completionstatic final booleanstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringchar table auto-completionstatic final booleanstatic final Stringstatic final Stringstatic final Stringstatic final Stringglossary auto-completionstatic final booleanstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringhistory completion and predictionstatic final Stringstatic final Stringstatic final Stringstatic final StringAligner settingsstatic final Stringstatic final Stringallow automatic spell checking or notstatic final StringAllow per-project external commandsstatic final StringTag Validation Option: allow tag editing in editor.static final StringWorkflow Option: Allow translation to be equal to sourcestatic final StringAlways confirm Quit, even if the project is savedstatic final intDefault number of seconds to auto save projectstatic final StringAutomatic save interval in secondsstatic final StringWorkflow Option: Insert Explanatory Text before the Best Fuzzy Matchstatic final StringWorkflow Option: Insert Best Match Into Translated Segmentstatic final StringWorkflow Option: Minimal Similarity Of the Best Fuzzy Match to insertstatic final intDefault Value of Workflow Option: Minimal Similarity Of the Best Fuzzy Match to insertstatic final StringTag Validation Option: check all printf-tagsstatic final StringTag Validation Option: check user defined tags according to regexp.static final StringTag Validation Option: check simple java MessageFormat pattern tagsstatic final StringTag Validation Option: check target for text that should have been removed according to regexp.static final StringTag Validation Option: check simple printf-tagsstatic final StringWorkflow Option: Attempt to convert numbers when inserting a fuzzy matchstatic final StringCreate Glossary Entry dialogstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringdisplay modification info (author and modification date)static final Stringdisplay the segment sourcesstatic final StringTag Validation Option: Don't check printf-tagsstatic final booleanstatic final StringWorkflow Option: Don't Insert Source Text Into Translated Segmentstatic final StringWorkflow Option: Number of segments to load initially in editorstatic final intstatic final StringWorkflow Option: Export current segmentstatic final Stringstatic final StringExternal TMX options: Fuzzy Thresholdstatic final StringExternal TMX options: Whether to show fuzzy matches from foreign (non-target language) matches.static final StringExternal TMX options: Display templatestatic final StringExternal TMX options: Display level 2 tagsstatic final StringExternal TMX options: Fuzzy match sort keystatic final StringExternal TMX options: Use / for stand-alone tagsstatic final StringCustom external command for post-processingstatic final StringExternal Finderstatic final StringOmegaT-wide Preferences Filenamestatic final StringVersion of file filters.static final StringPreference flag to suppress First Time Configuration wizard in the future.static final StringDo aggressive font fallbackstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final booleanstatic final Stringstatic final booleanstatic final Stringstatic final Stringstatic final booleanstatic final Stringstatic final Stringstatic final Stringstatic final booleanstatic final Stringstatic final Stringstatic final booleanstatic final Stringstatic final Stringstatic final Stringstatic final StringIssuesstatic final StringLanguageTool implementation to usestatic final StringDisabled categoriesstatic final StringDisabled rules prefixstatic final StringEnabled rules prefixstatic final StringLocal path to LanguageTool ngram model filesstatic final StringLocal path to LanguageTool server jar filestatic final StringURL of remote LanguageTool serverstatic final Stringstatic final Stringstatic final booleanstatic final Stringstatic final StringMark alternative translationsstatic final Stringstatic final StringMark Bidi controls as symbolsstatic final StringMark glossary matches.static final StringMark the non-breakable spaces with a different colorstatic final Stringmark unique segmentsstatic final StringMark the segments with a note with a different colorstatic final StringMark paragraphs startsstatic final Stringstatic final StringDefault paragraph delimitation indicatorstatic final StringMark the translated segments with a different colorstatic final StringMark the untranslated segments with a different colorstatic final StringMark whitespace as symbolsstatic final StringA constant string identifier for the tokenizer configuration that enables full stemming functionality.static final Stringstatic final Stringstatic final StringMost recent projects liststatic final StringWhether to automatically perform MT requests on entering segmentstatic final StringWhether to restrict automatic MT requests to only untranslated segmentsstatic final Stringstatic final Stringstatic final Stringstatic final StringNotification preferencesstatic final Stringstatic final Stringstatic final Stringstatic final Stringparagraph match from segment TMXstatic final StringWhen a fuzzy match is displayed from a memory belonging to a language other than the target language, a penalty is applied.static final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringProxy options: Password for proxy accessstatic final StringProxy options: User name for proxy accessstatic final StringWorkflow Option: Save auto-populated statusstatic final StringWorkflow Option: Save MT originstatic final Stringstatus bar progress modestatic final StringThe location of the scriptsstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringQuick script namesstatic final StringScript windowstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringSegment Properties Area preferencesstatic final Stringstatic final Stringstatic final Stringstatic final StringEditor Option: When activated, a single mouse click activates a segment in addition to the usual double click)static final Stringstatic final Stringstatic final StringThe location of the spell checker dictionariesstatic final StringURL of the dictionary repositorystatic final Stringstatic final booleanstatic final Stringstatic final booleanstatic final StringStatistics settingsstatic final Stringstatic final StringWorkflow Option: Go To Next Untranslated Segment stops when there is at least one alternative translationstatic final StringTag Validation Option: allow tag editing in editor.static final Stringstatic final Stringstatic final Stringstatic final StringTeam option: author IDstatic final Stringstatic final Stringstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringPrefix for keys used to record default tokenizer behavior settings.static final StringUse the TAB button to advance to the next segmentstatic final StringVersion Checkerstatic final booleanstatic final Stringstatic final Stringstatic final StringView options: Simplify protected parts tooltipsstatic final booleanstatic final StringView options: Show active source in boldstatic final booleanstatic final StringView options: Show all sources in boldstatic final booleanstatic final StringView options: Modification Info display templatesstatic final booleanstatic final StringView options: Mark first non-unique -
Method Summary
Modifier and TypeMethodDescriptionstatic voidRegister to receive notifications when preferences change.static voidaddPropertyChangeListener(String property, PropertyChangeListener listener) Register to receive notifications when the specified preference changes.static booleanexistsPreference(String key) Returns true if the preference is in OmegaT's preferences file.static Filtersstatic @Nullable StringgetPreference(String key) Returns the defaultValue of some preference out of OmegaT's preferences file.static intgetPreferenceDefault(String key, int defaultValue) Returns the integer value of some preference out of OmegaT's preferences file, if it exists.static StringgetPreferenceDefault(String key, String defaultValue) Returns the value of some preference out of OmegaT's preferences file, if it exists.static <T extends Enum<T>>
TgetPreferenceEnumDefault(String key, T defaultValue) Returns the value of some preference out of OmegaT's preferences file, if it exists.static SRXgetSRX()static voidinit()Initialize the preferences system.static voidstatic voidstatic booleanReturns true if this looks like the first run (no existing omegat.prefs when initialized).static booleanisPreference(String key) Returns the boolean defaultValue of some preference.static booleanisPreferenceDefault(String key, boolean defaultValue) Returns the boolean value of some preference out of OmegaT's preferences file, if it exists.static voidsave()static voidsetFilters(Filters newFilters) static voidsetPreference(String name, Object value) Sets the value of some preference.static void
-
Field Details
-
FILE_PREFERENCES
OmegaT-wide Preferences Filename -
SOURCE_LOCALE
- See Also:
-
TARGET_LOCALE
- See Also:
-
CURRENT_FOLDER
- See Also:
-
SOURCE_FOLDER
- See Also:
-
TARGET_FOLDER
- See Also:
-
TM_FOLDER
- See Also:
-
EXPORT_TM_FOLDER
- See Also:
-
DICT_FOLDER
- See Also:
-
GLOSSARY_FOLDER
- See Also:
-
GLOSSARY_FILE
- See Also:
-
TF_SRC_FONT_NAME
- See Also:
-
TF_FONT_DEFAULT
- See Also:
-
TF_SRC_FONT_SIZE
- See Also:
-
TF_FONT_SIZE_DEFAULT
public static final int TF_FONT_SIZE_DEFAULT- See Also:
-
FIRST_TIME_WIZARD_DONE
Preference flag to suppress First Time Configuration wizard in the future.- See Also:
-
MT_AUTO_FETCH
Whether to automatically perform MT requests on entering segment- See Also:
-
MT_ONLY_UNTRANSLATED
Whether to restrict automatic MT requests to only untranslated segments- See Also:
-
GLOSSARY_TBX_DISPLAY_CONTEXT
- See Also:
-
GLOSSARY_TBX_DISPLAY_CONTEXT_DEFAULT
public static final boolean GLOSSARY_TBX_DISPLAY_CONTEXT_DEFAULT- See Also:
-
GLOSSARY_NOT_EXACT_MATCH
- See Also:
-
GLOSSARY_NOT_EXACT_MATCH_DEFAULT
public static final boolean GLOSSARY_NOT_EXACT_MATCH_DEFAULT- See Also:
-
GLOSSARY_STEMMING
- See Also:
-
GLOSSARY_STEMMING_DEFAULT
public static final boolean GLOSSARY_STEMMING_DEFAULT- See Also:
-
GLOSSARY_REPLACE_ON_INSERT
- See Also:
-
GLOSSARY_REQUIRE_SIMILAR_CASE
- See Also:
-
GLOSSARY_REQUIRE_SIMILAR_CASE_DEFAULT
public static final boolean GLOSSARY_REQUIRE_SIMILAR_CASE_DEFAULT- See Also:
-
GLOSSARY_LAYOUT
- See Also:
-
GLOSSARY_MERGE_ALTERNATE_DEFINITIONS
- See Also:
-
GLOSSARY_MERGE_ALTERNATE_DEFINITIONS_DEFAULT
public static final boolean GLOSSARY_MERGE_ALTERNATE_DEFINITIONS_DEFAULT- See Also:
-
DICTIONARY_FUZZY_MATCHING
- See Also:
-
DICTIONARY_AUTO_SEARCH
- See Also:
-
DICTIONARY_CONDENSED_VIEW
- See Also:
-
DICTIONARY_USE_FONT
- See Also:
-
TF_DICTIONARY_FONT_SIZE
- See Also:
-
MATCHES_STEMMING_FULL
A constant string identifier for the tokenizer configuration that enables full stemming functionality. This configuration applies to enable snawball stemmer in OmegaT tokenizers when supported. In default, light stemmer mode will be used.- See Also:
-
GLOSSARY_STEMMING_FULL
- See Also:
-
MAINWINDOW_LAYOUT
- See Also:
-
PROJECT_FILES_WINDOW_GEOMETRY_PREFIX
- See Also:
-
PROJECT_FILES_USE_FONT
- See Also:
-
PROJECT_FILES_SHOW_ON_LOAD
- See Also:
-
SEARCHWINDOW_GEOMETRY_PREFIX
- See Also:
-
SEARCHWINDOW_SEARCH_TYPE
- See Also:
-
SEARCHWINDOW_REPLACE_TYPE
- See Also:
-
SEARCHWINDOW_CASE_SENSITIVE
- See Also:
-
SEARCHWINDOW_SPACE_MATCH_NBSP
- See Also:
-
SEARCHWINDOW_CASE_SENSITIVE_REPLACE
- See Also:
-
SEARCHWINDOW_SPACE_MATCH_NBSP_REPLACE
- See Also:
-
SEARCHWINDOW_REPLACE_UNTRANSLATED
- See Also:
-
SEARCHWINDOW_SEARCH_SOURCE
- See Also:
-
SEARCHWINDOW_SEARCH_TRANSLATION
- See Also:
-
SEARCHWINDOW_SEARCH_STATE
- See Also:
-
SEARCHWINDOW_SEARCH_NOTES
- See Also:
-
SEARCHWINDOW_SEARCH_COMMENTS
- See Also:
-
SEARCHWINDOW_REG_EXPRESSIONS
- See Also:
-
SEARCHWINDOW_GLOSSARY_SEARCH
- See Also:
-
SEARCHWINDOW_MEMORY_SEARCH
- See Also:
-
SEARCHWINDOW_TM_SEARCH
- See Also:
-
SEARCHWINDOW_ALL_RESULTS
- See Also:
-
SEARCHWINDOW_FILE_NAMES
- See Also:
-
SEARCHWINDOW_ADVANCED_VISIBLE
- See Also:
-
SEARCHWINDOW_SEARCH_AUTHOR
- See Also:
-
SEARCHWINDOW_AUTHOR_NAME
- See Also:
-
SEARCHWINDOW_DATE_FROM
- See Also:
-
SEARCHWINDOW_DATE_FROM_VALUE
- See Also:
-
SEARCHWINDOW_DATE_TO
- See Also:
-
SEARCHWINDOW_DATE_TO_VALUE
- See Also:
-
SEARCHWINDOW_NUMBER_OF_RESULTS
- See Also:
-
SEARCHWINDOW_DIR
- See Also:
-
SEARCHWINDOW_SEARCH_FILES
- See Also:
-
SEARCHWINDOW_RECURSIVE
- See Also:
-
SEARCHWINDOW_AUTO_SYNC
- See Also:
-
SEARCHWINDOW_BACK_TO_INITIAL_SEGMENT
- See Also:
-
SEARCHWINDOW_EXCLUDE_ORPHANS
- See Also:
-
SEARCHWINDOW_FULLHALFWIDTH_INSENSITIVE
- See Also:
-
SEARCHWINDOW_HISTORY_SIZE
- See Also:
-
SEARCHWINDOW_SEARCH_HISTORY_ITEM_PREFIX
- See Also:
-
SEARCHWINDOW_REPLACE_HISTORY_ITEM_PREFIX
- See Also:
-
USE_TAB_TO_ADVANCE
Use the TAB button to advance to the next segment- See Also:
-
ALWAYS_CONFIRM_QUIT
Always confirm Quit, even if the project is saved- See Also:
-
MARK_GLOSSARY_MATCHES
Mark glossary matches. This feature used to be called "TransTips", and the prefs key remains unchanged for backwards-compatibility.- See Also:
-
MARK_NOTED_SEGMENTS
Mark the segments with a note with a different color- See Also:
-
MARK_NBSP
Mark the non-breakable spaces with a different color- See Also:
-
MARK_WHITESPACE
Mark whitespace as symbols- See Also:
-
MARK_BIDI
Mark Bidi controls as symbols- See Also:
-
MARK_ALT_TRANSLATIONS
Mark alternative translations- See Also:
-
FONT_FALLBACK
Do aggressive font fallback- See Also:
-
MARK_PARA_DELIMITATIONS
Mark paragraphs starts- See Also:
-
MARK_PARA_TEXT
- See Also:
-
MARK_PARA_TEXT_DEFAULT
Default paragraph delimitation indicator- See Also:
-
MARK_TRANSLATED_SEGMENTS
Mark the translated segments with a different color- See Also:
-
MARK_AUTOPOPULATED
- See Also:
-
MARK_UNTRANSLATED_SEGMENTS
Mark the untranslated segments with a different color- See Also:
-
DONT_INSERT_SOURCE_TEXT
Workflow Option: Don't Insert Source Text Into Translated Segment- See Also:
-
ALLOW_TRANS_EQUAL_TO_SRC
Workflow Option: Allow translation to be equal to source- See Also:
-
BEST_MATCH_INSERT
Workflow Option: Insert Best Match Into Translated Segment- See Also:
-
BEST_MATCH_MINIMAL_SIMILARITY
Workflow Option: Minimal Similarity Of the Best Fuzzy Match to insert- See Also:
-
BEST_MATCH_MINIMAL_SIMILARITY_DEFAULT
public static final int BEST_MATCH_MINIMAL_SIMILARITY_DEFAULTDefault Value of Workflow Option: Minimal Similarity Of the Best Fuzzy Match to insert- See Also:
-
PENALTY_FOR_FOREIGN_MATCHES
When a fuzzy match is displayed from a memory belonging to a language other than the target language, a penalty is applied.- See Also:
-
PENALTY_FOR_FOREIGN_MATCHES_DEFAULT
public static final int PENALTY_FOR_FOREIGN_MATCHES_DEFAULT- See Also:
-
BEST_MATCH_EXPLANATORY_TEXT
Workflow Option: Insert Explanatory Text before the Best Fuzzy Match- See Also:
-
EXPORT_CURRENT_SEGMENT
Workflow Option: Export current segment- See Also:
-
SINGLE_CLICK_SEGMENT_ACTIVATION
Editor Option: When activated, a single mouse click activates a segment in addition to the usual double click)- See Also:
-
STOP_ON_ALTERNATIVE_TRANSLATION
Workflow Option: Go To Next Untranslated Segment stops when there is at least one alternative translation- See Also:
-
CONVERT_NUMBERS
Workflow Option: Attempt to convert numbers when inserting a fuzzy match- See Also:
-
SAVE_AUTO_STATUS
Workflow Option: Save auto-populated status- See Also:
-
SAVE_ORIGIN
Workflow Option: Save MT origin- See Also:
-
EDITOR_INITIAL_SEGMENT_LOAD_COUNT
Workflow Option: Number of segments to load initially in editor- See Also:
-
EDITOR_INITIAL_SEGMENT_LOAD_COUNT_DEFAULT
public static final int EDITOR_INITIAL_SEGMENT_LOAD_COUNT_DEFAULT- See Also:
-
DONT_CHECK_PRINTF_TAGS
Tag Validation Option: Don't check printf-tags- See Also:
-
DONT_CHECK_PRINTF_TAGS_DEFAULT
public static final boolean DONT_CHECK_PRINTF_TAGS_DEFAULT- See Also:
-
CHECK_SIMPLE_PRINTF_TAGS
Tag Validation Option: check simple printf-tags- See Also:
-
CHECK_ALL_PRINTF_TAGS
Tag Validation Option: check all printf-tags- See Also:
-
CHECK_JAVA_PATTERN_TAGS
Tag Validation Option: check simple java MessageFormat pattern tags- See Also:
-
CHECK_CUSTOM_PATTERN
Tag Validation Option: check user defined tags according to regexp.- See Also:
-
CHECK_REMOVE_PATTERN
Tag Validation Option: check target for text that should have been removed according to regexp.- See Also:
-
ALLOW_TAG_EDITING
Tag Validation Option: allow tag editing in editor.- See Also:
-
TAG_VALIDATE_ON_LEAVE
Tag Validation Option: allow tag editing in editor.- See Also:
-
TEAM_AUTHOR
Team option: author ID- See Also:
-
ALLOW_AUTO_SPELLCHECKING
allow automatic spell checking or not- See Also:
-
SPELLCHECKER_DICTIONARY_DIRECTORY
The location of the spell checker dictionaries- See Also:
-
SPELLCHECKER_DICTIONARY_URL
URL of the dictionary repository- See Also:
-
LANGUAGETOOL_BRIDGE_TYPE
LanguageTool implementation to use- See Also:
-
LANGUAGETOOL_REMOTE_URL
URL of remote LanguageTool server- See Also:
-
LANGUAGETOOL_LOCAL_SERVER_JAR_PATH
Local path to LanguageTool server jar file- See Also:
-
LANGUAGETOOL_LANGUAGE_MODEL_PATH
Local path to LanguageTool ngram model files- See Also:
-
LANGUAGETOOL_DISABLED_CATEGORIES_PREFIX
Disabled categories- See Also:
-
LANGUAGETOOL_DISABLED_RULES_PREFIX
Disabled rules prefix- See Also:
-
LANGUAGETOOL_ENABLED_RULES_PREFIX
Enabled rules prefix- See Also:
-
SCRIPTS_DIRECTORY
The location of the scripts- See Also:
-
SCRIPTS_QUICK_PREFIX
Quick script names- See Also:
-
SCRIPTS_QUICK_1
- See Also:
-
SCRIPTS_QUICK_2
- See Also:
-
SCRIPTS_QUICK_3
- See Also:
-
SCRIPTS_QUICK_4
- See Also:
-
SCRIPTS_QUICK_5
- See Also:
-
SCRIPTS_QUICK_6
- See Also:
-
SCRIPTS_QUICK_7
- See Also:
-
SCRIPTS_QUICK_8
- See Also:
-
SCRIPTS_QUICK_9
- See Also:
-
SCRIPTS_QUICK_0
- See Also:
-
SCRIPTWINDOW_GEOMETRY_PREFIX
Script window- See Also:
-
MOST_RECENT_PROJECTS_SIZE
Most recent projects list- See Also:
-
MOST_RECENT_PROJECTS_PREFIX
- See Also:
-
DISPLAY_SEGMENT_SOURCES
display the segment sources- See Also:
-
MARK_NON_UNIQUE_SEGMENTS
mark unique segments- See Also:
-
DISPLAY_MODIFICATION_INFO
display modification info (author and modification date)- See Also:
-
EXT_TMX_SHOW_LEVEL2
External TMX options: Display level 2 tags- See Also:
-
EXT_TMX_USE_SLASH
External TMX options: Use / for stand-alone tags- See Also:
-
EXT_TMX_MATCH_TEMPLATE
External TMX options: Display template- See Also:
-
EXT_TMX_SORT_KEY
External TMX options: Fuzzy match sort key- See Also:
-
EXT_TMX_KEEP_FOREIGN_MATCH
External TMX options: Whether to show fuzzy matches from foreign (non-target language) matches.- See Also:
-
EXT_TMX_FUZZY_MATCH_THRESHOLD
External TMX options: Fuzzy Threshold- See Also:
-
PARAGRAPH_MATCH_FROM_SEGMENT_TMX
paragraph match from segment TMX- See Also:
-
VIEW_OPTION_SOURCE_ALL_BOLD
View options: Show all sources in bold- See Also:
-
VIEW_OPTION_SOURCE_ALL_BOLD_DEFAULT
public static final boolean VIEW_OPTION_SOURCE_ALL_BOLD_DEFAULT- See Also:
-
VIEW_OPTION_SOURCE_ACTIVE_BOLD
View options: Show active source in bold- See Also:
-
VIEW_OPTION_SOURCE_ACTIVE_BOLD_DEFAULT
public static final boolean VIEW_OPTION_SOURCE_ACTIVE_BOLD_DEFAULT- See Also:
-
VIEW_OPTION_UNIQUE_FIRST
View options: Mark first non-unique- See Also:
-
VIEW_OPTION_PPT_SIMPLIFY
View options: Simplify protected parts tooltips- See Also:
-
VIEW_OPTION_PPT_SIMPLIFY_DEFAULT
public static final boolean VIEW_OPTION_PPT_SIMPLIFY_DEFAULT- See Also:
-
VIEW_OPTION_TEMPLATE_ACTIVE
View options: Modification Info display templates- See Also:
-
VIEW_OPTION_TEMPLATE_ACTIVE_DEFAULT
public static final boolean VIEW_OPTION_TEMPLATE_ACTIVE_DEFAULT- See Also:
-
VIEW_OPTION_MOD_INFO_TEMPLATE
- See Also:
-
VIEW_OPTION_MOD_INFO_TEMPLATE_WO_DATE
- See Also:
-
PROXY_USER_NAME
Proxy options: User name for proxy access- See Also:
-
PROXY_PASSWORD
Proxy options: Password for proxy access- See Also:
-
AUTO_SAVE_INTERVAL
Automatic save interval in seconds- See Also:
-
AUTO_SAVE_DEFAULT
public static final int AUTO_SAVE_DEFAULTDefault number of seconds to auto save project- See Also:
-
EXTERNAL_COMMAND
Custom external command for post-processing- See Also:
-
ALLOW_PROJECT_EXTERN_CMD
Allow per-project external commands- See Also:
-
FILTERS_VERSION
Version of file filters. Unfortunately cannot put it into filters itself for backwards compatibility reasons.- See Also:
-
LT_DISABLED
- See Also:
-
LT_DISABLED_DEFAULT
public static final boolean LT_DISABLED_DEFAULT- See Also:
-
LOOSE_TAG_ORDERING
- See Also:
-
TAGS_VALID_REQUIRED
- See Also:
-
STAT_COUNTING_PROTECTED_TEXT
- See Also:
-
STAT_COUNTING_PROTECTED_TEXT_DEFAULT
public static final boolean STAT_COUNTING_PROTECTED_TEXT_DEFAULT- See Also:
-
STAT_COUNTING_CUSTOM_TAGS
- See Also:
-
STAT_COUNTING_CUSTOM_TAGS_DEFAULT
public static final boolean STAT_COUNTING_CUSTOM_TAGS_DEFAULT- See Also:
-
TOK_BEHAVIOR_PREFIX
Prefix for keys used to record default tokenizer behavior settings. Prepend to the full name of the tokenizer, e.g.TOK_BEHAVIOR_PREFIX + tokenizer.class.getName()to obtaintokenizer_behavior_org.omegat.tokenizer.LuceneXXTokenizer- See Also:
-
AC_SHOW_SUGGESTIONS_AUTOMATICALLY
- See Also:
-
AC_SWITCH_VIEWS_WITH_LR
- See Also:
-
AC_GLOSSARY_ENABLED
glossary auto-completion- See Also:
-
AC_GLOSSARY_ENABLED_DEFAULT
public static final boolean AC_GLOSSARY_ENABLED_DEFAULT- See Also:
-
AC_GLOSSARY_SHOW_SOURCE
- See Also:
-
AC_GLOSSARY_SHOW_TARGET_BEFORE_SOURCE
- See Also:
-
AC_GLOSSARY_SORT_BY_LENGTH
- See Also:
-
AC_GLOSSARY_SORT_ALPHABETICALLY
- See Also:
-
AC_GLOSSARY_CAPITALIZE
- See Also:
-
AC_AUTOTEXT_ENABLED
autotext auto-completion- See Also:
-
AC_AUTOTEXT_ENABLED_DEFAULT
public static final boolean AC_AUTOTEXT_ENABLED_DEFAULT- See Also:
-
AC_AUTOTEXT_SORT_BY_LENGTH
- See Also:
-
AC_AUTOTEXT_SORT_ALPHABETICALLY
- See Also:
-
AC_AUTOTEXT_SORT_FULL_TEXT
- See Also:
-
AC_CHARTABLE_ENABLED
char table auto-completion- See Also:
-
AC_CHARTABLE_ENABLED_DEFAULT
public static final boolean AC_CHARTABLE_ENABLED_DEFAULT- See Also:
-
AC_CHARTABLE_USE_CUSTOM_CHARS
- See Also:
-
AC_CHARTABLE_CUSTOM_CHAR_STRING
- See Also:
-
AC_CHARTABLE_UNIQUE_CUSTOM_CHARS
- See Also:
-
AC_HISTORY_COMPLETION_ENABLED
history completion and prediction- See Also:
-
AC_HISTORY_PREDICTION_ENABLED
- See Also:
-
SB_PROGRESS_MODE
status bar progress mode- See Also:
-
SEGPROPS_INITIAL_MODE
Segment Properties Area preferences- See Also:
-
SEGPROPS_SHOW_RAW_KEYS
- See Also:
-
SEGPROPS_NOTIFY_PROPS
- See Also:
-
SEGPROPS_NOTIFY_DEFAULT_PROPS
- See Also:
-
NOTIFY_FUZZY_MATCHES
Notification preferences- See Also:
-
NOTIFY_GLOSSARY_HITS
- See Also:
-
NOTIFY_COMMENTS
- See Also:
-
NOTIFY_DICTIONARY_HITS
- See Also:
-
NOTIFY_DICTIONARY_NOHIT
- See Also:
-
NOTIFY_MULTIPLE_TRANSLATIONS
- See Also:
-
NOTIFY_NOTES
- See Also:
-
ALIGNER_HIGHLIGHT_PATTERN
Aligner settings- See Also:
-
ALIGNER_HIGHLIGHT_PATTERN_DEFAULT
- See Also:
-
CREATE_GLOSSARY_GEOMETRY_PREFIX
Create Glossary Entry dialog- See Also:
-
PROPERTY_SRX
- See Also:
-
PROPERTY_FILTERS
- See Also:
-
STATISTICS_WINDOW_GEOMETRY_PREFIX
Statistics settings- See Also:
-
STATS_OUTPUT_FORMAT
- See Also:
-
ISSUES_WINDOW_GEOMETRY_PREFIX
Issues- See Also:
-
ISSUES_WINDOW_DIVIDER_LOCATION_BOTTOM
- See Also:
-
ISSUE_PROVIDERS_DISABLED
- See Also:
-
ISSUE_PROVIDERS_DONT_ASK
- See Also:
-
EXTERNAL_FINDER_ALLOW_PROJECT_COMMANDS
External Finder- See Also:
-
VERSION_CHECK_AUTOMATIC
Version Checker- See Also:
-
VERSION_CHECK_AUTOMATIC_DEFAULT
public static final boolean VERSION_CHECK_AUTOMATIC_DEFAULT- See Also:
-
THEME_CLASS_NAME
- See Also:
-
THEME_DARK_CLASS_NAME
- See Also:
-
THEME_COLOR_MODE
- See Also:
-
GLOSSARY_SORT_BY_SRC_LENGTH
- See Also:
-
GLOSSARY_SORT_BY_LENGTH
- See Also:
-
MENUUI_CLASS_NAME
- See Also:
-
-
Method Details
-
getPreference
Returns the defaultValue of some preference out of OmegaT's preferences file.If the key is not found, returns the empty string.
- Parameters:
key- key of the key to look up, usually a static string from this class- Returns:
- preference defaultValue as a string
-
existsPreference
Returns true if the preference is in OmegaT's preferences file.If the key is not found return false
- Parameters:
key- key of the key to look up, usually a static string from this class- Returns:
- true if preferences exists
-
isPreference
Returns the boolean defaultValue of some preference.Returns true if the preference exists and is equal to "true", false otherwise (no such preference, or it's equal to "false", etc).
- Parameters:
key- preference key, usually a static string from this class- Returns:
- preference defaultValue as a boolean
-
isPreferenceDefault
Returns the boolean value of some preference out of OmegaT's preferences file, if it exists.If the key is not found, returns the default value provided and sets the preference to the default value.
- Parameters:
key- name of the key to look up, usually a static string from this classdefaultValue- default value for the key- Returns:
- preference value as an boolean
-
getPreferenceDefault
Returns the value of some preference out of OmegaT's preferences file, if it exists.If the key is not found, returns the default value provided and sets the preference to the default value.
- Parameters:
key- name of the key to look up, usually a static string from this classdefaultValue- default value for the key- Returns:
- preference value as a string
-
getPreferenceEnumDefault
Returns the value of some preference out of OmegaT's preferences file, if it exists.If the key is not found, returns the default value provided and sets the preference to the default value.
- Parameters:
key- name of the key to look up, usually a static string from this classdefaultValue- default value for the key- Returns:
- preference value as enum
-
getPreferenceDefault
Returns the integer value of some preference out of OmegaT's preferences file, if it exists.If the key is not found, returns the default value provided and sets the preference to the default value.
- Parameters:
key- name of the key to look up, usually a static string from this classdefaultValue- default value for the key- Returns:
- preference value as an integer
-
setPreference
Sets the value of some preference. The value will be persisted to disk as XML, serialized via value.toString().- Parameters:
name- preference key name, usually Preferences.PREF_...value- preference value as an object
-
addPropertyChangeListener
Register to receive notifications when preferences change.Note: The value returned by
PropertyChangeEvent#getNewValue()will be of the "correct" type (Integer, Boolean, Enum, etc.) but the value returned byPropertyChangeEvent#getOldValue()will be the String equivalent for storing in XML. -
addPropertyChangeListener
Register to receive notifications when the specified preference changes.Note: The value returned by
getNewValue()will be of the "correct" type (Integer, Boolean, Enum, etc.) but the value returned bygetOldValue()will be the String equivalent for storing in XML. -
setFilters
-
getFilters
-
setSRX
-
getSRX
-
save
public static void save() -
isFirstRun
public static boolean isFirstRun()Returns true if this looks like the first run (no existing omegat.prefs when initialized). If the underlying persistence does not provide the information, returns false. -
init
public static void init()Initialize the preferences system. This will load- general user prefs
- user filter settings
- user segmentation settings
StaticUtils.getConfigDir()(and others for general prefs; seegetPreferencesFile()) and set things up to create them viasave()if they don't yet exist.When the preferences system is required but actual user preferences shouldn't be loaded or altered (testing scenarios), use org.omegat.util.TestPreferencesInitializer methods or be sure to set the config dir with
RuntimePreferences.setConfigDir(String)before calling this method. -
initFilters
public static void initFilters() -
initSegmentation
public static void initSegmentation()
-