use of com.google.cloud.tools.intellij.debugger.CloudDebugRunConfiguration 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);
}
}
use of com.google.cloud.tools.intellij.debugger.CloudDebugRunConfiguration in project google-cloud-intellij by GoogleCloudPlatform.
the class ToggleSnapshotLocationAction method update.
@Override
public void update(AnActionEvent event) {
Editor editor = EDITOR.getData(event.getDataContext());
if (editor == null) {
return;
}
RunManagerImpl runManager = RunManagerImpl.getInstanceImpl(editor.getProject());
for (RunConfiguration runConfiguration : runManager.getAllConfigurations()) {
if (runConfiguration instanceof CloudDebugRunConfiguration) {
event.getPresentation().setVisible(true);
return;
}
}
event.getPresentation().setVisible(false);
}
Aggregations