Search in sources :

Example 1 with BlazeScalaSyncData

use of com.google.idea.blaze.scala.sync.model.BlazeScalaSyncData in project intellij by bazelbuild.

the class BlazeScalaSyncPlugin method updateSyncState.

@Override
public void updateSyncState(Project project, BlazeContext context, WorkspaceRoot workspaceRoot, ProjectViewSet projectViewSet, WorkspaceLanguageSettings workspaceLanguageSettings, BlazeInfo blazeInfo, @Nullable WorkingSet workingSet, WorkspacePathResolver workspacePathResolver, ArtifactLocationDecoder artifactLocationDecoder, TargetMap targetMap, Builder syncStateBuilder, @Nullable SyncState previousSyncState) {
    if (!workspaceLanguageSettings.isLanguageActive(LanguageClass.SCALA)) {
        return;
    }
    BlazeScalaWorkspaceImporter blazeScalaWorkspaceImporter = new BlazeScalaWorkspaceImporter(project, workspaceRoot, projectViewSet, targetMap);
    BlazeScalaImportResult importResult = Scope.push(context, (childContext) -> {
        childContext.push(new TimingScope("ScalaWorkspaceImporter", EventType.Other));
        return blazeScalaWorkspaceImporter.importWorkspace();
    });
    BlazeScalaSyncData syncData = new BlazeScalaSyncData(importResult);
    syncStateBuilder.put(BlazeScalaSyncData.class, syncData);
}
Also used : BlazeScalaWorkspaceImporter(com.google.idea.blaze.scala.sync.importer.BlazeScalaWorkspaceImporter) TimingScope(com.google.idea.blaze.base.scope.scopes.TimingScope) BlazeScalaImportResult(com.google.idea.blaze.scala.sync.model.BlazeScalaImportResult) BlazeScalaSyncData(com.google.idea.blaze.scala.sync.model.BlazeScalaSyncData)

Aggregations

TimingScope (com.google.idea.blaze.base.scope.scopes.TimingScope)1 BlazeScalaWorkspaceImporter (com.google.idea.blaze.scala.sync.importer.BlazeScalaWorkspaceImporter)1 BlazeScalaImportResult (com.google.idea.blaze.scala.sync.model.BlazeScalaImportResult)1 BlazeScalaSyncData (com.google.idea.blaze.scala.sync.model.BlazeScalaSyncData)1