Search in sources :

Example 1 with CloudDebugConfigType

use of com.google.cloud.tools.intellij.debugger.CloudDebugConfigType in project google-cloud-intellij by GoogleCloudPlatform.

the class AppEngineStandardWebIntegration method setupDebugRunConfiguration.

private void setupDebugRunConfiguration(@NotNull Project project) {
    RunManager runManager = RunManager.getInstance(project);
    boolean hasExistingDebugConfiguration = runManager.getAllConfigurationsList().stream().anyMatch(config -> config instanceof CloudDebugRunConfiguration);
    if (!hasExistingDebugConfiguration) {
        CloudDebugConfigType debugConfigType = CloudDebugConfigType.getInstance();
        ConfigurationFactory factory = debugConfigType.getConfigurationFactories()[0];
        RunnerAndConfigurationSettings settings = runManager.createConfiguration(new CloudDebugRunConfiguration(project, factory).clone(), factory);
        runManager.addConfiguration(settings, false);
    }
}
Also used : CloudDebugRunConfiguration(com.google.cloud.tools.intellij.debugger.CloudDebugRunConfiguration) CloudDebugConfigType(com.google.cloud.tools.intellij.debugger.CloudDebugConfigType) ConfigurationFactory(com.intellij.execution.configurations.ConfigurationFactory) RunnerAndConfigurationSettings(com.intellij.execution.RunnerAndConfigurationSettings) RunManager(com.intellij.execution.RunManager)

Aggregations

CloudDebugConfigType (com.google.cloud.tools.intellij.debugger.CloudDebugConfigType)1 CloudDebugRunConfiguration (com.google.cloud.tools.intellij.debugger.CloudDebugRunConfiguration)1 RunManager (com.intellij.execution.RunManager)1 RunnerAndConfigurationSettings (com.intellij.execution.RunnerAndConfigurationSettings)1 ConfigurationFactory (com.intellij.execution.configurations.ConfigurationFactory)1