public GotoGeneratorController( [NotNull] Lifetime lifetime, [NotNull] ISolution solution, [NotNull] IShellLocks locks, [NotNull] IDataContext context, IMainWindowPopupWindowContext mainWindowPopupWindowContext, bool enableMulticore) : base(lifetime, solution, solution, LibrariesFlag.SolutionOnly, locks, enableMulticore, new GotoByNameModel(lifetime), mainWindowPopupWindowContext) { this.EtcItemIcon = IdeThemedIcons.SearchResults.Id; this.ItemsPassFilter = new Property <Func <IOccurrence, bool> >("ItemsPassFilter", this.DefaultFilter); GotoByNameModelManager instance = GotoByNameModelManager.GetInstance(solution); instance.ProcessModel <GotoGeneratorModelInitilizer>(this.Model, lifetime, this.GetType()); ITextControl textControl = context.GetData(TextControlDataConstants.TEXT_CONTROL); Debug.Assert(textControl != null, "textControl != null"); var dataBuilder = new CSharpContextActionDataBuilder(); var generatorDataProvider = new GeneratorDataProvider((ICSharpContextActionDataProvider)dataBuilder.Build(solution, textControl)); var generatorsProvider = solution.GetComponent <GeneratorsProvider>(); var applicableGeneratorsCache = new ApplicableGeneratorsCache(generatorsProvider, generatorDataProvider); this.GotoContext.PutData(ApplicableGeneratorsCacheKey, applicableGeneratorsCache); _executionHost = context.GetComponent <GeneratorExecutionHost>(); }
public GotoWordIndexController([NotNull] Lifetime lifetime, [NotNull] ISolution solution, LibrariesFlag librariesFlag, [NotNull] IShellLocks locks, [NotNull] ITaskHost taskHost) : base(lifetime, solution, solution, librariesFlag, locks, taskHost, enableMulticore: false) #endif { var manager = GotoByNameModelManager.GetInstance(solution); manager.ProcessModel <GotoWordModelInitializer>(Model, lifetime); }