private static VersionCompliance getWGAVersionCompliance(IResource resource, boolean fallbackToDefault) {
IFile wgaConfFile = WGADesignStructureHelper.determineSyncInfo(resource);
VersionCompliance wgaVersionCompliance = null;
if (wgaConfFile != null) {
WGADesignConfigurationModel currentWGAConf;
try {
currentWGAConf = new WGADesignConfigurationModelWrapper(wgaConfFile);
wgaVersionCompliance = currentWGAConf.getVersionCompliance();
} catch (IOException e) {
}
}
if (wgaVersionCompliance == null && fallbackToDefault) {
Activator.getDefault().logWarning("Unable to determine version compliance for '" + resource.getLocation() + "'. Using default version compliance '" + Activator.DEFAULT_VERSION_COMPLIANCE.getValue() + "'.");