<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-28446986</id><updated>2011-04-21T14:35:12.440-04:00</updated><title type='text'>Digital Paper Napkin</title><subtitle type='html'>An engagement in the online discussions around open source, Eclipse, and other random musings.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://scribbledideas.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28446986/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://scribbledideas.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Michael D. Elder</name><uri>http://www.blogger.com/profile/03856327413506018439</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-28446986.post-115331528240250836</id><published>2006-07-19T09:03:00.000-04:00</published><updated>2006-07-19T09:21:22.413-04:00</updated><title type='text'>Label Decorators in a Common Navigator Framework viewer</title><content type='html'>&lt;span style="font-family:verdana;"&gt;I just posted these comments elsewhere on label decorators, and thought they might be useful to the general audience for the Common Navigator Framework.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;If you check out&lt;/span&gt;&lt;span style="font-family:verdana;"&gt; the &lt;a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ui.tests.navigator/"&gt;org.eclipse.ui.tests.navigator&lt;/a&gt; plugin &lt;/span&gt;&lt;span style="font-family:verdana;"&gt;from &lt;/span&gt;&lt;span style="font-family:verdana;"&gt;Eclipse CVS &lt;a href="http://dev.eclipse.org/viewcvs/index.cgi/"&gt;repository&lt;/a&gt;, &lt;/span&gt;&lt;span style="font-family:verdana;"&gt; there's a simple example of using a lightweight decorator there.&lt;/span&gt;&lt;span style="font-family:verdana;"&gt; (There are &lt;a href="http://wiki.eclipse.org/index.php/CVS_Howto"&gt;instructions&lt;/a&gt; on using Eclipse with CVS, which also &lt;a href="http://wiki.eclipse.org/index.php/CVS_Howto#CVS_Repository_Paths"&gt;documents&lt;/a&gt; the repository paths.)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;The extension looks like:&lt;/span&gt;&lt;table border="1"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;pre&gt;&amp;lt;!-- Verify decorator extension: Adds "&amp;gt;&amp;gt;" to Test Items that end in "3" --&amp;gt;&lt;br /&gt;&amp;lt;extension point="&lt;span style="font-weight: bold;"&gt;org.eclipse.ui.decorators&lt;/span&gt;"&amp;gt;&lt;br /&gt;&amp;lt;decorator &lt;span style="font-weight: bold;"&gt;class="org.eclipse.ui.tests.navigator.extension.TestLabelDecorator"&lt;/span&gt;&lt;br /&gt; id="org.eclipse.ui.tests.navigator.threeDecorator"&lt;br /&gt; label="Items that end in 3 decorator"&lt;br /&gt; lightweight="false"&lt;br /&gt; state="true"&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="font-weight: bold;"&gt;enablement&lt;/span&gt;&amp;gt;&lt;br /&gt; &amp;lt;objectclass&lt;br /&gt;     name="org.eclipse.ui.tests.navigator.extension.TestExtensionTreeData" /&amp;gt;&lt;br /&gt;&amp;lt;/&lt;span style="font-weight: bold;"&gt;enablement&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;/decorator&amp;gt;&lt;br /&gt;&amp;lt;/extension&amp;gt; &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="font-family:verdana;"&gt;And the type must implement ILabelDecorator:&lt;/span&gt;&lt;br /&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;import org.eclipse.jface.viewers.ILabelDecorator;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;import org.eclipse.jface.viewers.ILabelProviderListener;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;public class TestLabelDecorator implements ILabelDecorator &lt;/span&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="font-family:verdana;"&gt;There's an &lt;a href="http://wiki.eclipse.org/index.php/FAQ_How_do_I_create_a_label_decorator_declaratively%3F"&gt;FAQ&lt;/a&gt; on label decorators, as well&lt;/span&gt;&lt;span style="font-family:verdana;"&gt; as an &lt;a href="http://www.eclipse.org/articles/Article-Decorators/decorators.html"&gt;article &lt;/a&gt;with more detail. Right off, I don't think this topic would merit a full article in this series on contributing label decorators to Common Navigator Framework viewers, so if you think there's enough need out there, chime in! &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28446986-115331528240250836?l=scribbledideas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28446986/posts/default/115331528240250836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28446986/posts/default/115331528240250836'/><link rel='alternate' type='text/html' href='http://scribbledideas.blogspot.com/2006/07/label-decorators-in-common-navigator.html' title='Label Decorators in a Common Navigator Framework viewer'/><author><name>Michael D. Elder</name><uri>http://www.blogger.com/profile/03856327413506018439</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-28446986.post-115318906425202555</id><published>2006-07-17T21:43:00.000-04:00</published><updated>2006-07-17T22:48:27.146-04:00</updated><title type='text'>Boxing and Bourbon - Scapa, Kentucky Spirit, and Ol' Pappy!</title><content type='html'>&lt;span style="font-family:verdana;"&gt;When I started this blog, I said I'd review a scotch or bourbon and a cigar from time to time. I've been churning out CNF articles for the last couple of months and I've neglected that part of the original vision for the blog. But I digress.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/Scapa14.gif"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://photos1.blogger.com/blogger/5251/3014/320/Scapa14.png" alt="" border="0" /&gt;&lt;/a&gt;Over the last couple of weeks, I've had the chance to enjoy some very tasty beverages. But before I get into that, I'd like to throw out a much belated thanks to the good folks over at &lt;a style="font-family: verdana;" href="http://www.scapatech.com/home.html"&gt;Scapa Technologies&lt;/a&gt;. At the last &lt;a href="http://www.eclipsecon.org/2006/Home.do"&gt;EclipseCon&lt;/a&gt;, through the bequest of a friendly WTP PMC member, I was fortunate enough to end up with one of the bottles of &lt;a href="http://www.whisky-distilleries.info/Scapa_EN.shtml"&gt;Scapa&lt;/a&gt; 14yr that they brought along. Scapa is an Orkney Islands scotch that's hard to come by in my neck of the woods. I've had the Scapa 12yr before though, and I have to say that it goes great with a good steak -- particularly a ribeye or prime rib. I've always thought it had a nice honey with a hint of vanilla flavor that's different from the more peaty or smokey scotches. It also goes very well with any medium to full bodied cigar.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/kentuckyspririt.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://photos1.blogger.com/blogger/5251/3014/320/kentuckyspririt.jpg" alt="" border="0" /&gt;&lt;/a&gt;At least once or twice a week, I catch up with a friend of mine to &lt;a href="http://www.hbo.com/boxing/"&gt;catch&lt;/a&gt; &lt;a href="http://sports.espn.go.com/sports/tvlistings/story?id=1397056"&gt;the&lt;/a&gt; &lt;a href="http://sports.espn.go.com/sports/boxing/index"&gt;fights&lt;/a&gt;. The past two weeks have been pretty decent boxing matches, but particularly good for bourbon.&lt;br /&gt;&lt;br /&gt;If you're looking to try something a little more full bodied than your average bourbon, without quite the taming that an aged bourbon undergoes, check out the &lt;a href="http://www.whiskymag.com/whisky/brand/wild_turkey/whisky323.html"&gt;&lt;span style="font-style: italic;"&gt;Wild Turkey Kentucy Spirit&lt;/span&gt;&lt;/a&gt;. The flavor is full enough to be compared to the 10 year &lt;span style="font-style: italic;"&gt;Wild Turkey Russell Reserve&lt;/span&gt;, but still has a nice ruggedness like a straight up &lt;span style="font-style: italic;"&gt;Wild Turkey 101&lt;/span&gt;. Each &lt;span style="font-style: italic;"&gt;Kentucky Spirit&lt;/span&gt; bottle is individually labeled with the warehouse, row, barrell, and date of bottling. Each barrell is hand selected by &lt;a href="http://www.wildturkeybourbon.com/nest/jimmy.asp"&gt;Jimmy Russell&lt;/a&gt;, the master distiller of &lt;a href="http://en.wikipedia.org/wiki/Austin,_Nichols"&gt;Austin Nichols&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.oldripvanwinkle.com/newbs/vw/website3.nsf/files/C_20yr90pBottle.jpg/$FILE/C_20yr90pBottle.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://www.oldripvanwinkle.com/newbs/vw/website3.nsf/files/C_20yr90pBottle.jpg/$FILE/C_20yr90pBottle.jpg" alt="" border="0" height="280" width="90" /&gt;&lt;/a&gt;&lt;br /&gt;And finally, the week before last, I was lucky enough to try Some &lt;a href="http://www.oldripvanwinkle.com/newbs/vw/website3.nsf/docsbykey/HNEY-5FFM32?opendocument"&gt;Pappy Van Winkles 20yr&lt;/a&gt;. This really was a cut above just about any other bourbon that I've had. It's very smooth, but still has a nice little afterburn. I would describe the flavor as having the hint of butterscotch on the aftertaste, which was unique among the bourbons I've had before. This is another of the many fine tasty beverages not available in my local area, although there is one savvy local &lt;a href="http://www.sunsetgrilledurham.com/"&gt;establishment&lt;/a&gt; that carries the &lt;a href="http://www.oldripvanwinkle.com/newbs/vw/website3.nsf/docsbykey/HNEY-65GK63?opendocument"&gt;Pappy Van Winkle's 15yr&lt;/a&gt;, which is great -- but the extra 5 years on the 20yr really makes a difference!&lt;br /&gt;&lt;br /&gt;Well, I think that's about all I have to add on this topic for now. In my next Boxing and Bourbon post, I'll cover a few cigars that I've had recently -- both new and old favorites. &lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;* The image of Pappy Van Winkles was linked to from their website. The other two images were my own.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28446986-115318906425202555?l=scribbledideas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28446986/posts/default/115318906425202555'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28446986/posts/default/115318906425202555'/><link rel='alternate' type='text/html' href='http://scribbledideas.blogspot.com/2006/07/boxing-and-bourbon-scapa-kentucky.html' title='Boxing and Bourbon - Scapa, Kentucky Spirit, and Ol&apos; Pappy!'/><author><name>Michael D. Elder</name><uri>http://www.blogger.com/profile/03856327413506018439</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-28446986.post-115309301283197450</id><published>2006-07-16T19:00:00.000-04:00</published><updated>2006-07-16T21:33:12.476-04:00</updated><title type='text'>PDF versions now available!</title><content type='html'>&lt;span style="font-family:verdana;"&gt;Some readers have &lt;a href="http://scribbledideas.blogspot.com/2006/05/building-common-navigator-based-viewer_22.html#114902879904226539"&gt;requested&lt;/a&gt; PDF versions of the CNF articles. After some investigation of some &lt;a href="http://scribbledideas.blogspot.com/2006/05/building-common-navigator-based-viewer_22.html#115038717933923803"&gt;pointers&lt;/a&gt; from Brian Fitzpatrick, I decided to go with &lt;/span&gt;&lt;a style="font-family: verdana;" href="http://www.primopdf.com/"&gt;PrimoPDF&lt;/a&gt;&lt;span style="font-family:verdana;"&gt;. &lt;/span&gt;&lt;span style="font-family:verdana;"&gt;The content of each article is roughly unchanged, excluding some minor formatting adjustments.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;I have attached versions of the existing articles below, as well as comments to the original posts.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Building a Common Navigator Framework Viewer&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="https://bugs.eclipse.org/bugs/attachment.cgi?id=46347"&gt;Part I: Defining the Viewer (*.pdf)&lt;/a&gt;   (&lt;a href="http://scribbledideas.blogspot.com/2006/05/building-common-navigator-based-viewer.html"&gt;original post&lt;/a&gt;)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="https://bugs.eclipse.org/bugs/attachment.cgi?id=46348"&gt;Part II: Adding Content (*.pdf)&lt;/a&gt;   (&lt;a href="http://scribbledideas.blogspot.com/2006/05/building-common-navigator-based-viewer_22.html"&gt;original post&lt;/a&gt;)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="https://bugs.eclipse.org/bugs/attachment.cgi?id=46349"&gt;Part III: Configuring Menus  (*.pdf)&lt;/a&gt;   (&lt;a href="http://scribbledideas.blogspot.com/2006/06/building-common-navigator-based-viewer.html"&gt;original post&lt;/a&gt;)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="https://bugs.eclipse.org/bugs/attachment.cgi?id=46350"&gt;Part IV: Object Contributions (*.pdf)&lt;/a&gt;   (&lt;a href="http://scribbledideas.blogspot.com/2006/06/building-common-navigator-based-viewer_18.html"&gt;original post&lt;/a&gt;)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="https://bugs.eclipse.org/bugs/attachment.cgi?id=46351"&gt;Part V: Action Providers (*.pdf)&lt;/a&gt;   (&lt;a href="http://scribbledideas.blogspot.com/2006/06/building-common-navigator-_115067357450703178.html"&gt;original post&lt;/a&gt;)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;a href="https://bugs.eclipse.org/bugs/attachment.cgi?id=46352"&gt;What does the Common Navigator Framework help me do? (*.pdf)&lt;/a&gt;&lt;span style="font-family:verdana;"&gt;  (&lt;a href="http://scribbledideas.blogspot.com/2006/06/what-does-common-navigator-framework.html"&gt;original post&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;Once a few more of the foundations of building CNF viewers are covered, I will integrate these articles into a more coherent organization and prepose them as Eclipse Corner articles. The links above point to attachments on &lt;a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=143127"&gt;Bug 143127: [CommonNavigator] Examples&lt;/a&gt;.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28446986-115309301283197450?l=scribbledideas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28446986/posts/default/115309301283197450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28446986/posts/default/115309301283197450'/><link rel='alternate' type='text/html' href='http://scribbledideas.blogspot.com/2006/07/pdf-versions-now-available.html' title='PDF versions now available!'/><author><name>Michael D. Elder</name><uri>http://www.blogger.com/profile/03856327413506018439</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-28446986.post-115284525177341719</id><published>2006-07-13T22:32:00.000-04:00</published><updated>2006-07-13T22:49:56.660-04:00</updated><title type='text'>It takes a village</title><content type='html'>&lt;p&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;With some great help from the community, part of the series is no longer necessary. &lt;/span&gt;&lt;a style="font-family: verdana;" href="http://aashishpatil.blogspot.com/"&gt;Aashish Patil&lt;/a&gt;&lt;span style="font-family:verdana;"&gt; has prepared an article on &lt;/span&gt;&lt;a style="font-family: verdana;" href="http://aashishpatil.blogspot.com/2006/07/displaying-non-resource-content-using.html"&gt;rendering Non-Resource content&lt;/a&gt;&lt;span style="font-family:verdana;"&gt; in a Common Navigator Framework viewer.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:verdana;"&gt;Anybody else want to step in to help?&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:verdana;"&gt;For anyone that decides to jump in, feel free to either build the example in the&lt;/span&gt;&lt;a style="font-family: verdana;" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ui.examples.navigator/"&gt; org.eclipse.ui.examples.navigator&lt;/a&gt;&lt;span style="font-family:verdana;"&gt; plugin in the Eclipse CVS repository (check out  as anonymous, generate a patch, and attach it to &lt;/span&gt;&lt;a style="font-family: verdana;" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=143127"&gt;bug 143127&lt;/a&gt;&lt;span style="font-family:verdana;"&gt;). There are also some &lt;/span&gt;&lt;a style="font-family: verdana;" href="http://wiki.eclipse.org/index.php/CVS_Howto"&gt;instructions &lt;/a&gt;&lt;span style="font-family:verdana;"&gt; on using Eclipse with CVS, which also &lt;/span&gt;&lt;a style="font-family: verdana;" href="http://wiki.eclipse.org/index.php/CVS_Howto#CVS_Repository_Paths"&gt;documents&lt;/a&gt;&lt;span style="font-family:verdana;"&gt; the repository paths.&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;span style="font-family:verdana;"&gt;Or you can just build a complete example as Aashish did, and then attach it to &lt;/span&gt;&lt;a style="font-family: verdana;" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=143127" rel="nofollow"&gt;bug 143127: [CommonNavigator] Examples&lt;/a&gt;&lt;span style="font-family:verdana;"&gt; as a zip file to make it available to the community.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;span style=";font-family:verdana;font-size:130%;"  &gt;Thanks Aashish!&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28446986-115284525177341719?l=scribbledideas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://aashishpatil.blogspot.com/2006/07/displaying-non-resource-content-using.html' title='It takes a village'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28446986/posts/default/115284525177341719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28446986/posts/default/115284525177341719'/><link rel='alternate' type='text/html' href='http://scribbledideas.blogspot.com/2006/07/it-takes-village.html' title='It takes a village'/><author><name>Michael D. Elder</name><uri>http://www.blogger.com/profile/03856327413506018439</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-28446986.post-115275528841721996</id><published>2006-07-12T21:23:00.000-04:00</published><updated>2006-07-12T21:48:08.450-04:00</updated><title type='text'>Response to comments and status on upcoming articles</title><content type='html'>&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;When responding to a few of the latest comments on &lt;a href="http://scribbledideas.blogspot.com/2006/06/building-common-navigator-based-viewer_18.html"&gt;Part IV&lt;/a&gt;, it seemed like it made the most sense to just write a quick post.  I hope to have Part V ready by the end of the week -- Monday at the latest. &lt;p&gt;I've been busy with a few other activities over the last few weeks -- one of which was a great vacation, and now I'm back.&lt;/p&gt;&lt;p&gt;The following quotes are snippets of comments from  &lt;a href="http://scribbledideas.blogspot.com/2006/06/building-common-navigator-based-viewer_18.html"&gt;Part IV&lt;/a&gt;, I've copied them here for context.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;"You may want to mention (or show an example implementing) IObjectActionDelegate."&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I'll make a note for a short example of using IObjectActionDelegate just after Part V. My guess is there are other tutorials around for that topic (outside of the CNF context), so I may be able to find them and just post a link.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;"It looks to be a simple task to hook up the CNF to our virtual file system that accesses about 33 TB of disk. I had a prototype up and running in less than an hour."&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The filesystem example sounds pretty cool. I would hate to see how long an "expand all" type operation would take for 33TB though. Are you planning to use or provide "Go Into" support? (Which is not supported by the base framework, but I know of other clients that have implemented it).&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;"How do I sort the root nodes?"&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I'll make sorting the topic of the next article in the series. The algorithm for sorting in a generic context is kind of interesting, so it would merit an explanation better than the one available in the slides anyway.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;"At what point should I starting doing the work of building my nodes for my common navigator? I wanted to tie in the IProgress monitor and jobs to prevent blocking."&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;I have an article and example prepared for deferred loading of model data. For various reasons, the base framework doesn't support this natively. For clients that want to roll your own solution, there are a couple of points to be aware of, but it's not too complex. Deferred model loading can be used to offload expensive calculation out of the UI thread -- you could choose to pop a progress service dialog (which I would tend to discourage), but running the model loading operation in a Job, which shows progress in the Progress View is a great way to keep the UI responsive for the user. Would there be enough interest to make deferred model loading Part VII of the series?&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;"Secondly at what points are the methods in the content provider called? ... Will I need to refresh parts of my navigator during runtime?"&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;You have to call refresh() or update() on the viewer as necessary. You can implement fine-grained calls to add()/remove() to update the viewer; it's up to you to decide what makes the most sense for your scenario. You will have a reference to the viewer in the inputChanged() method on the content provider. You can remember the reference and generate events as necessary. Take a look at the org.eclipse.ui.examples.navigator plugin and specifically at the PropertiesContentProvider's implementation of inputChanged() and it's visit() method to refresh files as they change.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;So in summary, I'm tentatively planning the following articles:&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;&lt;ul style="font-family: verdana;"&gt;&lt;li&gt;Part V : Action Providers&lt;/li&gt;&lt;li&gt;Part VI: Sorting&lt;/li&gt;&lt;li&gt;Part VII: Deferred model loading&lt;/li&gt;&lt;li&gt;Part VIII: Non-resource content  &lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28446986-115275528841721996?l=scribbledideas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28446986/posts/default/115275528841721996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28446986/posts/default/115275528841721996'/><link rel='alternate' type='text/html' href='http://scribbledideas.blogspot.com/2006/07/response-to-comments-and-status-on.html' title='Response to comments and status on upcoming articles'/><author><name>Michael D. Elder</name><uri>http://www.blogger.com/profile/03856327413506018439</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-28446986.post-115067357450703178</id><published>2006-06-18T19:32:00.000-04:00</published><updated>2006-07-14T00:45:03.376-04:00</updated><title type='text'>Building a Common Navigator based viewer, Part V: Action Providers</title><content type='html'>&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-style: italic;"&gt;Thought is the blossom; language the bud; action the fruit behind it.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;-- &lt;a href="http://en.wikipedia.org/wiki/Ralph_Waldo_Emerson"&gt;Ralph Waldo Emerson&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Overview&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Action Providers provide a means to configure the retargetable actions and programmatically configure the context menu in a Common Navigator Framework viewer. In this article, we'll take a look at what an ActionProvider can do, and how to implement one for our Example View.&lt;br /&gt;&lt;br /&gt;Action Providers are useful for cases where you have to perform some computation before you can decide what items to add to a menu or you need to adjust the &lt;span style="font-style: italic;"&gt;retargetable actions&lt;/span&gt; to ensure that user keystrokes are handled properly (like Cut(Ctrl+x)/Copy(Ctrl+c)/Paste(Ctrl+p)/Delete(Delete)).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Creating our Action Provider implementation&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In other posts, we started with the XML configuration for the extension. For this article, we'll start from the code.&lt;br /&gt;&lt;br /&gt;First, we'll create our Action Provider class, which must extend &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.CommonActionProvider&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/property-action-provider.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/5251/3014/1600/property-action-provider.jpg" alt="The creation of the PropertyActionProvider class extending CommonActionProvider." border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Our class must define a no-argument constructor so that instances may be created from our extension.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/properties-action-provider-constructor.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; display: block; text-align: left;" src="http://photos1.blogger.com/blogger/5251/3014/1600/properties-action-provider-constructor.jpg" alt="The PropertyActionProvider constructor" border="1" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In our &lt;span style="font-weight: bold;"&gt;init()&lt;/span&gt; method, we verify that we are executing inside of a workbench part (opposed to a dialog), and then create the OpenAction, which takes the workbench page and a selection provider in its constructor. The &lt;span style="font-weight: bold;"&gt;ICommonActionExtensionSite&lt;/span&gt; provides access to several things that a &lt;span style="font-weight: bold;"&gt;CommonActionProvider&lt;/span&gt; might need. I'll refer you to the Javadoc API for more details here.&lt;br /&gt;&lt;br /&gt;Common Navigator viewers are capable of being enclosed in dialogs. Thus, a reference that is a subclass of  &lt;span style="font-weight: bold;"&gt;ICommonViewerSite&lt;/span&gt; is supplied by default from the &lt;span style="font-weight: bold;"&gt;ICommonActionExtensionSite&lt;/span&gt;. If your Action Provider is used by a viewer in a dialog, you cannot cast down to access the workbench page, since it is not available. In general, most Action Providers make assumptions that they are only used in workbench parts.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/properties-action-provider-init.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; display: block; text-align: left;" src="http://photos1.blogger.com/blogger/5251/3014/1600/properties-action-provider-init.jpg" alt="The PropertyActionProvider.init() method" border="1" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The &lt;span style="font-weight: bold;"&gt;fillActionBars()&lt;/span&gt; method can be used to configure &lt;span style="font-style: italic;"&gt;retargetable actions&lt;/span&gt;. A &lt;span style="font-style: italic;"&gt;retargetable action&lt;/span&gt; is an instance of &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.actions.RetargetAction&lt;/span&gt; with a unique identifier. The workbench registers many of these actions by default (see &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.IWorkbenchActionConstants&lt;/span&gt;).&lt;br /&gt;&lt;br /&gt;There is currently only one &lt;span style="font-style: italic;"&gt;retargetable action&lt;/span&gt; defined by the Common Navigator Framework (CNF), &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.ICommonActionConstants.OPEN&lt;/span&gt;. (But of course, you can register an action for any of the identifiers in &lt;span style="font-weight: bold;"&gt;IWorkbenchActionConstants&lt;/span&gt;). In the CNF, a &lt;span style="font-weight: bold;"&gt;RetargetAction&lt;/span&gt; with the &lt;span style="font-weight: bold;"&gt;ICommonActionConstants.OPEN&lt;/span&gt; identifier is executed each time an open event occurs on a viewer. If no action is registered when an open event occurs on a node in the viewer, the node's expanded state is toggled.&lt;br /&gt;&lt;br /&gt;In our example, we are going to register our OpenAction if it is enabled (we'll take a look at how this is determined shortly).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Note&lt;/span&gt;: If this action provider is used in a dialog context, the &lt;span style="font-style: italic;"&gt;openAction&lt;/span&gt; would be &lt;span style="font-weight: bold;"&gt;null &lt;/span&gt;because we only initialize it if we receive an &lt;span style="font-weight: bold;"&gt;ICommonViewerWorkbenchSite&lt;/span&gt;, so if you need your Action Provider to be robust enough for either workbench parts or dialogs, be that either all of your action fields are initialized or you check for &lt;span style="font-weight: bold;"&gt;null&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/properties-action-provider-fillActionBars.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; display: block; text-align: left;" src="http://photos1.blogger.com/blogger/5251/3014/1600/properties-action-provider-fillActionBars.jpg" alt="The PropertyActionProvider.fillActionBars() method" border="1" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The &lt;span style="font-weight: bold;"&gt;fillContextMenu()&lt;/span&gt; method uses the &lt;span style="font-weight: bold;"&gt;ICommonMenuConstants&lt;/span&gt; to make sure that the &lt;span style="font-style: italic;"&gt;openAction&lt;/span&gt; is positioned correctly in the menu.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/properties-action-provider-fillContextMenu.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; display: block; text-align: left;" src="http://photos1.blogger.com/blogger/5251/3014/1600/properties-action-provider-fillContextMenu.jpg" alt="The PropertyActionProvider.fillContextMenu() method" border="1" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Our &lt;span style="font-style: italic;"&gt;openAction&lt;/span&gt; is fairly simple. The contents of the &lt;span style="font-weight: bold;"&gt;run()&lt;/span&gt; method are unimportant for this example, but you can take a look at the example in the repository. The constructor and the &lt;span style="font-weight: bold;"&gt;isEnabled()&lt;/span&gt; method are shown here. The constructor remembers the references we pull from the &lt;span style="font-weight: bold;"&gt;ICommonViewerWorkbenchSite&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/properties-open-property-action.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; display: block; text-align: left;" src="http://photos1.blogger.com/blogger/5251/3014/1600/properties-open-property-action.jpg" alt="" border="1" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Adding our Action Provider to our viewer&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now let's take a look at our extension definition. Here we nest the &lt;span style="font-weight: bold;"&gt;actionProvider&lt;/span&gt; under our &lt;span style="font-weight: bold;"&gt;navigatorContent&lt;/span&gt; element in our &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.navigatorContent&lt;/span&gt; extension. Remember that we constructed the rest of this extension in &lt;a href="http://scribbledideas.blogspot.com/2006/05/building-common-navigator-based-viewer.html"&gt;previous&lt;/a&gt; &lt;a href="http://scribbledideas.blogspot.com/2006/05/building-common-navigator-based-viewer_22.html"&gt;articles&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The &lt;span style="font-weight: bold;"&gt;actionProvider&lt;/span&gt; element specifies an identifier and our implementation class.&lt;br /&gt;&lt;br /&gt;Since we have nested the &lt;span style="font-weight: bold;"&gt;actionProvider&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;element under our &lt;span style="font-weight: bold;"&gt;navigatorContent&lt;/span&gt; extension, &lt;/span&gt;&lt;span style="font-family:verdana;"&gt;the existing &lt;span style="font-weight: bold;"&gt;viewerContentBinding&lt;/span&gt; that &lt;span style="font-style: italic;"&gt;binds&lt;/span&gt; our content extension to our viewer also absorbs our action provider.&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;&lt;br /&gt;Furthermore, &lt;/span&gt;&lt;span style="font-family:verdana;"&gt;the menu options and &lt;span style="font-style: italic;"&gt;retargetable action&lt;/span&gt; configuration will only be available if our extension is active. If the user turns off our extension, then they will not need these actions, the CNF will not invoke them. &lt;/span&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/properties-action-provider-extension.1.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; display: block; text-align: left;" src="http://photos1.blogger.com/blogger/5251/3014/1600/properties-action-provider-extension.1.jpg" alt="The actionProvider element under the org.eclipse.ui.navigator.navigatorContent extension." border="1" /&gt;&lt;/a&gt;&lt;br /&gt;Alternatively, we could expose our &lt;span style="font-weight: bold;"&gt;actionProvider&lt;/span&gt; independently and use a &lt;span style="font-weight: bold;"&gt;viewerActionBinding&lt;/span&gt; to &lt;span style="font-style: italic;"&gt;bind&lt;/span&gt; the Action Provider to our viewer. In this case, the action provider will be available, even if our content extension is not.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/properties-action-provider-extension%20binding.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; display: block; text-align: left;" src="http://photos1.blogger.com/blogger/5251/3014/1600/properties-action-provider-extension%20binding.jpg" alt="The actionProvider exposed independently and bound to a viewer." border="1" /&gt;&lt;/a&gt;&lt;br /&gt;The final example view should appear like the following. When the "Open Property" action is selected, the property file will be opened and the property name will be selected.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/properties-action-provider-menu.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; display: block; text-align: left;" src="http://photos1.blogger.com/blogger/5251/3014/1600/properties-action-provider-menu.jpg" alt="The final menu." border="1" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Summary&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In this article, we have seen why an Action Provider does, walked through how to implement an Action Provider, and bound the Action Provider to our viewer.&lt;br /&gt;&lt;br /&gt;In our next article, we'll take a look at sorting our properties elements.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28446986-115067357450703178?l=scribbledideas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28446986/posts/default/115067357450703178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28446986/posts/default/115067357450703178'/><link rel='alternate' type='text/html' href='http://scribbledideas.blogspot.com/2006/06/building-common-navigator-_115067357450703178.html' title='Building a Common Navigator based viewer, Part V: Action Providers'/><author><name>Michael D. Elder</name><uri>http://www.blogger.com/profile/03856327413506018439</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-28446986.post-115067353050987577</id><published>2006-06-18T19:30:00.000-04:00</published><updated>2006-06-23T00:17:03.580-04:00</updated><title type='text'>Building a Common Navigator based viewer, Part IV: Object Contributions</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;span style="font-style: italic;"&gt;Action may not always bring happiness, but there is no happiness without action.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;-- &lt;a href="http://en.wikipedia.org/wiki/Benjamin_Disraeli"&gt;Benjamin Disraeli&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Overview&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In the last &lt;a href="http://scribbledideas.blogspot.com/2006/06/building-common-navigator-based-viewer.html"&gt;post&lt;/a&gt;, we discussed how to configure the popup menus for a Common Navigator instance. As we saw, a Common Navigator can declare all of its menu insertion points through the &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.viewer&lt;/span&gt; extension point and indicate whether contributions to the &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.popupMenus&lt;/span&gt; extension point should be honored. The declarative menu configuration serves the dual purpose of avoiding programmatic configuration of the menu structure, and documenting the menu structure for potential extenders.&lt;br /&gt;&lt;br /&gt;We also briefly talked about the two ways that contributors can tap into a menu. The first was through &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.popupMenus&lt;/span&gt;, which allows you to add menus throughout the workbench, and the second was through &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.navigatorContent&lt;/span&gt;, which is specific to the Common Navigator framework. We will cover &lt;span style="font-weight: bold;"&gt;...popupMenus&lt;/span&gt; in this article, and &lt;span style="font-weight: bold;"&gt;...navigatorContent&lt;/span&gt; in the next.&lt;br /&gt;&lt;br /&gt;As always, you can find the full source for this example in the &lt;span style="font-weight: bold;"&gt;&lt;a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ui.examples.navigator/"&gt;org.eclipse.ui.navigator.examples&lt;/a&gt;&lt;/span&gt; plugin from the Eclipse CVS repository. There are also some &lt;a href="http://wiki.eclipse.org/index.php/CVS_Howto"&gt;instructions&lt;/a&gt; on using Eclipse with CVS, which also &lt;a href="http://wiki.eclipse.org/index.php/CVS_Howto#CVS_Repository_Paths"&gt;documents&lt;/a&gt; the repository paths.&lt;br /&gt;&lt;br /&gt;With that out of the way, let's dive into the example.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Adding a &lt;span style="font-style: italic;"&gt;Delete Property&lt;/span&gt; action through &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.popupMenus&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Recall that for this series of articles, we are rendering a simple model of a properties file.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/properties-k.jpg"&gt;&lt;img style="cursor: pointer; width: 287px; height: 386px;" src="http://photos1.blogger.com/blogger/5251/3014/1600/properties-k.jpg" alt="A screencap of our initial example viewer." border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Now we are going to add a &lt;span style="font-style: italic;"&gt;Delete Property&lt;/span&gt; action that allows a user to select a property from the listing above and remove it.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/delete-property-action.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt;" src="http://photos1.blogger.com/blogger/5251/3014/1600/delete-property-action.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Open the &lt;span style="font-style: italic;"&gt;Plug-in Manifest Editor&lt;/span&gt; by double clicking the plugin.xml file in your plugin project. If you're not quite sure what this means, check out &lt;a href="http://scribbledideas.blogspot.com/2006/05/building-common-navigator-based-viewer.html#basicsetup"&gt;Part I&lt;/a&gt; of this series.&lt;br /&gt;&lt;br /&gt;On the &lt;span style="font-style: italic;"&gt;Extensions&lt;/span&gt; tab, select Add... and choose &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.popupMenus&lt;/span&gt;. If you don't see this option listed, uncheck "Show only extension points from the required plugins". If you haven't already added &lt;span style="font-weight: bold;"&gt;org.eclipse.ui&lt;/span&gt; as a dependent plugin, this will take care of that for you.&lt;br /&gt;&lt;br /&gt;Now select the entry created in the list ("org.eclipse.ui.popupMenus"), right-click and choose "objectContribution". Then, right-click again and choose "action".&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/popupmenus-contxmenu.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt;" src="http://photos1.blogger.com/blogger/5251/3014/1600/popupmenus-contxmenu.jpg" alt="The context menu for the org.eclipse.ui.popupMenus element on the Extensions tab." border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;An &lt;span style="font-style: italic;"&gt;objectContribution&lt;/span&gt; can declare menus (submenu extensions of the popup menu) and actions. The extension is fairly verbose to help optimize plugin loading. That is, the extension declares enough information that the actual class (and therefore the plugin) doesn't need to be loaded to render the menu. If the user never selects the action, then the plugin needn't be loaded.&lt;br /&gt;&lt;br /&gt;In particular, the extension declares the menu label, the menu icon, and a tooltip among other things. The extension also declares the menubar path (recall we described the values for insertion points in &lt;a href="http://scribbledideas.blogspot.com/2006/06/building-common-navigator-based-viewer.html"&gt;Part III&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;Use the values from the following diagram to configure the action element. You can enter the values on the &lt;span style="font-style: italic;"&gt;Extensions&lt;/span&gt; page, or flip over to the &lt;span style="font-style: italic;"&gt;plugin.xml&lt;/span&gt; tab and fill it in by hand.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/popupmenus-objectcontribution.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt;" src="http://photos1.blogger.com/blogger/5251/3014/1600/popupmenus-objectcontribution.jpg" alt="The configuration for the objectContribution element of org.eclipse.ui.popupMenus" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;There's a few things we should discuss here.&lt;br /&gt;&lt;br /&gt;First is the &lt;span style="font-style: italic;"&gt;objectClass&lt;/span&gt;, which declares that we are interested in &lt;span style="font-weight: bold;"&gt;...PropertiesTreeData&lt;/span&gt;. Recall from &lt;a href="http://scribbledideas.blogspot.com/2006/05/building-common-navigator-based-viewer_22.html"&gt;Part II&lt;/a&gt; that we defined a simple object model to represent the &lt;span style="font-style: italic;"&gt;name=value&lt;/span&gt; pairs in a property file. To delete these items, we want our action to enable on instances of our model.&lt;br /&gt;&lt;br /&gt;The &lt;span style="font-style: italic;"&gt;class&lt;/span&gt; attribute specifies a subclass of &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.actions.ActionDelegate&lt;/span&gt;. The implementation of &lt;span style="font-style: italic;"&gt;DeletePropertyAction.run(IAction)&lt;/span&gt; has some boilerplate for robustness, but the important part is as follows:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/delete-property-action-contents.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt;" src="http://photos1.blogger.com/blogger/5251/3014/1600/delete-property-action-contents.jpg" alt="The meat of the DeletePropertyAction.run(IAction) method." border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ActionDelegate&lt;/span&gt; declares a &lt;span style="font-style: italic;"&gt;selectionChanged(IAction, ISelection)&lt;/span&gt; method that is updated when the selection in the viewer changes. We override this method to remember the selection, so that in the event that the user selects the menu option, we know what item they clicked on.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Summary&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And that's all there is to it.&lt;br /&gt;&lt;br /&gt;Now you should feel comfortable experimenting with adding more actions to the popup menu, as well as adding submenus. Be sure to check out the &lt;span style="font-style: italic;"&gt;menu&lt;/span&gt; element (accessible in the same way you found &lt;span style="font-style: italic;"&gt;action&lt;/span&gt; earlier). If you use the &lt;span style="font-style: italic;"&gt;Extensions&lt;/span&gt; tab, all of the available attributes will be accessible to you, and remember you can use the right-click menu to create sub elements.&lt;br /&gt;&lt;br /&gt;In this article we covered the basics of contributing an action to our example viewer through the &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.popupMenus&lt;/span&gt; extension point. In the next article, we'll cover how to programmatically configure the menu using an extension of &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.navigatorContent&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28446986-115067353050987577?l=scribbledideas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28446986/posts/default/115067353050987577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28446986/posts/default/115067353050987577'/><link rel='alternate' type='text/html' href='http://scribbledideas.blogspot.com/2006/06/building-common-navigator-based-viewer_18.html' title='Building a Common Navigator based viewer, Part IV: Object Contributions'/><author><name>Michael D. Elder</name><uri>http://www.blogger.com/profile/03856327413506018439</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-28446986.post-115049392100878131</id><published>2006-06-16T16:06:00.000-04:00</published><updated>2006-06-18T22:29:21.733-04:00</updated><title type='text'>Building a Common Navigator based viewer, Part III: Configuring Menus</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;span style="font-style: italic;"&gt;Action is eloquence.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;-- VOLUMNIA&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;a href="http://www.shakespeare-literature.com/Coriolanus/"&gt;Coriolanus&lt;/a&gt;, Act 3, &lt;a href="http://www.shakespeare-literature.com/Coriolanus/15.html"&gt;Scene 2&lt;/a&gt;&lt;br /&gt;&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In &lt;a href="http://scribbledideas.blogspot.com/2006/05/building-common-navigator-based-viewer.html"&gt;earlier&lt;/a&gt; &lt;a href="http://scribbledideas.blogspot.com/2006/05/building-common-navigator-based-viewer_22.html"&gt;posts&lt;/a&gt;, we walked through how to construct a Common Navigator Framework (CNF) viewer and a basic extension to render property files. Now we will walk through how to configure the menu for a CNF viewer and how to add actions to our viewer to manipulate our content.&lt;br /&gt;&lt;br /&gt;Let's take a small step back though, and look at the current roadmap for upcoming posts:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Configuring CNF viewer popup menus (Part III)&lt;/span&gt;. This post will describe how to configure the popup menu of a CNF viewer, how to describe the insertion points and separators for a popup menu, and how to toggle whether a CNF viewer honors the &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.popupMenus&lt;/span&gt; extension point.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Adding Actions to a CNF viewer through Object Contributions (Part IV).  &lt;/span&gt;Part IV will cover how to add actions through Object Contributions. Object Contributions allow you to add actions (and even define menu sub-structures) for specific object types. Object Contributions are not specific to CNF viewers, but they are useful for adding menu actions without alot of code.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Adding Actions to a CNF viewer through Action Providers (Part V).&lt;/span&gt; Part V will cover how to programmatically configure CNF menus and adjust the retagetable actions for the Workbench. In particularly, the example will cover how to add a custom &lt;span style="font-style: italic;"&gt;Open&lt;/span&gt; action for individual property types.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Overview&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There are two basic options for adding actions to a Common Navigator Framework (CNF) viewer:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Contribute actions using &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.popupMenus&lt;/span&gt; as &lt;span style="font-style: italic;"&gt;objectContribution&lt;/span&gt;s or &lt;span style="font-style: italic;"&gt;viewerContribution&lt;/span&gt;s. The &lt;span style="font-weight: bold;"&gt;...popupMenus&lt;/span&gt; extension point allows you to contribute individual action delegates throughout the Eclipse Workbench. CNF viewers can be  configured to honor these contributions (which is the default) or to ignore them. In the case of the &lt;span style="font-style: italic;"&gt;Project Explorer&lt;/span&gt; contributed by Platform/UI, object and viewer contributions are honored. (To be covered in detail in Part IV.)&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Contribute actions using &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.navigatorContent &lt;/span&gt;as &lt;span style="font-style: italic;"&gt;actionProvider&lt;/span&gt;s. Sometimes, clients require more programmatic control over exactly what actions are contributed to a given menu in a particular context, as well as what retargetable actions are configured based on the current selection. CNF &lt;span style="font-style: italic;"&gt;Action Provider&lt;/span&gt;s are only honored by CNF viewers. (To be covered in detail in Part V.)&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:130%;"&gt;Configuring Menu Structure&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In &lt;a href="http://scribbledideas.blogspot.com/2006/05/building-common-navigator-based-viewer.html"&gt;Part I&lt;/a&gt;, we defined our example &amp;lt;viewer /&amp;gt; element, and popup menus were briefly &lt;a href="http://scribbledideas.blogspot.com/2006/05/building-common-navigator-based-viewer.html#popupmenus"&gt;mentioned&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Recall that there are two means to configure a popup menu. The first possibility is simply to specify a value for the &lt;span style="font-style: italic;"&gt;popupMenuId&lt;/span&gt; of the &amp;lt;viewer /&amp;gt; element in &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.viewer&lt;/span&gt;. The second possibility is to take a more active role in configuring the insertion points the menu supports. &lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;br /&gt;Tip: It is an error condition if both the popupMenuId is specified as well as the popupMenu element. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If we were to set the &lt;span style="font-style: italic;"&gt;popupMenuId&lt;/span&gt;, we might have something like the following:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/popupmenuid-attribute.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://photos1.blogger.com/blogger/5251/3014/1600/popupmenuid-attribute.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The identifier can be used by extenders of &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.popupMenus&lt;/span&gt; to add &lt;span style="font-style: italic;"&gt;viewerContributions&lt;/span&gt; specific to the view; however, no identifier is required for &lt;span style="font-style: italic;"&gt;objectContributions&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;When only the &lt;span style="font-style: italic;"&gt;popupMenuId &lt;/span&gt;attribute is specified, the default set of insertion points are automatically configured in the popup menu. These are documented in the schema reference for &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.viewer&lt;/span&gt;, but are duplicated here for convenience:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"group.new"            separator="true" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"group.goto" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"group.open"            separator="true" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"group.openWith" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"group.edit"            separator="true" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"group.show"            separator="true" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"group.reorganize" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"group.port"            separator="true" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"group.generate"        separator="true" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"group.search"          separator="true" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"group.build"           separator="true" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"additions"             separator="true" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"group.properties"      separator="true" &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;These values can be used by the &lt;span style="font-style: italic;"&gt;menubarPath&lt;/span&gt; attribute of elements in &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.popupMenus&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;These values can also be used when programmatically using or searching for menu items (see &lt;span style="font-style: italic;"&gt;org.eclipse.jface.action.IContributionManager&lt;/span&gt;, particularly &lt;span style="font-style: italic;"&gt;insertAfter(), insertBefore(), and appendToGroup()&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;All of the string constants ("group.*") are immortalized in &lt;span style="font-style: italic;"&gt;org.eclipse.ui.navigator.ICommonMenuConstants&lt;/span&gt; for programmatic usage.&lt;br /&gt;&lt;br /&gt;Alternatively, we could choose to define a &amp;lt;popupMenu /&amp;gt; element as a child of &amp;lt;viewer /&amp;gt;, where we could then define our own mix of insertion points. Remember, that you can use the &lt;span style="font-style: italic;"&gt;Extensions&lt;/span&gt; tab of the &lt;span style="font-style: italic;"&gt;Plug-in Manifest Editor&lt;/span&gt; to drive the creation of extension elements from the menu.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/adding-popupmenu-element.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/5251/3014/1600/adding-popupmenu-element.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For our example, we can use the same menu configuration as the &lt;span style="font-style: italic;"&gt;Project Explorer:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/configuring-popupmenu-element.0.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/5251/3014/1600/configuring-popupmenu-element.0.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Each &amp;lt;insertionPoint /&amp;gt; element indicates a GroupMarker that is accessible through the &lt;span style="font-style: italic;"&gt;IContributionMenu&lt;/span&gt; API. Where ever the &lt;span style="font-style: italic;"&gt;separator&lt;/span&gt; attribute is set to &lt;span style="font-weight: bold;"&gt;true&lt;/span&gt;, the menu will render a horizontal line. The menus in Eclipse are smart enough to only render the line if necessary, so two lines back to back only renders as one horizontal line.&lt;br /&gt;&lt;br /&gt;Also, take note of the &lt;span style="font-style: italic;"&gt;allowsPlatformContributions="true"&lt;/span&gt; attribute of &amp;lt;popupMenu /&amp;gt; element. By default, CNF viewers are enabled to honor &lt;span style="font-weight: bold;"&gt;..popupMenus&lt;/span&gt; contributions. Setting this attribute to &lt;span style="font-weight: bold;"&gt;false&lt;/span&gt; will restrict the menu to only honoring &lt;span style="font-style: italic;"&gt;Action Providers&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;The example above doesn't do anything fancy, but in your own CNF viewer, you could define your own menu insertion point ("group.example") where ever it makes sense for your scenarios. The recommended naming convention is "group.*", as the above insertion points follow, with the exception of the special &lt;span style="font-style: italic;"&gt;additions&lt;/span&gt; group.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Some comments on extending or manipulating the set of insertion points on a CNF menu.&lt;/span&gt; It is not possible to declaratively manipulate or extend the set of insertion points for an already configured viewer. It is possible to programmatically add new &lt;span style="font-style: italic;"&gt;GroupMarkers&lt;/span&gt; or &lt;span style="font-style: italic;"&gt;Separators&lt;/span&gt; through &lt;span style="font-style: italic;"&gt;Action Providers&lt;/span&gt;, but this practice should be used with care. We will get into the details of how this might be done in &lt;span style="font-style: italic;"&gt;Part V&lt;/span&gt;, but for now just heed the warning that this practice should be used with caution, and only when taking advantage of the &lt;span style="font-style: italic;"&gt;dependsOn&lt;/span&gt; attribute of the &amp;lt;actionProvider /&amp;gt; element, where the value indicates the identifier of an &lt;span style="font-style: italic;"&gt;Action Provider&lt;/span&gt; that adds extra insertion points to the menu. Insertion points should &lt;span style="font-weight: bold;"&gt;never&lt;/span&gt; be programmatically removed as other extensions may depend on them. If your own custom viewer has no use for a particular insertion point, then you can leave it out when you define your own &amp;lt;popupMenu /&amp;gt; element.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Summary&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In this article, we have discussed how to configure a menu for a Common Navigator Framework (CNF) viewer. In the next few articles, we will discuss how we can add to this menu using &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.popupMenus&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.navigatorContent/actionProvider&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28446986-115049392100878131?l=scribbledideas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28446986/posts/default/115049392100878131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28446986/posts/default/115049392100878131'/><link rel='alternate' type='text/html' href='http://scribbledideas.blogspot.com/2006/06/building-common-navigator-based-viewer.html' title='Building a Common Navigator based viewer, Part III: Configuring Menus'/><author><name>Michael D. Elder</name><uri>http://www.blogger.com/profile/03856327413506018439</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-28446986.post-114951307382970775</id><published>2006-06-05T07:47:00.000-04:00</published><updated>2006-06-12T14:52:23.936-04:00</updated><title type='text'>What does the Common Navigator Framework (CNF) help me do?</title><content type='html'>&lt;span style="font-family:verdana;"&gt;A framework should &lt;/span&gt;&lt;span style="font-style: italic;font-family:verdana;" &gt;help&lt;/span&gt;&lt;span style="font-family:verdana;"&gt; you do something, not &lt;/span&gt;&lt;span style="font-style: italic;font-family:verdana;" &gt;make&lt;/span&gt;&lt;span style="font-family:verdana;"&gt; you do something. In the following article, I'll go over the scenarios that motivated the creation of a generic, viewer integration framework. I'll also discuss a little of the background of the framework and how it evolved to an open source solution for the Eclipse Platform.&lt;br /&gt;&lt;br /&gt;The details of this article roughly follow the flow from the &lt;a href="http://eclipsezilla.eclipsecon.org/php/attachment.php?bugid=260"&gt;presentation&lt;/a&gt; given at EclipseCon 2006.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Use case 1: Expose various types of information in a viewer to provide a cohesive user experience with editors. &lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;One of the greatest features of Eclipse is its inherent extensibility. However, in some cases, the way in which the extensibility of Eclipse is utilized can come at the cost of the user experience. One problem that many products have come across when extending Eclipse is viewer &lt;span style="font-style: italic;"&gt;explosion&lt;/span&gt;, where many views for different tasks are created to satisfy the requirements of each individual component. Depending on the overall product architecture, the views may sometimes duplicate information (such as each view rendering the project and its resources, plus one other piece of value-added content for each project), or alternatively the views may render just their data, which means that if the user is exploiting function from multiple components within the product, s/he may have to keep multiple views open.&lt;br /&gt;&lt;br /&gt;The pattern that many components teams follow tends to be a viewer that exposes a custom model (like a J2EE Deployment Descriptor, as in the &lt;a href="http://www.eclipse.org/webtools/"&gt;Web&lt;/a&gt; Tools Platform) plus the resource or Java(tm) representation of the project.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/pe_documentmdl.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/5251/3014/1600/pe_documentmdl.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It turns out that this pattern is really driven by integrators incorporating the editor model into their viewers. Often, the extra content in a viewer is really a representation of some model that an editor can operate on, which is exposed to the user to make it easier for them to manipulate or navigate. So the first requirement of &lt;a href="http://www.foxmovies.com/fightclub/"&gt;fight&lt;/a&gt; club .. err the CNF is:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Requirement: Support a single viewer for all editor model integrators.&lt;/span&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Use Case 2: Expose model elements that are not tied directly to the workspace. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Not all viewers follow the editor model pattern; some viewers follow the pattern of incorporating data from outside the workspace environment to make it easier for users to have a "one-stop" shop for all of their development needs. The database extensions in WTP are an example of this:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/databases.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/5251/3014/1600/databases.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now merging all of the content of these views in one place can overwhelm the user, so the CNF must allow users to choose what is relevant to them.&lt;br /&gt;&lt;br /&gt;There are two requirements derived from this scenario:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Requirement: Allow non-resource driven model content.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Requirement: Allow users to choose what they want to see in their integrated viewer.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Use Case 3: Open Source Platform must allow integration from Commercial Products.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;One of the biggest value propositions of Eclipse is for vendors to pool resources to produce the commodity layers; then vendors can differentiate themselves to provide value-added content based on their customers' needs. The Web Tools Platform is one of the first big examples where many different kinds of viewer content would be required for end-users, both from standard and proprietary models, and therefore vendors must not be restricted from extending the primary navigational viewer.&lt;br /&gt;&lt;br /&gt;A similar problem exists on the level of commercial products, where value-added content from Independent Service Vendors (ISVs) must be able to integrate seamlessly to enhance the user experience. Often, the integration paths for ISVs are not as well documented as an open source platform, so providing a solution on the open source layer allows the ISVs to use the same consistent, public, documented API that the community has helped hone.&lt;br /&gt;&lt;br /&gt;So the general use case here is to allow extensibility across layers of software; downstream layers must be able to integrate seamlessly to maintain a cohesive user experience.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Requirement: Allow Platforms (open source and commercial) to reuse a consistent viewer integration framework and API.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;So in summary, there are four basic requirements of the CNF:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-style: italic;"&gt;Support a single viewer for all &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-style: italic;"&gt; editor model &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-style: italic;"&gt;integrators.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-style: italic;"&gt;Allow non-resource driven model content.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-style: italic;"&gt;Allow users to choose what they want to see in their integrated viewer.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-style: italic;"&gt;Allow Platforms (open source and commercial) to reuse a consistent viewer integration framework and API.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In addition to the requirements above, there were a few goals driven from experience with developing Eclipse viewers from release to release:&lt;br /&gt;&lt;/span&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Enhanced reusability&lt;/span&gt;. Clients should be able to re-use Platform content (Resource model, Java(tm) model, etc) with little or no code; and clients should be able to define their own viewers an "absorb" content easily.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Mitigate client reaction from release to release. &lt;/span&gt;Eclipse continues to evolve at all levels as an effective Platform. Often enhancements are made at the lower levels (such as the enhanced working set support from JDT in 3.1). For downstream integrators to adopt this functionality, it often requires an expensive porting or coding effort, in addition to whatever value-added content is slated for that product's own release. The CNF should make it easier for clients to absorb these enhancements without coding efforts.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-family:verdana;"&gt;The CNF began as product solution in Rational(R) Application Developer (RAD) v6.0. It was originally derived from the General Purpose Navigator proposal for Eclipse 3.0. The GPN was a great start, but much of the original code has been re-written; however some of the concepts still remain.&lt;br /&gt;&lt;br /&gt;When IBM Rational decided to contribute some of the lower integration layers of RAD v6.0 to the then newly formed Eclipse Web Tools Platform project, the CNF was included in the contribution. Product solutions often have very different focuses from Platform solutions, as the measure of value in a product solution is on the user experience, not on the ease of extendibility. Some initial API definition was done in the context of WTP, but there was uncertainty at the time about the proper home for the CNF. Like many of the frameworks in WTP, it is not specific to any particular specification, and solves a general problem required for products built on Eclipse. Therefore, it was expected that the proper home for the CNF was in the Platform. At the time, it wasn't clear that the Platform would be willing to accept the CNF or if another version or solution would present itself, so the effort invested to harden the CNF API in WTP was minimal.&lt;br /&gt;&lt;br /&gt;In Eclipse 3.2, it was agreed that the Platform would adopt the CNF, with the proper API finalization that was required. I've had requests to provide some thoughts and feedback on what it takes to turn a product solution into a platform solution, and I hope to address that in a future post.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;So in a nutshell, the CNF is designed to help you integrate document models into an navigator experience, integrate content that isn't specific to the workbench, allow you to absorb other content seamlessly (in particular resource and Java(tm) models), and mitigate your expense in time and effort to absorb incremental enhancements from release to release from layers beneath you. The CNF began as a product solution for a general problem in Rational Application Developer v6.0, and has been contributed to the open source Eclipse Platform in 3.2 to allow the community to better integrate their navigational viewers and provide a more cohesive user experience across software layers and products.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28446986-114951307382970775?l=scribbledideas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28446986/posts/default/114951307382970775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28446986/posts/default/114951307382970775'/><link rel='alternate' type='text/html' href='http://scribbledideas.blogspot.com/2006/06/what-does-common-navigator-framework.html' title='What does the Common Navigator Framework (CNF) help me do?'/><author><name>Michael D. Elder</name><uri>http://www.blogger.com/profile/03856327413506018439</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-28446986.post-114876742008015612</id><published>2006-05-27T17:11:00.000-04:00</published><updated>2006-06-12T14:56:28.193-04:00</updated><title type='text'>Where do we go from here?</title><content type='html'>So far, I've posted two articles on how to get started with the Common Navigator Framework (CNF). There's alot more that can be done though, and I'd like feedback from you about what you're most interested in. Eventually, most if not all, of the pieces of the framework will have an article, but the prioritization should be driven by the community. To that end, I ask the wildly open end question, what do &lt;span style="font-style: italic; font-weight: bold;"&gt;you&lt;/span&gt; want to learn about next?&lt;br /&gt;&lt;br /&gt;There are several large posting topics that come to mind right off:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Use cases and motivation for an extensible viewer.&lt;/span&gt; The posts so far jumped right into building extensions, but some in the community may not see the reason for having an extensible viewer framework. Is this topic worth an article? Does anyone care about the history or the evolution of the CNF? Or the lessons learned along the way? Or what about what it takes to contribute a component to the Eclipse Platform -- turning a product solution into a Platform-worthy API?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Contributing or consuming actions&lt;/span&gt;. You can contribute actions or use the API in your own viewers to drive generically extensible menus. You can also structure action extensions that are turned on and off with their content extension, or you can structure menu contributions that have dependencies on other menu contributions (such as contributing to a submenu). The CNF supports object and viewer contributions as well as a CNF-specific programmatic menu builder. You can also contribute to the retargetable actions of the workbench based on the selection in the viewer. Which of these articles would be valuable to you?&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Filters.&lt;/span&gt; I covered some of what you can do with filters in the first posting, was this enough? Do you want to see a programmatic example?&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Sorting.&lt;/span&gt; Sorting in a generic viewer is a nontrivial problem because there does not seem to be an intuitive approach. Therefore, one has to be arbitrarily decided. Even then, some may &lt;a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=141724"&gt;disagree&lt;/a&gt; with the limitations that are imposed. Are any of you interested in providing feedback about what you'd expect? Or do you just want to see an example of contributing sorters to a CNF viewer?&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Drag and Drop&lt;/span&gt;. The CNF supports extensibility for drag transfer data types (specific to the viewer) and extensiblity for drop handling (specific to extensions). You can contribute a DND handler for moving items within a viewer or for moving items from a Common Navigator to another an editor or view in the workbench. Would you like to see how to define your own transfer data type for a viewer? Or what about just adding your own drop handler?&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Reusing the API&lt;/span&gt; outside of the &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.CommonNavigator&lt;/span&gt; view-part implementation. There are many pieces of the CNF that are designed to be reusable outside of the standard view part implementation. Indeed, &lt;a href="http://eclipselowdown.blogspot.com/"&gt;Michael Valenta&lt;/a&gt;'s &lt;a href="http://eclipselowdown.blogspot.com/2006/05/common-navigator-and-synchronize-view.html"&gt;post&lt;/a&gt; is a great example of using the API to construct your own custom extensible viewer class, which doesn't depend on &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.CommonNavigator&lt;/span&gt; or &lt;span style="font-weight: bold;"&gt;CommonViewer&lt;/span&gt;.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Then there are several smaller topics that might be of interest:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Defining retargetable actions&lt;/span&gt;. The CNF allows extensions to define their own default &lt;span style="font-style: italic;"&gt;Open&lt;/span&gt; action (e.g., what happens when the user double clicks a node you've added?), as well as all of the other retargetable actions defined by the workbench (see &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.actions.IActionFactory&lt;/span&gt;) or your own custom retargetable actions.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Setting text in the status bar of the workbench. &lt;/span&gt;CNF extensions may use different text to describe their items in the status bar of the workbench than they use to label the item in the viewer.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Using custom fonts and color for items&lt;/span&gt;. Who says that plain old font is good enough? Get fancy with it.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Using mementos to restore or persist state between sessions.&lt;/span&gt; CNF extensions may remember state from session to session, providing consistency in the user's experience.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Binding an extension programatically to a viewer.&lt;/span&gt; You've &lt;a href="http://scribbledideas.blogspot.com/2006/05/building-common-navigator-based-viewer_22.html"&gt;seen&lt;/a&gt; how to &lt;span style="font-style: italic;"&gt;bind&lt;/span&gt; an extension to a viewer using the &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.viewer&lt;/span&gt; extension point, but did you know you can drive this directly through the API?&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Turning extensions on and off programatically&lt;/span&gt;. Again, the CNF allows you to programmatically customize a viewer using the API.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Defining and Using Wizard Shortcut actions. &lt;/span&gt;The CNF allows extensions to declare wizard shortcut actions based on existing &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.xxxWizards&lt;/span&gt; extensions. The text and icon is automatically picked up from the wizard definition, which means the action's text and icon updates when the wizard definition changes. Consumers of the framework can also reuse the API in their own viewers, without any CNF dependencies to render their own context menu with &lt;span style="font-style: italic;"&gt;New&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;Import&lt;/span&gt;, and &lt;span style="font-style: italic;"&gt;Export&lt;/span&gt; wizard shortcut actions with very little code.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Hiding the default toolbar buttons and tabs in the filters dialog.&lt;/span&gt; Some viewers don't care about link with editor or collapse all, and some viewers don't want to expose the ability to turn filters or extensions on and off to the user. Care to know how?&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Adding a link with editor handler.&lt;/span&gt; An oddly placed addition to the CNF is the link with editor extension point. It's not really core to something like the CNF, but it's something that most viewers (particularly navigational viewers) need. For custom editors or models, clients can add their own link with editor handlers; would this be interesting to you?&lt;/li&gt;&lt;/ul&gt;I'll end this posting with a couple of diagrams I used at EclipseCon 2006 to convey a high level conceptual model of how the extension points are structured. Feel free to post your own questions about these diagrams or your own topic ideas.&lt;br /&gt;&lt;br /&gt;In each diagram, the boxes with the component icon (the not-green-C, not-purple-I icon) are the elements in the extension point. The other boxes (with green Cs and purple-Is) show the classes or interfaces (respectively) defined by the element. The allowed cardinality is denoted between each element and its child.&lt;br /&gt;&lt;br /&gt;The first diagram shows the &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.navigatorContent&lt;/span&gt; extension point.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The second diagram shows the &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.viewer&lt;/span&gt; extension point.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/org_eclipse_ui_navigator_navigatorContent_ovrvw.0.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/5251/3014/320/org_eclipse_ui_navigator_navigatorContent_ovrvw.0.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/org_eclipse_ui_navigator_viewer_ovrvw.0.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/5251/3014/320/org_eclipse_ui_navigator_viewer_ovrvw.0.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28446986-114876742008015612?l=scribbledideas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28446986/posts/default/114876742008015612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28446986/posts/default/114876742008015612'/><link rel='alternate' type='text/html' href='http://scribbledideas.blogspot.com/2006/05/where-do-we-go-from-here.html' title='Where do we go from here?'/><author><name>Michael D. Elder</name><uri>http://www.blogger.com/profile/03856327413506018439</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-28446986.post-114833595180092508</id><published>2006-05-22T17:38:00.000-04:00</published><updated>2006-06-12T14:56:14.473-04:00</updated><title type='text'>Building a Common Navigator based viewer, Part II: Adding Content</title><content type='html'>&lt;span style=";font-family:verdana;font-size:100%;"  &gt;&lt;br /&gt;In this post, we're going to walk through adding a simple content extension to the viewer we defined in the &lt;a href="http://scribbledideas.blogspot.com/2006/05/building-common-navigator-based-viewer.html"&gt;last example&lt;/a&gt;. To avoid getting bogged down in an overly complex content provider and label provider, we will focus on a file structure with a very simple model, in this case a plain old *.properties file. When finished, our content extension will allow us to expand any *.properties file in the Example viewer and render the data in the file right in the viewer.&lt;br /&gt;&lt;br /&gt;You may also download &lt;a href="https://bugs.eclipse.org/bugs/attachment.cgi?id=42233"&gt;the full example&lt;/a&gt; as it stands at the end of this posting.&lt;br /&gt;&lt;br /&gt;First, let's take a look at what the content extension will look like in the plugin.xml file. If you have read the last post, you'll know that you can build an extension like the following example using the &lt;span style="font-style: italic;"&gt;Extensions&lt;/span&gt; tab of the &lt;span style="font-style: italic;"&gt;Plug-in Manifest Editor&lt;/span&gt;. First by selecting &lt;span style="font-style: italic;"&gt;Add...&lt;/span&gt; on the &lt;span style="font-style: italic;"&gt;Extensions&lt;/span&gt; page, choosing &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.navigatorContent&lt;/span&gt;, then using the right-click menu, and following the &lt;span style="font-style: italic;"&gt;New &gt; navigatorContent&lt;/span&gt; menu path. Alternatively, you can create this extension in the &lt;span style="font-style: italic;"&gt;plugin.xml&lt;/span&gt; tab of the same editor. Either approach is fine, but the first approach drives the &lt;span style="font-style: italic;"&gt;New&lt;/span&gt; menu from the Extension Point Schema, so you will see other options that are available in the raw &lt;span style="font-style: italic;"&gt;plugin.xml&lt;/span&gt; tab.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/properties-a.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: left; cursor: pointer;" src="http://photos1.blogger.com/blogger/5251/3014/1600/properties-a.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The extension declares a content extension with the id "&lt;span style="font-weight: bold;"&gt;org.eclipse.ui.examples.navigator.propertiesContent&lt;/span&gt;" with the display name "Properties File Contents". The name is the string used in the "Available Extensions" tab of the Filters dialog.* We will get into the code for the content and label providers shortly, but for now just note that each are specified; you cannot specify just one or the other.&lt;br /&gt;&lt;br /&gt;Finally we set some attributes to tell the framework how we would like our extension rendered in the viewer.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;activeByDefault&lt;/span&gt; determines whether the extension should be &lt;span style="font-style: italic;"&gt;active&lt;/span&gt; in the default configuration (e.g. new workspace).&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;icon&lt;/span&gt; determines what icon should be used when referring to the extension in the User Interface&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;priority&lt;/span&gt; is used in a couple of different ways. The most prominent is to determine the relative ordering of items in the viewer (highest priority items towards the top of the viewer down to lowest priority items towards the bottom of the viewer). In general, either "normal" or "high" should be sufficient for most extensions, indicating that they should be mixed in with the resources extension (when priorities match, the label is used to sort items alphabetically) or placed just above resources under projects.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;Within each &lt;span style="font-weight: bold;"&gt;&amp;lt;navigatorContent /&amp;gt;&lt;/span&gt; element, we can specify many different types of extensions, but before we grow the example, we must describe to the framework when our extension should be invoked. We need to describe when we can provide children, parents, or labels and icons for nodes in the tree. We do this using Eclipse Core Expressions. For now, I'll refer you to the documentation for &lt;span style="font-weight: bold;"&gt;org.eclipse.core.expressions&lt;/span&gt; for more detail on what is possible with these, or you can use the &lt;span style="font-style: italic;"&gt;New &gt; ...&lt;/span&gt; menu in the &lt;span style="font-style: italic;"&gt;Extensions&lt;/span&gt; tab to create these easily.&lt;br /&gt;&lt;br /&gt;For content extensions, there are two important expressions: &lt;span style="font-weight: bold;"&gt;&amp;lt;triggerPoints /&amp;gt;&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;&amp;lt;possibleChildren /&amp;gt;&lt;/span&gt;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The &lt;span style="font-weight: bold;"&gt;&amp;lt;triggerPoints /&amp;gt;&lt;/span&gt; expression indiciates which types of nodes in the tree might be interesting to our extension. When the framework finds a node that matches the &lt;span style="font-weight: bold;"&gt;&amp;lt;triggerPoints /gt;&lt;/span&gt; expression, our extension will be invoked to provide elements or children for that node. Our extension may not be the only one to be given the opportunity to provide children, as the framework will aggregate all contributed children under each node.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/properties-b.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: left; cursor: pointer;" src="http://photos1.blogger.com/blogger/5251/3014/1600/properties-b.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The &lt;span style="font-weight: bold;"&gt;&amp;lt;possibleChildren /&amp;gt;&lt;/span&gt; expression indiciates which types of nodes in the tree our extension may be able to provide a label or parent for. For your scenarios that must support link with editor, or setSelection() on the viewer, the &lt;span style="font-weight: bold;"&gt;&amp;lt;possibleChildren /&amp;gt;&lt;/span&gt; expression must be accurate and complete.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/properties-c.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: left; cursor: pointer;" src="http://photos1.blogger.com/blogger/5251/3014/1600/properties-c.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Once we have an extension defined, we must &lt;span style="font-style: italic;"&gt;bind &lt;/span&gt;it to the viewers we want it associated with. Specifying a &lt;span style="font-weight: bold;"&gt;&amp;lt;viewerContentBinding /&amp;gt;&lt;/span&gt; indicates that any extension which matches an included pattern is &lt;span style="font-style: italic;"&gt;visible&lt;/span&gt; to any viewer with the &lt;span style="font-style: italic;"&gt;viewerId&lt;/span&gt; specified in the &lt;span style="font-weight: bold;"&gt;&amp;lt;viewerContentBinding /&amp;gt;&lt;/span&gt; element. Recall that we saw these in &lt;a href="http://scribbledideas.blogspot.com/2006/05/building-common-navigator-based-viewer.html"&gt;the last posting&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;For the example, we will &lt;span style="font-style: italic;"&gt;bind&lt;/span&gt; our properties content extension (with id "&lt;span style="font-weight: bold;"&gt;org.eclipse.ui.examples.navigator.propertiesContent&lt;/span&gt;" to our Example View (with id "&lt;span style="font-weight: bold;"&gt;org.eclipse.ui.examples.navigator.view&lt;/span&gt;").&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/properties-d.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: left; cursor: pointer;" src="http://photos1.blogger.com/blogger/5251/3014/1600/properties-d.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now that we have setup our extension, let's take a look at the code that will actually do the heavy lifting.&lt;br /&gt;&lt;br /&gt;First, we need a model. A properties file has an extremely simple structure, and we will model this using just one type of model object, called &lt;span style="font-weight: bold;"&gt;PropertiesTreeData&lt;/span&gt;, which will have three fields: &lt;span style="font-style: italic;"&gt;name&lt;/span&gt; (the name of the property), &lt;span style="font-style: italic;"&gt;value&lt;/span&gt; (the value of the property), and &lt;span style="font-style: italic;"&gt;container&lt;/span&gt; (the file that contains the properties model. One of these model elements will be populated for each property in the *.properties file.&lt;br /&gt;&lt;br /&gt;In our example, the properties model will only be loaded when requested through the content provider. The content provider is used by the framework to determine the children of each element in the tree, or for any given element, determine its parent (or parents as there could be potentially more than one).&lt;br /&gt;&lt;br /&gt;Our example content provider implements &lt;span style="font-weight: bold;"&gt;org.eclipse.jface.viewers.ITreeContentProvider&lt;/span&gt; to provide information about the tree structure. The Common Navigator framework also supports implementations of the new &lt;span style="font-weight: bold;"&gt;org.eclipse.jface.viewers.ITreePathContentProvider&lt;/span&gt;, but that is out of scope for this example.&lt;br /&gt;&lt;br /&gt;The &lt;span style="font-weight: bold;"&gt;PropertiesContentProvider&lt;/span&gt; also handles some of the other functions required by our extension, such as listening for resource changes and updating the model (and viewer) accordingly. We will not go over these in this posting, but you can see how it works in &lt;span style=";font-family:verdana;font-size:100%;"  &gt;the &lt;a href="https://bugs.eclipse.org/bugs/attachment.cgi?id=42233"&gt;full source&lt;/a&gt;&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;.&lt;br /&gt;&lt;br /&gt;For now, we will focus on the viewer integration methods as defined by &lt;span style="font-weight: bold;"&gt;ITreeContentProvider&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/properties-e.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: left; cursor: pointer;" src="http://photos1.blogger.com/blogger/5251/3014/1600/properties-e.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;An &lt;span style="font-weight: bold;"&gt;ITreeContentProvider&lt;/span&gt; must implement &lt;span style="font-weight: bold;"&gt;getElements(Object input)&lt;/span&gt;, &lt;span style="font-weight: bold;"&gt;getChildren(Object parent)&lt;/span&gt;, &lt;span style="font-weight: bold;"&gt;hasChildren(Object element)&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;getParent(Object element)&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;The &lt;span style="font-weight: bold;"&gt;getElements()&lt;/span&gt; method is queried for elements at the root of the viewer. Many implementations will just forward this call to &lt;span style="font-weight: bold;"&gt;getChildren()&lt;/span&gt;, and that's just what we'll do.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/properties-f.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; display: block; text-align: left; cursor: pointer;" src="http://photos1.blogger.com/blogger/5251/3014/1600/properties-f.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The &lt;span style="font-weight: bold;"&gt;getChildren()&lt;/span&gt; accepts an object (in our case either a *.properties &lt;span style="font-weight: bold;"&gt;IFile&lt;/span&gt; or an instance of our &lt;span style="font-weight: bold;"&gt;PropertiesTreeData&lt;/span&gt; model object because we described these in our &lt;span style="font-weight: bold;"&gt;&amp;lt;triggerPoints /&amp;gt;&lt;/span&gt; expression.&lt;br /&gt;&lt;br /&gt;In the following implementation, we check to see if the incoming element is an instance of &lt;span style="font-weight: bold;"&gt;org.eclipse.core.resources.IFile&lt;/span&gt; and if the file extension ends in *.properties. If the incoming element meets these criteria, we check our cache of loaded models or attempt to load the model if not cached. The method &lt;span style="font-weight: bold;"&gt;updateModel()&lt;/span&gt; will create a &lt;span style="font-weight: bold;"&gt;PropertiesTreeData&lt;/span&gt; object for each property, and cache what it finds in the &lt;span style="font-style: italic;"&gt;cachedModelMap&lt;/span&gt;. Check out the &lt;a href="https://bugs.eclipse.org/bugs/attachment.cgi?id=42233"&gt;full source&lt;/a&gt; to see how &lt;span style="font-weight: bold;"&gt;updateModel()&lt;/span&gt; is implemented.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/properties-g.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; display: block; text-align: left; cursor: pointer;" src="http://photos1.blogger.com/blogger/5251/3014/1600/properties-g.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The &lt;span style="font-weight: bold;"&gt;hasChildren()&lt;/span&gt; method is optimized to return true whenever it is called with an &lt;span style="font-weight: bold;"&gt;IFile&lt;/span&gt; with the *.properties extension. The other alternative is to eagerly load the contents of the file to perform the calculation, but that approach comes with an added performance penality.&lt;br /&gt;&lt;br /&gt;If called with a &lt;span style="font-weight: bold;"&gt;PropertiesTreeData&lt;/span&gt; model element, &lt;span style="font-weight: bold;"&gt;hasChildren()&lt;/span&gt; will return false, since none of our model elements may have children (a property has no children, but other models clearly may).&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/properties-h.0.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; display: block; text-align: left; cursor: pointer;" src="http://photos1.blogger.com/blogger/5251/3014/1600/properties-h.0.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The &lt;span style="font-weight: bold;"&gt;getParent()&lt;/span&gt; method will return the &lt;span style="font-weight: bold;"&gt;IFile&lt;/span&gt; that contains the &lt;span style="font-weight: bold;"&gt;PropertiesTreeData&lt;/span&gt; item or &lt;span style="font-weight: bold;"&gt;null&lt;/span&gt; if called with any other object. The Common Navigator framework will continue querying other extensions until a non-&lt;span style="font-weight: bold;"&gt;null&lt;/span&gt; parent is found or all relevant extensions have been queried. Recall that an extension may be asked to provide a parent for an element if that element matches its &lt;span style="font-weight: bold;"&gt;&amp;lt;possibleChildren /&amp;gt;&lt;/span&gt; expression.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/properties-i.0.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; display: block; text-align: left; cursor: pointer;" src="http://photos1.blogger.com/blogger/5251/3014/1600/properties-i.0.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Finally, the label provider of our content extension tells the viewer how to render the icon and label for our model elements (&lt;span style="font-weight: bold;"&gt;PropertiesTreeData&lt;/span&gt;). Since we're only conerned with these elements, we do not need to worry about providing labels or icons for any other elements. Other extensions will render the labels and icons for other elements in the tree.&lt;br /&gt;&lt;br /&gt;The &lt;span style="font-weight: bold;"&gt;PropertiesLabelProvider&lt;/span&gt; implements &lt;span style="font-weight: bold;"&gt;org.eclipse.jface.viewers.ILabelProvider&lt;/span&gt; and also &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.IDescriptionProvider&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ILabelProvider&lt;/span&gt; is the default interface required for proving labels and icons by JFace.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;IDescriptionProvider&lt;/span&gt; is specific to the Common Navigator framework and is used to provide text for the status bar in the lower left hand corner of the Eclipse window.&lt;br /&gt;&lt;br /&gt;The methods required by &lt;span style="font-weight: bold;"&gt;ILabelProvider&lt;/span&gt; are &lt;span style="font-weight: bold;"&gt;getText()&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;getImage()&lt;/span&gt;. We will render the label for our model elements as the "&lt;span style="font-style: italic;"&gt;name&lt;/span&gt;= &lt;span style="font-style: italic;"&gt;value&lt;/span&gt;" string for the property (without the quotes). For the icon, we just use one of the shared icons provided by Platform/UI.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/properties-j.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; display: block; text-align: left; cursor: pointer;" src="http://photos1.blogger.com/blogger/5251/3014/1600/properties-j.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The label provider will be queried for labels, icons, or descriptions for any element contributed directly by the extension or for any element that matches the &amp;lt;possibleChildren /&amp;gt; expression for that extension. If &lt;span style="font-weight: bold;"&gt;null&lt;/span&gt; is returned for the icon or the label, the framework will continuing other applicable extensions based on their &amp;lt;possibleChildren /&amp;gt; expressions and viewer &lt;span style="font-weight: bold;"&gt;bindings&lt;/span&gt;. If your extensions wishes to pass on its opportunity to provide a label or icon, always return &lt;span style="font-weight: bold;"&gt;null&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;And that's it. The final view renders properties files right in our &lt;span style="font-style: italic;"&gt;Example View&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/properties-k.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; cursor: pointer;" src="http://photos1.blogger.com/blogger/5251/3014/1600/properties-k.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;*-In general, you should externalize your strings, but we will not worry about that for these examples. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28446986-114833595180092508?l=scribbledideas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28446986/posts/default/114833595180092508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28446986/posts/default/114833595180092508'/><link rel='alternate' type='text/html' href='http://scribbledideas.blogspot.com/2006/05/building-common-navigator-based-viewer_22.html' title='Building a Common Navigator based viewer, Part II: Adding Content'/><author><name>Michael D. Elder</name><uri>http://www.blogger.com/profile/03856327413506018439</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-28446986.post-114815241695120152</id><published>2006-05-20T14:41:00.000-04:00</published><updated>2006-06-23T00:10:55.470-04:00</updated><title type='text'>Building a Common Navigator based viewer, Part I: Defining the Viewer</title><content type='html'>I've started fielding questions about the Common Navigator on the &lt;a href="news:eclipse.platform"&gt;eclipse.platform newsgroup&lt;/a&gt; and the message from the community is resoundingly that there are not enough examples. In order to help the community adopt the Common Navigator framework, I'm going to be fleshing out some examples (in the Eclipse repo at dev.eclipse.org:/home/eclipse, where you can login as "anonymous"; see the &lt;a href="http://wiki.eclipse.org/index.php/CVS_Howto"&gt;wiki for more information&lt;/a&gt;. I will be documenting these examples here in this blog. Eventually I will intgrate the documentation that evolves here back into the Platform SDK, but I want a forum where potential consumers can provide feedback easily and directly to the distribution media (e.g. this blog).&lt;br /&gt;&lt;br /&gt;Specific documentation on the extension points and API is available in the Eclipse Platform Help (&lt;span style="font-style: italic;"&gt;Help &gt; Help Content&lt;/span&gt;) under the &lt;span style="font-style: italic;"&gt;Platform Plug-in Developer's Guide &gt; Reference &gt; API Reference | Extension Points Reference&lt;/span&gt;. The relevant extension points are &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.viewer&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.navigatorContent&lt;/span&gt;. The relevant API packages are &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator&lt;/span&gt;. If you'd like more details on the specifics mentioned in this post, please follow up with these references.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So where to begin? First we're going to configure our plugin that will contain the viewer to add &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator&lt;/span&gt; to its dependencies. Then we're going to define a view part using the &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.views&lt;/span&gt; extension point and specify the &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.CommonNavigator&lt;/span&gt; class as our view part implementation, which will provide a cradle for our viewer. Then we will define a &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.viewer&lt;/span&gt; extension to configure the viewer as a Common Navigator. Finally, we can define &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.navigatorContent&lt;/span&gt; extensions along with &lt;span style="font-style: italic;"&gt;bindings &lt;/span&gt;(&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.viewer/viewerContentBinding&lt;/span&gt;&lt;/span&gt;) to associate extensions with our viewer.&lt;br /&gt;&lt;br /&gt;You don't have to use &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.CommonNavigator &lt;/span&gt;in order to take advantage of the framework; you could embed content using the &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.INavigatorContentService&lt;/span&gt; virtually anywhere from dialogs to editors or define your own viewer and view part class, but for this example, we're going to stick to the basics.&lt;br /&gt;&lt;br /&gt;&lt;a name="basicsetup"&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Basic Setup&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The Common Navigator Framework is a feature that is new to Eclipse 3.2. Therefore, you must have an update to Eclipse 3.2 environment installed. The topic of this post will not get into setting up Eclipse for self-hosting development. I assume that you have Eclipse 3.2 setup and are either self-hosting against a target of your own choice or the default.&lt;br /&gt;&lt;br /&gt;Before we do anything, we need to make sure that we have our plugin configured with the necessary dependencies. Either create a new Plugin (&lt;span style="font-style: italic;"&gt;File&gt; New&gt; Project: Plug-in Development&gt; Plug-in Project: Set the name and accept the defaults&lt;/span&gt;), or open up the Plug-in Manfiest Editor (select the "plugin.xml" file in your viewer of choice (Project Explorer, Package Explorer, Navigator, etc) and double-click or right-click and select &lt;span style="font-style: italic;"&gt;Open With&gt; Plug-in Manifest Editor&lt;/span&gt;. On the &lt;span style="font-style: italic;"&gt;Dependencies&lt;/span&gt; tab, click &lt;span style="font-style: italic;"&gt;Add...&lt;/span&gt; and begin typing &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator&lt;/span&gt; and select it when it is highlighted or when you see it in the list.&lt;br /&gt;&lt;br /&gt;Now select the &lt;span style="font-style: italic;"&gt;Extensions&lt;/span&gt; tab of the editor.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Defining the view part&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When defining a Common Navigator enabled viewer, you must declare the actual view part. Eclipse view parts are defined by the &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.views&lt;/span&gt; extension point. A view part is the container for our viewer; it has a tab handle with a label, a place for a view menu (the little triangle in the top right corner of the view part), and can contain any widget that we need to display to the end user. View parts are not specific to Common Navigators, we just need a cradle to hold our viewer.&lt;br /&gt;&lt;br /&gt;You can define the view through the &lt;span style="font-style: italic;"&gt;Extensions&lt;/span&gt; tab by selecting &lt;span style="font-style: italic;"&gt;Add...&lt;/span&gt; and begin typing &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.views&lt;/span&gt; until you see it in the list. Then right-click on the entry that is created under the "All Extensions" tree named &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.views &lt;/span&gt;and choose &lt;span style="font-style: italic;"&gt;New &gt; view&lt;/span&gt;. This will create the &lt;view&gt; element in the plugin.xml file.&lt;br /&gt;&lt;br /&gt;When you select the view element, the available attributes for the element should appear as editable textboxes and widgets on the right. We are going to enter the following values (without the quotes):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;id&lt;/span&gt;: "org.eclipse.ui.examples.navigator.view"&lt;br /&gt;&lt;span style="font-style: italic;"&gt;name&lt;span style="font-style: italic;"&gt;:&lt;/span&gt;&lt;/span&gt; "Example View"&lt;br /&gt;&lt;span style="font-style: italic;"&gt;class:&lt;/span&gt; "org.eclipse.ui.navigator.CommonNavigator"&lt;br /&gt;&lt;span style="font-style: italic;"&gt;icon:&lt;/span&gt; "icons/filenav_nav.gif" (or your own)&lt;br /&gt;&lt;span style="font-style: italic;"&gt;allowMultiple:&lt;/span&gt; false&lt;br /&gt;&lt;br /&gt;Now select the "plugin.xml" tab of the editor. You should see something like the following. You can choose to create a category as in the diagram, but be sure to indicate which category your viewer should be associated with by specifying the "category" attribute of the viewer. Otherwise, your viewer will appear in the &lt;span style="font-style: italic;"&gt;Other&lt;/span&gt; category of the &lt;span style="font-style: italic;"&gt;Show View&lt;/span&gt; dialog (&lt;span style="font-style: italic;"&gt;Window &gt; Show View &gt; Other...&lt;/span&gt;).&lt;br /&gt;&lt;br /&gt;&lt;/view&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/defining_the_view.0.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/5251/3014/1600/defining_the_view.0.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;view&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Defining the viewer configuration&lt;/span&gt;&lt;br /&gt;&lt;/view&gt;&lt;br /&gt;Once we define the view part, we need to define a configuration extension for our view part (&lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.viewer&lt;/span&gt;) which will tell the framework some basic things like which view part is a Common Navigator, what the structure of the popup menu should be,  and whether to respect object contributions, in addition to properties that influence the default behavior of the viewer.&lt;br /&gt;&lt;br /&gt;Open the &lt;span style="font-style: italic;"&gt;Extensions&lt;/span&gt; tab again on the editor and click &lt;span style="font-style: italic;"&gt;Add...&lt;/span&gt;; when the dialog appears begin typing &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.viewer&lt;/span&gt; until you see it in the list and then select it. Right-click on the new &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.viewer &lt;/span&gt;element in the "All Extensions" tree and choose &lt;span style="font-style: italic;"&gt;New &gt; viewer&lt;/span&gt;. The &lt;viewer&gt; element will allow us to associate an abstract Common Navigator viewer with a specific view part. The abstract viewer is what extensions are associated with, regardless of whether the viewer is embedded in a view part or elsewhere. So for this example, we'll use the id we used above in our &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.views&lt;/span&gt; extension ("&lt;/viewer&gt;&lt;span style="font-family:verdana;"&gt;org.eclipse.ui.examples.navigator.view"). Select the &lt;viewer&gt; element in the view (which will be labeled &lt;span style="font-style: italic;"&gt;name-of-your-plugin.viewer&lt;/span&gt; by default) and change the &lt;span style="font-style: italic;"&gt;viewerId&lt;/span&gt; in the text box that appears on the right to "&lt;/viewer&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;org.eclipse.ui.examples.navigator.view" without the quotes.&lt;br /&gt;&lt;br /&gt;&lt;a name="popupmenus"&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Some comments on popup menus&lt;/span&gt;. The Common Navigator framework has two means to allow viewers to customize their menus. The first way to configure the popup menu is to specify the &lt;span style="font-style: italic;"&gt;popupMenuId&lt;/span&gt; of &lt;span style="font-style: italic;"&gt;viewer&lt;/span&gt; to accept the default separators and group marker ids for the menu. The default values are documented under the &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.viewer&lt;/span&gt; extension point, but are reproduced below for convenience. Alternatively, you could choose not to specify a &lt;span style="font-style: italic;"&gt;popupMenuId&lt;/span&gt; and instead specify a  &amp;lt;popupmenu /&amp;gt; element as a child of the &amp;lt;viewer /&amp;gt; element. Here, you may define your own separator and group markers for your downstream clients to add to. If you expect to &lt;span style="font-style: italic;"&gt;bind&lt;/span&gt; the content or actions of the content extensions provided by the Platform (Resource, Java(tm)), then it is recommended that you use the default groupings.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"group.new"             separator="true" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"group.goto"             &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"group.open"            separator="true" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"group.openWith" &lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"group.edit"            separator="true" &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"group.show"            separator="true" &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-style: italic;"&gt;"group.reorganize"&lt;br /&gt;"group.port" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"group.generate"        separator="true" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"group.search"          separator="true" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"group.build"           separator="true" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"additions"             separator="true"  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"group.properties"      separator="true" &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Some comments on options&lt;/span&gt;. The &amp;lt; options /&amp;gt; element under the &amp;lt;viewer /&amp;gt; element allows you to specify String-based name=value pairs. There are a few options used by the base framework (documented in the Examples section of &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.viewer&lt;/span&gt;), but the mechanism can be used by your own viewers or extensions to provide extra configuration to extensions &lt;span style="font-style: italic;"&gt;bound&lt;/span&gt; to the viewer. See &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.INavigatorViewerDescriptor&lt;/span&gt; for the API to read the properties specified in a &amp;lt;viewer /&amp;gt;element. You can get to the viewer descriptor via the &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.INavigatorContentService&lt;/span&gt; of a Common Navigator viewer.&lt;br /&gt;&lt;br /&gt;Once you have set the &lt;span style="font-style: italic;"&gt;viewerId&lt;/span&gt;, you can select the "plugin.xml" tab to see the following element defined.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/defining_the_viewer2.0.jpg"&gt;&lt;img style="cursor: pointer;" src="http://photos1.blogger.com/blogger/5251/3014/1600/defining_the_viewer2.0.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;After defining the viewer, we will need to add content extensions and &lt;span style="font-style: italic;"&gt;bind&lt;/span&gt; them to the viewer. I'll cover this in more detail in the next post. For the example we'll simply &lt;span style="font-style: italic;"&gt;bind&lt;/span&gt; the default resource content (defined by the &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.resources&lt;/span&gt; plugin) to our viewer.&lt;br /&gt;&lt;br /&gt;Go back to the &lt;span style="font-style: italic;"&gt;Extensions&lt;/span&gt; tab, right-click on the &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.viewer&lt;/span&gt; extension and choose &lt;span style="font-style: italic;"&gt;New &gt; viewerContentBinding&lt;/span&gt;. Select the &lt;span style="font-style: italic;"&gt;viewerContentBinding&lt;/span&gt; element and set the &lt;span style="font-style: italic;"&gt;viewerId&lt;/span&gt; to the id we are using for our example viewer ("org.eclipse.ui.navigator.examples.view").&lt;br /&gt;Right-click on the new &lt;span style="font-style: italic;"&gt;viewerContentBinding&lt;/span&gt; element, and choose &lt;span style="font-style: italic;"&gt;New &gt; includes&lt;/span&gt;. Finally, right-click on the new &lt;span style="font-style: italic;"&gt;includes&lt;/span&gt; element&lt;br /&gt;and choose &lt;span style="font-style: italic;"&gt;New &gt; contentExtension. &lt;/span&gt;For the &lt;span style="font-style: italic;"&gt;pattern&lt;/span&gt; attribute of the &lt;span style="font-style: italic;"&gt;contentExtension&lt;/span&gt; we will specify "org.eclipse.ui.navigator.resourceContent" without the quotes, which is the identifier used by the &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.resources&lt;/span&gt; plugin to identify the Resource extension.&lt;br /&gt;&lt;br /&gt;On the "plugin.xml" tab, we should have something like the following:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/defining_the_viewer-2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/5251/3014/1600/defining_the_viewer-2.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;You may now launch the workbench (&lt;span style="font-style: italic;"&gt;Run...&lt;/span&gt; &gt; New Eclipse Application) to see the viewer in action. We haven't bound any actions to it yet, so you'll need to use either the Resource Navigator or the Package Explorer to create projects that you can see in the viewer. We'll add Resource actions and filters next, but for now, take notice of the default behavior associated with the viewer. The Collapse All button, the Link with Editor button, the Filters button (along with a Filters ("Available Filters") tab and an Extensions ("Available Content") tab.&lt;br /&gt;&lt;br /&gt;To &lt;span style="font-style: italic;"&gt;bind&lt;/span&gt; the resource filters, we need to add another &lt;span style="font-style: italic;"&gt;contentExtension&lt;/span&gt; element to our &lt;span style="font-style: italic;"&gt;includes&lt;/span&gt;. Specify "&lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.resources.filters.*&lt;/span&gt;" as the identifier. This will pick up all resource filters defined by &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.resources&lt;/span&gt;. Alternatively, you could select the individual filters you want by look at the plugin.xml file of that plugin and picking out the identifiers.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/binding-to-the-viewer2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/5251/3014/1600/binding-to-the-viewer2.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Select &lt;span style="font-style: italic;"&gt;Run...&lt;/span&gt; again and verify that you now have several resource filters in your "Available Filters" tab of the Filters dialog.&lt;br /&gt;&lt;br /&gt;Next we'll &lt;span style="font-style: italic;"&gt;bind&lt;/span&gt; the default resource actions. To &lt;span style="font-style: italic;"&gt;bind&lt;/span&gt; actions, we need to add a &lt;span style="font-style: italic;"&gt;viewerActionBinding&lt;/span&gt; to the root of our  extension point. Right-clikck &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.viewer&lt;/span&gt; and select &lt;span style="font-style: italic;"&gt;New &gt; viewerActionBinding&lt;/span&gt;. Make sure the &lt;span style="font-style: italic;"&gt;viewerId&lt;/span&gt; is the correct, and then add an &lt;span style="font-style: italic;"&gt;includes&lt;/span&gt; element that has a &lt;span style="font-style: italic;"&gt;actionExtension&lt;/span&gt; element. For the &lt;span style="font-style: italic;"&gt;pattern&lt;/span&gt; attribute, specify "&lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.resources.*&lt;/span&gt;". Now when you &lt;span style="font-style: italic;"&gt;Run...&lt;/span&gt; the workbench, you'll see &lt;span style="font-style: italic;"&gt;New&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;Import&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;Export&lt;/span&gt;, and &lt;span style="font-style: italic;"&gt;Refresh&lt;/span&gt; by default in the empty viewer, and other actions approximating the Resource Navigator when you select elements in the viewer.&lt;br /&gt;&lt;br /&gt;Your plugin.xml at this point should look like:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/binding-to-the-viewer.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/5251/3014/1600/binding-to-the-viewer.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-style: italic;"&gt;"How does he know all the right ids? This is a little too "magic number for me!"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-family:verdana;"&gt; To locate the identifiers of content extensions you would like to &lt;span style="font-style: italic;"&gt;bind&lt;/span&gt; to your viewer, you can peruse the plugin.xml files of plugins that define the extensions. You can use the &lt;span style="font-style: italic;"&gt;Plug-ins&lt;/span&gt; view to make this easier (&lt;span style="font-style: italic;"&gt;Window &gt; Show View &gt; Other...: PDE &gt; Plug-ins&lt;/span&gt;) or you can open the plugin.xml file of &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.navigatorContent&lt;/span&gt; (using the &lt;span style="font-style: italic;"&gt;Plug-ins&lt;/span&gt; view, even) and on the &lt;span style="font-style: italic;"&gt;Extension Points&lt;/span&gt; tab, select &lt;span style="font-style: italic;"&gt;navigatorContent&lt;/span&gt;. Then click &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-style: italic;"&gt;Find References&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-family:verdana;"&gt;  to locate all extensions in your workspace that define content or action extensions you might want to use in your own viewer. Content extensions are defined by the &lt;span style="font-weight: bold;"&gt;navigatorContent&lt;/span&gt; element, so use the &lt;span style="font-style: italic;"&gt;id &lt;/span&gt;attribute of &lt;span style="font-weight: bold;"&gt;navigatorContent&lt;/span&gt; extensions you would like to &lt;span style="font-style: italic;"&gt;bind&lt;/span&gt; when you define&lt;span style="font-style: italic;"&gt; contentExtension&lt;/span&gt; elements under &lt;span style="font-style: italic;"&gt;viewerContentBinding&lt;/span&gt;s for your viewer. Action extensions are defined by the &lt;span style="font-weight: bold;"&gt;actionProvider&lt;/span&gt; element, so use the &lt;span style="font-style: italic;"&gt;id&lt;/span&gt; attribute of the &lt;span style="font-weight: bold;"&gt;actionProvider&lt;/span&gt; extensions you would lik to &lt;span style="font-style: italic;"&gt;bind&lt;/span&gt; when you define &lt;span style="font-style: italic;"&gt;actionExtension&lt;/span&gt; elements under &lt;span style="font-style: italic;"&gt;viewerActionBindings&lt;/span&gt; for your viewer. Keep in mind that &lt;span style="font-weight: bold;"&gt;actionProvider&lt;/span&gt; that are nested under &lt;span style="font-weight: bold;"&gt;navigatorContent&lt;/span&gt; extensions are automatically &lt;span style="font-style: italic;"&gt;bound &lt;/span&gt;when their enclosing content extension is &lt;span style="font-style: italic;"&gt;bound&lt;/span&gt; to a viewer.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Defining Filters&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The last thing we are going to do today is define a filter for our viewer using Eclipse Core Expressions. Documentation on the Core Expressions framework is available with the &lt;span style="font-weight: bold;"&gt;org.eclipse.core.expressions&lt;/span&gt; plugin. We are going to use the property testers defined by &lt;span style="font-weight: bold;"&gt;org.eclipse.core.resources&lt;/span&gt; to test for a specific project nature, and hide all projects which do not have this project nature.&lt;br /&gt;&lt;br /&gt;So back on the &lt;span style="font-style: italic;"&gt;Extensions&lt;/span&gt; tab of the &lt;span style="font-style: italic;"&gt;Plug-in Manifest Editor&lt;/span&gt;, select &lt;span style="font-style: italic;"&gt;Add...&lt;/span&gt; and choose &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.navigatorContent&lt;/span&gt;. Then add a new &lt;span style="font-style: italic;"&gt;commonFilter&lt;/span&gt; element to this extension (same as before: right-click on the &lt;span style="font-weight: bold;"&gt;org.eclipse.ui.navigator.navigatorContent&lt;/span&gt; element, choose &lt;span style="font-style: italic;"&gt;New &gt; commonFilter&lt;/span&gt;). Change the suggested &lt;span style="font-style: italic;"&gt;id&lt;/span&gt; to "org.eclipse.ui.examples.navigator.filters.hideNonJavaProjects", and change the name to "Hide non-Java projects". Instead of specifying a class implementation, we are just going to define the expression in terms of XML. Right-click on the &lt;span style="font-style: italic;"&gt;commonFilter&lt;/span&gt; element and select &lt;span style="font-style: italic;"&gt;New &gt; filterExpression&lt;/span&gt;. From here, we can continue using the right click menu to create an expression like the following:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/filters-expr.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/5251/3014/1600/filters-expr.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-family:verdana;"&gt;You can also set the &lt;span style="font-style: italic;"&gt;activeByDefault&lt;/span&gt; attribute in the extension to determine whether the filter is active in the default configuration.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;Finally, we need to define a &lt;span style="font-style: italic;"&gt;contentExtension&lt;/span&gt; as part of our &lt;span style="font-style: italic;"&gt;viewerContentBinding&lt;/span&gt; for this viewer. Be sure to use the &lt;span style="font-style: italic;"&gt;id&lt;/span&gt; of our new filter, or a generic pattern (like "&lt;span style="font-weight: bold;"&gt;org.eclipse.ui.examples.navigator.filters.*&lt;/span&gt;") to &lt;span style="font-style: italic;"&gt;bind&lt;/span&gt; this filter and all future filters that we (or our downstream contributions) define that match this id. Your final plugin.xml should look like the following:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/final-example1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/5251/3014/1600/final-example1.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now &lt;span style="font-style: italic;"&gt;Run...&lt;/span&gt; the workbench one last time. Create a few Simple projects and a few Java Projects. When the "Hide non-Java Projects" filter is enabled, the Simple projects should disappear from the view.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5251/3014/1600/example-view.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/5251/3014/1600/example-view.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28446986-114815241695120152?l=scribbledideas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28446986/posts/default/114815241695120152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28446986/posts/default/114815241695120152'/><link rel='alternate' type='text/html' href='http://scribbledideas.blogspot.com/2006/05/building-common-navigator-based-viewer.html' title='Building a Common Navigator based viewer, Part I: Defining the Viewer'/><author><name>Michael D. Elder</name><uri>http://www.blogger.com/profile/03856327413506018439</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-28446986.post-114814824586869518</id><published>2006-05-20T13:11:00.000-04:00</published><updated>2006-06-12T14:55:49.710-04:00</updated><title type='text'>Why would scribbledideas be interesting to read?</title><content type='html'>I started scribbledideas to better engage in the global discussion that is the internet. I hope to use this forum to post thoughts and information on some of my professional activities, solicit feedback from consumers of technology I &lt;a href="http://www.eclipsecon.org/2006/Sub.do?id=260"&gt;have&lt;/a&gt; a &lt;a href="http://www-306.ibm.com/software/awdtools/developer/application/"&gt;hand&lt;/a&gt; in at my &lt;a href="http://www-128.ibm.com/developerworks/platform/"&gt;day&lt;/a&gt; &lt;a href="http://www.ibm.com/us/"&gt;job&lt;/a&gt;, and perhaps throw out an occasional review of &lt;a href="http://www.cigars-review.org/Bolivar-Belicosos-Finos.htm"&gt;a&lt;/a&gt; &lt;a href="http://www.cigars-review.org/Montecristo-Montecristo-No-2.htm"&gt;good&lt;/a&gt; &lt;a href="http://www.cigars-review.org/Flor-de-Tabacos-de-Partagas-Lusitanias.htm"&gt;cigar&lt;/a&gt; or  perhaps &lt;a href="http://www.single-malt.com/lagavuli.htm"&gt;even&lt;/a&gt; &lt;a href="http://www.scotchwhisky.net/malt/caol_ila.htm"&gt;a&lt;/a&gt; &lt;a href="http://www.single-malt.com/glenport.htm"&gt;good&lt;/a&gt; &lt;a href="http://www.scapamalt.com/shop/products.aspx"&gt;scotch&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;For the most part these days, my development efforts focus on Eclipse or Eclipse-based commercial products produced by IBM. In the open source arena, my most recent contribution is the Common Navigator Framework, but before that I had a hand in many of the visceral frameworks in the Eclipse &lt;a href="http://wiki.eclipse.org/index.php/Web_Tools_Project"&gt;Web&lt;/a&gt; Tools Platform (&lt;a href="http://www.eclipse.org/webtools/"&gt;WTP&lt;/a&gt;) relating to project structuring, EMF model management, and J2EE tooling. Currently, I am one of several IBM committers to the new Eclipse &lt;a href="http://wiki.eclipse.org/index.php/STP"&gt;Services &lt;/a&gt;Oriented Architecture (&lt;a href="http://www.eclipse.org/stp/"&gt;SOA&lt;/a&gt;) Tools Platform.&lt;br /&gt;&lt;br /&gt;I've been a Java developer for about seven years in various domains from assembly line management software, to enterprise Business to Business communcations, to Eclipse-based desktop software. My interests these days are in the design of solid, robust Application Programming Interfaces (API) and encapsulated, evolveable frameworks.&lt;br /&gt;&lt;br /&gt;As an undergrad, I participated in several student research competitions, including taking First Place in the ACM/SIGCSE International Student Research Competition, twice (2001 and 2003); and First (2001) and Third (2003) respectively in the ACM Grand Finals International Student Research competitions. I was fortunate to be able to particpate in these activities as part of the research group run by my undergrad advisor, &lt;a href="http://cs.furman.edu/faculty/porter/"&gt;Hayden S. Porter&lt;/a&gt;, of &lt;a href="http://www.furman.edu/"&gt;Furman University&lt;/a&gt;, where I received a B.S. in Computer Science in 2003. Currently, I am pursuing an M.S. in Computer Science part time from the &lt;a href="http://cs.unc.edu/"&gt;University of North Carolina at Chapel Hill&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;My outside interests (as I &lt;a href="http://www.cigars-review.org/H-Upmann-Gran-Coronas.htm"&gt;alluded&lt;/a&gt; &lt;a href="http://www.whiskymag.com/whisky/brand/wild_turkey/whisky325.html"&gt;to&lt;/a&gt; &lt;a href="http://sports.espn.go.com/sports/boxing/index"&gt;before&lt;/a&gt;) center around watching boxing, fine bourbon or scotch, and cigars. I also like grilling meat over fire and cooking. Of course, these activities are always &lt;a href="http://www.google.com/musica?aid=_lPEsTewd9H&amp;sa=X&amp;amp;oi=music&amp;ct=result"&gt;enhanced&lt;/a&gt; &lt;a href="http://www.google.com/musica?aid=QECj0d8791L&amp;amp;sa=X&amp;oi=music&amp;amp;ct=result"&gt;with&lt;/a&gt; &lt;a href="http://www.google.com/musica?aid=uDJdGNtagQK&amp;sa=X&amp;amp;oi=music&amp;amp;ct=result"&gt;good&lt;/a&gt; &lt;a href="http://www.janemonheitmusic.com/"&gt;music&lt;/a&gt; or if carried out at &lt;a href="http://sanfrancisco.citysearch.com/profile/35670003/"&gt;fine&lt;/a&gt; &lt;a href="http://www.sunsetgrilledurham.com/"&gt;restaurants&lt;/a&gt;, &lt;a href="http://www.amrasraleigh.com/"&gt;jazz&lt;/a&gt; &lt;a href="http://www.sambucajazzcafe.com/"&gt;clubs&lt;/a&gt; or &lt;a href="http://www.mycigars.com/"&gt;cigar cafes&lt;/a&gt;.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28446986-114814824586869518?l=scribbledideas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28446986/posts/default/114814824586869518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28446986/posts/default/114814824586869518'/><link rel='alternate' type='text/html' href='http://scribbledideas.blogspot.com/2006/05/why-would-scribbledideas-be.html' title='Why would scribbledideas be interesting to read?'/><author><name>Michael D. Elder</name><uri>http://www.blogger.com/profile/03856327413506018439</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>
