use of com.google.idea.blaze.base.model.BlazeProjectData in project intellij by bazelbuild.
the class BlazeGoRootsProvider method getGoPathSourcesRoots.
@Override
public Collection<VirtualFile> getGoPathSourcesRoots(@Nullable Project project, @Nullable Module module) {
if (project == null) {
return ImmutableList.of();
}
BlazeProjectData projectData = BlazeProjectDataManager.getInstance(project).getBlazeProjectData();
if (projectData == null || !projectData.workspaceLanguageSettings.isLanguageActive(LanguageClass.GO) || !BlazeGoSupport.blazeGoSupportEnabled.getValue()) {
return ImmutableList.of();
}
File goRoot = getGoRoot(project);
if (goRoot == null) {
return ImmutableList.of();
}
VirtualFile goRootVF = VirtualFileSystemProvider.getInstance().getSystem().findFileByIoFile(goRoot);
return goRootVF != null ? ImmutableList.of(goRootVF) : ImmutableList.of();
}
use of com.google.idea.blaze.base.model.BlazeProjectData in project intellij by bazelbuild.
the class FastBuildServiceImpl method checkLabelIsSupported.
private void checkLabelIsSupported(Label label) {
BlazeProjectData blazeProjectData = projectDataManager.getBlazeProjectData();
checkState(blazeProjectData != null, "this is not a blaze project");
TargetIdeInfo ideInfo = blazeProjectData.targetMap.get(TargetKey.forPlainTarget(label));
checkArgument(ideInfo != null, "label %s is not found, run a blaze sync?", label);
checkArgument(supportsFastBuilds(ideInfo.kind), "fast builds are not supported for %s targets", ideInfo.kind);
}
Aggregations