private static List <ITreeNode> FindArrayUsages(IDeclaredElement declaredElement, IClassLikeDeclaration container, IDaemonProcess daemonProcess, DaemonProcessKind processKind) { var result = new List <ITreeNode>(); if (processKind != DaemonProcessKind.GLOBAL_WARNINGS) { var collectUsagesStageProcess = daemonProcess?.GetStageProcess <CollectUsagesStageProcess>(); if (collectUsagesStageProcess == null) { return(result); } foreach (var usage in collectUsagesStageProcess.GetDeclaredElementUsages(declaredElement) .Where(container.Contains)) { result.Add(usage); } return(result); } var finder = declaredElement.GetPsiServices().Finder; foreach (var reference in finder.FindAllReferences(declaredElement)) { result.Add(reference.GetTreeNode()); } return(result); }
public DaemonStageProcess(IDaemonProcess process, SearchDomainFactory searchDomainFactory, ICSharpFile csFile) { this.searchDomainFactory = searchDomainFactory; this.csFile = csFile; DaemonProcess = process; usages = process.GetStageProcess<CollectUsagesStageProcess>(); Assertion.Assert(usages != null, "usages != null"); }
public DaemonStageProcess(IDaemonProcess process, SearchDomainFactory searchDomainFactory, ICSharpFile csFile) { this.searchDomainFactory = searchDomainFactory; this.csFile = csFile; DaemonProcess = process; usages = process.GetStageProcess <CollectUsagesStageProcess>(); Assertion.Assert(usages != null, "usages != null"); }
public InspectionsProcess(IDaemonProcess process, IContextBoundSettingsStore settings) : base(process, settings) { process.SourceFile.PrimaryPsiLanguage.Is <PsiLanguage>(); process.GetStageProcess <PsiFileIndexProcess>(); myDeclarations = new Dictionary <string, List <IDeclaration> >(); VisitFile(process.SourceFile.GetPsiFile <PsiLanguage>(new DocumentRange(process.SourceFile.Document, 0)) as IPsiFile); }
public InspectionsProcess(IDaemonProcess process, IContextBoundSettingsStore settings) : base(process, settings) { process.SourceFile.PrimaryPsiLanguage.Is<PsiLanguage>(); process.GetStageProcess<PsiFileIndexProcess>(); myDeclarations = new Dictionary<string, List<IDeclaration>>(); VisitFile(process.SourceFile.GetPsiFile<PsiLanguage>(new DocumentRange(process.SourceFile.Document, 0)) as IPsiFile); }
public override IDaemonStageProcess CreateProcess(IDaemonProcess process, IContextBoundSettingsStore settings, DaemonProcessKind processKind) { if (!IsSupported(process.SourceFile)) return null; var collectUsagesStageProcess = process.GetStageProcess<CollectUsagesStageProcess>(); var typeUsageManager = new TypeUsageManager(collectUsagesStageProcess); return new ContainerRegistrationAnalysisStageProcess(process, settings, typeUsageManager, solutionAnalyzer); }
public CallGraphContext(DaemonProcessKind processKind, [NotNull] IDaemonProcess daemonProcess) { myProcessKind = processKind; myDaemonProcess = daemonProcess; if (processKind == DaemonProcessKind.VISIBLE_DOCUMENT) { var collectUsageProcess = daemonProcess.GetStageProcess <CollectUsagesStageProcess>().NotNull(); myGraphDataElement = collectUsageProcess.SwaExtensionsUsageDataInfo[CallGraphSwaExtensionProvider.Id].As <CallGraphDataElement>(); } myStack.Push(new BoundContextTag(CallGraphContextTag.NONE, null)); }
public override IDaemonStageProcess CreateProcess(IDaemonProcess process, IContextBoundSettingsStore settings, DaemonProcessKind processKind) #endif { if (!IsSupported(process.SourceFile)) { return(null); } var collectUsagesStageProcess = process.GetStageProcess <CollectUsagesStageProcess>(); var typeUsageManager = new TypeUsageManager(collectUsagesStageProcess); return(new ContainerRegistrationAnalysisStageProcess(process, settings, typeUsageManager, solutionAnalyzer)); }
private IDaemonStageProcess DoCreateProcess(IDaemonProcess process, IContextBoundSettingsStore settings, DaemonProcessKind processKind) { if (!IsSupported(process.SourceFile)) { return null; } if (processKind != DaemonProcessKind.VISIBLE_DOCUMENT) { return null; } var collectUsagesStageProcess = process.GetStageProcess<CollectUsagesStageProcess>(); var typeUsageManager = new TypeUsageManager(collectUsagesStageProcess); return new ContainerRegistrationAnalysisStageProcess(process, settings, typeUsageManager, patternManager); }
private IDaemonStageProcess DoCreateProcess(IDaemonProcess process, IContextBoundSettingsStore settings, DaemonProcessKind processKind) { if (!IsSupported(process.SourceFile)) { return(null); } if (processKind != DaemonProcessKind.VISIBLE_DOCUMENT) { return(null); } var collectUsagesStageProcess = process.GetStageProcess <CollectUsagesStageProcess>(); var typeUsageManager = new TypeUsageManager(collectUsagesStageProcess); return(new ContainerRegistrationAnalysisStageProcess(process, settings, typeUsageManager, patternManager)); }
public IEnumerable<IDaemonStageProcess> CreateProcess(IDaemonProcess process, IContextBoundSettingsStore settings, DaemonProcessKind processKind) { process.Solution.GetPsiServices().DependencyStore.AddDependency(MvcSpecificFileImageContributor.Dependency); IProjectFile projectFile = process.SourceFile.ToProjectFile(); if (projectFile == null) { return Enumerable.Empty<IDaemonStageProcess>(); } if (!projectFile.IsProjectReferencingNancy()) { return Enumerable.Empty<IDaemonStageProcess>(); } return new[] { new NancyDaemonStageProcess(searchDomainFactory, process, process.GetStageProcess<CollectUsagesStageProcess>(), settings) }; }
public IEnumerable <IDaemonStageProcess> CreateProcess(IDaemonProcess process, IContextBoundSettingsStore settings, DaemonProcessKind processKind) { process.Solution.GetPsiServices().DependencyStore.AddDependency(MvcSpecificFileImageContributor.Dependency); IProjectFile projectFile = process.SourceFile.ToProjectFile(); if (projectFile == null) { return(Enumerable.Empty <IDaemonStageProcess>()); } if (!projectFile.IsProjectReferencingNancy()) { return(Enumerable.Empty <IDaemonStageProcess>()); } return(new[] { new NancyDaemonStageProcess(searchDomainFactory, process, process.GetStageProcess <CollectUsagesStageProcess>(), settings) }); }