use of com.google.idea.blaze.android.run.runner.BlazeAndroidRunContext in project intellij by bazelbuild.
the class BlazeAndroidBinaryRunConfigurationHandler method createRunner.
@Override
public BlazeCommandRunConfigurationRunner createRunner(Executor executor, ExecutionEnvironment environment) throws ExecutionException {
Project project = environment.getProject();
Module module = getModule();
AndroidFacet facet = module != null ? AndroidFacet.getInstance(module) : null;
ProjectViewSet projectViewSet = ProjectViewManager.getInstance(project).getProjectViewSet();
BlazeAndroidRunConfigurationValidationUtil.validateExecution(module, facet, projectViewSet);
ImmutableList<String> blazeFlags = configState.getCommonState().getExpandedBuildFlags(project, projectViewSet, BlazeCommandName.RUN);
ImmutableList<String> exeFlags = ImmutableList.copyOf(configState.getCommonState().getExeFlagsState().getExpandedFlags());
BlazeAndroidRunContext runContext = createRunContext(project, facet, environment, blazeFlags, exeFlags);
return new BlazeAndroidRunConfigurationRunner(module, runContext, getCommonState().getDeployTargetManager(), getCommonState().getDebuggerManager(), configuration.getUniqueID());
}
use of com.google.idea.blaze.android.run.runner.BlazeAndroidRunContext in project intellij by bazelbuild.
the class BlazeAndroidTestRunConfigurationHandler method createRunner.
@Override
public BlazeCommandRunConfigurationRunner createRunner(Executor executor, ExecutionEnvironment environment) throws ExecutionException {
Project project = environment.getProject();
Module module = getModule();
AndroidFacet facet = module != null ? AndroidFacet.getInstance(module) : null;
ProjectViewSet projectViewSet = ProjectViewManager.getInstance(project).getProjectViewSet();
BlazeAndroidRunConfigurationValidationUtil.validateExecution(module, facet, projectViewSet);
ImmutableList<String> blazeFlags = configState.getCommonState().getExpandedBuildFlags(project, projectViewSet, BlazeCommandName.TEST);
ImmutableList<String> exeFlags = ImmutableList.copyOf(configState.getCommonState().getExeFlagsState().getExpandedFlags());
BlazeAndroidRunContext runContext = createRunContext(project, facet, environment, blazeFlags, exeFlags);
return new BlazeAndroidRunConfigurationRunner(module, runContext, getCommonState().getDeployTargetManager(), getCommonState().getDebuggerManager(), configuration.getUniqueID());
}
Aggregations