diff --git a/aspect/intellij_info_impl.bzl b/aspect/intellij_info_impl.bzl index 84610948903..bf085c5020a 100644 --- a/aspect/intellij_info_impl.bzl +++ b/aspect/intellij_info_impl.bzl @@ -373,6 +373,7 @@ def collect_py_info(target, ctx, semantics, ide_info, ide_info_file, output_grou args = getattr(ctx.rule.attr, "args", []) data_deps = getattr(ctx.rule.attr, "data", []) args = _do_starlark_string_expansion(ctx, "args", args, data_deps) + imports = getattr(ctx.rule.attr, "imports", []) ide_info["py_ide_info"] = struct_omit_none( launcher = py_launcher, @@ -380,6 +381,7 @@ def collect_py_info(target, ctx, semantics, ide_info, ide_info_file, output_grou sources = sources, srcs_version = _get_python_srcs_version(ctx), args = args, + imports = imports, ) update_sync_output_groups(output_groups, "intellij-info-py", depset([ide_info_file])) diff --git a/base/src/META-INF/blaze-base.xml b/base/src/META-INF/blaze-base.xml index c100d7ac619..c3308a9a61f 100644 --- a/base/src/META-INF/blaze-base.xml +++ b/base/src/META-INF/blaze-base.xml @@ -89,16 +89,16 @@ class="com.google.idea.blaze.base.actions.CopyBlazeTargetPathAction" text="Copy BUILD Target String"> + + - - + + - diff --git a/base/src/com/google/idea/blaze/base/actions/CompileCorrespondingBuildFilesAction.java b/base/src/com/google/idea/blaze/base/actions/CompileCorrespondingBuildFilesAction.java deleted file mode 100644 index b8c8aa3bdd1..00000000000 --- a/base/src/com/google/idea/blaze/base/actions/CompileCorrespondingBuildFilesAction.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2016 The Bazel Authors. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.idea.blaze.base.actions; - -import com.google.common.collect.ImmutableSet; -import com.google.idea.blaze.base.build.BlazeBuildService; -import com.google.idea.blaze.base.lang.buildfile.psi.BuildFile; -import com.google.idea.blaze.base.lang.buildfile.search.BlazePackage; -import com.google.idea.blaze.base.model.primitives.Label; -import com.google.idea.blaze.base.sync.status.BlazeSyncStatus; -import com.google.idea.common.actions.ActionPresentationHelper; -import com.intellij.openapi.actionSystem.*; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vfs.VirtualFile; - -/** Allows a partial sync of the project depending on what's been selected. */ -public class CompileCorrespondingBuildFilesAction extends BlazeProjectAction { - - @Override - protected void actionPerformedInBlazeProject(Project project, AnActionEvent e) { - if (!BlazeSyncStatus.getInstance(project).syncInProgress()) { - runBuild(project, e); - } - updateStatus(project, e); - } - - - private static void updateStatus(Project project, AnActionEvent e) { - Presentation presentation = e.getPresentation(); - presentation.setEnabled(!BlazeSyncStatus.getInstance(project).syncInProgress()); - } - - protected void runBuild(Project project, AnActionEvent e) { - VirtualFile vf = e.getData(CommonDataKeys.VIRTUAL_FILE); - ImmutableSet