private bool ShouldAddCodeVision( IMethodDeclaration methodDeclaration, IHighlightingConsumer consumer, IReadOnlyCallGraphContext context) { var isBurstIconsEnabled = base.IsGutterMarkEnabled; var boundStore = mySettingsStore.BoundSettingsStore; var providerId = myBurstCodeInsightProvider.ProviderId; void Fallback() => base.Analyze(methodDeclaration, consumer, context); return(isBurstIconsEnabled && RiderIconProviderUtil.IsCodeVisionEnabled(boundStore, providerId, Fallback, out _)); }
protected override bool CheckAndAnalyze(IMethodDeclaration methodDeclaration, IHighlightingConsumer consumer) { if (consumer == null) { return(false); } if (!RiderIconProviderUtil.IsCodeVisionEnabled(mySettingsStore.BoundSettingsStore, myCodeInsightProvider.ProviderId, () => { }, out _)) { return(false); } var declaredElement = methodDeclaration.DeclaredElement; myCodeInsightProvider.AddHighlighting(consumer, methodDeclaration, declaredElement, BurstCodeAnalysisUtil.BURST_DISPLAY_NAME, BurstCodeAnalysisUtil.BURST_TOOLTIP, BurstCodeAnalysisUtil.BURST_DISPLAY_NAME, myIconHost.Transform(InsightUnityIcons.InsightUnity.Id), GetBurstActions(methodDeclaration), null); return(false); }