Search in sources :

Example 1 with JavaeePersistentData

use of com.intellij.javaee.oss.server.JavaeePersistentData 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());
}
Also used : JavaeePersistentData(com.intellij.javaee.oss.server.JavaeePersistentData) CloudSdkService(com.google.cloud.tools.intellij.appengine.sdk.CloudSdkService) ApplicationServer(com.intellij.javaee.appServerIntegrations.ApplicationServer) AppEngineServerIntegration(com.google.cloud.tools.intellij.appengine.server.integration.AppEngineServerIntegration)

Aggregations

CloudSdkService (com.google.cloud.tools.intellij.appengine.sdk.CloudSdkService)1 AppEngineServerIntegration (com.google.cloud.tools.intellij.appengine.server.integration.AppEngineServerIntegration)1 ApplicationServer (com.intellij.javaee.appServerIntegrations.ApplicationServer)1 JavaeePersistentData (com.intellij.javaee.oss.server.JavaeePersistentData)1