public final class ExternalSystemUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static <any> |
HASHING_STRATEGY |
Modifier and Type | Method and Description |
---|---|
static BuildEvent |
convert(ExternalSystemTaskExecutionEvent taskExecutionEvent) |
static ExecutionEnvironment |
createExecutionEnvironment(Project project,
ProjectSystemId externalSystemId,
ExternalSystemTaskExecutionSettings taskSettings,
java.lang.String executorId) |
static RunnerAndConfigurationSettings |
createExternalSystemRunnerAndConfigurationSettings(ExternalSystemTaskExecutionSettings taskSettings,
Project project,
ProjectSystemId externalSystemId) |
static FailureResultImpl |
createFailureResult(java.lang.String title,
java.lang.Exception exception,
ProjectSystemId externalSystemId,
Project project,
DataProvider dataProvider) |
static ToolWindow |
ensureToolWindowContentInitialized(Project project,
ProjectSystemId externalSystemId) |
static void |
ensureToolWindowInitialized(Project project,
ProjectSystemId externalSystemId) |
static int |
fileHashCode(java.io.File file) |
static boolean |
filesEqual(java.io.File file1,
java.io.File file2) |
static AbstractExternalSystemTaskConfigurationType |
findConfigurationType(ProjectSystemId externalSystemId) |
static VirtualFile |
findLocalFileByPath(java.lang.String path) |
static ExternalSystemExecutionConsoleManager<ExternalSystemRunConfiguration,ExecutionConsole,ProcessHandler> |
getConsoleManagerFor(ExternalSystemTask task) |
static ExternalProjectInfo |
getExternalProjectInfo(Project project,
ProjectSystemId projectSystemId,
java.lang.String externalProjectPath) |
static java.lang.String |
getRunnerId(java.lang.String executorId) |
static void |
invokeLater(Project p,
ModalityState state,
java.lang.Runnable r) |
static void |
invokeLater(Project p,
java.lang.Runnable r) |
static boolean |
isNewProject(Project project) |
static boolean |
isNoBackgroundMode() |
static void |
linkExternalProject(ProjectSystemId externalSystemId,
ExternalProjectSettings projectSettings,
Project project,
Consumer<? super java.lang.Boolean> importResultCallback,
boolean isPreviewMode,
ProgressExecutionMode progressExecutionMode)
Tries to obtain external project info implied by the given settings and link that external project to the given ide project.
|
static VirtualFile |
refreshAndFindFileByIoFile(java.io.File file) |
static void |
refreshProject(Project project,
ProjectSystemId externalSystemId,
java.lang.String externalProjectPath,
boolean isPreviewMode,
ProgressExecutionMode progressExecutionMode) |
static void |
refreshProject(Project project,
ProjectSystemId externalSystemId,
java.lang.String externalProjectPath,
ExternalProjectRefreshCallback callback,
boolean isPreviewMode,
ProgressExecutionMode progressExecutionMode)
Import external project.
|
static void |
refreshProject(Project project,
ProjectSystemId externalSystemId,
java.lang.String externalProjectPath,
ExternalProjectRefreshCallback callback,
boolean isPreviewMode,
ProgressExecutionMode progressExecutionMode,
boolean reportRefreshError)
Import external project.
|
static void |
refreshProject(java.lang.String externalProjectPath,
ImportSpec importSpec) |
static void |
refreshProject(java.lang.String externalProjectPath,
ImportSpecBuilder importSpecBuilder) |
static void |
refreshProjects(ImportSpec spec)
Asks to refresh all external projects of the target external system linked to the given ide project based on provided spec
|
static void |
refreshProjects(ImportSpecBuilder specBuilder)
Asks to refresh all external projects of the target external system linked to the given ide project based on provided spec
|
static void |
refreshProjects(Project project,
ProjectSystemId externalSystemId,
boolean force)
Deprecated.
|
static void |
refreshProjects(Project project,
ProjectSystemId externalSystemId,
boolean force,
ProgressExecutionMode progressExecutionMode)
Deprecated.
|
static void |
runTask(ExternalSystemTaskExecutionSettings taskSettings,
java.lang.String executorId,
Project project,
ProjectSystemId externalSystemId) |
static void |
runTask(ExternalSystemTaskExecutionSettings taskSettings,
java.lang.String executorId,
Project project,
ProjectSystemId externalSystemId,
TaskCallback callback,
ProgressExecutionMode progressExecutionMode) |
static void |
runTask(ExternalSystemTaskExecutionSettings taskSettings,
java.lang.String executorId,
Project project,
ProjectSystemId externalSystemId,
TaskCallback callback,
ProgressExecutionMode progressExecutionMode,
boolean activateToolWindowBeforeRun) |
static void |
runTask(ExternalSystemTaskExecutionSettings taskSettings,
java.lang.String executorId,
Project project,
ProjectSystemId externalSystemId,
TaskCallback callback,
ProgressExecutionMode progressExecutionMode,
boolean activateToolWindowBeforeRun,
UserDataHolderBase userData) |
static void |
scheduleExternalViewStructureUpdate(Project project,
ProjectSystemId systemId) |
public static int fileHashCode(java.io.File file)
public static boolean filesEqual(java.io.File file1, java.io.File file2)
public static void ensureToolWindowInitialized(Project project, ProjectSystemId externalSystemId)
public static ToolWindow ensureToolWindowContentInitialized(Project project, ProjectSystemId externalSystemId)
@Deprecated public static void refreshProjects(Project project, ProjectSystemId externalSystemId, boolean force)
refreshProjects(ImportSpecBuilder)
project
- target ide projectexternalSystemId
- target external system which projects should be refreshedforce
- flag which defines if external project refresh should be performed if it's config is up-to-date@Deprecated public static void refreshProjects(Project project, ProjectSystemId externalSystemId, boolean force, ProgressExecutionMode progressExecutionMode)
refreshProjects(ImportSpecBuilder)
project
- target ide projectexternalSystemId
- target external system which projects should be refreshedforce
- flag which defines if external project refresh should be performed if it's config is up-to-datepublic static void refreshProjects(ImportSpecBuilder specBuilder)
specBuilder
- import specification builderpublic static void refreshProjects(ImportSpec spec)
spec
- import specificationpublic static void refreshProject(Project project, ProjectSystemId externalSystemId, java.lang.String externalProjectPath, boolean isPreviewMode, ProgressExecutionMode progressExecutionMode)
public static void refreshProject(Project project, ProjectSystemId externalSystemId, java.lang.String externalProjectPath, ExternalProjectRefreshCallback callback, boolean isPreviewMode, ProgressExecutionMode progressExecutionMode)
Import external project.
project
- target intellij project to useexternalProjectPath
- path of the target external project's filecallback
- callback to be notified on refresh resultisPreviewMode
- flag that identifies whether libraries should be resolved during the refreshpublic static void refreshProject(Project project, ProjectSystemId externalSystemId, java.lang.String externalProjectPath, ExternalProjectRefreshCallback callback, boolean isPreviewMode, ProgressExecutionMode progressExecutionMode, boolean reportRefreshError)
Import external project.
project
- target intellij project to useexternalProjectPath
- path of the target external projectcallback
- callback to be notified on refresh resultisPreviewMode
- flag that identifies whether libraries should be resolved during the refreshreportRefreshError
- prevent to show annoying error notification, e.g. if auto-import mode usedpublic static void refreshProject(java.lang.String externalProjectPath, ImportSpecBuilder importSpecBuilder)
public static void refreshProject(java.lang.String externalProjectPath, ImportSpec importSpec)
public static boolean isNewProject(Project project)
public static FailureResultImpl createFailureResult(java.lang.String title, java.lang.Exception exception, ProjectSystemId externalSystemId, Project project, DataProvider dataProvider)
public static BuildEvent convert(ExternalSystemTaskExecutionEvent taskExecutionEvent)
public static void runTask(ExternalSystemTaskExecutionSettings taskSettings, java.lang.String executorId, Project project, ProjectSystemId externalSystemId)
public static void runTask(ExternalSystemTaskExecutionSettings taskSettings, java.lang.String executorId, Project project, ProjectSystemId externalSystemId, TaskCallback callback, ProgressExecutionMode progressExecutionMode)
public static void runTask(ExternalSystemTaskExecutionSettings taskSettings, java.lang.String executorId, Project project, ProjectSystemId externalSystemId, TaskCallback callback, ProgressExecutionMode progressExecutionMode, boolean activateToolWindowBeforeRun)
public static void runTask(ExternalSystemTaskExecutionSettings taskSettings, java.lang.String executorId, Project project, ProjectSystemId externalSystemId, TaskCallback callback, ProgressExecutionMode progressExecutionMode, boolean activateToolWindowBeforeRun, UserDataHolderBase userData)
public static ExecutionEnvironment createExecutionEnvironment(Project project, ProjectSystemId externalSystemId, ExternalSystemTaskExecutionSettings taskSettings, java.lang.String executorId)
public static RunnerAndConfigurationSettings createExternalSystemRunnerAndConfigurationSettings(ExternalSystemTaskExecutionSettings taskSettings, Project project, ProjectSystemId externalSystemId)
public static AbstractExternalSystemTaskConfigurationType findConfigurationType(ProjectSystemId externalSystemId)
public static java.lang.String getRunnerId(java.lang.String executorId)
public static void linkExternalProject(ProjectSystemId externalSystemId, ExternalProjectSettings projectSettings, Project project, Consumer<? super java.lang.Boolean> importResultCallback, boolean isPreviewMode, ProgressExecutionMode progressExecutionMode)
externalSystemId
- target external systemprojectSettings
- settings of the external project to linkproject
- target ide project to link external project toimportResultCallback
- it might take a while to resolve external project info, that's why it's possible to provide
a callback to be notified on processing result. It receives true
if an external
project info has been successfully obtained, false
otherwise.isPreviewMode
- flag which identifies if missing external project binaries should be downloadedprogressExecutionMode
- identifies how progress bar will be represented for the current processingpublic static VirtualFile refreshAndFindFileByIoFile(java.io.File file)
public static VirtualFile findLocalFileByPath(java.lang.String path)
public static void scheduleExternalViewStructureUpdate(Project project, ProjectSystemId systemId)
public static ExternalProjectInfo getExternalProjectInfo(Project project, ProjectSystemId projectSystemId, java.lang.String externalProjectPath)
public static ExternalSystemExecutionConsoleManager<ExternalSystemRunConfiguration,ExecutionConsole,ProcessHandler> getConsoleManagerFor(ExternalSystemTask task)
public static void invokeLater(Project p, java.lang.Runnable r)
public static void invokeLater(Project p, ModalityState state, java.lang.Runnable r)
public static boolean isNoBackgroundMode()