Search in sources :

Example 1 with RunConfigurationState

use of com.google.idea.blaze.base.run.state.RunConfigurationState in project intellij by bazelbuild.

the class BlazeAndroidBinaryRunConfigurationHandler method doMigrate.

private int doMigrate(Project project) {
    int count = 0;
    for (RunConfiguration runConfig : RunManager.getInstance(project).getConfigurationsList(BlazeCommandRunConfigurationType.getInstance())) {
        if (runConfig instanceof BlazeCommandRunConfiguration) {
            RunConfigurationState state = ((BlazeCommandRunConfiguration) runConfig).getHandler().getState();
            if (state instanceof BlazeAndroidBinaryRunConfigurationState) {
                ((BlazeAndroidBinaryRunConfigurationState) state).setLaunchMethod(AndroidBinaryLaunchMethod.MOBILE_INSTALL);
                count++;
            }
        }
    }
    return count;
}
Also used : RunConfigurationState(com.google.idea.blaze.base.run.state.RunConfigurationState) RunConfiguration(com.intellij.execution.configurations.RunConfiguration) BlazeCommandRunConfiguration(com.google.idea.blaze.base.run.BlazeCommandRunConfiguration) BlazeCommandRunConfiguration(com.google.idea.blaze.base.run.BlazeCommandRunConfiguration)

Aggregations

BlazeCommandRunConfiguration (com.google.idea.blaze.base.run.BlazeCommandRunConfiguration)1 RunConfigurationState (com.google.idea.blaze.base.run.state.RunConfigurationState)1 RunConfiguration (com.intellij.execution.configurations.RunConfiguration)1