Class Core


  • public final class Core
    extends java.lang.Object
    Class 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.
    • Method Detail

      • getProject

        public static IProject getProject()
        Get project instance.
      • setProject

        public static void setProject​(IProject newCurrentProject)
        Set new current project.
      • getMainWindow

        public static IMainWindow getMainWindow()
        Get main window instance.
      • getEditor

        public static IEditor getEditor()
        Get editor instance.
      • getTagValidation

        public static ITagValidation getTagValidation()
        Get tag validation component instance.
      • getIssues

        public static IIssues getIssues()
      • getMatcher

        public static IMatcher getMatcher()
        Get matcher component instance.
      • getSpellChecker

        public static ISpellChecker getSpellChecker()
        Get spell checker instance.
      • getFilterMaster

        public static FilterMaster getFilterMaster()
      • setFilterMaster

        public static void setFilterMaster​(FilterMaster newFilterMaster)
      • getAutoSave

        public static IAutoSave getAutoSave()
      • getGlossary

        public static IGlossaries getGlossary()
        Get glossary instance.
      • getNotes

        public static INotes getNotes()
        Get notes instance.
      • getComments

        public static IComments getComments()
        Get comments area
        Returns:
        the comment area
      • getDictionaries

        public static IDictionaries getDictionaries()
      • getSegmenter

        public static Segmenter getSegmenter()
      • setSegmenter

        public static void setSegmenter​(Segmenter newSegmenter)
      • initializeGUI

        public static void initializeGUI​(java.lang.ClassLoader classLoader,
                                         java.util.Map<java.lang.String,​java.lang.String> params)
                                  throws java.lang.Exception
        Initialize application components.
        Throws:
        java.lang.Exception
      • initializeConsole

        public static void initializeConsole​(java.util.Map<java.lang.String,​java.lang.String> params)
                                      throws java.lang.Exception
        Initialize application components.
        Throws:
        java.lang.Exception
      • registerMarker

        public static void registerMarker​(IMarker marker)
        Register class for calculate marks.
        Parameters:
        marker - marker implementation
      • getMarkers

        public static java.util.List<IMarker> getMarkers()
      • getParams

        public static java.util.Map<java.lang.String,​java.lang.String> getParams()
      • registerFilterClass

        public static void registerFilterClass​(java.lang.Class<? extends IFilter> clazz)
      • registerMachineTranslationClass

        public static void registerMachineTranslationClass​(java.lang.Class<? extends IMachineTranslation> clazz)
      • registerMarkerClass

        public static void registerMarkerClass​(java.lang.Class<? extends IMarker> clazz)
      • registerTokenizerClass

        public static void registerTokenizerClass​(java.lang.Class<? extends ITokenizer> clazz)
      • getPluginsLoadingErrors

        public static java.util.List<java.lang.String> getPluginsLoadingErrors()
        Get all plugin loading errors.
      • pluginLoadingError

        public static void pluginLoadingError​(java.lang.String errorText)
        Any plugin can call this method for say about error on loading.
      • executeExclusively

        public static void executeExclusively​(boolean waitForUnlock,
                                              Core.RunnableWithException run)
                                       throws java.lang.Exception
        Use 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