Package org.omegat.gui.main
Class ProjectUICommands
java.lang.Object
org.omegat.gui.main.ProjectUICommands
Handler for project UI commands, like open, save, compile, etc.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidImports the file/files/folder into project's source files.static voidDoes wikireadstatic voidstatic voidopenWriteableGlossaryFile(boolean parent) static voidClose project.static voidstatic voidstatic voidstatic voidstatic voidstatic voidstatic voidprojectImportFiles(String destination, File[] toImport) Copy the specified files to the specified destination.static voidprojectImportFiles(String destination, File[] toImport, boolean doReload) Copy the specified files to the specified destination, then reload if indicated.static voidprojectOpen(File projectDirectory) Open project.static voidprojectOpen(File projectDirectory, boolean closeCurrent) Open project.static voidProject reload.static voidprojectRemote(String url) Open remote project specified by url.static voidprojectRestart(String projectDir) static voidprojectRestart(String projectDir, boolean skipConfirm) Restart the application, optionally skipping any confirmation dialogs.static voidSave project.static voidprojectSingleCompile(String sourcePattern) static voidstatic voidPrompt the user to reload the current project
-
Method Details
-
projectCreate
public static void projectCreate() -
projectTeamCreate
public static void projectTeamCreate() -
projectOpen
Open project. Does nothing if there is already a project open. Convenience method forprojectOpen(File, boolean).- Parameters:
projectDirectory- Open project stored in projectDirectory
-
projectOpen
Open project. Does nothing if a project is already open and closeCurrent is false.- Parameters:
projectDirectory- project directory or null if user must choose itcloseCurrent- 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
-
projectCompileAndCommit
public static void projectCompileAndCommit() -
projectCommitSourceFiles
public static void projectCommitSourceFiles() -
projectRemote
Open remote project specified by url.- Parameters:
url- remote project repository.
-
projectImportFiles
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 totoImport- Files to copy to destination path
-
projectImportFiles
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 totoImport- Files to copy to destination pathdoReload- If true, the project will be reloaded after the files are successfully copied
-
openWriteableGlossaryFile
public static void openWriteableGlossaryFile(boolean parent) -
openFile
-
projectExit
public static void projectExit() -
projectRestart
-
projectRestart
Restart the application, optionally skipping any confirmation dialogs.- Parameters:
projectDir- project to open after restart, or nullskipConfirm- 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
-