use of com.intellij.facet.FacetConfiguration in project intellij-community by JetBrains.
the class PythonSdkType method findPythonSdk.
@Nullable
public static Sdk findPythonSdk(@Nullable Module module) {
if (module == null)
return null;
final Sdk sdk = ModuleRootManager.getInstance(module).getSdk();
if (sdk != null && sdk.getSdkType() instanceof PythonSdkType)
return sdk;
final Facet[] facets = FacetManager.getInstance(module).getAllFacets();
for (Facet facet : facets) {
final FacetConfiguration configuration = facet.getConfiguration();
if (configuration instanceof PythonFacetSettings) {
return ((PythonFacetSettings) configuration).getSdk();
}
}
return null;
}
Aggregations