use of com.google.cloud.tools.intellij.appengine.server.integration.AppEngineServerIntegration in project google-cloud-intellij by GoogleCloudPlatform.
the class AppEngineStandardUltimateWebIntegration method getOrCreateAppServer.
private static ApplicationServer getOrCreateAppServer() {
final CloudSdkService sdkService = CloudSdkService.getInstance();
if (sdkService == null) {
return null;
}
final AppEngineServerIntegration integration = AppEngineServerIntegration.getInstance();
// There are no distinguishing features about the App Engine servers so just return
// the first one found
final List<ApplicationServer> servers = ApplicationServersManager.getInstance().getApplicationServers(integration);
if (!servers.isEmpty()) {
return servers.iterator().next();
}
return ApplicationServersManager.getInstance().createServer(integration, new JavaeePersistentData());
}
Aggregations