use of com.google.cloud.tools.intellij.appengine.descriptor.dom.AppEngineStandardWebApp in project google-cloud-intellij by GoogleCloudPlatform.
the class AppEngineStandardFacet method getAppEngineStandardWebXml.
@Nullable
public AppEngineStandardWebApp getAppEngineStandardWebXml() {
XmlFile appengineWebXmlFile = AppEngineAssetProvider.getInstance().loadAppEngineStandardWebXml(getModule().getProject(), ImmutableList.of(getModule()));
final DomManager domManager = DomManager.getDomManager(getModule().getProject());
DomFileElement<AppEngineStandardWebApp> appEngineWebXmlDom = domManager.getFileElement(appengineWebXmlFile, AppEngineStandardWebApp.class);
if (appEngineWebXmlDom == null) {
return null;
}
return appEngineWebXmlDom.getRootElement();
}
use of com.google.cloud.tools.intellij.appengine.descriptor.dom.AppEngineStandardWebApp in project google-cloud-intellij by GoogleCloudPlatform.
the class AppEngineStandardFacet method getRuntimeJavaVersion.
/**
* Returns the {@link JavaVersion} of the Java runtime, as defined in the {@code
* appengine-web.xml}.
*
* <p>If no runtime is specified in the {@code appengine-web.xml} or if the specified runtime is
* not valid, {@link JavaVersion#JAVA_1_7} is returned.
*/
public JavaVersion getRuntimeJavaVersion() {
AppEngineStandardWebApp appEngineStandardWebApp = getAppEngineStandardWebXml();
if (appEngineStandardWebApp != null) {
String runtimeString = appEngineStandardWebApp.getRuntime().getStringValue();
JavaVersion runtimeVersion = RUNTIMES_MAP.get(runtimeString);
if (runtimeVersion != null) {
return runtimeVersion;
}
}
// The default runtime is Java 7.
return JavaVersion.JAVA_1_7;
}
Aggregations