<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/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>Platform extensibility - Part 2</title><link>http://blogs.msdn.com/b/vsproject/archive/2009/06/18/platform-extensibility-part-2.aspx</link><description>In my previous blog post on platform extensibility, I introduced you to the data-driven nature of the property pages UI. I explained how a collection of xml files drives the UI but stopped short of describing the contents of these files. I'll continue</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Platform extensibility - Part 2</title><link>http://blogs.msdn.com/b/vsproject/archive/2009/06/18/platform-extensibility-part-2.aspx#9808872</link><pubDate>Mon, 29 Jun 2009 22:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9808872</guid><dc:creator>boris.dusek</dc:creator><description>&lt;p&gt;Hello Pavan,&lt;/p&gt;
&lt;p&gt;I checked and I made a typo in my post, but not in the flex file itself. In the file itself, I have correctly &amp;lt;Rule Name=&amp;quot;Flex&amp;quot; PageTemplate=&amp;quot;tool&amp;quot; SwitchPrefix=&amp;quot;-&amp;quot; Order=&amp;quot;10&amp;quot;&amp;gt;. The &amp;quot;SwitchPrefix&amp;quot; string is occuring only once in the whole file, and that is in the Rule element as specified above. I posted the file at &lt;a rel="nofollow" target="_new" href="http://cid-4b1a2a5233d113a1.skydrive.live.com/self.aspx/.Public/flex.xml"&gt;http://cid-4b1a2a5233d113a1.skydrive.live.com/self.aspx/.Public/flex.xml&lt;/a&gt; in case you want to take a look. I don't know what causes the UI to not honor the SwitchPrefix, maybe that's a post-Beta 1 feature?&lt;/p&gt;
&lt;p&gt;Thanks, Boris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9808872" width="1" height="1"&gt;</description></item><item><title>re: Platform extensibility - Part 2</title><link>http://blogs.msdn.com/b/vsproject/archive/2009/06/18/platform-extensibility-part-2.aspx#9808865</link><pubDate>Mon, 29 Jun 2009 22:40:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9808865</guid><dc:creator>Pavan Adharapurapu</dc:creator><description>&lt;p&gt;Boris, this is a reply to your comment on Saturday, June 20, 2009 5:11 AM.&lt;/p&gt;
&lt;p&gt;Sorry for the delay in responding.&lt;/p&gt;
&lt;p&gt;Boris, you should change the &amp;quot;SwitchPrefix&amp;quot; attribute to &amp;quot;-&amp;quot; rather than the &amp;quot;Switch&amp;quot; attribute as you mention. Note: If you want to change the switch prefix for a particular property only, change/define SwitchPrefix on that particular property. If you want it changed on all properties in the Rule, change SwitchPrefix on the Rule itself (and make sure no other property overrides it locally to some other value)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9808865" width="1" height="1"&gt;</description></item><item><title>re: Platform extensibility - Part 2</title><link>http://blogs.msdn.com/b/vsproject/archive/2009/06/18/platform-extensibility-part-2.aspx#9793241</link><pubDate>Sat, 20 Jun 2009 12:11:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9793241</guid><dc:creator>boris.dusek</dc:creator><description>&lt;p&gt;Pavan, thank you very much, after applying your suggestions, I was successful! One remark though - I specified Switch=&amp;quot;-&amp;quot;, but the property page UI still shows &amp;quot;/&amp;quot;.&lt;/p&gt;
&lt;p&gt;Looking forward to your next posts! Thanks, Boris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9793241" width="1" height="1"&gt;</description></item><item><title>re: Platform extensibility - Part 2</title><link>http://blogs.msdn.com/b/vsproject/archive/2009/06/18/platform-extensibility-part-2.aspx#9792569</link><pubDate>Sat, 20 Jun 2009 04:49:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9792569</guid><dc:creator>Pavan Adharapurapu</dc:creator><description>&lt;p&gt;Boris, this is a reply to your post on Friday, June 19, 2009 9:25 AM.&lt;/p&gt;
&lt;p&gt;You are almost there. The reason solution explorer does not show the input.l file is because the system does not know that the item type &amp;quot;Flex&amp;quot; represents an item type for a source file. Do the following three steps and everything should work.&lt;/p&gt;
&lt;p&gt;Step 1&lt;/p&gt;
&lt;p&gt;------&lt;/p&gt;
&lt;p&gt;Add the below snippet after the final &amp;lt;/Rule&amp;gt; tag. &amp;nbsp;It tells the system about the new ContentType &amp;nbsp;you are introducing. &amp;nbsp;I will explain ContentType in a later post. You may want to look at at %ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\ProjectItemsSchema.xml to see the definitions for well known content types.&lt;/p&gt;
&lt;p&gt; &amp;lt;ItemType&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Name=&amp;quot;Flex&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;DisplayName=&amp;quot;Flex Scanner&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;FileExtension&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Name=&amp;quot;*.l&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;ContentType=&amp;quot;Flex&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;FileExtension&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Name=&amp;quot;*.lex&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;ContentType=&amp;quot;Flex&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;ContentType&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Name=&amp;quot;Flex&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;DisplayName=&amp;quot;Flex Scanner&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;ItemType=&amp;quot;Flex&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;Step2&lt;/p&gt;
&lt;p&gt;-----&lt;/p&gt;
&lt;p&gt;Add an enclosing &amp;nbsp;&amp;lt;ProjectSchemaDefinitions&amp;gt; ... &amp;lt;/ProjectSchemaDefinitions&amp;gt; root element for the whole file. This should enclose the previous &amp;lt;Rule&amp;gt;…&amp;lt;/Rule&amp;gt; section and whatever you added in Step1 (but not the XML declaration element)&lt;/p&gt;
&lt;p&gt;Step3&lt;/p&gt;
&lt;p&gt;-----&lt;/p&gt;
&lt;p&gt;Move the namespaces (and only the namespaces) from the &amp;lt;Rule&amp;gt; element to the just added &amp;lt;ProjectSchemaDefinitions&amp;gt; element.&lt;/p&gt;
&lt;p&gt;Now, restart the IDE and open your project. You should have your files as well as the property pages.&lt;/p&gt;
&lt;p&gt;With the files now appearing in sln explorer, there is no need to modify the filters file manually. When you load the project, create a filter in the sln explorer, set its &amp;quot;Filter&amp;quot; property appropriately and move your Flex files into that filter. But, if you already have it manually added in the filters file, you can leave it as it is (hand generating the UniqueIdentifier guid is fine). &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9792569" width="1" height="1"&gt;</description></item><item><title>re: Platform extensibility - Part 2</title><link>http://blogs.msdn.com/b/vsproject/archive/2009/06/18/platform-extensibility-part-2.aspx#9790882</link><pubDate>Fri, 19 Jun 2009 20:22:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9790882</guid><dc:creator>Pavan Adharapurapu</dc:creator><description>&lt;p&gt;Boris, this is a reply to your post on Friday, June 19, 2009 5:36 AM.&lt;/p&gt;
&lt;p&gt;Thanks for your feedback. I am glad you find the posts useful.&lt;/p&gt;
&lt;p&gt;As for the 3 mistakes you pointed to, yes, you are right. I corrected them in the post directly. In general, always go with what is in the xml file on your system since we know that it works. Of course, that is no excuse to having inconsistencies in the blog post :)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9790882" width="1" height="1"&gt;</description></item><item><title>re: Platform extensibility - Part 2</title><link>http://blogs.msdn.com/b/vsproject/archive/2009/06/18/platform-extensibility-part-2.aspx#9787386</link><pubDate>Fri, 19 Jun 2009 16:25:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9787386</guid><dc:creator>boris.dusek</dc:creator><description>&lt;p&gt;I probably need a hand - I created $(VCTargetsPath)flex.xml and specified ItemType=&amp;quot;Flex&amp;quot; in its Rule.DataSource, filled it with tons of options from the flex manpage. Then hand-edited my .vcxproj, added &amp;lt;ItemGroup&amp;gt;&amp;lt;Flex Include=&amp;quot;input.l&amp;quot;/&amp;gt;&amp;lt;ItemGroup&amp;gt;. Then before that into the project file, &amp;lt;ItemGroup&amp;gt;&amp;lt;PropertyPageSchema Include=&amp;quot;$(VCTargetsPath)flex.xml&amp;quot;/&amp;gt;&amp;lt;/ItemGroup&amp;gt;. Then I edited the vcxproj.filters file, added new filter, somehow tried to &amp;quot;hand-generate&amp;quot; new UniqueIdentifier for it and called the filter &amp;quot;Flex Files&amp;quot; with extensions &amp;quot;l;lex&amp;quot;, and added the file &amp;quot;input.l&amp;quot; to have the &amp;quot;Flex Files&amp;quot; filter. And have created the input.l file in the project directory. Still can't see the input.l file in the solution explorer (but can see empty &amp;quot;Flex Files&amp;quot; folder there), and no Flex property schema loaded in property pages. Am I doing something wrong? Or is this not yet supported? Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9787386" width="1" height="1"&gt;</description></item><item><title>re: Platform extensibility - Part 2</title><link>http://blogs.msdn.com/b/vsproject/archive/2009/06/18/platform-extensibility-part-2.aspx#9784027</link><pubDate>Fri, 19 Jun 2009 12:36:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9784027</guid><dc:creator>boris.dusek</dc:creator><description>&lt;p&gt;Thanks for these posts, while lots of stuff can be figured out from looking at the xml files themselves, there are always many useful details in your posts. Right now I am writing a Flex (lexical scanner) rule as an exercise :-)&lt;/p&gt;
&lt;p&gt;Few remarks: the xml files and your samples contain Subtype, but you mention SubType (capital T) - can be a bit confusing as to what is the right way to spell it. And in 3.d. and 3.f., didn't you mean &amp;quot;false&amp;quot; instead of &amp;quot;true&amp;quot; (otherwise these attributes would only make common sense if named &amp;quot;Invisible&amp;quot; and &amp;quot;DontIncludeInCommandLine&amp;quot;)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9784027" width="1" height="1"&gt;</description></item></channel></rss>