use of com.intellij.util.ThreeState in project go-lang-idea-plugin by go-lang-plugin-org.
the class GoVendoringUtil method isVendoringEnabled.
@Contract("null -> false")
public static boolean isVendoringEnabled(@Nullable Module module) {
if (module == null) {
return false;
}
String version = GoSdkService.getInstance(module.getProject()).getSdkVersion(module);
if (!vendoringCanBeDisabled(version)) {
return true;
}
ThreeState vendorSupportEnabled = GoModuleSettings.getInstance(module).getVendoringEnabled();
if (vendorSupportEnabled == ThreeState.UNSURE) {
return supportsVendoring(version) && supportsVendoringByDefault(version);
}
return vendorSupportEnabled.toBoolean();
}
Aggregations