Search in sources :

Example 1 with BlazeIdeInterface

use of com.google.idea.blaze.base.sync.aspects.BlazeIdeInterface in project intellij by bazelbuild.

the class BlazeSyncTask method resolveIdeArtifacts.

private static BuildResult resolveIdeArtifacts(Project project, BlazeContext parentContext, WorkspaceRoot workspaceRoot, ProjectViewSet projectViewSet, BlazeVersionData blazeVersionData, WorkspaceLanguageSettings workspaceLanguageSettings, ShardedTargetList shardedTargets) {
    return Scope.push(parentContext, context -> {
        context.push(new TimingScope(Blaze.buildSystemName(project) + "Build", EventType.BlazeInvocation));
        context.output(new StatusOutput("Building IDE resolve files..."));
        // We don't want IDE resolve errors to fail the whole sync
        context.setPropagatesErrors(false);
        if (shardedTargets.isEmpty()) {
            return BuildResult.SUCCESS;
        }
        BlazeIdeInterface blazeIdeInterface = BlazeIdeInterface.getInstance();
        return blazeIdeInterface.resolveIdeArtifacts(project, context, workspaceRoot, projectViewSet, blazeVersionData, workspaceLanguageSettings, shardedTargets);
    });
}
Also used : TimingScope(com.google.idea.blaze.base.scope.scopes.TimingScope) StatusOutput(com.google.idea.blaze.base.scope.output.StatusOutput) BlazeIdeInterface(com.google.idea.blaze.base.sync.aspects.BlazeIdeInterface)

Example 2 with BlazeIdeInterface

use of com.google.idea.blaze.base.sync.aspects.BlazeIdeInterface in project intellij by bazelbuild.

the class BlazeSyncTask method getIdeQueryResult.

private BlazeIdeInterface.IdeResult getIdeQueryResult(Project project, BlazeContext parentContext, ProjectViewSet projectViewSet, BlazeVersionData blazeVersionData, BlazeConfigurationHandler configHandler, ShardedTargetList shardedTargets, WorkspaceLanguageSettings workspaceLanguageSettings, ArtifactLocationDecoder artifactLocationDecoder, Builder syncStateBuilder, @Nullable SyncState previousSyncState, boolean mergeWithOldState) {
    return Scope.push(parentContext, context -> {
        context.push(new TimingScope("IdeQuery", EventType.BlazeInvocation));
        context.output(new StatusOutput("Building IDE info files..."));
        context.setPropagatesErrors(false);
        BlazeIdeInterface blazeIdeInterface = BlazeIdeInterface.getInstance();
        return blazeIdeInterface.updateTargetMap(project, context, workspaceRoot, projectViewSet, blazeVersionData, configHandler, shardedTargets, workspaceLanguageSettings, artifactLocationDecoder, syncStateBuilder, previousSyncState, mergeWithOldState);
    });
}
Also used : TimingScope(com.google.idea.blaze.base.scope.scopes.TimingScope) StatusOutput(com.google.idea.blaze.base.scope.output.StatusOutput) BlazeIdeInterface(com.google.idea.blaze.base.sync.aspects.BlazeIdeInterface)

Aggregations

StatusOutput (com.google.idea.blaze.base.scope.output.StatusOutput)2 TimingScope (com.google.idea.blaze.base.scope.scopes.TimingScope)2 BlazeIdeInterface (com.google.idea.blaze.base.sync.aspects.BlazeIdeInterface)2