Search in sources :

Example 11 with RunConfigurationBase

use of com.intellij.execution.configurations.RunConfigurationBase in project intellij by bazelbuild.

the class BlazeAndroidTestProgramRunner method doExecute.

@Override
protected RunContentDescriptor doExecute(final RunProfileState state, final ExecutionEnvironment env) throws ExecutionException {
    RunContentDescriptor descriptor = super.doExecute(state, env);
    if (descriptor != null) {
        ProcessHandler processHandler = descriptor.getProcessHandler();
        assert processHandler != null;
        RunProfile runProfile = env.getRunProfile();
        int uniqueId = (runProfile instanceof RunConfigurationBase) ? ((RunConfigurationBase) runProfile).getUniqueID() : -1;
        AndroidSessionInfo sessionInfo = new AndroidSessionInfo(processHandler, descriptor, uniqueId, env.getExecutor().getId(), env.getExecutor().getActionName(), InstantRunUtils.isInstantRunEnabled(env));
        processHandler.putUserData(AndroidSessionInfo.KEY, sessionInfo);
    }
    return descriptor;
}
Also used : RunConfigurationBase(com.intellij.execution.configurations.RunConfigurationBase) RunContentDescriptor(com.intellij.execution.ui.RunContentDescriptor) AndroidSessionInfo(com.android.tools.idea.run.AndroidSessionInfo) ProcessHandler(com.intellij.execution.process.ProcessHandler) RunProfile(com.intellij.execution.configurations.RunProfile)

Example 12 with RunConfigurationBase

use of com.intellij.execution.configurations.RunConfigurationBase in project intellij by bazelbuild.

the class BlazeAndroidBinaryProgramRunner method doExecute.

@Override
protected RunContentDescriptor doExecute(final RunProfileState state, final ExecutionEnvironment env) throws ExecutionException {
    RunContentDescriptor descriptor = super.doExecute(state, env);
    if (descriptor != null) {
        ProcessHandler processHandler = descriptor.getProcessHandler();
        assert processHandler != null;
        RunProfile runProfile = env.getRunProfile();
        int uniqueId = (runProfile instanceof RunConfigurationBase) ? ((RunConfigurationBase) runProfile).getUniqueID() : -1;
        AndroidSessionInfo sessionInfo = new AndroidSessionInfo(processHandler, descriptor, uniqueId, env.getExecutor().getId(), env.getExecutor().getActionName(), InstantRunUtils.isInstantRunEnabled(env));
        processHandler.putUserData(AndroidSessionInfo.KEY, sessionInfo);
    }
    return descriptor;
}
Also used : RunConfigurationBase(com.intellij.execution.configurations.RunConfigurationBase) RunContentDescriptor(com.intellij.execution.ui.RunContentDescriptor) AndroidSessionInfo(com.android.tools.idea.run.AndroidSessionInfo) ProcessHandler(com.intellij.execution.process.ProcessHandler) RunProfile(com.intellij.execution.configurations.RunProfile)

Aggregations

RunConfigurationBase (com.intellij.execution.configurations.RunConfigurationBase)12 RunProfile (com.intellij.execution.configurations.RunProfile)6 ProcessHandler (com.intellij.execution.process.ProcessHandler)5 RunContentDescriptor (com.intellij.execution.ui.RunContentDescriptor)4 AndroidSessionInfo (com.android.tools.idea.run.AndroidSessionInfo)2 Module (com.intellij.openapi.module.Module)2 Project (com.intellij.openapi.project.Project)2 NotNull (org.jetbrains.annotations.NotNull)2 AndroidProject (com.android.builder.model.AndroidProject)1 Client (com.android.ddmlib.Client)1 IDevice (com.android.ddmlib.IDevice)1 NullOutputReceiver (com.android.ddmlib.NullOutputReceiver)1 ApkProjects.isApkProject (com.android.tools.idea.apk.ApkProjects.isApkProject)1 GradleSyncInvoker (com.android.tools.idea.gradle.project.sync.GradleSyncInvoker)1 GradleSyncListener (com.android.tools.idea.gradle.project.sync.GradleSyncListener)1 GradleSyncState (com.android.tools.idea.gradle.project.sync.GradleSyncState)1 AndroidTestRunConfiguration (com.android.tools.idea.testartifacts.instrumented.AndroidTestRunConfiguration)1 CompileStepBeforeRun (com.intellij.compiler.options.CompileStepBeforeRun)1 BaseCoverageSuite (com.intellij.coverage.BaseCoverageSuite)1 LogFilesManager (com.intellij.diagnostic.logging.LogFilesManager)1