How to make my language service work in a split code windowI have implemented a language service that seems to be working.  I'm connecting it to a standard code window.  The code window is editing objects from a db so it is not using files on disk.  All seems ok until I split the code window at which point the bottom pane is ok but the top pane seems not to paint at all.<br><br>I then loaded up the regexlangservice sample that came with the vs 2005 sdk.  It paints top and bottom but the scrollbar on the top pane won't paint.<br><br>Any ideas?<br> © 2009 Microsoft Corporation. All rights reserved.Thu, 11 Sep 2008 14:36:58 Z1eb6cbcc-a6e3-4c69-af52-cedac4a1d5afhttp://social.msdn.microsoft.com/Forums/en-US/vsx/thread/1eb6cbcc-a6e3-4c69-af52-cedac4a1d5af#1eb6cbcc-a6e3-4c69-af52-cedac4a1d5afhttp://social.msdn.microsoft.com/Forums/en-US/vsx/thread/1eb6cbcc-a6e3-4c69-af52-cedac4a1d5af#1eb6cbcc-a6e3-4c69-af52-cedac4a1d5afReggieAtSunhttp://social.msdn.microsoft.com/Profile/en-US/?user=ReggieAtSunHow to make my language service work in a split code windowI have implemented a language service that seems to be working.  I'm connecting it to a standard code window.  The code window is editing objects from a db so it is not using files on disk.  All seems ok until I split the code window at which point the bottom pane is ok but the top pane seems not to paint at all.<br><br>I then loaded up the regexlangservice sample that came with the vs 2005 sdk.  It paints top and bottom but the scrollbar on the top pane won't paint.<br><br>Any ideas?<br> Thu, 21 Aug 2008 17:13:54 Z2008-08-21T17:13:54Zhttp://social.msdn.microsoft.com/Forums/en-US/vsx/thread/1eb6cbcc-a6e3-4c69-af52-cedac4a1d5af#87103651-481d-4b4a-b6ad-29e24d8ca812http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/1eb6cbcc-a6e3-4c69-af52-cedac4a1d5af#87103651-481d-4b4a-b6ad-29e24d8ca812Aaron Martenhttp://social.msdn.microsoft.com/Profile/en-US/?user=Aaron%20MartenHow to make my language service work in a split code window Hi Reggie,<br><br>I've reproed the behavior you're describing in the RegExLangServ sample in the VS 2008 SDK. I'll track this down and post back here when I figure out what's going on.<br><br>Sincerely,<br>AaronM<hr size="1" align="left" width="25%">http://blogs.msdn.com/aaronmarWed, 27 Aug 2008 17:43:22 Z2008-08-27T17:43:22Zhttp://social.msdn.microsoft.com/Forums/en-US/vsx/thread/1eb6cbcc-a6e3-4c69-af52-cedac4a1d5af#f6609f41-6dc7-461c-8bcd-b2523b2f8202http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/1eb6cbcc-a6e3-4c69-af52-cedac4a1d5af#f6609f41-6dc7-461c-8bcd-b2523b2f8202Douglas Hodges _VS_http://social.msdn.microsoft.com/Profile/en-US/?user=Douglas%20Hodges%20_VS_How to make my language service work in a split code window<span style="color:#1f497d"><font face=Calibri>This is actually a bug with the RegEx Language Service sample.  The issue is that the sample does not register its language service under the following registry key:</font></span> <p style="margin:0in 0in 0pt"><span style="color:#1f497d"><font face=Calibri> </font></span></p> <p style="margin:0in 0in 0pt"><span style="color:#1f497d"><font face=Calibri>HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\9.0\Languages\Language Services</font></span></p> <p style="margin:0in 0in 0pt"><span style="color:#1f497d"><font face=Calibri> </font></span></p> <p style="margin:0in 0in 0pt"><span style="color:#1f497d"><font face=Calibri>If you are running the sample in the experimental hive with /RANU switch specified then this key would be:</font></span></p> <p style="margin:0in 0in 0pt"><span style="color:#1f497d"><font face=Calibri> </font></span></p> <p style="margin:0in 0in 0pt"><span style="color:#1f497d"><font face=Calibri>HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0Exp\Configuration\Languages\Language Services</font></span></p> <p style="margin:0in 0in 0pt"><span style="color:#1f497d"><font face=Calibri> </font></span></p> <p style="margin:0in 0in 0pt"><span style="color:#1f497d"><font face=Calibri>The good news is that there is an existing attribute that does this registration (ProvideLanguageService), but this was not  used in the RegExLanguageService sample. The sample can be easily fixed by adding the following attribute in VsPkg.cs:</font></span></p> <p style="margin:0in 0in 0pt"><span style="color:#1f497d"><font face=Calibri> </font></span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">    <span style="color:green">// This attribute is used to register your language under &quot;Language Services&quot; and set the </span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">    <span style="color:green">// defaults for your language's Tools-Options user preferences.</span></p> <p style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">    [<span style="color:#2b91af">ProvideLanguageService</span>(<span style="color:blue">typeof</span>(<span style="color:#2b91af">RegularExpressionLanguageService</span>), <span style="color:#a31515">&quot;Regular Expression&quot;</span>, 101, RequestStockColors=<span style="color:blue">true</span>)]</span></p> <p style="margin:0in 0in 0pt"><span style="color:#1f497d"><font face=Calibri> <br></font></span></p> <p style="margin:0in 0in 0pt"><span style="color:#1f497d"><font face=Calibri>This attribute has many optional parameters that let you set the various user preference options. <br><br>One should also add a string resource with ID=101 and value “Regular Expression”. </font></span></p></span></span><hr size="1" align="left" width="25%">Visual Studio IDE ArchitectWed, 10 Sep 2008 17:02:00 Z2008-09-10T17:02:00Zhttp://social.msdn.microsoft.com/Forums/en-US/vsx/thread/1eb6cbcc-a6e3-4c69-af52-cedac4a1d5af#565fe438-2009-42f5-a8d1-d9b3bb19afb4http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/1eb6cbcc-a6e3-4c69-af52-cedac4a1d5af#565fe438-2009-42f5-a8d1-d9b3bb19afb4Bert Huijbenhttp://social.msdn.microsoft.com/Profile/en-US/?user=Bert%20HuijbenHow to make my language service work in a split code window The &quot;RequestStockColors=true&quot; line in this example gave me the hint to resolve an issue I was looking for since August 2007.<br><br>My language service registered with RequestStockColors=false but provided no colors of its own.<br><br><br>This provided me with several resizing, redrawing and scrollbar issues I tried to work around. Adding RequestStockColors=true allowed me to remove all these workaround.<br><br>Thanks!<br>Thu, 11 Sep 2008 14:36:58 Z2008-09-11T14:36:58Z