use of com.android.tools.idea.gradle.variant.view.BuildVariantView in project android by JetBrains.
the class SelectBuildVariantAction method doPerform.
@Override
protected void doPerform(@NotNull AnActionEvent e, @NotNull final Project project) {
final Module module = getSelectedAndroidModule(e);
if (module != null) {
ToolWindowManager manager = ToolWindowManager.getInstance(project);
ToolWindow toolWindow = manager.getToolWindow(BuildVariantToolWindowFactory.ID);
if (toolWindow != null) {
toolWindow.activate(new Runnable() {
@Override
public void run() {
BuildVariantView view = BuildVariantView.getInstance(project);
view.findAndSelectVariantEditor(module);
}
});
}
}
}
use of com.android.tools.idea.gradle.variant.view.BuildVariantView in project android by JetBrains.
the class SyncProjectActionTest method testDoPerform.
public void testDoPerform() {
Project project = getProject();
BuildVariantView buildVariantView = IdeComponents.replaceServiceWithMock(project, BuildVariantView.class);
myAction.doPerform(myEvent, project);
assertTrue(myPresentation.isEnabled());
verify(mySyncInvoker).requestProjectSyncAndSourceGeneration(project, null);
verify(buildVariantView).projectImportStarted();
}
Aggregations