package blanco.omegat.util.matching;

import org.omegat.core.threads.CommandThread;
import org.omegat.gui.main.MainWindow;

public class OmegaTWrapper {

    private static CommandThread commandThread = null;

    public static CommandThread getCommandThread() {

        if (commandThread == null) {
            synchronized (OmegaTWrapper.class) {
                if (commandThread == null) {
                    MainWindow mainWindow = new MainWindow();
                    CommandThread.core = new CommandThread(mainWindow);
                    commandThread = CommandThread.core;
                }
            }
        }

        return commandThread;
    }

}
