Package org.omegat.core
Class Core
- java.lang.Object
- 
- org.omegat.core.Core
 
- 
 public final class Core extends java.lang.ObjectClass which contains all components instances. Note about threads synchronization: each component must have only local synchronization. It mustn't synchronize around other components or some other objects. Components which works in Swing UI thread can have other synchronization idea: it can not be synchronized to access to some data which changed only in UI thread.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static interfaceCore.RunnableWithException
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static voidexecuteExclusively(boolean waitForUnlock, Core.RunnableWithException run)Use this to perform operations that must not be run concurrently.static IAutoSavegetAutoSave()static ICommentsgetComments()Get comments areastatic IDictionariesgetDictionaries()static IEditorgetEditor()Get editor instance.static FilterMastergetFilterMaster()static IGlossariesgetGlossary()Get glossary instance.static GlossaryManagergetGlossaryManager()static IIssuesgetIssues()static MachineTranslateTextAreagetMachineTranslatePane()static IMainWindowgetMainWindow()Get main window instance.static java.util.List<IMarker>getMarkers()static IMatchergetMatcher()Get matcher component instance.static INotesgetNotes()Get notes instance.static java.util.Map<java.lang.String,java.lang.String>getParams()static java.util.List<java.lang.String>getPluginsLoadingErrors()Get all plugin loading errors.static IProjectgetProject()Get project instance.static SegmentergetSegmenter()static ISpellCheckergetSpellChecker()Get spell checker instance.static ITagValidationgetTagValidation()Get tag validation component instance.static voidinitializeConsole(java.util.Map<java.lang.String,java.lang.String> params)Initialize application components.static voidinitializeGUI(java.lang.ClassLoader classLoader, java.util.Map<java.lang.String,java.lang.String> params)Initialize application components.static voidpluginLoadingError(java.lang.String errorText)Any plugin can call this method for say about error on loading.static voidregisterFilterClass(java.lang.Class<? extends IFilter> clazz)static voidregisterMachineTranslationClass(java.lang.Class<? extends IMachineTranslation> clazz)static voidregisterMarker(IMarker marker)Register class for calculate marks.static voidregisterMarkerClass(java.lang.Class<? extends IMarker> clazz)static voidregisterTokenizerClass(java.lang.Class<? extends ITokenizer> clazz)static voidsetFilterMaster(FilterMaster newFilterMaster)static voidsetProject(IProject newCurrentProject)Set new current project.static voidsetSegmenter(Segmenter newSegmenter)
 
- 
- 
- 
Method Detail- 
getProjectpublic static IProject getProject() Get project instance.
 - 
setProjectpublic static void setProject(IProject newCurrentProject) Set new current project.
 - 
getMainWindowpublic static IMainWindow getMainWindow() Get main window instance.
 - 
getEditorpublic static IEditor getEditor() Get editor instance.
 - 
getTagValidationpublic static ITagValidation getTagValidation() Get tag validation component instance.
 - 
getIssuespublic static IIssues getIssues() 
 - 
getMatcherpublic static IMatcher getMatcher() Get matcher component instance.
 - 
getSpellCheckerpublic static ISpellChecker getSpellChecker() Get spell checker instance.
 - 
getFilterMasterpublic static FilterMaster getFilterMaster() 
 - 
setFilterMasterpublic static void setFilterMaster(FilterMaster newFilterMaster) 
 - 
getMachineTranslatePanepublic static MachineTranslateTextArea getMachineTranslatePane() 
 - 
getAutoSavepublic static IAutoSave getAutoSave() 
 - 
getGlossarypublic static IGlossaries getGlossary() Get glossary instance.
 - 
getGlossaryManagerpublic static GlossaryManager getGlossaryManager() 
 - 
getNotespublic static INotes getNotes() Get notes instance.
 - 
getCommentspublic static IComments getComments() Get comments area- Returns:
- the comment area
 
 - 
getDictionariespublic static IDictionaries getDictionaries() 
 - 
getSegmenterpublic static Segmenter getSegmenter() 
 - 
setSegmenterpublic static void setSegmenter(Segmenter newSegmenter) 
 - 
initializeGUIpublic static void initializeGUI(java.lang.ClassLoader classLoader, java.util.Map<java.lang.String,java.lang.String> params) throws java.lang.ExceptionInitialize application components.- Throws:
- java.lang.Exception
 
 - 
initializeConsolepublic static void initializeConsole(java.util.Map<java.lang.String,java.lang.String> params) throws java.lang.ExceptionInitialize application components.- Throws:
- java.lang.Exception
 
 - 
registerMarkerpublic static void registerMarker(IMarker marker) Register class for calculate marks.- Parameters:
- marker- marker implementation
 
 - 
getMarkerspublic static java.util.List<IMarker> getMarkers() 
 - 
getParamspublic static java.util.Map<java.lang.String,java.lang.String> getParams() 
 - 
registerFilterClasspublic static void registerFilterClass(java.lang.Class<? extends IFilter> clazz) 
 - 
registerMachineTranslationClasspublic static void registerMachineTranslationClass(java.lang.Class<? extends IMachineTranslation> clazz) 
 - 
registerMarkerClasspublic static void registerMarkerClass(java.lang.Class<? extends IMarker> clazz) 
 - 
registerTokenizerClasspublic static void registerTokenizerClass(java.lang.Class<? extends ITokenizer> clazz) 
 - 
getPluginsLoadingErrorspublic static java.util.List<java.lang.String> getPluginsLoadingErrors() Get all plugin loading errors.
 - 
pluginLoadingErrorpublic static void pluginLoadingError(java.lang.String errorText) Any plugin can call this method for say about error on loading.
 - 
executeExclusivelypublic static void executeExclusively(boolean waitForUnlock, Core.RunnableWithException run) throws java.lang.ExceptionUse this to perform operations that must not be run concurrently.For instance project load/save/compile/autosave operations must not be executed in parallel because it will break project files, especially during team synchronization. For guaranteed non-parallel execution, all such operations must be executed via this method. - Parameters:
- waitForUnlock- should execution wait for unlock 3 minutes
- run- code for execute
- Throws:
- java.lang.Exception
 
 
- 
 
-