use of com.google.idea.blaze.base.settings.BlazeImportSettings in project intellij by bazelbuild.
the class BlazeSyncManager method requestProjectSync.
/**
* Requests a project sync with Blaze.
*/
public void requestProjectSync(BlazeSyncParams syncParams) {
if (syncParams.syncMode == SyncMode.NO_BUILD && !syncParams.backgroundSync && !SyncDirectoriesWarning.warn(project)) {
return;
}
StartupManager.getInstance(project).runWhenProjectIsInitialized(() -> {
BlazeImportSettings importSettings = BlazeImportSettingsManager.getInstance(project).getImportSettings();
if (importSettings == null) {
throw new IllegalStateException(String.format("Attempt to sync non-%s project.", Blaze.buildSystemName(project)));
}
if (runInitialDirectoryOnlySync(syncParams)) {
BlazeSyncParams params = new BlazeSyncParams.Builder("Initial directory update", BlazeSyncParams.SyncMode.NO_BUILD).build();
submitTask(new BlazeSyncTask(project, importSettings, params));
}
submitTask(new BlazeSyncTask(project, importSettings, syncParams));
});
}
Aggregations