Exemple #1
0
        public int GetCodeWindowManager(IVsCodeWindow pCodeWin, out IVsCodeWindowManager ppCodeWinMgr)
        {
            var ptvsService = _serviceProvider.GetPythonToolsService();

            ppCodeWinMgr = ptvsService.GetOrCreateCodeWindowManager(pCodeWin);
            return(VSConstants.S_OK);
        }
Exemple #2
0
        int IVsLanguageInfo.GetCodeWindowManager(IVsCodeWindow codeWindow, out IVsCodeWindowManager codeWindowManager)
        {
            codeWindowManager = CreateCodeWindowManager(codeWindow);

            if (codeWindowManager != null)
                return VSConstants.S_OK;
            else
                return VSConstants.E_NOTIMPL;
        }
        public int GetCodeWindowManager(
            IVsCodeWindow pCodeWin,
            out IVsCodeWindowManager ppCodeWinMgr
            )
        {
            ppCodeWinMgr = new VsCodeWindowManager((TLanguageService)this, pCodeWin);

            return(VSConstants.S_OK);
        }
Exemple #4
0
        int IVsLanguageInfo.GetCodeWindowManager(IVsCodeWindow codeWindow, out IVsCodeWindowManager codeWindowManager)
        {
            codeWindowManager = CreateCodeWindowManager(codeWindow);

            if (codeWindowManager != null)
            {
                return(VSErr.S_OK);
            }
            else
            {
                return(VSErr.E_NOTIMPL);
            }
        }
Exemple #5
0
        public int GetCodeWindowManager(IVsCodeWindow pCodeWin, out IVsCodeWindowManager ppCodeWinMgr)
        {
            var model = _serviceProvider.GetService(typeof(SComponentModel)) as IComponentModel;
            var service = model.GetService<IVsEditorAdaptersFactoryService>();

            IVsTextView textView;
            if (ErrorHandler.Succeeded(pCodeWin.GetPrimaryView(out textView))) {
                ppCodeWinMgr = new CodeWindowManager(pCodeWin, service.GetWpfTextView(textView), _componentModel);

                return VSConstants.S_OK;
            }

            ppCodeWinMgr = null;
            return VSConstants.E_FAIL;
        }
Exemple #6
0
        public int GetCodeWindowManager(IVsCodeWindow pCodeWin, out IVsCodeWindowManager ppCodeWinMgr)
        {
            var model   = _serviceProvider.GetService(typeof(SComponentModel)) as IComponentModel;
            var service = model.GetService <IVsEditorAdaptersFactoryService>();

            IVsTextView textView;

            if (ErrorHandler.Succeeded(pCodeWin.GetPrimaryView(out textView)))
            {
                ppCodeWinMgr = new CodeWindowManager(pCodeWin, service.GetWpfTextView(textView));
                return(VSConstants.S_OK);
            }

            ppCodeWinMgr = null;
            return(VSConstants.E_FAIL);
        }
        public int GetCodeWindowManager(IVsCodeWindow pCodeWin, out IVsCodeWindowManager ppCodeWinMgr)
        {
            var adaptersFactory = _serviceProvider.GetComponentModel().GetService<IVsEditorAdaptersFactoryService>();

            IVsTextLines textLines;
            ErrorHandler.ThrowOnFailure(pCodeWin.GetBuffer(out textLines));
            var textBuffer = adaptersFactory.GetDataBuffer(textLines);
            if (textBuffer == null)
            {
                ppCodeWinMgr = null;
                return VSConstants.E_FAIL;
            }

            ppCodeWinMgr = _serviceProvider.GetHlslToolsService().GetOrCreateCodeWindowManager(pCodeWin);
            return VSConstants.S_OK;
        }
        int IVsLanguageInfo.GetCodeWindowManager(IVsCodeWindow pCodeWin, out IVsCodeWindowManager ppCodeWinMgr)
        {
            IVsEditorAdaptersFactoryService adaptersFactory = ComponentModel.GetService <IVsEditorAdaptersFactoryService>();

            IVsTextLines textLines;

            ErrorHandler.ThrowOnFailure(pCodeWin.GetBuffer(out textLines));
            ITextBuffer textBuffer = adaptersFactory.GetDataBuffer(textLines);

            if (textBuffer == null)
            {
                ppCodeWinMgr = null;
                return(VSConstants.E_FAIL);
            }

            ppCodeWinMgr = GetCodeWindowManager(pCodeWin, textBuffer);
            return(VSConstants.S_OK);
        }
        public int GetCodeWindowManager(IVsCodeWindow pCodeWin, out IVsCodeWindowManager ppCodeWinMgr)
        {
            var adaptersFactory = _serviceProvider.GetComponentModel().GetService <IVsEditorAdaptersFactoryService>();

            IVsTextLines textLines;

            ErrorHandler.ThrowOnFailure(pCodeWin.GetBuffer(out textLines));
            var textBuffer = adaptersFactory.GetDataBuffer(textLines);

            if (textBuffer == null)
            {
                ppCodeWinMgr = null;
                return(VSConstants.E_FAIL);
            }

            ppCodeWinMgr = _languagePackage.GetOrCreateCodeWindowManager(pCodeWin);
            return(VSConstants.S_OK);
        }
Exemple #10
0
        public int GetCodeWindowManager(IVsCodeWindow pCodeWin, out IVsCodeWindowManager ppCodeWinMgr) {
#if !DEV12_OR_LATER
            var model = _serviceProvider.GetService(typeof(SComponentModel)) as IComponentModel;
            var service = model.GetService<IVsEditorAdaptersFactoryService>();

            IVsTextView textView;
            if (ErrorHandler.Succeeded(pCodeWin.GetPrimaryView(out textView))) {
                var wpfView = service.GetWpfTextView(textView);

                var controller = DjangoIntellisenseControllerProvider.GetOrCreateController(model, wpfView);
                controller.AttachKeyboardFilter();

#if DEV11
                new TextViewFilter(textView);
#endif
            }
#endif
            ppCodeWinMgr = null;
            return VSConstants.E_FAIL;
        }
        public int GetCodeWindowManager(IVsCodeWindow pCodeWin, out IVsCodeWindowManager ppCodeWinMgr)
        {
#if !DEV12_OR_LATER
            var model   = _serviceProvider.GetService(typeof(SComponentModel)) as IComponentModel;
            var service = model.GetService <IVsEditorAdaptersFactoryService>();

            IVsTextView textView;
            if (ErrorHandler.Succeeded(pCodeWin.GetPrimaryView(out textView)))
            {
                var wpfView = service.GetWpfTextView(textView);

                var controller = DjangoIntellisenseControllerProvider.GetOrCreateController(model, wpfView);
                controller.AttachKeyboardFilter();

#if DEV11
                new TextViewFilter(textView);
#endif
            }
#endif
            ppCodeWinMgr = null;
            return(VSConstants.E_FAIL);
        }
Exemple #12
0
 public virtual int GetCodeWindowManager(IVsCodeWindow pCodeWin, out IVsCodeWindowManager ppCodeWinMgr)
 {
     ppCodeWinMgr = null;
     return(VSConstants.E_NOTIMPL);
 }
Exemple #13
0
 public int GetCodeWindowManager(IVsCodeWindow pCodeWin, out IVsCodeWindowManager ppCodeWinMgr) {
     var ptvsService = _serviceProvider.GetPythonToolsService();
     ppCodeWinMgr = ptvsService.GetOrCreateCodeWindowManager(pCodeWin);
     return VSConstants.S_OK;
 }
Exemple #14
0
 public int GetCodeWindowManager(IVsCodeWindow pCodeWin, out IVsCodeWindowManager ppCodeWinMgr)
 {
     ppCodeWinMgr = null;
     return(VSConstants.E_FAIL);
 }
Exemple #15
0
 int IVsLanguageInfo.GetCodeWindowManager(IVsCodeWindow pCodeWin, out IVsCodeWindowManager ppCodeWinMgr)
 {
     var ptvsService = _serviceProvider.GetAlpaLanguageService();
     ppCodeWinMgr = ptvsService.GetOrCreateCodeWindowManager(pCodeWin);
     return VSConstants.S_OK;
 }
Exemple #16
0
 public int GetCodeWindowManager(IVsCodeWindow pCodeWin, out IVsCodeWindowManager ppCodeWinMgr)
 {
     ppCodeWinMgr = new DartCodeWindowManager(textDocumentFactory, editorAdapterFactory, pCodeWin, analysisServiceFactory);
     return(VSConstants.S_OK);
 }
Exemple #17
0
 // GetCodeWindowManager -- this gives us the VsCodeWindow which is what we need to
 // add adornments and so forth.
 /// <include file='doc\LanguageService.uex' path='docs/doc[@for="LanguageService.GetCodeWindowManager"]/*' />
 public int GetCodeWindowManager(IVsCodeWindow codeWindow, out IVsCodeWindowManager mgr) {
     Initialize();
     IVsTextLines buffer = null;
     NativeMethods.ThrowOnFailure(codeWindow.GetBuffer(out buffer));
     mgr = CreateCodeWindowManager(codeWindow, GetOrCreateSource(buffer));
     return NativeMethods.S_OK;
 }
 public int GetCodeWindowManager(IVsCodeWindow pCodeWin, out IVsCodeWindowManager ppCodeWinMgr)
 {
     ppCodeWinMgr = new DartCodeWindowManager(textDocumentFactory, editorAdapterFactory, pCodeWin, analysisServiceFactory);
     return VSConstants.S_OK;
 }
Exemple #19
0
 int IVsLanguageInfo.GetCodeWindowManager(IVsCodeWindow pCodeWin, out IVsCodeWindowManager ppCodeWinMgr)
 {
     IVsTextLines lines;
     IVsEditorAdaptersFactoryService service = this.ComponentModel.GetService<IVsEditorAdaptersFactoryService>();
     ErrorHandler.ThrowOnFailure(pCodeWin.GetBuffer(out lines));
     IVsTextBuffer bufferAdapter = lines;
     ITextBuffer dataBuffer = service.GetDataBuffer(bufferAdapter);
     if (dataBuffer == null)
     {
         ppCodeWinMgr = null;
         return -2147467259;
     }
     ppCodeWinMgr = this.GetCodeWindowManager(pCodeWin, dataBuffer);
     return 0;
 }
Exemple #20
0
 public int GetCodeWindowManager(IVsCodeWindow codeWindow, out IVsCodeWindowManager mgr);
Exemple #21
0
 int IVsLanguageInfo.GetCodeWindowManager(IVsCodeWindow pCodeWin, out IVsCodeWindowManager ppCodeWinMgr)
 {
     ppCodeWinMgr = null;
     return(VSConstants.E_NOTIMPL);
 }
Exemple #22
0
        int IVsLanguageInfo.GetCodeWindowManager(IVsCodeWindow pCodeWin, out IVsCodeWindowManager ppCodeWinMgr)
        {
            IVsEditorAdaptersFactoryService adaptersFactory = ComponentModel.GetService<IVsEditorAdaptersFactoryService>();

            IVsTextLines textLines;
            ErrorHandler.ThrowOnFailure(pCodeWin.GetBuffer(out textLines));
            ITextBuffer textBuffer = adaptersFactory.GetDataBuffer(textLines);
            if (textBuffer == null)
            {
                ppCodeWinMgr = null;
                return VSConstants.E_FAIL;
            }

            ppCodeWinMgr = GetCodeWindowManager(pCodeWin, textBuffer);
            return VSConstants.S_OK;
        }
Exemple #23
0
 // GetCodeWindowManager -- this gives us the VsCodeWindow which is what we need to
 // add adornments and so forth.
 public virtual int GetCodeWindowManager(IVsCodeWindow w, out IVsCodeWindowManager mgr) {
   IVsCodeWindow codeWindow = (IVsCodeWindow)w;
   IVsTextView textView;
   w.GetPrimaryView(out textView);
   IVsTextLines buffer;
   textView.GetBuffer(out buffer);
   mgr = this.GetCodeWindowManager(this, codeWindow, GetSource(buffer));
   return 0;
 }
        public int GetCodeWindowManager(IVsCodeWindow pCodeWin, out IVsCodeWindowManager ppCodeWinMgr)
        {
            ppCodeWinMgr = new GdCodeWindowManager(this, _package, pCodeWin);

            return(VSConstants.S_OK);
        }
        public int GetCodeWindowManager(IVsCodeWindow pCodeWin, out IVsCodeWindowManager ppCodeWinMgr) {

            ppCodeWinMgr = new CodeWindowManager(pCodeWin, _serviceContainer);
            
            return VSConstants.S_OK;
        }
 public int GetCodeWindowManager(IVsCodeWindow pCodeWin, out IVsCodeWindowManager ppCodeWinMgr)
 {
     ppCodeWinMgr = default;
     return(VSConstants.E_NOTIMPL);
 }
 public int GetCodeWindowManager(IVsCodeWindow pCodeWin, out IVsCodeWindowManager ppCodeWinMgr)
 {
     ppCodeWinMgr = null;
     return FAILED;
 }
 public int GetCodeWindowManager(IVsCodeWindow pCodeWin, out IVsCodeWindowManager ppCodeWinMgr) {
     ppCodeWinMgr = new CodeWindowManager(_componentModel.GetService<IVsEditorAdaptersFactoryService>());
     return VSConstants.S_OK;
 }
 public int GetCodeWindowManager(IVsCodeWindow pCodeWin, out IVsCodeWindowManager ppCodeWinMgr) {
     ppCodeWinMgr = null;
     return VSConstants.E_NOTIMPL;
 }
 public int GetCodeWindowManager(IVsCodeWindow pCodeWin, out IVsCodeWindowManager ppCodeWinMgr)
 {
     ppCodeWinMgr = null;
     return(failed);
 }
 public int GetCodeWindowManager(IVsCodeWindow pCodeWin, out IVsCodeWindowManager ppCodeWinMgr)
 {
     ppCodeWinMgr = new CodeWindowManager(_componentModel.GetService <IVsEditorAdaptersFactoryService>());
     return(VSConstants.S_OK);
 }
Exemple #32
0
 public int GetCodeWindowManager(IVsCodeWindow codeWindow, out IVsCodeWindowManager mgr);
        // GetCodeWindowManager -- this gives us the VsCodeWindow which is what we need to
        // add adornments and so forth.
        /// <include file='doc\LanguageService.uex' path='docs/doc[@for="LanguageService.GetCodeWindowManager"]/*' />
        public int GetCodeWindowManager(IVsCodeWindow codeWindow, out IVsCodeWindowManager mgr)
        {
            //set the inheritKeyBinding guid so that navigation keys work. Do this before deriving class's
            //CreateCodeWindowManager method gets called, so they may override if required
            IOleServiceProvider sp = codeWindow as IOleServiceProvider;
            if (sp != null) {
                ServiceProvider site = new ServiceProvider(sp);
                object window = site.GetService(typeof(IVsWindowFrame).GUID);
                if (window is IVsWindowFrame) {
                    IVsWindowFrame frame = (IVsWindowFrame)window;
                    Guid CMDUIGUID_TextEditor = new Guid(0x8B382828, 0x6202, 0x11d1, 0x88, 0x70, 0x00, 0x00, 0xF8, 0x75, 0x79, 0xD2);
                    NativeMethods.ThrowOnFailure(frame.SetGuidProperty((int)__VSFPROPID.VSFPROPID_InheritKeyBindings, ref CMDUIGUID_TextEditor));
                }
            }

            Initialize();
            IVsTextLines buffer = null;
            NativeMethods.ThrowOnFailure(codeWindow.GetBuffer(out buffer));
            mgr = CreateCodeWindowManager(codeWindow, GetOrCreateSource(buffer));
            return NativeMethods.S_OK;
        }