private static bool IsNancyRazorPage(IPsiSourceFile sourceFile) { var project = sourceFile.GetProject(); if (!project.IsProjectReferencingNancy() || !project.IsProjectReferencingNancyRazorViewEngine()) { return false; } string pageBaseType = WebConfigCache.GetData(sourceFile).GetRazorBasePageType(isCSharp: true); return !string.IsNullOrWhiteSpace(pageBaseType) && pageBaseType.StartsWith("Nancy.ViewEngines.Razor.NancyRazorViewBase"); }
public IReferenceFactory CreateFactory(IPsiSourceFile sourceFile, IFile file) { var project = sourceFile.GetProject(); if (project == null || !project.IsUnityProject()) return null; if (sourceFile.PrimaryPsiLanguage.Is<CSharpLanguage>()) return new UnityEventFunctionReferenceFactory(); return null; }
public IReferenceFactory CreateFactory(IPsiSourceFile sourceFile, IFile file, IWordIndex wordIndexForChecks) { var project = sourceFile.GetProject(); if (project == null || !project.IsUnityProject()) { return(null); } if (sourceFile.PrimaryPsiLanguage.Is <CSharpLanguage>()) { return(new UnityObjectTypeReferenceFactory()); } return(null); }
public IReferenceFactory CreateFactory(IPsiSourceFile sourceFile, IFile file) { var project = sourceFile.GetProject(); if (project == null || !project.IsUnityProject()) { return(null); } if (sourceFile.PrimaryPsiLanguage.Is <CSharpLanguage>()) { return(new UnityEventFunctionReferenceFactory()); } return(null); }
public IReferenceFactory CreateFactory(IPsiSourceFile sourceFile, IFile file, IWordIndex wordIndexForChecks) { var project = sourceFile.GetProject(); if (project == null || !project.IsUnityProject()) { return(null); } if (sourceFile.IsAsmDef() && sourceFile.PrimaryPsiLanguage.Is <JsonLanguage>()) { return(new AsmDefNameReferenceFactory()); } return(null); }
public bool IsApplicable(IPsiSourceFile sourceFile) { var project = sourceFile.GetProject(); return(project != null && project.IsUnityProject()); }
public bool IsApplicable(IPsiSourceFile sourceFile) { var project = sourceFile.GetProject(); return project != null && project.IsUnityProject(); }