<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://dotneteers.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>LearnVSXNow! #38 - VS 2010 Editor - Text Coloring Sample Deep Dive</title><link>http://dotneteers.net/blogs/divedeeper/archive/2008/11/04/LearnVSXNowPart38.aspx</link><description>In the previous part of the LearnVSXNow! series I shared my first experiences with the new Visual Studio 2010 SDK CTP. To help you understand new features in VS 2010 editor extensibility I decided to write a deep dive about a few examples. I selected</description><dc:language>en</dc:language><generator>CommunityServer 2008 (Build: 30417.1769)</generator><item><title>re: LearnVSXNow! #38 - VS 2010 Editor - Text Coloring Sample Deep Dive</title><link>http://dotneteers.net/blogs/divedeeper/archive/2008/11/04/LearnVSXNowPart38.aspx#2029</link><pubDate>Tue, 30 Mar 2010 01:44:26 GMT</pubDate><guid isPermaLink="false">74e06254-0e07-4c08-8611-9f55b924f030:2029</guid><dc:creator>Jin Feng</dc:creator><description>&lt;p&gt;Hi Noah and inovak,&lt;/p&gt;
&lt;p&gt;I got the same question that Bill asked in this thread. Do you have any update or examples to illustrate the solution?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://dotneteers.net/aggbug.aspx?PostID=2029" width="1" height="1"&gt;</description></item><item><title>Boo syntax highlighting pro Visual Studio 2010</title><link>http://dotneteers.net/blogs/divedeeper/archive/2008/11/04/LearnVSXNowPart38.aspx#2014</link><pubDate>Fri, 26 Mar 2010 17:52:21 GMT</pubDate><guid isPermaLink="false">74e06254-0e07-4c08-8611-9f55b924f030:2014</guid><dc:creator>Tomáš Pastorek</dc:creator><description>&lt;p&gt;V jenom svém projektu používám skriptovací jazyk Boo , o kterém jsem před nedávnem psal ve svém seriálu&lt;/p&gt;
&lt;img src="http://dotneteers.net/aggbug.aspx?PostID=2014" width="1" height="1"&gt;</description></item><item><title>re: LearnVSXNow! #38 - VS 2010 Editor - Text Coloring Sample Deep Dive</title><link>http://dotneteers.net/blogs/divedeeper/archive/2008/11/04/LearnVSXNowPart38.aspx#1430</link><pubDate>Fri, 13 Nov 2009 17:18:09 GMT</pubDate><guid isPermaLink="false">74e06254-0e07-4c08-8611-9f55b924f030:1430</guid><dc:creator>Supernova</dc:creator><description>&lt;p&gt;Why don&amp;#39;t you support us with a frakking solution file for download?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://dotneteers.net/aggbug.aspx?PostID=1430" width="1" height="1"&gt;</description></item><item><title>re: LearnVSXNow! #38 - VS 2010 Editor - Text Coloring Sample Deep Dive</title><link>http://dotneteers.net/blogs/divedeeper/archive/2008/11/04/LearnVSXNowPart38.aspx#829</link><pubDate>Sun, 17 May 2009 04:31:48 GMT</pubDate><guid isPermaLink="false">74e06254-0e07-4c08-8611-9f55b924f030:829</guid><dc:creator>GA30</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Noah, Inovak, or anyone. Can anyone give any insight into the degree in which developing custom editors (rather than extensions to existing ones) has changed from VS2008 to VS2010. For example, have things changed drastically from the custom editor process described in LVSXN parts 15 - 17? &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://dotneteers.net/aggbug.aspx?PostID=829" width="1" height="1"&gt;</description></item><item><title>re: LearnVSXNow! #38 - VS 2010 Editor - Text Coloring Sample Deep Dive</title><link>http://dotneteers.net/blogs/divedeeper/archive/2008/11/04/LearnVSXNowPart38.aspx#563</link><pubDate>Sun, 08 Feb 2009 10:10:19 GMT</pubDate><guid isPermaLink="false">74e06254-0e07-4c08-8611-9f55b924f030:563</guid><dc:creator>Noah Richards</dc:creator><description>&lt;p&gt;Hey Bill,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m an editor dev, so I&amp;#39;ll see if I can help a bit.&lt;/p&gt;
&lt;p&gt;Except in the simplest circumstances, language classification probably requires you to build some type of model over the language. &amp;nbsp;If the only state you need to remember is, say, the lines that start in comments or multi-line strings or something similar, that&amp;#39;s information that you&amp;#39;ll want to create and store in your classifier (and update whenever text changes). &amp;nbsp;More complicated scenarios will generally require building a more complicated model on top of the text, which is what most languages end up doing.&lt;/p&gt;
&lt;p&gt;To the end of making this analysis simpler, buffers use a snapshot model, where you can get a stable version of the text in a buffer at any point in time (hence why the argument to GetClassifications is a SnapshotSpan), along with methods for translating SnapshotPoints and SnapshotSpans from one version of the buffer to another.&lt;/p&gt;
&lt;p&gt;Unfortunately, the TextColoringSample is an overly-complicated example of writing a classifier, since it adds in the aspect of creating and consuming a new extension (the IWordListProvider). &amp;nbsp;Most classifiers will only have to write the classifier provider and classifier (and either create or re-use some of the existing classification types and format definitions). &amp;nbsp;The intent is that implementing the classifier interfaces is a small burden on top of whatever language analysis you&amp;#39;ll need to write, and so you can concentrate on the complicated stuff and not classifiers themselves.&lt;/p&gt;
&lt;p&gt;If you (or Inovak) have any questions, drop me a line; noah.richards @ ms.&lt;/p&gt;
&lt;p&gt;-Noah&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://dotneteers.net/aggbug.aspx?PostID=563" width="1" height="1"&gt;</description></item><item><title>text editor  | Digg.com</title><link>http://dotneteers.net/blogs/divedeeper/archive/2008/11/04/LearnVSXNowPart38.aspx#421</link><pubDate>Sat, 29 Nov 2008 14:07:06 GMT</pubDate><guid isPermaLink="false">74e06254-0e07-4c08-8611-9f55b924f030:421</guid><dc:creator>text editor  | Digg.com</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;text editor &amp;nbsp;| Digg.com&lt;/p&gt;
&lt;img src="http://dotneteers.net/aggbug.aspx?PostID=421" width="1" height="1"&gt;</description></item><item><title>re: LearnVSXNow! #38 - VS 2010 Editor - Text Coloring Sample Deep Dive</title><link>http://dotneteers.net/blogs/divedeeper/archive/2008/11/04/LearnVSXNowPart38.aspx#416</link><pubDate>Wed, 26 Nov 2008 05:28:21 GMT</pubDate><guid isPermaLink="false">74e06254-0e07-4c08-8611-9f55b924f030:416</guid><dc:creator>inovak</dc:creator><description>&lt;p&gt;Hi Bill,&lt;/p&gt;
&lt;p&gt;The question you mentioned is one of the few I am really interested in. Right now I try get closer to those Microsoft guys who work on the new editor. They have code samples answering your questions, but those are not public yet. As a VSX insider I hope they will open it and allow me to blog about the whole classification process.&lt;/p&gt;
&lt;p&gt;One thing I know is that classification is the mechanism they use for syntax coloring in the new VS. With classicifaction they can handle all aspects of coloring includng comments and context sensitive keywords (like select, from, yield, etc.)&lt;/p&gt;
&lt;p&gt;As soon as I get some news I try to publish them.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://dotneteers.net/aggbug.aspx?PostID=416" width="1" height="1"&gt;</description></item><item><title>re: LearnVSXNow! #38 - VS 2010 Editor - Text Coloring Sample Deep Dive</title><link>http://dotneteers.net/blogs/divedeeper/archive/2008/11/04/LearnVSXNowPart38.aspx#414</link><pubDate>Tue, 25 Nov 2008 20:55:10 GMT</pubDate><guid isPermaLink="false">74e06254-0e07-4c08-8611-9f55b924f030:414</guid><dc:creator>Bill</dc:creator><description>&lt;p&gt;Great article... question though. &amp;nbsp;Say you were writing a classifier for a language like C# where a /* could be above the line that is being classified by IClassifier.GetClassificationSpans. &amp;nbsp;How would you know that? &amp;nbsp;In your sample, you are just iterating words assuming that the start of a line is a start of the default lexical state. &amp;nbsp;Can you give any hints on how an advanced classifier would be done that processes things like being in multi-line comments, etc.?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://dotneteers.net/aggbug.aspx?PostID=414" width="1" height="1"&gt;</description></item></channel></rss>