|  | 
|  | 1 | +/* | 
|  | 2 | + * Copyright 2025 The Bazel Authors. All rights reserved. | 
|  | 3 | + * | 
|  | 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | 
|  | 5 | + * you may not use this file except in compliance with the License. | 
|  | 6 | + * You may obtain a copy of the License at | 
|  | 7 | + * | 
|  | 8 | + *    http://www.apache.org/licenses/LICENSE-2.0 | 
|  | 9 | + * | 
|  | 10 | + * Unless required by applicable law or agreed to in writing, software | 
|  | 11 | + * distributed under the License is distributed on an "AS IS" BASIS, | 
|  | 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
|  | 13 | + * See the License for the specific language governing permissions and | 
|  | 14 | + * limitations under the License. | 
|  | 15 | + */ | 
|  | 16 | + | 
|  | 17 | +package com.google.idea.blaze.base.sync; | 
|  | 18 | + | 
|  | 19 | +import com.google.common.collect.ImmutableSet; | 
|  | 20 | +import com.google.idea.blaze.base.model.BlazeProjectData; | 
|  | 21 | +import com.google.idea.blaze.base.projectview.ProjectViewSet; | 
|  | 22 | +import com.google.idea.blaze.base.scope.BlazeContext; | 
|  | 23 | +import com.google.idea.blaze.base.settings.BlazeImportSettings; | 
|  | 24 | +import com.google.idea.blaze.base.targetmaps.SourceToTargetMap; | 
|  | 25 | +import com.intellij.openapi.project.Project; | 
|  | 26 | +import java.io.File; | 
|  | 27 | + | 
|  | 28 | +public class SourceToTargetMapInitializer implements SyncListener { | 
|  | 29 | + | 
|  | 30 | +  @Override | 
|  | 31 | +  public void onSyncComplete(Project project, BlazeContext context, | 
|  | 32 | +      BlazeImportSettings importSettings, ProjectViewSet projectViewSet, | 
|  | 33 | +      ImmutableSet<Integer> buildIds, BlazeProjectData blazeProjectData, SyncMode syncMode, | 
|  | 34 | +      SyncResult syncResult) { | 
|  | 35 | +    // eagerly instantiate source to target map | 
|  | 36 | +    SourceToTargetMap.getInstance(project).getRulesForSourceFile(new File("")); | 
|  | 37 | +  } | 
|  | 38 | +} | 
0 commit comments