public UnityShaderModuleHandlerAndDecorator( UnityShaderModule module, IProjectPsiModuleHandler handler) : base(handler) { myAllModules = new List <IPsiModule>(base.GetAllModules()); myAllModules.Add(module); myShaderLabProperties = new ShaderFilesProperties(true); myCppProperties = new ShaderFilesProperties(false); myModule = module; myDocumentManager = module.GetSolution().GetComponent <DocumentManager>(); }
public Tuple <IProjectPsiModuleHandler, IPsiModuleDecorator> OverrideHandler(Lifetime lifetime, IProject project, IProjectPsiModuleHandler handler) { if (handler.PrimaryModule != null && UnityReferencesTracker.ReferencesUnity(project)) { var module = new UnityShaderModule(project.GetSolution(), project.Name, handler.PrimaryModule.TargetFrameworkId); var newHandlerAndDecorator = new UnityShaderModuleHandlerAndDecorator(module, handler); return(new Tuple <IProjectPsiModuleHandler, IPsiModuleDecorator>(newHandlerAndDecorator, newHandlerAndDecorator)); } return(null); }