Class ProjectUICommands

java.lang.Object
org.omegat.gui.main.ProjectUICommands

public final class ProjectUICommands extends Object
Handler for project UI commands, like open, save, compile, etc.
  • Method Details

    • projectCreate

      public static void projectCreate()
    • projectTeamCreate

      public static void projectTeamCreate()
    • projectOpen

      public static void projectOpen(File projectDirectory)
      Open project. Does nothing if there is already a project open. Convenience method for projectOpen(File, boolean).
      Parameters:
      projectDirectory - Open project stored in projectDirectory
    • projectOpen

      public static void projectOpen(File projectDirectory, boolean closeCurrent)
      Open project. Does nothing if a project is already open and closeCurrent is false.
      Parameters:
      projectDirectory - project directory or null if user must choose it
      closeCurrent - whether to close the current project first, if any
    • promptReload

      public static void promptReload()
      Prompt the user to reload the current project
    • projectReload

      public static void projectReload()
      Project reload.

      When select Project>Reload jump to here.

    • projectSave

      public static void projectSave()
      Save project.

      When the project is a team project, it also commit files and push to remote.

    • projectClose

      public static void projectClose()
      Close project.

      When the project is a team project, it commits and push first.

    • projectEditProperties

      public static void projectEditProperties()
    • projectCompile

      public static void projectCompile()
    • projectSingleCompile

      public static void projectSingleCompile(String sourcePattern)
    • projectCompileAndCommit

      public static void projectCompileAndCommit()
    • projectCommitSourceFiles

      public static void projectCommitSourceFiles()
    • projectRemote

      public static void projectRemote(String url)
      Open remote project specified by url.
      Parameters:
      url - remote project repository.
    • projectImportFiles

      public static void projectImportFiles(String destination, File[] toImport)
      Copy the specified files to the specified destination. The project will be reloaded afterward.

      Convenience method for projectImportFiles(String, File[], boolean).

      Parameters:
      destination - The path to copy the files to
      toImport - Files to copy to destination path
    • projectImportFiles

      public static void projectImportFiles(String destination, File[] toImport, boolean doReload)
      Copy the specified files to the specified destination, then reload if indicated. Note that a modal dialog will be shown if any of the specified files would be overwritten.
      Parameters:
      destination - The path to copy the files to
      toImport - Files to copy to destination path
      doReload - If true, the project will be reloaded after the files are successfully copied
    • openWriteableGlossaryFile

      public static void openWriteableGlossaryFile(boolean parent)
    • openFile

      public static void openFile(File path)
    • projectExit

      public static void projectExit()
    • projectRestart

      public static void projectRestart(String projectDir)
    • projectRestart

      public static void projectRestart(String projectDir, boolean skipConfirm)
      Restart the application, optionally skipping any confirmation dialogs.
      Parameters:
      projectDir - project to open after restart, or null
      skipConfirm - if true, do not show any confirmation dialog even if preferences would normally require it and even if a project is open but unmodified
    • doPromptImportSourceFiles

      public static void doPromptImportSourceFiles()
      Imports the file/files/folder into project's source files.
    • doWikiImport

      public static void doWikiImport()
      Does wikiread