public final class ProjectUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MODE_ATTACH |
static java.lang.String |
MODE_NEW |
static java.lang.String |
MODE_PROPERTY |
static java.lang.String |
MODE_REPLACE |
Modifier and Type | Method and Description |
---|---|
static boolean |
closeAndDispose(Project project) |
static boolean |
confirmLoadingFromRemotePath(java.lang.String path,
java.lang.String msgKey,
java.lang.String titleKey) |
static int |
confirmOpenNewProject(boolean isNewProject) |
static int |
confirmOpenOrAttachProject() |
static Project |
findAndFocusExistingProjectForPath(java.nio.file.Path file) |
static void |
focusProjectWindow(Project project,
boolean executeIfAppInactive) |
static java.awt.Window |
getActiveFrameOrWelcomeScreen() |
static java.lang.String |
getBaseDir() |
static VirtualFile |
getFileAndRefresh(java.nio.file.Path file) |
static Project [] |
getOpenProjects() |
static boolean |
isRemotePath(java.lang.String path) |
static boolean |
isSameProject(java.lang.String projectFilePath,
Project project) |
static boolean |
isValidProjectPath(java.nio.file.Path file) |
static Project |
openOrImport(java.nio.file.Path file,
OpenProjectTask options) |
static Project |
openOrImport(java.nio.file.Path path,
Project projectToClose,
boolean forceOpenInNewFrame) |
static Project |
openOrImport(java.lang.String path,
Project projectToClose,
boolean forceOpenInNewFrame) |
static Project |
openProject(java.lang.String path,
Project projectToClose,
boolean forceOpenInNewFrame) |
static boolean |
showYesNoDialog(java.lang.String message,
java.lang.String titleKey) |
static Project |
tryOpenFileList(Project project,
java.util.List<? extends java.io.File> list,
java.lang.String location) |
static void |
updateLastProjectLocation(java.lang.String projectFilePath) |
public static final java.lang.String MODE_PROPERTY
public static final java.lang.String MODE_ATTACH
public static final java.lang.String MODE_REPLACE
public static final java.lang.String MODE_NEW
public static void updateLastProjectLocation(java.lang.String projectFilePath)
public static boolean closeAndDispose(Project project)
public static Project openOrImport(java.nio.file.Path path, Project projectToClose, boolean forceOpenInNewFrame)
public static Project openOrImport(java.lang.String path, Project projectToClose, boolean forceOpenInNewFrame)
path
- project file pathprojectToClose
- currently active projectforceOpenInNewFrame
- forces opening in new framepublic static Project openOrImport(java.nio.file.Path file, OpenProjectTask options)
public static VirtualFile getFileAndRefresh(java.nio.file.Path file)
public static Project openProject(java.lang.String path, Project projectToClose, boolean forceOpenInNewFrame)
public static boolean confirmLoadingFromRemotePath(java.lang.String path, java.lang.String msgKey, java.lang.String titleKey)
public static boolean showYesNoDialog(java.lang.String message, java.lang.String titleKey)
public static java.awt.Window getActiveFrameOrWelcomeScreen()
public static boolean isRemotePath(java.lang.String path)
public static Project [] getOpenProjects()
public static Project findAndFocusExistingProjectForPath(java.nio.file.Path file)
public static int confirmOpenNewProject(boolean isNewProject)
GeneralSettings.OPEN_PROJECT_SAME_WINDOW
GeneralSettings.OPEN_PROJECT_NEW_WINDOW
Messages.CANCEL
- if user canceled the dialogpublic static int confirmOpenOrAttachProject()
public static boolean isSameProject(java.lang.String projectFilePath, Project project)
public static void focusProjectWindow(Project project, boolean executeIfAppInactive)
public static java.lang.String getBaseDir()
public static Project tryOpenFileList(Project project, java.util.List<? extends java.io.File> list, java.lang.String location)
public static boolean isValidProjectPath(java.nio.file.Path file)