public void VsTextViewCreated(IVsTextView textViewAdapter) { var textView = EditorAdaptersFactoryService.GetWpfTextView(textViewAdapter); var modules = new ModulesIndex(); textView.Properties.GetOrCreateSingletonProperty(() => new ModuleGoToDefinition(textViewAdapter, textView, modules, DurandalPackage.DTE)); textView.Properties.GetOrCreateSingletonProperty(() => new WidgetGoToDefinition(textViewAdapter, textView, modules, DurandalPackage.DTE)); }
public JavaScriptCompletionSource(ITextBuffer buffer, IGlyphService glyphService) { _buffer = buffer; var index = new ModulesIndex(); completionSources = new ReadOnlyCollection <StringCompletionSource>(new StringCompletionSource[] { new DefineCompletionSource(glyphService, index) }); }
public WidgetGoToDefinition(IVsTextView adapter, IWpfTextView textView, ModulesIndex modulesIndex, DTE dte) : base(adapter, textView, VSConstants.VSStd97CmdID.GotoDefn) { this.modules = modulesIndex; this.dte = dte; }
public DefineCompletionSource(IGlyphService glyphService, ModulesIndex index) { this.index = index; this.moduleIcon = glyphService.GetGlyph(StandardGlyphGroup.GlyphGroupClass, StandardGlyphItem.GlyphItemPublic); this.namespaceIcon = glyphService.GetGlyph(StandardGlyphGroup.GlyphGroupNamespace, StandardGlyphItem.GlyphItemPublic); }