Search in sources :

Example 21 with ThreeState

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();
}
Also used : ThreeState(com.intellij.util.ThreeState) Contract(org.jetbrains.annotations.Contract)

Aggregations

ThreeState (com.intellij.util.ThreeState)21 PsiElement (com.intellij.psi.PsiElement)4 NotNull (org.jetbrains.annotations.NotNull)4 StackFrameProxyImpl (com.intellij.debugger.jdi.StackFrameProxyImpl)3 Project (com.intellij.openapi.project.Project)3 Ref (com.intellij.openapi.util.Ref)3 SourcePosition (com.intellij.debugger.SourcePosition)2 SuspendContextImpl (com.intellij.debugger.engine.SuspendContextImpl)2 EvaluateException (com.intellij.debugger.engine.evaluation.EvaluateException)2 ExpressionEvaluator (com.intellij.debugger.engine.evaluation.expression.ExpressionEvaluator)2 JavaLanguage (com.intellij.lang.java.JavaLanguage)2 Logger (com.intellij.openapi.diagnostic.Logger)2 Document (com.intellij.openapi.editor.Document)2 TextEditor (com.intellij.openapi.fileEditor.TextEditor)2 TextRange (com.intellij.openapi.util.TextRange)2 Registry (com.intellij.openapi.util.registry.Registry)2 Client (com.android.ddmlib.Client)1 ClientData (com.android.ddmlib.ClientData)1 IDevice (com.android.ddmlib.IDevice)1 GoBuildTargetSettings (com.goide.project.GoBuildTargetSettings)1