<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;C0YBR309fyp7ImA9WxBUF08.&quot;"><id>tag:blogger.com,1999:blog-1557780184357927241</id><updated>2010-03-04T22:15:56.367+05:30</updated><title>Eclipse Tips</title><subtitle type="html">Tips and Tricks for Eclipse Plug-in Development</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://blog.eclipse-tips.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://blog.eclipse-tips.com/" /><link rel="hub" href="http://pubsubhubbub.appspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Prakash G.R.</name><uri>http://www.blogger.com/profile/13046268367318873066</uri><email>noreply@blogger.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>102</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/cypal" /><feedburner:info uri="cypal" /><thespringbox:skin xmlns:thespringbox="http://www.thespringbox.com/dtds/thespringbox-1.0.dtd">http://feeds.feedburner.com/cypal?format=skin</thespringbox:skin><feedburner:emailServiceId>cypal</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><entry gd:etag="W/&quot;DUMASXYzcCp7ImA9WxBWFk0.&quot;"><id>tag:blogger.com,1999:blog-1557780184357927241.post-8233163764547897584</id><published>2010-02-08T11:07:00.000+05:30</published><updated>2010-02-08T11:07:28.888+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-08T11:07:28.888+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><title>Eclipse Day in Bangalore - registrations open</title><content type="html">Today the registrations open for Eclipse Day in Bangalore. The entry is *free*, but you have to register to get the ticket. The tickets are limited, &lt;a href="http://eclipsedayindia.eventbrite.com/"&gt;so hurry up&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
The deadline for talk submissions are fast approaching and you have only one week left. Again, &lt;a href="http://bit.ly/EclipseDay2010"&gt;hurry up&lt;/a&gt; :-)&lt;br /&gt;
&lt;br /&gt;
We also have a calendar published in the &lt;a href="http://wiki.eclipse.org/Eclipse_Day_India"&gt;wiki&lt;/a&gt;. You can subscribe to it in your calendar, so you won't miss any dates.&lt;div class="blogger-post-footer"&gt;&lt;br/&gt;&lt;br/&gt;
&lt;p style="border: 1px solid rgb(198, 198, 198); padding: 10px; color: rgb(51, 51, 51); font-family: 'Lucida Grande',sans-serif; font-size: 1.1em; background-color: rgb(255, 255, 198); margin-bottom: 10px;"&gt; 
From &lt;a href="http://blog.eclipse-tips.com"&gt;Eclipse Tips&lt;/a&gt;
&lt;br/&gt;
Like the tip? Subscribe via &lt;a href="http://feeds.feedburner.com/cypal"&gt;RSS&lt;/a&gt; or &lt;a href="http://bit.ly/EclipseTipsViaEmail"&gt;Email&lt;/a&gt; or &lt;a href="https://twitter.com/Eclipse_Tips"&gt;Twitter&lt;/a&gt;
&lt;/p&gt;
&lt;br/&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1557780184357927241-8233163764547897584?l=blog.eclipse-tips.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cypal/~4/k9Ahb-Sojv4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.eclipse-tips.com/feeds/8233163764547897584/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.eclipse-tips.com/2010/02/eclipse-day-in-bangalore-registrations.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/8233163764547897584?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/8233163764547897584?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cypal/~3/k9Ahb-Sojv4/eclipse-day-in-bangalore-registrations.html" title="Eclipse Day in Bangalore - registrations open" /><author><name>Prakash G.R.</name><uri>http://www.blogger.com/profile/13046268367318873066</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="08225524632456251201" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.eclipse-tips.com/2010/02/eclipse-day-in-bangalore-registrations.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUDQHs-eCp7ImA9WxBXEUU.&quot;"><id>tag:blogger.com,1999:blog-1557780184357927241.post-3432042122680872504</id><published>2010-01-23T00:03:00.001+05:30</published><updated>2010-01-23T00:21:11.550+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-23T00:21:11.550+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><title>Launching www.eclipse-tips.com ...</title><content type="html">Its due for a long time :-) Ever since I purchased this domain, I wanted to create a site as a resource for Eclipse Plug-in developers. With little bit of hacking over the two weekends, the website is up and running with bare minimum content. I'll be adding more content from this blog and elsewhere, meanwhile you can check out the layout and other stuff.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_hsp14iFkRLs/S1nvVBqEQRI/AAAAAAAAErM/VR0jJTPTuHI/s1600-h/EclipseTipsSite.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="455" src="http://1.bp.blogspot.com/_hsp14iFkRLs/S1nvVBqEQRI/AAAAAAAAErM/VR0jJTPTuHI/s640/EclipseTipsSite.png" width="640" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Coolest and most useful thing for the visitors would be Eclipse Search. Even though the results portion occupies a significant space in the prime area, I decided to have it because its very handy if you want to search for something. And the whole interface is very nice (courtesy: Google Ajax APIs) Whether you want to search for a particular class in the repository or search for an xml editor plugin or a blog entry about Tray Item, its available in &amp;nbsp;few clicks.&lt;br /&gt;
&lt;br /&gt;
Every article has a pdf &amp;amp; print icon. So if you need an offline copy, its available. This was not possible earlier with this blog.&lt;br /&gt;
&lt;br /&gt;
And last, but not the least, for international visitors, the translate option is available in the bottom bar. With just two clicks you can translate to a language of your choice - without reloading the page. Again, done thru Google Ajax APIs. (you got to love this web stuff - esp when you can implement a feature without writing a single line of code :-) )&lt;br /&gt;
&lt;br /&gt;
Mail me/leave a comment if you have any comments/suggestions&lt;div class="blogger-post-footer"&gt;&lt;br/&gt;&lt;br/&gt;
&lt;p style="border: 1px solid rgb(198, 198, 198); padding: 10px; color: rgb(51, 51, 51); font-family: 'Lucida Grande',sans-serif; font-size: 1.1em; background-color: rgb(255, 255, 198); margin-bottom: 10px;"&gt; 
From &lt;a href="http://blog.eclipse-tips.com"&gt;Eclipse Tips&lt;/a&gt;
&lt;br/&gt;
Like the tip? Subscribe via &lt;a href="http://feeds.feedburner.com/cypal"&gt;RSS&lt;/a&gt; or &lt;a href="http://bit.ly/EclipseTipsViaEmail"&gt;Email&lt;/a&gt; or &lt;a href="https://twitter.com/Eclipse_Tips"&gt;Twitter&lt;/a&gt;
&lt;/p&gt;
&lt;br/&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1557780184357927241-3432042122680872504?l=blog.eclipse-tips.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cypal/~4/TCso3CqQKcA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.eclipse-tips.com/feeds/3432042122680872504/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.eclipse-tips.com/2010/01/launching-wwweclipse-tipscom.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/3432042122680872504?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/3432042122680872504?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cypal/~3/TCso3CqQKcA/launching-wwweclipse-tipscom.html" title="Launching www.eclipse-tips.com ..." /><author><name>Prakash G.R.</name><uri>http://www.blogger.com/profile/13046268367318873066</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="08225524632456251201" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_hsp14iFkRLs/S1nvVBqEQRI/AAAAAAAAErM/VR0jJTPTuHI/s72-c/EclipseTipsSite.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total><feedburner:origLink>http://blog.eclipse-tips.com/2010/01/launching-wwweclipse-tipscom.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE4FRns5eip7ImA9WxBQGEU.&quot;"><id>tag:blogger.com,1999:blog-1557780184357927241.post-6491796656854801214</id><published>2010-01-19T10:58:00.001+05:30</published><updated>2010-01-19T12:05:17.522+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-19T12:05:17.522+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><title>Eclipse Day in Bangalore</title><content type="html">&lt;i&gt;&lt;b&gt;About&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Last year we had a successful &lt;a href="http://wiki.eclipse.org/Eclipse_DemoCamps_November_2009/Bangalore"&gt;Eclipse Demo Camp in Bangalore&lt;/a&gt;. In a post-event survey, many people said that they are willing to attend a full day event, and here we are.&lt;br /&gt;
&lt;br /&gt;
Me and Ankur are planning for &lt;a href="http://wiki.eclipse.org/Eclipse_Day"&gt;an Eclipse Day&lt;/a&gt; in Bangalore on April 9th. This year's theme would be "Eclipse Plug-in Development". It will be a full day event. Unlike the Demo Camp, there will be three types of talks (Long talk, Short talk and Lightning talk) and we have a committee (&lt;a href="http://ketan.padegaonkar.name/"&gt;Ketan&lt;/a&gt; from ThoughtWorks, &lt;a href="http://www.devmarch.com/eclipsesummit/2009/speakers.html#Jain"&gt;Anshu Jain&lt;/a&gt; from IBM &amp;amp; &lt;a href="http://eclipse-info.blogspot.com/"&gt;Madhu&lt;/a&gt;, an Independent Eclipse Consultant) to review the proposals. So you will get to attend only the best out of the proposals. &lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Want to attend?&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Just like the Demo Camp, the entry is free. However you have to pre-register and the registrations open on Feb 1st. There are only 100 seats available, so you want to register as soon as its opens. Registrations can be done from &lt;a href="http://eclipsedayindia.eventbrite.com/"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Interested in presenting?&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Fill in &lt;a href="http://bit.ly/EclipseDay2010"&gt;this form&lt;/a&gt; and submit your proposals. The review team will get back to you.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Sponsoring:&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Last but not least, sponsors. We are reaching out various companies for sponsorship. Your company can support the event by sponsoring it. It also had added advantage of:&lt;br /&gt;
&lt;br /&gt;
* 5 reserved attendee seats&lt;br /&gt;
* One lightning talk&lt;br /&gt;
* Ads &amp;amp; stall space in the venue (banners and contact booth at sponsor's cost. We will help provide as much space possible.)&lt;br /&gt;
* Mention in various promotions on Eclipse websites as mentioned &lt;a href="http://wiki.eclipse.org/Eclipse_Day#Promotional_Opportunities_Checklist"&gt;here&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
Do contact &lt;a href="mailto:grprakash+EclipseDay@gmail.com"&gt;me&lt;/a&gt; or &lt;a href="mailto:ankur_sharma@in.ibm.com"&gt;Ankur&lt;/a&gt; if you have any questions.&lt;div class="blogger-post-footer"&gt;&lt;br/&gt;&lt;br/&gt;
&lt;p style="border: 1px solid rgb(198, 198, 198); padding: 10px; color: rgb(51, 51, 51); font-family: 'Lucida Grande',sans-serif; font-size: 1.1em; background-color: rgb(255, 255, 198); margin-bottom: 10px;"&gt; 
From &lt;a href="http://blog.eclipse-tips.com"&gt;Eclipse Tips&lt;/a&gt;
&lt;br/&gt;
Like the tip? Subscribe via &lt;a href="http://feeds.feedburner.com/cypal"&gt;RSS&lt;/a&gt; or &lt;a href="http://bit.ly/EclipseTipsViaEmail"&gt;Email&lt;/a&gt; or &lt;a href="https://twitter.com/Eclipse_Tips"&gt;Twitter&lt;/a&gt;
&lt;/p&gt;
&lt;br/&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1557780184357927241-6491796656854801214?l=blog.eclipse-tips.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cypal/~4/7m_IweGXsmc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.eclipse-tips.com/feeds/6491796656854801214/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.eclipse-tips.com/2010/01/eclipse-day-in-bangalore.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/6491796656854801214?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/6491796656854801214?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cypal/~3/7m_IweGXsmc/eclipse-day-in-bangalore.html" title="Eclipse Day in Bangalore" /><author><name>Prakash G.R.</name><uri>http://www.blogger.com/profile/13046268367318873066</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="08225524632456251201" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><georss:point>12.971606 77.594376</georss:point><feedburner:origLink>http://blog.eclipse-tips.com/2010/01/eclipse-day-in-bangalore.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE4AQXg5eyp7ImA9WxBSFEw.&quot;"><id>tag:blogger.com,1999:blog-1557780184357927241.post-8284535337713690849</id><published>2009-12-21T22:36:00.002+05:30</published><updated>2009-12-21T23:05:40.623+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-21T23:05:40.623+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="Commands" /><category scheme="http://www.blogger.com/atom/ns#" term="workbench" /><title>Toggle Commands the toggle other contributions</title><content type="html">Found &lt;a href="http://philondev.blogspot.com/2009/12/toggle-commands-toggle-other.html"&gt;this one&lt;/a&gt; on &lt;a href="http://philondev.blogspot.com"&gt;Phil's blog&lt;/a&gt;. Republishing it with his permission. Thanks Phil!&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Introduction&lt;/h2&gt;This is a follow up to &lt;a href="http://blog.eclipse-tips.com/2009/03/commands-part-6-toggle-radio-menu.html"&gt;Commands Part 6: Toggle &amp;amp; Radio menu contributions&lt;/a&gt; of fellow blogger &lt;a href="http://blog.eclipse-tips.com/"&gt;Prakash G.R.&lt;/a&gt;. He described how to use command toggle and radio states. Here I will show you how to drive other contributions in the Eclipse Workbench using a toggle command.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;What we want to achieve&lt;/h2&gt;I needed to show another toolbar button when a certain toggle command was executed. Imagine something like "Show clock" that will show or hide a little clock in the worbench window status bar.&lt;br /&gt;
Such contribution can be easily added using a &lt;span style="font-family: courier new;"&gt;menuContribution&lt;/span&gt; for the trim area. First create a toolbar in the trim area and then contribute controls/commands to this toolbar also using the &lt;span style="font-family: courier new;"&gt;menuContribution&lt;/span&gt; extension point.&lt;br /&gt;
Since we want the clock contribution&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: xml;"&gt;&amp;lt;menucontribution locationuri="toolbar:mytoolbar"&amp;gt;
&amp;lt;control class="test.ui.clocl.internal.ClockControlContribution" id="test.ui.clock"&amp;gt;
&amp;lt;visiblewhen checkenabled="false"&amp;gt;
  &amp;lt;with variable="activeWorkbenchWindow"&amp;gt;
    &amp;lt;test args="test.ui.clock.ToggleCommand"
      forcepluginactivation="true"
      property="org.eclipse.core.commands.toggle"
      value="true"/&amp;gt;
  &amp;lt;/with&amp;gt;
&amp;lt;/visiblewhen&amp;gt;

&amp;lt;/control&amp;gt;
&amp;lt;/menucontribution&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
That will create a toolbar contribution that is only visible when the &lt;span style="font-family: courier new;"&gt;test.ui.clock.ToggleCommand&lt;/span&gt; is in the "&lt;span style="font-family: courier new;"&gt;true&lt;/span&gt;" state, when its checked.&lt;br /&gt;
&lt;br /&gt;
Lets define the command:&lt;br /&gt;
&lt;pre class="brush: xml;"&gt;&amp;lt;command defaulthandler="org.eclipse.core.commands.extender.ToggleCommandHandler" id="test.ui.clock.ToggleCommand" name="Show clock"&amp;gt;
&amp;lt;state
  class="org.eclipse.ui.handlers.RegistryToggleState:true"
  id="org.eclipse.ui.commands.toggleState"&amp;gt;
&amp;lt;/state&amp;gt;

&amp;lt;/command&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
How this command works and what the state is you have already read in Prakash's blog entry. The default handler for this command does a little more than the one in the latter mentioned blog entry. It is defined like this:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java;"&gt;/**
* Generic command that toggles the executed command and re-evaluates property testers for the
* &lt;code&gt;org.eclipse.core.commands.toggle&lt;/code&gt; property.
*
*/
public class ToggleCommandHandler extends AbstractHandler {

public Object execute(final ExecutionEvent event) throws ExecutionException {
  HandlerUtil.toggleCommandState(event.getCommand());
  final IWorkbenchWindow ww = HandlerUtil.getActiveWorkbenchWindowChecked(event);
  final IEvaluationService service = (IEvaluationService) ww.getService(IEvaluationService.class);
  if (service != null) {
    service.requestEvaluation("org.eclipse.core.commands.toggle");
  }
  return null;
}
}
&lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;How do toggle the visibility of the clock contribution&lt;/h2&gt;&lt;br /&gt;
The connection between toggling the command and making the clock contribution visible is hidden in a property tester, that the clock contribution uses:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java;"&gt;public class CommandsPropertyTester extends PropertyTester {
public static final String NAMESPACE = "org.eclipse.core.commands"; //$NON-NLS-1$
public static final String PROPERTY_BASE = NAMESPACE + '.';
public static final String TOGGLE_PROPERTY_NAME = "toggle"; //$NON-NLS-1$
public static final String TOGGLE_PROPERTY = PROPERTY_BASE + TOGGLE_PROPERTY_NAME;

public boolean test(final Object receiver, final String property, final Object[] args, final Object expectedValue) {
  if (receiver instanceof IServiceLocator &amp;amp;&amp;amp; args.length == 1 &amp;amp;&amp;amp; args[0] instanceof String) {
    final IServiceLocator locator = (IServiceLocator) receiver;
    if (TOGGLE_PROPERTY_NAME.equals(property)) {
      final String commandId = args[0].toString();
      final ICommandService commandService = (ICommandService)locator.getService(ICommandService.class);
      final Command command = commandService.getCommand(commandId);
      final State state = command.getState(RegistryToggleState.STATE_ID);
      if (state != null) {
        return state.getValue().equals(expectedValue);
      }
    }
  }
  return false;
}
}

&lt;/pre&gt;&lt;br /&gt;
It is defined in plugin.xml like this:&lt;br /&gt;
&lt;pre class="brush: xml;"&gt;&amp;lt;propertytester
class="org.eclipse.core.commands.extender.internal.CommandsPropertyTester"
id="org.eclipse.core.expressions.testers.CommandsPropertyTester"
namespace="org.eclipse.core.commands"
properties="toggle"
type="org.eclipse.ui.services.IServiceLocator"/&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
That means we define a new property for the namespace "&lt;span style="font-family: courier new;"&gt;org.eclipse.core.command&lt;/span&gt;" and the property is named "toggle". It will operate on&lt;span style="font-family: courier new;"&gt; IServiceLocator&lt;/span&gt; variables. Such variable that is an &lt;span style="font-family: courier new;"&gt;IServiceLocator&lt;/span&gt; is the "&lt;span style="font-family: courier new;"&gt;activeWorkbenchWindow&lt;/span&gt;" variable. Now you should understand the &lt;span style="font-family: courier new;"&gt;visibleWhen&lt;/span&gt; expression of the clock contribution. It should be only visible when the toggle for the clock toggle command is "true". The re-evaluation of the property testers is triggered by the generic &lt;span style="font-family: courier new;"&gt;ToggleCommand&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;A little tip at the end&lt;/h2&gt;If you put the &lt;span style="font-family: courier new;"&gt;ToggleCommand&lt;/span&gt; and property tester in a seperate bundle for easier re-use in all your projects and other bundles make sure you either start the bundle at the beginning or set the "test" expressions "&lt;span style="font-family: courier new;"&gt;forcePluginActivation&lt;/span&gt;" to true to let the Eclipse expression framework activate the bundle for you. Otherwise the property tester is completly ignored and the clock would be always visible.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Bonus&lt;/h2&gt;Since the state of the toggle is preserved in an instance preference value the visibility of all associated contributions that use the property tester to check for the toggle state of the command.&lt;br /&gt;
&lt;br /&gt;
Of course you can also reverse the test expression for your contributions if you have a toggle command that says something like "Hide clock".&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://philondev.blogspot.com/2009/12/toggle-commands-toggle-other.html"&gt;Click here for the original entry.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;br/&gt;&lt;br/&gt;
&lt;p style="border: 1px solid rgb(198, 198, 198); padding: 10px; color: rgb(51, 51, 51); font-family: 'Lucida Grande',sans-serif; font-size: 1.1em; background-color: rgb(255, 255, 198); margin-bottom: 10px;"&gt; 
From &lt;a href="http://blog.eclipse-tips.com"&gt;Eclipse Tips&lt;/a&gt;
&lt;br/&gt;
Like the tip? Subscribe via &lt;a href="http://feeds.feedburner.com/cypal"&gt;RSS&lt;/a&gt; or &lt;a href="http://bit.ly/EclipseTipsViaEmail"&gt;Email&lt;/a&gt; or &lt;a href="https://twitter.com/Eclipse_Tips"&gt;Twitter&lt;/a&gt;
&lt;/p&gt;
&lt;br/&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1557780184357927241-8284535337713690849?l=blog.eclipse-tips.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cypal/~4/X9W90GlQRbQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.eclipse-tips.com/feeds/8284535337713690849/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.eclipse-tips.com/2009/12/toggle-commands-toggle-other.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/8284535337713690849?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/8284535337713690849?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cypal/~3/X9W90GlQRbQ/toggle-commands-toggle-other.html" title="Toggle Commands the toggle other contributions" /><author><name>Prakash G.R.</name><uri>http://www.blogger.com/profile/13046268367318873066</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="08225524632456251201" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.eclipse-tips.com/2009/12/toggle-commands-toggle-other.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkUBRXs_cSp7ImA9WxNaFkQ.&quot;"><id>tag:blogger.com,1999:blog-1557780184357927241.post-502073317694799479</id><published>2009-12-02T00:30:00.001+05:30</published><updated>2009-12-02T00:34:14.549+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-02T00:34:14.549+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Target" /><category scheme="http://www.blogger.com/atom/ns#" term="plugins" /><category scheme="http://www.blogger.com/atom/ns#" term="PDE" /><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="workbench" /><title>Reload your plugins without restarting Eclipse</title><content type="html">When you are developing Eclipse plugins, sometimes its annoying that the changes in the plugin.xml won't reflect immediately. You need to restart the target Eclipse to see the changes. This will be painful if you are playing with trial-n-error stuff like the menu urls. In this tip, I'll explain how to make Eclipse reread your plugin.xml without restarting the target.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Create a plugin, launch as an Eclipse Application (you don't even need to Debug, just Run would do) &lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Check the UI contributions of your plugin.&lt;/li&gt;
&lt;li&gt;Make the desired change in your plugin.xml. Right now, I've changed a Command's name; added a Command contribution to an existing menu; added a new view and made changes to an existing perspective&lt;/li&gt;

&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_hsp14iFkRLs/SxVmZ-dtgAI/AAAAAAAAEbY/2O7DiMTt4oM/s1600/Changes.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_hsp14iFkRLs/SxVmZ-dtgAI/AAAAAAAAEbY/2O7DiMTt4oM/s400/Changes.png" /&gt;&lt;/a&gt;   
&lt;/div&gt;
&lt;li&gt;In your target, open the Plug-ins Registry view and in the pull down menu, check the 'Show Advanced Operations'&lt;/li&gt;

&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_hsp14iFkRLs/SxVmnMEZyVI/AAAAAAAAEbc/o9LfDlJx9RI/s1600/Enable%20Advance%20Operations.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_hsp14iFkRLs/SxVmnMEZyVI/AAAAAAAAEbc/o9LfDlJx9RI/s1600/Enable%20Advance%20Operations.png" /&gt;&lt;/a&gt;   
&lt;/div&gt;
&lt;li&gt;Right click your plugin and select Disable. &lt;/li&gt;

&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_hsp14iFkRLs/SxVmsYQlD8I/AAAAAAAAEbg/AvZjG_grMk0/s1600/Disable.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_hsp14iFkRLs/SxVmsYQlD8I/AAAAAAAAEbg/AvZjG_grMk0/s640/Disable.png" /&gt;&lt;/a&gt;   
&lt;/div&gt;
&lt;li&gt;Then right click again and select Enable.&lt;/li&gt;

&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_hsp14iFkRLs/SxVmxHdHgWI/AAAAAAAAEbk/pMb9p1llt64/s1600/Enable.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_hsp14iFkRLs/SxVmxHdHgWI/AAAAAAAAEbk/pMb9p1llt64/s640/Enable.png" /&gt;&lt;/a&gt;   
&lt;/div&gt;
&lt;li&gt;Since you have made changes to the current perspective by adding a view, you would be greeted with this Dialog.&lt;/li&gt;

&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_hsp14iFkRLs/SxVm56TKJeI/AAAAAAAAEbo/vCXRM8QewrI/s1600/PerspectiveChanges.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_hsp14iFkRLs/SxVm56TKJeI/AAAAAAAAEbo/vCXRM8QewrI/s640/PerspectiveChanges.png" /&gt;&lt;/a&gt;   
&lt;/div&gt;
&lt;li&gt;Say Yes. There you go. Now all the changes in the plugin.xml would reflect in the UI&lt;/li&gt;

&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_hsp14iFkRLs/SxVocRrc3eI/AAAAAAAAEbw/QcUyAP9jlJE/s1600/UI_Changes.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_hsp14iFkRLs/SxVocRrc3eI/AAAAAAAAEbw/QcUyAP9jlJE/s640/UI_Changes.png" /&gt;&lt;/a&gt; 
&lt;/div&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
While this may not be applicable for all the changes you make in plugin.xml, this should cover up for most the changes.&lt;div class="blogger-post-footer"&gt;&lt;br/&gt;&lt;br/&gt;
&lt;p style="border: 1px solid rgb(198, 198, 198); padding: 10px; color: rgb(51, 51, 51); font-family: 'Lucida Grande',sans-serif; font-size: 1.1em; background-color: rgb(255, 255, 198); margin-bottom: 10px;"&gt; 
From &lt;a href="http://blog.eclipse-tips.com"&gt;Eclipse Tips&lt;/a&gt;
&lt;br/&gt;
Like the tip? Subscribe via &lt;a href="http://feeds.feedburner.com/cypal"&gt;RSS&lt;/a&gt; or &lt;a href="http://bit.ly/EclipseTipsViaEmail"&gt;Email&lt;/a&gt; or &lt;a href="https://twitter.com/Eclipse_Tips"&gt;Twitter&lt;/a&gt;
&lt;/p&gt;
&lt;br/&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1557780184357927241-502073317694799479?l=blog.eclipse-tips.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cypal/~4/zjwYusfCdBQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.eclipse-tips.com/feeds/502073317694799479/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.eclipse-tips.com/2009/12/reload-your-plugins-without-restarting.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/502073317694799479?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/502073317694799479?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cypal/~3/zjwYusfCdBQ/reload-your-plugins-without-restarting.html" title="Reload your plugins without restarting Eclipse" /><author><name>Prakash G.R.</name><uri>http://www.blogger.com/profile/13046268367318873066</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="08225524632456251201" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_hsp14iFkRLs/SxVmZ-dtgAI/AAAAAAAAEbY/2O7DiMTt4oM/s72-c/Changes.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total><feedburner:origLink>http://blog.eclipse-tips.com/2009/12/reload-your-plugins-without-restarting.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QNQXo6eCp7ImA9WxBREUU.&quot;"><id>tag:blogger.com,1999:blog-1557780184357927241.post-6126910074710628378</id><published>2009-11-10T00:31:00.007+05:30</published><updated>2009-12-30T19:26:30.410+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-30T19:26:30.410+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="e4" /><category scheme="http://www.blogger.com/atom/ns#" term="RCP" /><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="workbench" /><title>e4: First e4 RCP Application</title><content type="html">The next big thing in Eclipse is Eclipse 4.0 dubbed as e4. It will be released in 2010. That doesn't mean that the 3.x stream will be deprecated or discontinued. The 3.x releases will go on for "few" years till everyone boards the 4.0. But clearly the future of Eclipse is e4 and its already &lt;a href="http://download.eclipse.org/e4/downloads/"&gt;here&lt;/a&gt;. I'll be writing a series of blog posts on e4 and this will be the first. You can follow this blog in &lt;a href="http://feeds.feedburner.com/cypal"&gt;RSS&lt;/a&gt;, or &lt;a href="http://bit.ly/2mfGXa"&gt;email&lt;/a&gt; or even in &lt;a href="http://twitter.com/Eclipse_Tips"&gt;twitter&lt;/a&gt;. I'm still learning about e4, so feel free to correct me if you find any mistakes :-)&lt;br /&gt;
&lt;br /&gt;
First set up your e4 Environment:&lt;br /&gt;
&lt;br /&gt;
1) Download &lt;a href="http://download.eclipse.org/e4/downloads/drops/S-1.0M1-200910131430/index.html"&gt;e4 1.0 M1&lt;/a&gt;&lt;br /&gt;
2) Click e4-&amp;gt;Generate e4 Example Project&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_hsp14iFkRLs/SvhkPZg_B9I/AAAAAAAAEZ0/RklJURoMvx4/s1600-h/e4_generate_samples.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_hsp14iFkRLs/SvhkPZg_B9I/AAAAAAAAEZ0/RklJURoMvx4/s400/e4_generate_samples.png" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
3) Right click e4-examples.psf and click 'Import Project Set'. This should import the contacts and the photo projects from the CVS to your workspace&lt;br /&gt;
4) Open the contacts.product file and click the "Launch an Eclipse Application" link in the Overview page&lt;br /&gt;
5) Thats it. You should be running the Contacts demo.&lt;br /&gt;
&lt;br /&gt;
You can play around with the css theme or code and check out the effects. When you are done, lets start an app from the scratch. The first app will have nothing more than a view (something like the 'RCP Application with a View', created by PDE Wizard). Note: If you find it hard to work with e4, you can grab &lt;a href="http://download.eclipse.org/eclipse/downloads/"&gt;a latest 3.6 build&lt;/a&gt; and set the e4 as the target platform and proceed with the following steps)&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Step 1:&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
Use the New Plug-in wizard and create a new plugin. (No RCP - just plain old plugin)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Step 2:&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
You don't need an Activator. In the Overview tab, remove the Activator class and also delete the Activator.java file from the sources.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Step 3:&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
The default dependencies of this would have o.e.core.runtime and o.e.ui. In e4, we still need the core.runtime in e4, but not the o.e.ui. Remove it. Now add the following dependencies:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;org.eclipse.swt,&lt;/li&gt;
&lt;li&gt;org.eclipse.jface,&lt;/li&gt;
&lt;li&gt;org.eclipse.e4.ui.workbench&lt;/li&gt;
&lt;li&gt;org.eclipse.e4.ui.workbench.swt&lt;/li&gt;
&lt;/ul&gt;&lt;b&gt;&lt;i&gt;Step 4:&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
Lets create a view. Instead of o.e.ui.views, now we have to use org.eclipse.e4.workbench.parts extension (which should now serve both the editors and views). The extension point would look like&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: xml;"&gt;&amp;lt;extension point="org.eclipse.e4.workbench.parts"&amp;gt;
      &amp;lt;part class="com.eclipse_tips.e4.firstapp.MyFirstView" /&amp;gt;
&amp;lt;/extension&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
The implementation class would be:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java; collapse: true"&gt;public class MyFirstView {

 public MyFirstView(Composite parent){
    
  // this shouldn't be there ideally, investigating
  if(parent.getLayout() == null)
    parent.setLayout(new FillLayout());

  Composite composite = new Composite(parent, SWT.NONE);
  composite.setLayout(new FillLayout());
  
  Button button = new Button(composite, SWT.PUSH);
  button.setText("Hello World");
  button.addSelectionListener(new SelectionAdapter() {
   @Override
   public void widgetSelected(SelectionEvent e) {
    MessageDialog.openInformation(new Shell(), "e4", "Hello e4 World!");
   }
  });
 }

}&lt;/pre&gt;&lt;br /&gt;
Yes, what you are seeing it correct. It doesn't implement the IWorkbenchView or extend ViewPart. Further more, it appears that I've done &lt;a href="http://blog.eclipse-tips.com/2009/01/top-10-mistakes-in-eclipse-plug-in.html"&gt;one of the top 10 mistakes&lt;/a&gt; by not having a default constructor. Don't worry, e4 is smart. When it instantiates an object like this thru reflection, it identifies the parameters for the constructor and will pass them from the context. If more than one constructor is present, it can even identify the right one to use (more on this later)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Step 5:&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
Now, we have the view, lets create an RCP product that will use this view. Fire up the New Wizard and create a Product Configuration file with the basic settings. In the Product Configuration editor, give it some name and click the New for the Product. Specify some id and select 'org.eclipse.e4.ui.workbench.swt.application' for Application.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_hsp14iFkRLs/SvhjsyLPe7I/AAAAAAAAEZc/k63jl73oolo/s1600-h/e4_rcp_product_configuration.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_hsp14iFkRLs/SvhjsyLPe7I/AAAAAAAAEZc/k63jl73oolo/s640/e4_rcp_product_configuration.png" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Step 6:&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
Go back to your plugin.xml. You should see the newly created application there. Now lets create the missing link between the product and the view - the UI model. In a typical 3.x RCP, you would have specified an application that has a run method, an initial perspective id, the layout for that perspective, the views, menus, actions thru the ActionFactory constants etc. This whole setup would require a little bit of both java coding and plugin.xml configuration. In e4, you can specify the entire UI in a model. Thats the applicationXMI. It can get as complex as your UI can be, but the simplest one looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: xml;"&gt;&amp;lt;?xml version="1.0" encoding="ASCII"?&amp;gt;
&amp;lt;application:MApplication xmi:version="2.0" 
 xmlns:xmi="http://www.omg.org/XMI" 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xmlns:application="http://www.eclipse.org/ui/2008/Application"&amp;gt;

  &amp;lt;windows name="Main Window" width="200" height="100"&amp;gt;
 &amp;lt;children xsi:type="application:MContributedPart" 
  id="MyView" 
  iconURI="platform:/plugin/com.eclipse-tips.e4.firstApp/icons/sample.gif" 
  URI="platform:/plugin/com.eclipse-tips.e4.firstApp/com.eclipse_tips.e4.firstapp.MyFirstView"/&amp;gt;
  &amp;lt;/windows&amp;gt;
&amp;lt;/application:MApplication&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
There is nothing much to explain. It has got nothing more than a window and a view in it. (no menus,no tool bars, no status lines and even no stacks to hold the view) Specify this file in the parameter of the product extension:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: xml;"&gt;&amp;lt;extension
       id="rcpProduct"
       point="org.eclipse.core.runtime.products"&amp;gt;
    &amp;lt;product
          application="org.eclipse.e4.ui.workbench.swt.application"
          name="My First e4 RCP"&amp;gt;
       &amp;lt;property
             name="applicationXMI"
             value="com.eclipse-tips.e4.firstApp/App.xmi"&amp;gt;
       &amp;lt;/property&amp;gt;
    &amp;lt;/product&amp;gt;
 &amp;lt;/extension&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Step 7:&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
You are all set to go. Switch to the Dependencies tab of the Product Editor and add your plugin. Click 'Add Required plugins' and launch. The launch will fail, because we have not included few more plugins that are required, but not specified in the dependencies (from databinding beans to renderers will be missing) The simplest way to get thru the error, is to edit the launch configuration and launch with 'all workspace and enabled target plugins'.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_hsp14iFkRLs/SvhkEvyGgiI/AAAAAAAAEZs/KJM9zmU9i4A/s1600-h/E4_RCP_launch_config.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_hsp14iFkRLs/SvhkEvyGgiI/AAAAAAAAEZs/KJM9zmU9i4A/s640/E4_RCP_launch_config.png" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Now launch again, voila - there comes your first e4 RCP!&lt;br /&gt;
&lt;br /&gt;
So what has happened till now? With the product &amp;amp; launch configuration, we are basically running the org.eclipse.e4.ui.workbench.swt.application. The application looks for the model of the UI in the applicationXMI parameter. It creates the Workbench, and asks it to render the UI from that model. Recursively, an appropriate renderer for every element in the XMI file is found, and its asked to create the UI. Finally you get the app:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_hsp14iFkRLs/Svhj5iO9deI/AAAAAAAAEZk/jCCNyIXu6do/s320/e4_first_rcp.png" /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;br/&gt;&lt;br/&gt;
&lt;p style="border: 1px solid rgb(198, 198, 198); padding: 10px; color: rgb(51, 51, 51); font-family: 'Lucida Grande',sans-serif; font-size: 1.1em; background-color: rgb(255, 255, 198); margin-bottom: 10px;"&gt; 
From &lt;a href="http://blog.eclipse-tips.com"&gt;Eclipse Tips&lt;/a&gt;
&lt;br/&gt;
Like the tip? Subscribe via &lt;a href="http://feeds.feedburner.com/cypal"&gt;RSS&lt;/a&gt; or &lt;a href="http://bit.ly/EclipseTipsViaEmail"&gt;Email&lt;/a&gt; or &lt;a href="https://twitter.com/Eclipse_Tips"&gt;Twitter&lt;/a&gt;
&lt;/p&gt;
&lt;br/&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1557780184357927241-6126910074710628378?l=blog.eclipse-tips.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cypal/~4/ygb5cpVoPXg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.eclipse-tips.com/feeds/6126910074710628378/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.eclipse-tips.com/2009/11/first-e4-rcp-application.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/6126910074710628378?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/6126910074710628378?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cypal/~3/ygb5cpVoPXg/first-e4-rcp-application.html" title="e4: First e4 RCP Application" /><author><name>Prakash G.R.</name><uri>http://www.blogger.com/profile/13046268367318873066</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="08225524632456251201" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_hsp14iFkRLs/SvhkPZg_B9I/AAAAAAAAEZ0/RklJURoMvx4/s72-c/e4_generate_samples.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://blog.eclipse-tips.com/2009/11/first-e4-rcp-application.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C08FR3Y4eip7ImA9WxNUEkk.&quot;"><id>tag:blogger.com,1999:blog-1557780184357927241.post-1723605305934596489</id><published>2009-11-03T15:20:00.000+05:30</published><updated>2009-11-03T15:20:16.832+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-03T15:20:16.832+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><title>Eclipse Tips on Twitter !</title><content type="html">Get (a different set of) Eclipse&amp;nbsp; Tips in twitter: &lt;a href="http://twitter.com/Eclipse_Tips"&gt;@Eclipse_Tips&lt;/a&gt;. If you are still in the RSS reader era, get the feed &lt;a href="http://twitter.com/statuses/user_timeline/85313393.rss"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;br/&gt;&lt;br/&gt;
&lt;p style="border: 1px solid rgb(198, 198, 198); padding: 10px; color: rgb(51, 51, 51); font-family: 'Lucida Grande',sans-serif; font-size: 1.1em; background-color: rgb(255, 255, 198); margin-bottom: 10px;"&gt; 
From &lt;a href="http://blog.eclipse-tips.com"&gt;Eclipse Tips&lt;/a&gt;
&lt;br/&gt;
Like the tip? Subscribe via &lt;a href="http://feeds.feedburner.com/cypal"&gt;RSS&lt;/a&gt; or &lt;a href="http://bit.ly/EclipseTipsViaEmail"&gt;Email&lt;/a&gt; or &lt;a href="https://twitter.com/Eclipse_Tips"&gt;Twitter&lt;/a&gt;
&lt;/p&gt;
&lt;br/&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1557780184357927241-1723605305934596489?l=blog.eclipse-tips.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cypal/~4/Vtv-UixxecY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.eclipse-tips.com/feeds/1723605305934596489/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.eclipse-tips.com/2009/11/eclipse-tips-on-twitter.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/1723605305934596489?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/1723605305934596489?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cypal/~3/Vtv-UixxecY/eclipse-tips-on-twitter.html" title="Eclipse Tips on Twitter !" /><author><name>Prakash G.R.</name><uri>http://www.blogger.com/profile/13046268367318873066</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="08225524632456251201" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.eclipse-tips.com/2009/11/eclipse-tips-on-twitter.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkENQHY5fyp7ImA9WxNVFko.&quot;"><id>tag:blogger.com,1999:blog-1557780184357927241.post-6315123858544739069</id><published>2009-10-28T00:29:00.001+05:30</published><updated>2009-10-28T00:41:31.827+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-28T00:41:31.827+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Progress" /><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="guidelines" /><category scheme="http://www.blogger.com/atom/ns#" term="3.6" /><category scheme="http://www.blogger.com/atom/ns#" term="Commands" /><category scheme="http://www.blogger.com/atom/ns#" term="workbench" /><title>Associating a Command with a Job</title><content type="html">Earlier we saw how to &lt;a href="http://blog.eclipse-tips.com/2008/08/adding-iaction-to-job.html"&gt;associate an Action with a Job&lt;/a&gt;. Now you can associate a Command. Its very similar - use the constant to set a property on the job:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java;"&gt;ICommandService service = (ICommandService) serviceLocator.getService(ICommandService.class);
Command command = service.getCommand(commandId);
ParameterizedCommand parameterizedCommand = new ParameterizedCommand(command, null);
job.setProperty(IProgressConstants.COMMAND_PROPERTY, parameterizedCommand);
&lt;/pre&gt;&lt;br /&gt;
You have to specify either the ACTION_PROPERTY or COMMAND_PROPERTY, but not both. If you specify both, neither of them will get executed.&lt;br /&gt;
&lt;br /&gt;
Note: You need a 3.6 M3 or a latest I-Build for this to work.&lt;div class="blogger-post-footer"&gt;&lt;br/&gt;&lt;br/&gt;
&lt;p style="border: 1px solid rgb(198, 198, 198); padding: 10px; color: rgb(51, 51, 51); font-family: 'Lucida Grande',sans-serif; font-size: 1.1em; background-color: rgb(255, 255, 198); margin-bottom: 10px;"&gt; 
From &lt;a href="http://blog.eclipse-tips.com"&gt;Eclipse Tips&lt;/a&gt;
&lt;br/&gt;
Like the tip? Subscribe via &lt;a href="http://feeds.feedburner.com/cypal"&gt;RSS&lt;/a&gt; or &lt;a href="http://bit.ly/EclipseTipsViaEmail"&gt;Email&lt;/a&gt; or &lt;a href="https://twitter.com/Eclipse_Tips"&gt;Twitter&lt;/a&gt;
&lt;/p&gt;
&lt;br/&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1557780184357927241-6315123858544739069?l=blog.eclipse-tips.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cypal/~4/jCdM0AuIGdk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.eclipse-tips.com/feeds/6315123858544739069/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.eclipse-tips.com/2009/10/associating-command-with-job.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/6315123858544739069?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/6315123858544739069?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cypal/~3/jCdM0AuIGdk/associating-command-with-job.html" title="Associating a Command with a Job" /><author><name>Prakash G.R.</name><uri>http://www.blogger.com/profile/13046268367318873066</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="08225524632456251201" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://blog.eclipse-tips.com/2009/10/associating-command-with-job.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0UMQH4-fyp7ImA9WxNQFkU.&quot;"><id>tag:blogger.com,1999:blog-1557780184357927241.post-4184994961603957565</id><published>2009-09-23T11:24:00.000+05:30</published><updated>2009-09-23T11:24:41.057+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-23T11:24:41.057+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><title>Eclipse Demo Camp, Bangalore</title><content type="html">Its back :-)&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_hsp14iFkRLs/SrkAJp9i2wI/AAAAAAAAERo/9b-r6XppV5g/s1600-h/Eclipse-camp.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_hsp14iFkRLs/SrkAJp9i2wI/AAAAAAAAERo/9b-r6XppV5g/s320/Eclipse-camp.gif" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;We are planning to organize a Demo Camp sometime in November. Date, time and venue to be decided. Since IBM's Eclipse team has grown since last Demo Camp, this time, you get a very good opportunity to learn right from the source, on whats coming up. From &lt;a href="http://wiki.eclipse.org/Equinox/p2"&gt;p2&lt;/a&gt; to &lt;a href="http://wiki.eclipse.org/PDE/Incubator/b3/Proposal"&gt;b3&lt;/a&gt; and &lt;a href="http://wiki.eclipse.org/E4"&gt;e4&lt;/a&gt; (Am I the only one who thinks that things can be named better?) we can give a good number of demos/presentations. But we don't want to make it as the Big Blue show, so we need few contributions from the community as well. We are glad that &lt;a href="http://eclipse-info.blogspot.com/"&gt;Madhu&lt;/a&gt; and &lt;a href="http://anilgudise.blogspot.com/"&gt;Anil&lt;/a&gt; have already signed up with some topics. I would encourage you to add a demo on what you are working on. Even if not sign up as an attendee, its a nice chance to meet other Eclipse plug-in developers and see what they are building with Eclipse.&lt;br /&gt;
&lt;a href="http://draft.blogger.com/goog_1253637096834"&gt;&lt;br /&gt;
&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://wiki.eclipse.org/Eclipse_DemoCamps_November_2009/Bangalore"&gt;http://wiki.eclipse.org/Eclipse_DemoCamps_November_2009/Bangalore&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;br/&gt;&lt;br/&gt;
&lt;p style="border: 1px solid rgb(198, 198, 198); padding: 10px; color: rgb(51, 51, 51); font-family: 'Lucida Grande',sans-serif; font-size: 1.1em; background-color: rgb(255, 255, 198); margin-bottom: 10px;"&gt; 
From &lt;a href="http://blog.eclipse-tips.com"&gt;Eclipse Tips&lt;/a&gt;
&lt;br/&gt;
Like the tip? Subscribe via &lt;a href="http://feeds.feedburner.com/cypal"&gt;RSS&lt;/a&gt; or &lt;a href="http://bit.ly/EclipseTipsViaEmail"&gt;Email&lt;/a&gt; or &lt;a href="https://twitter.com/Eclipse_Tips"&gt;Twitter&lt;/a&gt;
&lt;/p&gt;
&lt;br/&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1557780184357927241-4184994961603957565?l=blog.eclipse-tips.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cypal/~4/c7ALNokQH_M" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.eclipse-tips.com/feeds/4184994961603957565/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.eclipse-tips.com/2009/09/eclipse-demo-camp-bangalore.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/4184994961603957565?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/4184994961603957565?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cypal/~3/c7ALNokQH_M/eclipse-demo-camp-bangalore.html" title="Eclipse Demo Camp, Bangalore" /><author><name>Prakash G.R.</name><uri>http://www.blogger.com/profile/13046268367318873066</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="08225524632456251201" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_hsp14iFkRLs/SrkAJp9i2wI/AAAAAAAAERo/9b-r6XppV5g/s72-c/Eclipse-camp.gif" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><georss:point>12.971606 77.594376</georss:point><feedburner:origLink>http://blog.eclipse-tips.com/2009/09/eclipse-demo-camp-bangalore.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0cDQHY7fSp7ImA9WxNQFkw.&quot;"><id>tag:blogger.com,1999:blog-1557780184357927241.post-4932218668846285347</id><published>2009-09-22T12:51:00.007+05:30</published><updated>2009-09-22T14:47:51.805+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-22T14:47:51.805+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="plugins" /><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="Downloads" /><category scheme="http://www.blogger.com/atom/ns#" term="3.6" /><category scheme="http://www.blogger.com/atom/ns#" term="Update" /><category scheme="http://www.blogger.com/atom/ns#" term="workbench" /><title>Catching up with Milestones and I-Builds</title><content type="html">Helios M2 is released. Now the biggest problem for the early adopters would be how to catch up with these milestones. Every time, you have to download the milestone build, and then update it with all your required plugins (svn, mylyn, etc). If you are on the I builds, then you have to do this on every week. If you feel that its a painful process, here is a tip. &lt;br /&gt;
&lt;br /&gt;
The&amp;nbsp; p2 repos for Eclipse are not only for the stable releases, &lt;a href="http://wiki.eclipse.org/Eclipse_Project_Update_Sites"&gt;but also for the Milestones, I Builds and Nightly builds&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://download.eclipse.org/eclipse/updates/3.6milestones"&gt;Milestones: http://download.eclipse.org/eclipse/updates/3.6milestones&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://download.eclipse.org/eclipse/updates/3.6-I-builds"&gt;I-Builds: http://download.eclipse.org/eclipse/updates/3.6-I-builds&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://download.eclipse.org/eclipse/updates/3.6-N-builds"&gt;Nightly Builds: http://download.eclipse.org/eclipse/updates/3.6-N-builds&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The &lt;a href="http://www.eclipse.org/eclipse/platform-releng/buildSchedule.html"&gt;build schedule is available here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Go to your Preferences and add the required repo in your Available Software Site preferences (and disable all others, it will be slow to update).&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;img border="0" height="351" src="http://1.bp.blogspot.com/_hsp14iFkRLs/Srh7vaSVXBI/AAAAAAAAERY/nb-axjlvPCQ/s800/Available_Software_Sites.png" width="662" /&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Also enable the automatic updates. You are done. Whenever there is a new Milestone (or an I-Build), then your Eclipse gets updated automatically to it and you don't have to worry about installing other required plug-ins.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;img border="0" height="406" src="http://2.bp.blogspot.com/_hsp14iFkRLs/Srh8a0E0sAI/AAAAAAAAERg/n2tzeO6apIg/s800/Automatic_updates.png" width="492" /&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
Enjoy with the latest and greatest without any pains :-)&lt;div class="blogger-post-footer"&gt;&lt;br/&gt;&lt;br/&gt;
&lt;p style="border: 1px solid rgb(198, 198, 198); padding: 10px; color: rgb(51, 51, 51); font-family: 'Lucida Grande',sans-serif; font-size: 1.1em; background-color: rgb(255, 255, 198); margin-bottom: 10px;"&gt; 
From &lt;a href="http://blog.eclipse-tips.com"&gt;Eclipse Tips&lt;/a&gt;
&lt;br/&gt;
Like the tip? Subscribe via &lt;a href="http://feeds.feedburner.com/cypal"&gt;RSS&lt;/a&gt; or &lt;a href="http://bit.ly/EclipseTipsViaEmail"&gt;Email&lt;/a&gt; or &lt;a href="https://twitter.com/Eclipse_Tips"&gt;Twitter&lt;/a&gt;
&lt;/p&gt;
&lt;br/&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1557780184357927241-4932218668846285347?l=blog.eclipse-tips.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cypal/~4/G7bn4hQmpRA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.eclipse-tips.com/feeds/4932218668846285347/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.eclipse-tips.com/2009/09/catching-up-with-milestones-and-i.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/4932218668846285347?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/4932218668846285347?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cypal/~3/G7bn4hQmpRA/catching-up-with-milestones-and-i.html" title="Catching up with Milestones and I-Builds" /><author><name>Prakash G.R.</name><uri>http://www.blogger.com/profile/13046268367318873066</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="08225524632456251201" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_hsp14iFkRLs/Srh7vaSVXBI/AAAAAAAAERY/nb-axjlvPCQ/s72-c/Available_Software_Sites.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://blog.eclipse-tips.com/2009/09/catching-up-with-milestones-and-i.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkEBSX45fip7ImA9WxNQEE4.&quot;"><id>tag:blogger.com,1999:blog-1557780184357927241.post-7610143536304099106</id><published>2009-09-15T22:39:00.002+05:30</published><updated>2009-09-15T22:40:58.026+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-15T22:40:58.026+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jface" /><category scheme="http://www.blogger.com/atom/ns#" term="RCP" /><category scheme="http://www.blogger.com/atom/ns#" term="dialogs" /><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="guidelines" /><category scheme="http://www.blogger.com/atom/ns#" term="workbench" /><category scheme="http://www.blogger.com/atom/ns#" term="swt" /><title>Back to the basics: Display, Shell, Window ...</title><content type="html">Every Eclipse plugin developer has to deal with Shell and Window, but sometimes doesn't understand the difference between these two. In this tip, I'm trying to explain the basic things: Display, Shell, Window, Dialog, Workbench, WorkbenchPart, WorkbenchSite and WorkbenchPage. Yeah, I know, its probably the boring post you can read in this blog, if you are little bit experienced in these areas.&lt;br /&gt;
&lt;h4&gt;&lt;a href="http://help.eclipse.org/stable/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/widgets/Display.html"&gt;Display&lt;/a&gt;:&lt;/h4&gt;This class is the link between SWT and the underlying OS. It manages the interaction between widgets and the OS. The primary task for this class is to maintain the event loop (&lt;a href="http://help.eclipse.org/stable/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/widgets/Display.html#readAndDispatch%28%29"&gt;readAndDispatch()&lt;/a&gt;). Unless you are writing a plain SWT app, you won't be using that. The most common methods you would be using in this class are &lt;a href="http://help.eclipse.org/stable/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/widgets/Display.html#asyncExec%28java.lang.Runnable%29"&gt;asyncExec()&lt;/a&gt;, &lt;a href="http://help.eclipse.org/stable/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/widgets/Display.html#syncExec%28java.lang.Runnable%29"&gt;syncExec()&lt;/a&gt; and &lt;a href="http://help.eclipse.org/stable/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/widgets/Display.html#timerExec%28int,%20java.lang.Runnable%29"&gt;timerExec()&lt;/a&gt;, which allows you to run a piece of code in the UI thread. (aka user interface thread or display thread)&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;&lt;a href="http://help.eclipse.org/stable/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/widgets/Shell.html"&gt;Shell&lt;/a&gt;:&lt;/h4&gt;Shell is the "window" that you see in your desktop. The one that has a title, maximize, minimize, restore and close buttons. A shell can be either a top-level shell (no parent shell) or can be a secondary shell (will have a parent shell). The style that is passed in the constructor defines which of the above mentioned buttons are displayed and also whether the Shell is modal or not. If you are on a pure SWT app, then you should be create a Shell; create controls in it; open it; run the event loop; and dispose it. Speaking in code:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt;Shell shell = new Shell(display);
// set layout and create widgets 
 shell.open ();
 while (!shell.isDisposed ()) {
  if (!display.readAndDispatch ()) display.sleep ();
 }
 display.dispose ();
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;&lt;a href="http://help.eclipse.org/stable/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/window/Window.html"&gt;Window&lt;/a&gt;:&lt;/h4&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; If you are developing plugins/JFace applications, its better to use Window rather than Shells directly, because it manages the above things for you. It is not, but think it of as a wrapper for Shell. When you use a Window, a Shell is not created until the open() method is called. Since the Shell is not created till the Window is open and windows can be reopened (yes, you can reopen it), configuration of the Shell should be done in the configureShell() method. Remember, this is an abstract class and so you cannot directly use it. You must either use Dialog or ApplicationWindow or your own concrete class.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;&lt;a href="http://help.eclipse.org/stable/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/dialogs/Dialog.html"&gt;Dialog&lt;/a&gt;:&lt;/h4&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; When you need a specialized communication with the user, you should be using Dialogs. In all other cases, you will be using ApplicationWindow. Dialog are more of helper windows that are attached to another main window. PreferenceDialog, PropertyDialog, ErrorDialog, InputDialog &amp;amp; WizardDialog are some frequently used dialogs.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;&lt;a href="http://help.eclipse.org/stable/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/window/ApplicationWindow.html"&gt;ApplicationWindow&lt;/a&gt;:&lt;/h4&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Window + menu support + toolbar support + coolbar support + status line support = ApplicationWindow :-) &lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;&lt;a href="http://help.eclipse.org/stable/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/ui/IWorkbenchWindow.html"&gt;IWorkbenchWindow&lt;/a&gt;:&lt;/h4&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; WorkbenchWindow is Eclipse specific ApplicationWindow, which adds few services and a set of IWorkbenchPages to the ApplicationWindow. Although the javadoc says "Each workbench window has a collection of 0 or more pages", in reality it has only one page. I believe this is due to backward compatibility with Eclipse 1.0. &lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;&lt;a href="http://help.eclipse.org/stable/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/ui/IWorkbenchPage.html"&gt;IWorkbenchPage&lt;/a&gt;:&lt;/h4&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; The area that lies between the toolbar and the status line of the WorkbenchWindow is known as WorkbenchPage. Simply put, this is the body of the WorkbenchWindow, where all the editors and views are showed. IWorkbenchPage contains IWorkbenchParts, which are the the visual representation of the Views and Editors. Both IViewPart and IEditorPart derive from &lt;a href="http://help.eclipse.org/stable/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/ui/IWorkbenchPart.html"&gt;IWorkbenchPart&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;&lt;a href="http://help.eclipse.org/stable/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/ui/IWorkbenchSite.html"&gt;IWorkbenchSite&lt;/a&gt;:&lt;/h4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IWorkbenchPart resides inside the IWorkbenchPage. So it has no direct access to the workbench itself. So when it needs to interact with the workbench, then it needs the IWorkbenchSite. For example to get the shell inside a view, you call getSite().getShell().&lt;div class="blogger-post-footer"&gt;&lt;br/&gt;&lt;br/&gt;
&lt;p style="border: 1px solid rgb(198, 198, 198); padding: 10px; color: rgb(51, 51, 51); font-family: 'Lucida Grande',sans-serif; font-size: 1.1em; background-color: rgb(255, 255, 198); margin-bottom: 10px;"&gt; 
From &lt;a href="http://blog.eclipse-tips.com"&gt;Eclipse Tips&lt;/a&gt;
&lt;br/&gt;
Like the tip? Subscribe via &lt;a href="http://feeds.feedburner.com/cypal"&gt;RSS&lt;/a&gt; or &lt;a href="http://bit.ly/EclipseTipsViaEmail"&gt;Email&lt;/a&gt; or &lt;a href="https://twitter.com/Eclipse_Tips"&gt;Twitter&lt;/a&gt;
&lt;/p&gt;
&lt;br/&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1557780184357927241-7610143536304099106?l=blog.eclipse-tips.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cypal/~4/OxMxxkHowOI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.eclipse-tips.com/feeds/7610143536304099106/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.eclipse-tips.com/2009/09/back-to-basics-display-shell-window.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/7610143536304099106?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/7610143536304099106?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cypal/~3/OxMxxkHowOI/back-to-basics-display-shell-window.html" title="Back to the basics: Display, Shell, Window ..." /><author><name>Prakash G.R.</name><uri>http://www.blogger.com/profile/13046268367318873066</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="08225524632456251201" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total><feedburner:origLink>http://blog.eclipse-tips.com/2009/09/back-to-basics-display-shell-window.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEMNSXc_cSp7ImA9WxNRFUo.&quot;"><id>tag:blogger.com,1999:blog-1557780184357927241.post-2950286492438125393</id><published>2009-09-10T12:19:00.001+05:30</published><updated>2009-09-10T14:18:18.949+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-10T14:18:18.949+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="RCP" /><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="3.6" /><category scheme="http://www.blogger.com/atom/ns#" term="workbench" /><title>Excluding a view from Properties View</title><content type="html">In a previous tip, we saw how to make a &lt;a href="http://blog.eclipse-tips.com/2009/05/creating-custom-property-view.html"&gt;Properties View to respond only to a particular View&lt;/a&gt; or Editor. In this tip, we are going to see how to exclude a particular View or Editor from the Properties View. This will be very helpful in RCP apps, where they don't want the generic view like Outline view or an editor that contributes to the Properties View. Last time we extended the Properties View to create our own view and added some code. But this time its simple. You just have to use the org.eclipse.ui.propertiesView extension point.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: xml;"&gt;&amp;lt;extension
         point="org.eclipse.ui.propertiesView"&amp;gt;
      &amp;lt;excludeSources
            id="org.eclipse.ui.views.ContentOutline"&amp;gt;
      &amp;lt;/excludeSources&amp;gt;
      &amp;lt;excludeSources
            id="com.eclipse_tips.editors.MyOwnEditor"&amp;gt;
      &amp;lt;/excludeSources&amp;gt;
&amp;lt;/extension&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
Yes, its that simple :-) Don't try with Galileo, you would need Helios (3.6) M2 to get this working.&lt;div class="blogger-post-footer"&gt;&lt;br/&gt;&lt;br/&gt;
&lt;p style="border: 1px solid rgb(198, 198, 198); padding: 10px; color: rgb(51, 51, 51); font-family: 'Lucida Grande',sans-serif; font-size: 1.1em; background-color: rgb(255, 255, 198); margin-bottom: 10px;"&gt; 
From &lt;a href="http://blog.eclipse-tips.com"&gt;Eclipse Tips&lt;/a&gt;
&lt;br/&gt;
Like the tip? Subscribe via &lt;a href="http://feeds.feedburner.com/cypal"&gt;RSS&lt;/a&gt; or &lt;a href="http://bit.ly/EclipseTipsViaEmail"&gt;Email&lt;/a&gt; or &lt;a href="https://twitter.com/Eclipse_Tips"&gt;Twitter&lt;/a&gt;
&lt;/p&gt;
&lt;br/&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1557780184357927241-2950286492438125393?l=blog.eclipse-tips.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cypal/~4/okyfHv-oyNY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.eclipse-tips.com/feeds/2950286492438125393/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.eclipse-tips.com/2009/09/excluding-view-from-properties-view.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/2950286492438125393?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/2950286492438125393?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cypal/~3/okyfHv-oyNY/excluding-view-from-properties-view.html" title="Excluding a view from Properties View" /><author><name>Prakash G.R.</name><uri>http://www.blogger.com/profile/13046268367318873066</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="08225524632456251201" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.eclipse-tips.com/2009/09/excluding-view-from-properties-view.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEcEQno9eCp7ImA9WxJaFUU.&quot;"><id>tag:blogger.com,1999:blog-1557780184357927241.post-8412958758749086055</id><published>2009-08-06T23:31:00.001+05:30</published><updated>2009-08-06T23:36:43.460+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-06T23:36:43.460+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="plugins" /><category scheme="http://www.blogger.com/atom/ns#" term="jface" /><category scheme="http://www.blogger.com/atom/ns#" term="RCP" /><category scheme="http://www.blogger.com/atom/ns#" term="dialogs" /><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="guidelines" /><category scheme="http://www.blogger.com/atom/ns#" term="workbench" /><title>Remember the State</title><content type="html">As a rule of thumb, your application should try to remember the state across sessions. So when a user hits the close button and then opens it after few mins/days, it should present exactly in the same way where he left. In this tip, I'm going to explain few things of how this could be achieved.&lt;br /&gt;
&lt;br /&gt;
The first and foremost thing is the number of windows opened and current perspective and its state in each window. If you are writing a plugin for the IDE, you need not worry about this. Eclipse does that for you. If you are an RCP app, you have to do it yourself. You have to do it in the WorkbenchAdvisor.initialize() method:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java;"&gt;public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
 
 @Override
 public void initialize(IWorkbenchConfigurer configurer) {

  super.initialize(configurer);
  configurer.setSaveAndRestore(true);
 }

 // other methods ...
}
&lt;/pre&gt;&lt;br /&gt;
Now this will take care of lot of things - the number of windows that are opened; location &amp;amp; size of those windows; perspective of each window; view &amp;amp; editors in each perspective; their locations,... All by setting that one boolean variable!&lt;br /&gt;
&lt;br /&gt;
Now that our views and editors are restored by Eclipse, we need to ensure the state of them. Most of the views will be tree/table based. In these cases, the current selection is an important one to restore. &lt;br /&gt;
&lt;br /&gt;
To store these items and anyother stuff you want to, Eclipse provides IMemento. An instance of this IMemento is passed to the view when its initialized and when workbench is closed. The information can be stored hierarchically with string keys and it will be persisted as an XML. If you are wondering why can't it be as simple as passing a Serializable Java object and the workbench persisting it, the answer is simple. The same class may not be there when Eclipse starts next time or even if the same class is available, it might have changed. IMemento avoids this problem by persisting the stae as an XML string.&lt;br /&gt;
&lt;br /&gt;
So how do we use it? In the view, you have to override the init() and saveState() methods:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt;@Override
public void init(IViewSite site, IMemento memento) throws PartInitException {
 this.memento = memento;
 super.init(site, memento);
}

public void createPartControl(Composite parent) {
        // create the viewer
 restoreSelection();
}

private void restoreSelection() {
 if (memento != null) {
  IMemento storedSelection = memento.getChild("StoredSelection");
  if (storedSelection != null) {
   // create a structured selection from it
   viewer.setSelection(selection);
  }
 }
}

@Override
public void saveState(IMemento memento) {
 IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
 if (!selection.isEmpty()) {
  IMemento storedSelection = memento.createChild("StoredSelection");
  // store the selection under storedSelection
 }
}
&lt;/pre&gt;&lt;br /&gt;
Not just the selection, we can store any other information (which of the tree nodes are expanded, sorter &amp;amp; filter settings etc) which will be useful to restore the state.&lt;br /&gt;
&lt;br /&gt;
Great. Now moving on from the views, the next item would be dialogs. Similar to the workbench windows, you can store the size, location and other elements of a dialog as well. The functionality for size and location is available by default, but you need to enable it by overriding the Dialog.getDialogBoundsSettings() method. The Dialog class stores &amp;amp; retrieves the size and location from IDialogSettings returned from that method. The original implementation returns null, so nothing is saved. We need to create an instanceof IDialogSettings and return it. Your plugin's Activator simplifies that. When required, it creates a dialog_settings.xml under your plugin's data area and store the dialog settings of all the dialogs. You have to create a separate section for each dialog.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt;private static final String MY_DIALOG_SETTINGS = "MY_DIALOG_SETTINGS";

@Override
protected IDialogSettings getDialogBoundsSettings() {
 IDialogSettings settings = Activator.getDefault().getDialogSettings();
 IDialogSettings section = settings.getSection(MY_DIALOG_SETTINGS);
 if (section == null) {
  section = settings.addNewSection(MY_DIALOG_SETTINGS);
 }
 return section;
}&lt;/pre&gt;&lt;br /&gt;
In case you want to store only the location or size, you can specify it by overriding the getDialogBoundsStrategy() method.&lt;br /&gt;
&lt;br /&gt;
Much like the IMemento, the IDialogSettings basically organizes the key-value strings in an hierarchical way. So along with the size &amp;amp; location, you can store any other information in this IDialogSettings. Its a good practice to store the values of the widgets (which radion button is selecte, checked state of a check box, etc) in the dialog, so its faster for an user who frequently repeats an operation.&lt;br /&gt;
&lt;br /&gt;
Talking about the widgets, the trickier one is Combo. When the list of options are predefined and the user can't enter a new value, then its easy. But in places where the user can enter the values, (like File/Directory selection, search boxes), remembering them is not straight forward.&lt;br /&gt;
&lt;br /&gt;
We shouldn't be storing every single value the user enters, but only the recently used ones. Probably with a limit of 5 or 10 items only. This can be done with the help of LinkedHashSet. It guarantees the order of the element, so whenever the user enters a new values, put the current value first in the set then add the rest of the elements (even if the first element is repeated, it won't change the position). Then take the first N elements and store it.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java;"&gt;private static final String COMBO_STATE="COMBO_STATE";

private static final int HISTORY_SIZE = 5;

private String []comboState;

private void restoreComboState(IDialogSettings settings) {
 comboState = settings.getArray(COMBO_STATE);
 if(comboState ==null)
  comboState = new String[0];
 for (String value : comboState) {
  myCombo.add(value);
 }
}

private void saveComboState(IDialogSettings settings) {

 // use LinkedHashSet to have the recently entered ones
 LinkedHashSet&amp;lt;String&amp;gt; newState = new LinkedHashSet&amp;lt;String&amp;gt;();
 newState.add(myCombo.getText());
 newState.addAll(Arrays.asList(comboState));

 // now convert it to the array of required size
 int size = Math.min(HISTORY_SIZE, newState.size());
 String[] newStateArray = new String[size];
 newState.toArray(newStateArray);

 // store
 settings.put(COMBO_STATE, newStateArray);
}
&lt;/pre&gt;&lt;br /&gt;
One last piece. Look at this dialog:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_hsp14iFkRLs/SnsZ4H4Oh4I/AAAAAAAAEK4/RXXOGhZ6x_M/s800/Open_Perspective_Question.png" /&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Sometimes only for the first time you want to ask the question to the user. Thereafter if the user prefers, you can use the same answer. To simplify this, you can use the MessageDialogWithToggle. You need to pass the preference store and the key for the preference value. When the user selects the check box, the value will be stored. From the next time onwards, you can check the value from the preference and use it.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt;MessageDialogWithToggle.openYesNoQuestion(shell, "Remember me", "Is this tip useful?", 
  "Don't bug me with this question again", true, 
  Activator.getDefault().getPreferenceStore(), "BUG_USER_KEY");
&lt;/pre&gt;&lt;br /&gt;
There you go:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_hsp14iFkRLs/SnsaBbEuZlI/AAAAAAAAELA/swpaRewXzDI/s800/Tip_Useful_Question.png" /&gt;&lt;/div&gt;&lt;br /&gt;
:-)&lt;div class="blogger-post-footer"&gt;&lt;br/&gt;&lt;br/&gt;
&lt;p style="border: 1px solid rgb(198, 198, 198); padding: 10px; color: rgb(51, 51, 51); font-family: 'Lucida Grande',sans-serif; font-size: 1.1em; background-color: rgb(255, 255, 198); margin-bottom: 10px;"&gt; 
From &lt;a href="http://blog.eclipse-tips.com"&gt;Eclipse Tips&lt;/a&gt;
&lt;br/&gt;
Like the tip? Subscribe via &lt;a href="http://feeds.feedburner.com/cypal"&gt;RSS&lt;/a&gt; or &lt;a href="http://bit.ly/EclipseTipsViaEmail"&gt;Email&lt;/a&gt; or &lt;a href="https://twitter.com/Eclipse_Tips"&gt;Twitter&lt;/a&gt;
&lt;/p&gt;
&lt;br/&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1557780184357927241-8412958758749086055?l=blog.eclipse-tips.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cypal/~4/weSokobWRhM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.eclipse-tips.com/feeds/8412958758749086055/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.eclipse-tips.com/2009/08/remember-state.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/8412958758749086055?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/8412958758749086055?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cypal/~3/weSokobWRhM/remember-state.html" title="Remember the State" /><author><name>Prakash G.R.</name><uri>http://www.blogger.com/profile/13046268367318873066</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="08225524632456251201" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_hsp14iFkRLs/SnsZ4H4Oh4I/AAAAAAAAEK4/RXXOGhZ6x_M/s72-c/Open_Perspective_Question.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total><feedburner:origLink>http://blog.eclipse-tips.com/2009/08/remember-state.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE4FSHczfSp7ImA9WxJUGU4.&quot;"><id>tag:blogger.com,1999:blog-1557780184357927241.post-4303128513757494169</id><published>2009-07-18T22:37:00.001+05:30</published><updated>2009-07-18T22:38:39.985+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-18T22:38:39.985+05:30</app:edited><title>Eclipse Summit India - Day 2</title><content type="html">The second day, I was a little late and missed the Oracle's Plenary session. I was in time for IBM's session. Being an IBM-er nothing new for me there to see RAD or websphere. It was good.&lt;br /&gt;
&lt;br /&gt;
The first session I took was by Ilya Shinkarenko. More than half of the hall had repeated audience. It was nice, just as yesterday. This time, I was able to attend till the end. After a heavy lunch, I felt very sleepy in the afternoon session. The presenter was partly responsible for that ;-) Then I moved to Anshu Jain's session called 'Eclipse as framework of frameworks', which was simply awesome. To quote Ankur, "a lot of meat added with a perfect aroma, the presentation was a feast". Of the ones I've attended, that was the best. Next was networking in the corridor. After many questions on Eclipse startup to command invocation, that marked the end of the day for me.&lt;br /&gt;
&lt;br /&gt;
Some afterthoughts:&lt;br /&gt;
&lt;br /&gt;
(*) The good thing about this conference is the focus.  This is not an all-in-conference, which targets all the CEOs, CTOs, Managers, decision makers, IT guys and your office boys. This has complete focus on Eclipse plug-in developers and almost all of these sessions are well aligned towards this.&lt;br /&gt;
&lt;br /&gt;
(*) Parallel tracks are good, but they could have been specific tracks like OSGi, EMF etc. Also there were instances like both the OSGi sessions were held in parallel, so if someone is interested in OSGi, they have to choose between these two. Probably the next time, it gets better.&lt;br /&gt;
&lt;br /&gt;
(*) The venue was also much better, center of the city and well accessible. No need to talk about the food, it was great :-)&lt;br /&gt;
&lt;br /&gt;
I believe that the photos, videos and the slides will be uploaded online soon. I'll post a link once its done.&lt;div class="blogger-post-footer"&gt;&lt;br/&gt;&lt;br/&gt;
&lt;p style="border: 1px solid rgb(198, 198, 198); padding: 10px; color: rgb(51, 51, 51); font-family: 'Lucida Grande',sans-serif; font-size: 1.1em; background-color: rgb(255, 255, 198); margin-bottom: 10px;"&gt; 
From &lt;a href="http://blog.eclipse-tips.com"&gt;Eclipse Tips&lt;/a&gt;
&lt;br/&gt;
Like the tip? Subscribe via &lt;a href="http://feeds.feedburner.com/cypal"&gt;RSS&lt;/a&gt; or &lt;a href="http://bit.ly/EclipseTipsViaEmail"&gt;Email&lt;/a&gt; or &lt;a href="https://twitter.com/Eclipse_Tips"&gt;Twitter&lt;/a&gt;
&lt;/p&gt;
&lt;br/&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1557780184357927241-4303128513757494169?l=blog.eclipse-tips.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cypal/~4/_JSKDGNd22Q" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.eclipse-tips.com/feeds/4303128513757494169/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.eclipse-tips.com/2009/07/eclipse-summit-india-day-2.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/4303128513757494169?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/4303128513757494169?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cypal/~3/_JSKDGNd22Q/eclipse-summit-india-day-2.html" title="Eclipse Summit India - Day 2" /><author><name>Prakash G.R.</name><uri>http://www.blogger.com/profile/13046268367318873066</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="08225524632456251201" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.eclipse-tips.com/2009/07/eclipse-summit-india-day-2.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEENR3ozfip7ImA9WxJUGE8.&quot;"><id>tag:blogger.com,1999:blog-1557780184357927241.post-7656574543405745755</id><published>2009-07-17T14:44:00.002+05:30</published><updated>2009-07-17T14:54:56.486+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-17T14:54:56.486+05:30</app:edited><title>Eclipse Summit India - Day 1</title><content type="html">Before I start, a question: How do you know you are in troubled economic times?&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://1.bp.blogspot.com/_hsp14iFkRLs/SmBAujwQobI/AAAAAAAAEJc/i1zg8F_18iY/s1600/EclipseSummitIndiaLogo.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_hsp14iFkRLs/SmBAujwQobI/AAAAAAAAEJc/i1zg8F_18iY/s200/EclipseSummitIndiaLogo.png" /&gt;&lt;/a&gt;Today is the first day of Eclipse Summit India. Luckily, even after screwing up by taking a wrong road and going in a different direction, I did make it well before the keynote by Microsoft. Yes, Microsoft. They are one of the Platinum sponsors. Just like me, everyone was wondering what are they doing there, the answer told was "interoperability". I'm not going to summarize any of the topics presented, so I'll leave you to guess what how he positioned M$ in that.One thing that was interesting is they have PHP as a first class citizen in their IIS. That was surprising for me. Additionally they have some thing called a 'One Installer' which will download all that you want for a web site and install it on your server - not just PHP module for IIS or the latest .Net runtime, but Wordpress and Drupal as well! Wow!&lt;br /&gt;
&lt;br /&gt;
After that it was Ilya Shinkarenko's workshop. It was good. Started a little slow and the pace moved up during the session. I've to cut it in the middle and rush to the other room. Adobe guys were just finishing their presentation. Both of them had a black Mac book and even before I said another 'wow', I noticed it was a windows machine with an Apple sticker. Good idea, I should say. The presentation was mine, and I hope it went well. I did get some good feedback during the lunch. Its definitely troubled ecomony now, but the buffet was good :-)&lt;br /&gt;
&lt;br /&gt;
Post lunch, yeah, I'm in the EMF workshop and blogging this (yeah, we got free wi-fi). Got to run for Ankur's Presentation. Rest of the sessions in the evening/tomorrow.&lt;br /&gt;
&lt;br /&gt;
Before I sign out, the answer: In the free goodies for attendees, you get a pencil instead of a pen ;-)&lt;div class="blogger-post-footer"&gt;&lt;br/&gt;&lt;br/&gt;
&lt;p style="border: 1px solid rgb(198, 198, 198); padding: 10px; color: rgb(51, 51, 51); font-family: 'Lucida Grande',sans-serif; font-size: 1.1em; background-color: rgb(255, 255, 198); margin-bottom: 10px;"&gt; 
From &lt;a href="http://blog.eclipse-tips.com"&gt;Eclipse Tips&lt;/a&gt;
&lt;br/&gt;
Like the tip? Subscribe via &lt;a href="http://feeds.feedburner.com/cypal"&gt;RSS&lt;/a&gt; or &lt;a href="http://bit.ly/EclipseTipsViaEmail"&gt;Email&lt;/a&gt; or &lt;a href="https://twitter.com/Eclipse_Tips"&gt;Twitter&lt;/a&gt;
&lt;/p&gt;
&lt;br/&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1557780184357927241-7656574543405745755?l=blog.eclipse-tips.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cypal/~4/8dydryT_8_4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.eclipse-tips.com/feeds/7656574543405745755/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.eclipse-tips.com/2009/07/eclipse-summit-india-day-1.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/7656574543405745755?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/7656574543405745755?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cypal/~3/8dydryT_8_4/eclipse-summit-india-day-1.html" title="Eclipse Summit India - Day 1" /><author><name>Prakash G.R.</name><uri>http://www.blogger.com/profile/13046268367318873066</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="08225524632456251201" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_hsp14iFkRLs/SmBAujwQobI/AAAAAAAAEJc/i1zg8F_18iY/s72-c/EclipseSummitIndiaLogo.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total><feedburner:origLink>http://blog.eclipse-tips.com/2009/07/eclipse-summit-india-day-1.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEcAQH88cCp7ImA9WxJVEE0.&quot;"><id>tag:blogger.com,1999:blog-1557780184357927241.post-7989849880617545097</id><published>2009-06-26T13:10:00.000+05:30</published><updated>2009-06-26T13:10:41.178+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-26T13:10:41.178+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="RCP" /><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="Commands" /><category scheme="http://www.blogger.com/atom/ns#" term="workbench" /><title>Keyboard accessibility thru Command Framework</title><content type="html">Keyboard shortcuts is usually much speedier than reaching out your mouse, moving it, pointing it to something and clicking. But there are some things which cannot be done that easily by keyboard shortcuts. For me, one of them is finding out a closed project and open it. Unfortunately, I've quite a large set of projects in my workspace and try to keep most them closed, when not used. In addition to that in the Package Explorer, I've the 'Closed Projects' filter on. So if I need to open a project, I've use the pull down menu, uncheck 'Closed Projects' navigate thru the working sets to find the right project and double click it. To enable keyboard access to this regular task, I decided to make use of &lt;a href="http://wiki.eclipse.org/Platform_Command_Framework"&gt;Commands Framework&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
The solution is to add a &lt;a href="http://blog.eclipse-tips.com/2008/12/commands-part-3-parameters-for-commands.html"&gt;parameterized command&lt;/a&gt;, and in the values, I compute the projects which are closed. So when I press the awesome shortcut (Ctrl+3) it would display me the list of closed projects. With few keys, I can navigate to the project I want and open it. Lets see how to do it. First step is the command with the parameter:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;extension point="org.eclipse.ui.commands"&amp;gt;
   &amp;lt;command
            defaultHandler="com.eclipse_tips.handlers.OpenProjectHandler"
            id="com.eclipse-tips.openProject.command"
            name="Open Project"&amp;gt;
      &amp;lt;commandParameter
               id="com.eclipse-tips.openProject.projectNameParameter"
               name="Name"
               optional="false"
               values="com.eclipse_tips.handlers.ProjectNameParameterValues"&amp;gt;
      &amp;lt;/commandParameter&amp;gt;
   &amp;lt;/command&amp;gt;
&amp;lt;/extension&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
And the handler:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java;"&gt;public Object execute(ExecutionEvent event) throws ExecutionException {
 String projectName = event.getParameter("com.eclipse-tips.openProject.projectNameParameter");
 IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
 IProject project = root.getProject(projectName);
 try {
  project.open(null);
 } catch (CoreException e) {
  throw new ExecutionException("Error occured while open project", e);
 }
 return null;
}
&lt;/pre&gt;&lt;br /&gt;
For the parameter values, I look for closed projects and return them:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java;"&gt;public Map&amp;lt;String, String&amp;gt; getParameterValues() {

 IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
 IProject[] projects = root.getProjects();
 Map&amp;lt;String, String&amp;gt; paramValues = new HashMap&amp;lt;String, String&amp;gt;();
 for (IProject project : projects) {
  if (project.exists() &amp;amp;&amp;amp; !project.isOpen()) {
   paramValues.put(project.getName(), project.getName());
  }

 }
 return paramValues;
}
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
So finally, When I press Ctrl+3 and type OPN, I get the list:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_hsp14iFkRLs/SkR2yIhfxzI/AAAAAAAAECA/D0u-kCTiq-Q/s1600-h/KeyboardCommands.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_hsp14iFkRLs/SkR2yIhfxzI/AAAAAAAAECA/D0u-kCTiq-Q/s400/KeyboardCommands.png" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;
This idea can be extended to provide keyboard accessibility to many functionalities. Say in an RCP mail application, you can add a command like 'Go To Mail' with parameter as the Subject/Sender:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_hsp14iFkRLs/SkR539zueKI/AAAAAAAAECI/REDeNO2mVnQ/s1600-h/KeyboardCommands1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_hsp14iFkRLs/SkR539zueKI/AAAAAAAAECI/REDeNO2mVnQ/s400/KeyboardCommands1.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Hmmm, if only the 'Built On Eclipse' mail app that I *have* to use, knows the existence of threads other than the UI thread :-(&lt;div class="blogger-post-footer"&gt;&lt;br/&gt;&lt;br/&gt;
&lt;p style="border: 1px solid rgb(198, 198, 198); padding: 10px; color: rgb(51, 51, 51); font-family: 'Lucida Grande',sans-serif; font-size: 1.1em; background-color: rgb(255, 255, 198); margin-bottom: 10px;"&gt; 
From &lt;a href="http://blog.eclipse-tips.com"&gt;Eclipse Tips&lt;/a&gt;
&lt;br/&gt;
Like the tip? Subscribe via &lt;a href="http://feeds.feedburner.com/cypal"&gt;RSS&lt;/a&gt; or &lt;a href="http://bit.ly/EclipseTipsViaEmail"&gt;Email&lt;/a&gt; or &lt;a href="https://twitter.com/Eclipse_Tips"&gt;Twitter&lt;/a&gt;
&lt;/p&gt;
&lt;br/&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1557780184357927241-7989849880617545097?l=blog.eclipse-tips.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cypal/~4/jzeEc1ip9Z4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.eclipse-tips.com/feeds/7989849880617545097/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.eclipse-tips.com/2009/06/keyboard-accessibility-thru-command.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/7989849880617545097?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/7989849880617545097?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cypal/~3/jzeEc1ip9Z4/keyboard-accessibility-thru-command.html" title="Keyboard accessibility thru Command Framework" /><author><name>Prakash G.R.</name><uri>http://www.blogger.com/profile/13046268367318873066</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="08225524632456251201" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_hsp14iFkRLs/SkR2yIhfxzI/AAAAAAAAECA/D0u-kCTiq-Q/s72-c/KeyboardCommands.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://blog.eclipse-tips.com/2009/06/keyboard-accessibility-thru-command.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUMEQ3o7eyp7ImA9WxJXEEw.&quot;"><id>tag:blogger.com,1999:blog-1557780184357927241.post-2386978422358746936</id><published>2009-06-03T13:51:00.003+05:30</published><updated>2009-06-03T13:53:22.403+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-03T13:53:22.403+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jface" /><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="guidelines" /><category scheme="http://www.blogger.com/atom/ns#" term="workbench" /><title>Subtask in ProgressMonitors</title><content type="html">Here is a trivial tip. When inspecting a bug, I found a interesting thing on Progress Monitors. We know monitor.worked() increments the progress bar, but how do we change the text to update the current subtask? The initial text is set by the beginTask() method and it should be called only once. I digged into the IProgressMonitor and found the subtask() method:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java;"&gt;IRunnableWithProgress operation = new IRunnableWithProgress() {

 public void run(IProgressMonitor monitor) {

  monitor.beginTask("Main task running ...", 5);
  for (int i = 0; i &amp;lt; 5; i++) {
   monitor.subTask("Subtask # " + i + " running.");
   runSubTask(new SubProgressMonitor(monitor, 1), i);
  }
 }

};
&lt;/pre&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_hsp14iFkRLs/SiYv6gq_xPI/AAAAAAAADpY/vDP9JM1hYzU/s1600-h/ProgressWithSubTask1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_hsp14iFkRLs/SiYv6gq_xPI/AAAAAAAADpY/vDP9JM1hYzU/s400/ProgressWithSubTask1.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Now the question is what happens when the runSubTask() method sets another subTask on the SubProgressMonitor?&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java;"&gt;private void runSubTask(IProgressMonitor monitor, int subTaskId) {

 monitor.beginTask("Sub task running", 10);
  for (int i = 0; i &amp;lt; 10; i++) {
   monitor.subTask("Inside subtask, " + i + " out of 10");
   // do something here ...
   monitor.worked(1);
   if (monitor.isCanceled())
    throw new OperationCanceledException();
 }
  monitor.done();
 }

}
&lt;/pre&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_hsp14iFkRLs/SiYwUsf-8SI/AAAAAAAADpg/9hmZYQi9ufY/s1600-h/ProgressWithSubTask2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_hsp14iFkRLs/SiYwUsf-8SI/AAAAAAAADpg/9hmZYQi9ufY/s400/ProgressWithSubTask2.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Basically the SubProgressMonitor's subTask() overwrites the parent's subTask(). Thats the default behaviour. You can customize it with the style bits provided in the SubProgressMonitor:&lt;br /&gt;
&lt;br /&gt;
If you want to append the SubProgressMonitor's subTask info, use the style PREPEND_MAIN_LABEL_TO_SUBTASK:&lt;br /&gt;
&lt;pre class="brush: java;"&gt;new SubProgressMonitor(monitor, 1, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK), i);&lt;/pre&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_hsp14iFkRLs/SiYxQ54EfzI/AAAAAAAADpo/TsxDbbnNb5M/s1600-h/ProgressWithSubTask3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_hsp14iFkRLs/SiYxQ54EfzI/AAAAAAAADpo/TsxDbbnNb5M/s400/ProgressWithSubTask3.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Else if you want to ignore it altogher then use the SUPPRESS_SUBTASK_LABEL style:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java;"&gt;new SubProgressMonitor(monitor, 1, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL), i);&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;br/&gt;&lt;br/&gt;
&lt;p style="border: 1px solid rgb(198, 198, 198); padding: 10px; color: rgb(51, 51, 51); font-family: 'Lucida Grande',sans-serif; font-size: 1.1em; background-color: rgb(255, 255, 198); margin-bottom: 10px;"&gt; 
From &lt;a href="http://blog.eclipse-tips.com"&gt;Eclipse Tips&lt;/a&gt;
&lt;br/&gt;
Like the tip? Subscribe via &lt;a href="http://feeds.feedburner.com/cypal"&gt;RSS&lt;/a&gt; or &lt;a href="http://bit.ly/EclipseTipsViaEmail"&gt;Email&lt;/a&gt; or &lt;a href="https://twitter.com/Eclipse_Tips"&gt;Twitter&lt;/a&gt;
&lt;/p&gt;
&lt;br/&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1557780184357927241-2386978422358746936?l=blog.eclipse-tips.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cypal/~4/T2meNyoULUU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.eclipse-tips.com/feeds/2386978422358746936/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.eclipse-tips.com/2009/06/subtask-in-progressmonitors.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/2386978422358746936?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/2386978422358746936?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cypal/~3/T2meNyoULUU/subtask-in-progressmonitors.html" title="Subtask in ProgressMonitors" /><author><name>Prakash G.R.</name><uri>http://www.blogger.com/profile/13046268367318873066</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="08225524632456251201" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_hsp14iFkRLs/SiYv6gq_xPI/AAAAAAAADpY/vDP9JM1hYzU/s72-c/ProgressWithSubTask1.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.eclipse-tips.com/2009/06/subtask-in-progressmonitors.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE4CRn85cSp7ImA9WxJQFUQ.&quot;"><id>tag:blogger.com,1999:blog-1557780184357927241.post-838666877859722878</id><published>2009-05-29T15:10:00.004+05:30</published><updated>2009-05-29T17:06:07.129+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-29T17:06:07.129+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="RCP" /><category scheme="http://www.blogger.com/atom/ns#" term="Mac" /><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="guidelines" /><category scheme="http://www.blogger.com/atom/ns#" term="workbench" /><category scheme="http://www.blogger.com/atom/ns#" term="swt" /><title>Search menu in Mac - the implementation</title><content type="html">In the previous entry I mentioned about the &lt;a href="http://blog.eclipse-tips.com/2009/05/search-menu-in-mac.html" linkindex="207"&gt;Search Menu in Mac&lt;/a&gt;. Lets see what that search menu contains:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_hsp14iFkRLs/Sh-mTAhPuqI/AAAAAAAADoA/bFIxmmj8I2k/s1600-h/Tweetie_Mac_Search_Menu1.png" imageanchor="1" linkindex="208" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;br /&gt;
&lt;/a&gt;&amp;nbsp;&lt;a href="http://3.bp.blogspot.com/_hsp14iFkRLs/Sh-s6fxoaXI/AAAAAAAADoI/Q0n2b1lKuec/s1600-h/Tweetie_Mac_Search_Menu1.png" imageanchor="1" linkindex="209" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_hsp14iFkRLs/Sh-s6fxoaXI/AAAAAAAADoI/Q0n2b1lKuec/s400/Tweetie_Mac_Search_Menu1.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
The first item is the "Clear" menu. It clears the recent search history. Next comes the recent searches. If you want to call it as "Search History", you can do it in the title field menu item. The title field &amp;amp; clear menu item are visible only when there is at least one entry in the recent searches. The menu can also have custom items, where you can include you own action items. Lets see how to add all these in an SWT app:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt;Text searchText = new Text(shell, SWT.SEARCH | SWT.ICON_CANCEL | SWT.ICON_SEARCH);
  SearchFieldSupport searchFieldSupport = new SearchFieldSupport(searchText);
  Menu menu = new Menu(searchText);
  
  MenuItem customItem = new MenuItem(menu, SWT.NONE);
  customItem.setText("Custom Action");
  customItem.addSelectionListener(new SelectionAdapter() {
   public void widgetSelected(SelectionEvent e) {
    MessageDialog.openInformation(shell, "Search Field", "Custom action is done here");
   };
  });
  
  MenuItem sep1 = new MenuItem(menu, SWT.SEPARATOR);
  
  MenuItem recentMenuItem = new MenuItem(menu, SWT.NONE);
  recentMenuItem.setText("Search History");
  SearchFieldSupport.setRecentSearchesTitle(recentMenuItem);
  
  // for the search history
  MenuItem recentsMenuItem = new MenuItem(menu, SWT.PUSH);
  SearchFieldSupport.setRecentSearches(recentsMenuItem);
  
  MenuItem sep2 = new MenuItem(menu, SWT.SEPARATOR);

  MenuItem clearMenuItem = new MenuItem(menu, SWT.PUSH);
  clearMenuItem.setText("Clear History");
  SearchFieldSupport.setClearRecents(clearMenuItem);

  searchFieldSupport.setMenu(menu);
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Here is the result:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_hsp14iFkRLs/Sh-s8Km0cBI/AAAAAAAADoQ/jyU6iBgQK7Q/s1600-h/Mac_SWT_Search.png" imageanchor="1" linkindex="210" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_hsp14iFkRLs/Sh-s8Km0cBI/AAAAAAAADoQ/jyU6iBgQK7Q/s320/Mac_SWT_Search.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Its almost perfect except that when we clear the search history and see the menu, it looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_hsp14iFkRLs/Sh-s_dGEh7I/AAAAAAAADoY/WyYEhsjoduA/s1600-h/Search_Separator.png" imageanchor="1" linkindex="211" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_hsp14iFkRLs/Sh-s_dGEh7I/AAAAAAAADoY/WyYEhsjoduA/s320/Search_Separator.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Its because the separators are still shown even when there is no recent menu items. The hack is to set the separator as a resentSearches menu item:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt;MenuItem sep2 = new MenuItem(menu, SWT.SEPARATOR);
  SearchFieldSupport.setRecentSearchesTitle(sep2);
&lt;/pre&gt;&lt;br /&gt;
The Search Field also supports a custom menu item which tells that there is no recent search items. This menu item is automatically hidden when there search history is not empty. We can add that also before the second separator:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt;MenuItem recentsMenuItem = new MenuItem(menu, SWT.PUSH);
  SearchFieldSupport.setRecentSearches(recentsMenuItem);
  
  MenuItem noRecentMenuItem = new MenuItem(menu, SWT.NONE);
  noRecentMenuItem.setText("No Search History");
  SearchFieldSupport.setNoRecentSearches(noRecentMenuItem);
  
  MenuItem sep2 = new MenuItem(menu, SWT.SEPARATOR);
  SearchFieldSupport.setRecentSearchesTitle(sep2);
&lt;/pre&gt;&lt;br /&gt;
Now we are all set:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_hsp14iFkRLs/Sh-tBBrSgUI/AAAAAAAADog/RASrf0OvunY/s1600-h/Search_Empty.png" imageanchor="1" linkindex="212" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_hsp14iFkRLs/Sh-tBBrSgUI/AAAAAAAADog/RASrf0OvunY/s320/Search_Empty.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
The last missing piece of the puzzle, the SearchFieldSupport class:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java; collapse: true"&gt;package org.eclipse.ui.cocoa.ext;

import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.KeyListener;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.cocoa.ext.internal.NSSearchField;

/**
 * 
 * @author Prakash G.R.
 * 
 */
public class SearchFieldSupport implements KeyListener, DisposeListener {
 
 private final NSSearchField nsSearchField;
 private final Text text;

 public SearchFieldSupport(Text text) {
  this.text = text;
  text.addKeyListener(this);
  text.addDisposeListener(this);
  nsSearchField = new NSSearchField(text);
 }

 public Text getText() {
  return text;
 }

 public String[] getRecentSearchStrings() {
  return nsSearchField.getRecentSearches();
 }
 
 public void setRecentSearchStrings(String[] recentSearches) {
  nsSearchField.setRecentSearches(recentSearches);
 }

 public void setMenu(Menu menu) {
  nsSearchField.setMenu(menu);
 }

 public static void setNoRecentSearches(MenuItem menuItem) {
  NSSearchField.setTag(menuItem, NSSearchField.NSSearchFieldNoRecentsMenuItemTag);
 }

 public static void setClearRecents(MenuItem menuItem) {
  NSSearchField.setTag(menuItem, NSSearchField.NSSearchFieldClearRecentsMenuItemTag);
 }

 public static void setRecentSearchesTitle(MenuItem menuItem) {
  NSSearchField.setTag(menuItem, NSSearchField.NSSearchFieldRecentsTitleMenuItemTag);
 }

 public static void setRecentSearches(MenuItem menuItem) {
  NSSearchField.setTag(menuItem, NSSearchField.NSSearchFieldRecentsMenuItemTag);
 }

 public void widgetDisposed(DisposeEvent e) {
  text.removeKeyListener(this);
 }

 public void keyPressed(KeyEvent e) {
  // do nothing
 }

 public void keyReleased(KeyEvent e) {
  if (e.keyCode == '\r') {
   String[] recentSearchStrings = getRecentSearchStrings();
   int oldSize = recentSearchStrings.length;
   String[] newSearchStrings = new String[recentSearchStrings.length + 1];
   System.arraycopy(recentSearchStrings, 0, newSearchStrings, 0, recentSearchStrings.length);
   newSearchStrings[oldSize] = text.getText();
   setRecentSearchStrings(newSearchStrings);
   text.setSelection(0, text.getText().length());
  }
 }

}
&lt;/pre&gt;&lt;br /&gt;
and the custom NSSearchField class:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java; collapse: true"&gt;package org.eclipse.ui.cocoa.ext.internal;

import java.lang.reflect.Field;

import org.eclipse.swt.internal.cocoa.NSArray;
import org.eclipse.swt.internal.cocoa.NSMenu;
import org.eclipse.swt.internal.cocoa.NSMenuItem;
import org.eclipse.swt.internal.cocoa.NSMutableArray;
import org.eclipse.swt.internal.cocoa.NSString;
import org.eclipse.swt.internal.cocoa.OS;
import org.eclipse.swt.internal.cocoa.id;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.Text;

/**
 * @author Prakash G.R.
 * 
 */
@SuppressWarnings("restriction")
public class NSSearchField extends org.eclipse.swt.internal.cocoa.NSSearchField {

 public static final int NSSearchFieldRecentsTitleMenuItemTag = 1000;
 public static final int NSSearchFieldRecentsMenuItemTag = 1001;
 public static final int NSSearchFieldClearRecentsMenuItemTag = 1002;
 public static final int NSSearchFieldNoRecentsMenuItemTag = 1003;

 private static final int /* long */sel_setSearchMenuTemplate = OS.sel_registerName("setSearchMenuTemplate:");
 private static final int /* long */sel_setTag = OS.sel_registerName("setTag:");
 private static final int /* long */sel_setRecentSearches = OS.sel_registerName("setRecentSearches:");

 public NSSearchField(id id) {
  super(id);
 }

 public NSSearchField(Text text) {
  super(text.view);
 }

 public void setMenu(Menu menu) {
  try {
   Field field = Menu.class.getDeclaredField("nsMenu");
   field.setAccessible(true);

   NSMenu nsMenu = (NSMenu) field.get(menu);

   OS.objc_msgSend(this.id, sel_setSearchMenuTemplate, nsMenu.id);
  } catch (Exception e) {
   e.printStackTrace();
  }
 }

 public static boolean setTag(MenuItem menuItem, int tag) {
  try {
   Field field = MenuItem.class.getDeclaredField("nsItem");
   field.setAccessible(true);

   NSMenuItem nsMenuItem = (NSMenuItem) field.get(menuItem);
   OS.objc_msgSend(nsMenuItem.id, sel_setTag, tag);

   // no action for titles
   if (tag == NSSearchFieldRecentsTitleMenuItemTag || tag == NSSearchFieldNoRecentsMenuItemTag) {
    nsMenuItem.setAction(0);
   }
   return true;
  } catch (Exception e) {
   return false;
  }
 }

 public String[] getRecentSearches() {
  NSArray recentSearches = super.recentSearches();
  String[] recentSearchStrings = new String[recentSearches.count()];
  for (int i = 0; i &amp;lt; recentSearchStrings.length; i++) {
   recentSearchStrings[i] = (new NSString(recentSearches.objectAtIndex(i))).getString();
  }
  return recentSearchStrings;
 }

 public void setRecentSearches(String[] recentSearchStrings) {
  
  NSMutableArray recentSearches = NSMutableArray.arrayWithCapacity(recentSearchStrings.length);
  for (String aRecentSearcb : recentSearchStrings) {
   NSString nsString = NSString.stringWith(aRecentSearcb);
   recentSearches.addObject(nsString);
  }
  OS.objc_msgSend(this.id, sel_setRecentSearches, recentSearches.id);
  
 }
}
&lt;/pre&gt;&lt;br /&gt;
Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;br/&gt;&lt;br/&gt;
&lt;p style="border: 1px solid rgb(198, 198, 198); padding: 10px; color: rgb(51, 51, 51); font-family: 'Lucida Grande',sans-serif; font-size: 1.1em; background-color: rgb(255, 255, 198); margin-bottom: 10px;"&gt; 
From &lt;a href="http://blog.eclipse-tips.com"&gt;Eclipse Tips&lt;/a&gt;
&lt;br/&gt;
Like the tip? Subscribe via &lt;a href="http://feeds.feedburner.com/cypal"&gt;RSS&lt;/a&gt; or &lt;a href="http://bit.ly/EclipseTipsViaEmail"&gt;Email&lt;/a&gt; or &lt;a href="https://twitter.com/Eclipse_Tips"&gt;Twitter&lt;/a&gt;
&lt;/p&gt;
&lt;br/&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1557780184357927241-838666877859722878?l=blog.eclipse-tips.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cypal/~4/_1WqCtWp3MY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.eclipse-tips.com/feeds/838666877859722878/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.eclipse-tips.com/2009/05/search-menu-in-mac-implementation.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/838666877859722878?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/838666877859722878?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cypal/~3/_1WqCtWp3MY/search-menu-in-mac-implementation.html" title="Search menu in Mac - the implementation" /><author><name>Prakash G.R.</name><uri>http://www.blogger.com/profile/13046268367318873066</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="08225524632456251201" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_hsp14iFkRLs/Sh-s6fxoaXI/AAAAAAAADoI/Q0n2b1lKuec/s72-c/Tweetie_Mac_Search_Menu1.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://blog.eclipse-tips.com/2009/05/search-menu-in-mac-implementation.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkUESH4zeyp7ImA9WxJQFUQ.&quot;"><id>tag:blogger.com,1999:blog-1557780184357927241.post-5683512156685396104</id><published>2009-05-26T17:24:00.001+05:30</published><updated>2009-05-29T15:13:29.083+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-29T15:13:29.083+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Mac" /><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="workbench" /><category scheme="http://www.blogger.com/atom/ns#" term="swt" /><title>Search menu in Mac</title><content type="html">In Mac applications, the little search box can have a pull down menu (similar to a View's pull down menu). It can have recent searches, user contributed menu entries, a menu item for clearing the recent searches etc. Here is the search box of Tweetie (the twitter app that I use):&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_hsp14iFkRLs/ShvX5ccsbkI/AAAAAAAADns/vuhs0Z4n25o/s1600-h/Tweetie_Mac_Search_Menu.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_hsp14iFkRLs/ShvX5ccsbkI/AAAAAAAADns/vuhs0Z4n25o/s400/Tweetie_Mac_Search_Menu.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Eclipse by default offers the SWT.SEARCH style which will bring this search box instead of the default text box. But there is no option to add the menu. For today's SWT-Cocoa hack, I tried to enhance the Search box with the search menu and here is the result:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_hsp14iFkRLs/ShvX6NZwCPI/AAAAAAAADn0/o-4tfxj8BNw/s1600-h/SWT_Mac_Search.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_hsp14iFkRLs/ShvX6NZwCPI/AAAAAAAADn0/o-4tfxj8BNw/s400/SWT_Mac_Search.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
The code is so ugly that I can't post it in public yet. Will post it with refinements tomorrow.&lt;br /&gt;
&lt;br /&gt;
Update: The implementation is &lt;a href="http://blog.eclipse-tips.com/2009/05/search-menu-in-mac-implementation.html"&gt;available here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;br/&gt;&lt;br/&gt;
&lt;p style="border: 1px solid rgb(198, 198, 198); padding: 10px; color: rgb(51, 51, 51); font-family: 'Lucida Grande',sans-serif; font-size: 1.1em; background-color: rgb(255, 255, 198); margin-bottom: 10px;"&gt; 
From &lt;a href="http://blog.eclipse-tips.com"&gt;Eclipse Tips&lt;/a&gt;
&lt;br/&gt;
Like the tip? Subscribe via &lt;a href="http://feeds.feedburner.com/cypal"&gt;RSS&lt;/a&gt; or &lt;a href="http://bit.ly/EclipseTipsViaEmail"&gt;Email&lt;/a&gt; or &lt;a href="https://twitter.com/Eclipse_Tips"&gt;Twitter&lt;/a&gt;
&lt;/p&gt;
&lt;br/&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1557780184357927241-5683512156685396104?l=blog.eclipse-tips.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cypal/~4/4NrSzbxY5QQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.eclipse-tips.com/feeds/5683512156685396104/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.eclipse-tips.com/2009/05/search-menu-in-mac.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/5683512156685396104?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/5683512156685396104?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cypal/~3/4NrSzbxY5QQ/search-menu-in-mac.html" title="Search menu in Mac" /><author><name>Prakash G.R.</name><uri>http://www.blogger.com/profile/13046268367318873066</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="08225524632456251201" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_hsp14iFkRLs/ShvX5ccsbkI/AAAAAAAADns/vuhs0Z4n25o/s72-c/Tweetie_Mac_Search_Menu.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://blog.eclipse-tips.com/2009/05/search-menu-in-mac.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C04ESXs8fyp7ImA9WxJQEE8.&quot;"><id>tag:blogger.com,1999:blog-1557780184357927241.post-4762226622898038483</id><published>2009-05-23T01:17:00.002+05:30</published><updated>2009-05-23T01:21:48.577+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-23T01:21:48.577+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jface" /><category scheme="http://www.blogger.com/atom/ns#" term="Mac" /><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="workbench" /><category scheme="http://www.blogger.com/atom/ns#" term="swt" /><title>Badge label on Mac Dock icon</title><content type="html">I'm passionate on both Mac and Eclipse. Although Eclipse runs well on a Mac, its not a marriage made in heaven. Its really hard to get the complete Mac experience with a portable UI tool kit. If you think of features like &lt;a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=246165" linkindex="68"&gt;this one&lt;/a&gt;, its actually endless list. One such thing is the badge on the Dock Icon. In Mac, the Dock icon can have a badge - like the number of unread mails in your inbox. How much effort does it takes to add a badge to our RCP mail sample? Not much. Since SWT doesn't have a NSDockTile, we need a NSDockTile class with two methods, one to get the DockTile for the application and the other to set the badge on it (there is an easier way by using the Mac Generator tool, but that will be a patch to SWT itself, which I wanted to avoid):&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java; collapse: true"&gt;/**
 * @author Prakash G.R. (grprakash@gmail.com) 
 * 
 */
@SuppressWarnings("restriction")
public class NSDockTile extends NSResponder {

 private static final int sel_setBadgeLabel_ = OS.sel_registerName("setBadgeLabel:");
 private static final int sel_dockTile_ = OS.sel_registerName("dockTile");
 private static final int sel_display_ = OS.sel_registerName("display");

 public NSDockTile(int id) {
  super(id);
 }

 public static NSDockTile getApplicationDockTile() {
  NSApplication sharedApplication = NSApplication.sharedApplication();
  int id = OS.objc_msgSend(sharedApplication.id, sel_dockTile_);
  NSDockTile dockTile = new NSDockTile(id);
  return dockTile;
 }

 public void setBadgeLabel(String badgeLabel) {
   NSString nsBadgeLabel = NSString.stringWith(badgeLabel);
   OS.objc_msgSend(this.id, sel_setBadgeLabel_, nsBadgeLabel.id);
   OS.objc_msgSend(this.id, sel_display_);
 }
}
&lt;/pre&gt;&lt;br /&gt;
And a two line code to set the badge:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java;"&gt;NSDockTile nsDockTile = NSDockTile.getApplicationDockTile();
nsDockTile.setBadgeLabel("6");
&lt;/pre&gt;&lt;br /&gt;
There you go in the dock icon and in the minimized window:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_hsp14iFkRLs/Shb96m7JMzI/AAAAAAAADnE/h7fEqJoOjTo/s1600-h/RCPMailDock.png" imageanchor="1" linkindex="69" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_hsp14iFkRLs/Shb96m7JMzI/AAAAAAAADnE/h7fEqJoOjTo/s400/RCPMailDock.png" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/_hsp14iFkRLs/Shb97sot5fI/AAAAAAAADnM/h14qB8Ocvg8/s1600-h/RCPMailWindow.png" imageanchor="1" linkindex="70" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_hsp14iFkRLs/Shb97sot5fI/AAAAAAAADnM/h14qB8Ocvg8/s400/RCPMailWindow.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
In case you were wondering how the GMail icon for the application is set, here is the code for that:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java;"&gt;ImageDescriptor imageDescriptor = ImageDescriptor.createFromURL(iconUrl);
Image image = imageDescriptor.createImage();
NSApplication app = NSApplication.sharedApplication();
app.setApplicationIconImage(image.handle);
&lt;/pre&gt;&lt;br /&gt;
Oh, BTW, I've just started learning Objective C, Cocoa &amp;amp; related things. So stay tuned, you will see more Mac related posts here. Also what is your favourite Mac feature that you are missing in Eclipse?&lt;div class="blogger-post-footer"&gt;&lt;br/&gt;&lt;br/&gt;
&lt;p style="border: 1px solid rgb(198, 198, 198); padding: 10px; color: rgb(51, 51, 51); font-family: 'Lucida Grande',sans-serif; font-size: 1.1em; background-color: rgb(255, 255, 198); margin-bottom: 10px;"&gt; 
From &lt;a href="http://blog.eclipse-tips.com"&gt;Eclipse Tips&lt;/a&gt;
&lt;br/&gt;
Like the tip? Subscribe via &lt;a href="http://feeds.feedburner.com/cypal"&gt;RSS&lt;/a&gt; or &lt;a href="http://bit.ly/EclipseTipsViaEmail"&gt;Email&lt;/a&gt; or &lt;a href="https://twitter.com/Eclipse_Tips"&gt;Twitter&lt;/a&gt;
&lt;/p&gt;
&lt;br/&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1557780184357927241-4762226622898038483?l=blog.eclipse-tips.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cypal/~4/K3GxaV-btwU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.eclipse-tips.com/feeds/4762226622898038483/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.eclipse-tips.com/2009/05/badge-label-on-mac-dock-icon.html#comment-form" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/4762226622898038483?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/4762226622898038483?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cypal/~3/K3GxaV-btwU/badge-label-on-mac-dock-icon.html" title="Badge label on Mac Dock icon" /><author><name>Prakash G.R.</name><uri>http://www.blogger.com/profile/13046268367318873066</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="08225524632456251201" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_hsp14iFkRLs/Shb96m7JMzI/AAAAAAAADnE/h7fEqJoOjTo/s72-c/RCPMailDock.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">5</thr:total><feedburner:origLink>http://blog.eclipse-tips.com/2009/05/badge-label-on-mac-dock-icon.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkICRnk5eip7ImA9WxJRFEw.&quot;"><id>tag:blogger.com,1999:blog-1557780184357927241.post-9040372474361125777</id><published>2009-05-16T00:37:00.001+05:30</published><updated>2009-05-16T00:39:27.722+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-16T00:39:27.722+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="RCP" /><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="3.5" /><category scheme="http://www.blogger.com/atom/ns#" term="workbench" /><title>Creating a custom Property View</title><content type="html">In an RCP application, you might need a Properties View, which shows only the properties of a specific view or a set of views. But the generic Properties View will show from all the other views that support it. Armed up with the knowledge of &lt;a href="http://blog.eclipse-tips.com/2009/05/how-to-create-pagebookview.html"&gt;how a PageBookView works&lt;/a&gt;, lets see how to hack the Properties View to listen only to a specific view.&lt;br /&gt;
&lt;br /&gt;
The isImportant() method is the one which decides whether to create an IPage for the specific IWorkbenchPart or not. The idea is to override that method and return false for all the workbenchPart that we are not interested in. Lets create the view first:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;view
            class="com.eclipse_tips.views.CustomPropertiesView"
            icon="icons/sample.gif"
            id="com.eclipse-tips.views.customePropertiesView"
            name="My Properties View"&amp;gt;
&amp;lt;/view&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
The CustomPropertiesView should extend PropertySheet and override the isImportant():&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt;public class CustomPropertiesView extends PropertySheet {

 @Override
 protected boolean isImportant(IWorkbenchPart part) {
  if (part.getSite().getId().equals(IPageLayout.ID_PROJECT_EXPLORER))
   return true;
  return false;
 }
}&lt;/pre&gt;&lt;br /&gt;
In this case, I'm making the view only to respond to Project Explorer and ignore other views. Here is the CustomPropertyView in action:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_hsp14iFkRLs/Sg28Nwe3QSI/AAAAAAAADko/DqnVd7obB1Y/s1600-h/CustomPropertiesProjectExplore.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_hsp14iFkRLs/Sg28Nwe3QSI/AAAAAAAADko/DqnVd7obB1Y/s320/CustomPropertiesProjectExplore.png" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&amp;nbsp;&lt;a href="http://4.bp.blogspot.com/_hsp14iFkRLs/Sg28VbUXjHI/AAAAAAAADkw/J6Bv2_uIkwU/s1600-h/CustomPropertiesNavigator.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_hsp14iFkRLs/Sg28VbUXjHI/AAAAAAAADkw/J6Bv2_uIkwU/s320/CustomPropertiesNavigator.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
If you are on 3.5 or above, you would see the Pin Action in your Custom Properties View. If you don't want the Pin action in your properties view, there is no way to prevent the PropertySheet to adding the action. The action is added to both tool bar and menu in the createControl() method. Only way to get rid of the action is to remove it after the PropertySheet adds it:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt;@Override
 public void createPartControl(Composite parent) {
  
  super.createPartControl(parent);
  IMenuManager menuManager = getViewSite().getActionBars().getMenuManager();
  IContributionItem[] items = menuManager.getItems();
  for (IContributionItem iContributionItem : items) {
   if(iContributionItem instanceof ActionContributionItem) {
    if(((ActionContributionItem) iContributionItem).getAction() instanceof PinPropertySheetAction) {
     menuManager.remove(iContributionItem);
     break;
    }
   }
  }

  IToolBarManager toolBarManager = getViewSite().getActionBars().getToolBarManager();
  items = toolBarManager.getItems();
  for (IContributionItem iContributionItem : items) {
   if(iContributionItem instanceof ActionContributionItem) {
    if(((ActionContributionItem) iContributionItem).getAction() instanceof PinPropertySheetAction)) {
     toolBarManager.remove(iContributionItem);
     break;
    }
   }
  }
 }
&lt;/pre&gt;&lt;br /&gt;
And don't forget to override the isPinned() method:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt;@Override
 public boolean isPinned() {
  return false;
 }
&lt;/pre&gt;&lt;br /&gt;
There you go:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_hsp14iFkRLs/Sg28gW12WnI/AAAAAAAADk4/Y_bxy5lHIvI/s1600-h/PinActionRemoved.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_hsp14iFkRLs/Sg28gW12WnI/AAAAAAAADk4/Y_bxy5lHIvI/s320/PinActionRemoved.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;br/&gt;&lt;br/&gt;
&lt;p style="border: 1px solid rgb(198, 198, 198); padding: 10px; color: rgb(51, 51, 51); font-family: 'Lucida Grande',sans-serif; font-size: 1.1em; background-color: rgb(255, 255, 198); margin-bottom: 10px;"&gt; 
From &lt;a href="http://blog.eclipse-tips.com"&gt;Eclipse Tips&lt;/a&gt;
&lt;br/&gt;
Like the tip? Subscribe via &lt;a href="http://feeds.feedburner.com/cypal"&gt;RSS&lt;/a&gt; or &lt;a href="http://bit.ly/EclipseTipsViaEmail"&gt;Email&lt;/a&gt; or &lt;a href="https://twitter.com/Eclipse_Tips"&gt;Twitter&lt;/a&gt;
&lt;/p&gt;
&lt;br/&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1557780184357927241-9040372474361125777?l=blog.eclipse-tips.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cypal/~4/dWaTq8NDkaM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.eclipse-tips.com/feeds/9040372474361125777/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.eclipse-tips.com/2009/05/creating-custom-property-view.html#comment-form" title="10 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/9040372474361125777?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/9040372474361125777?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cypal/~3/dWaTq8NDkaM/creating-custom-property-view.html" title="Creating a custom Property View" /><author><name>Prakash G.R.</name><uri>http://www.blogger.com/profile/13046268367318873066</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="08225524632456251201" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_hsp14iFkRLs/Sg28Nwe3QSI/AAAAAAAADko/DqnVd7obB1Y/s72-c/CustomPropertiesProjectExplore.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">10</thr:total><feedburner:origLink>http://blog.eclipse-tips.com/2009/05/creating-custom-property-view.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak4GRnk5fyp7ImA9WxJRE08.&quot;"><id>tag:blogger.com,1999:blog-1557780184357927241.post-5571902850791056235</id><published>2009-05-14T15:22:00.166+05:30</published><updated>2009-05-15T00:52:07.727+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-15T00:52:07.727+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="workbench" /><title>How to create a PageBookView</title><content type="html">Think of Properties View. It displays the properties of the selected element in the active part. Whenever the selection changes or the active part changes, it tracks them and displays the properties (unless you used the &lt;a href="http://blog.eclipse-tips.com/2008/10/multi-instance-property-view-first-look.html" linkindex="218"&gt;'Pin to selection' feature available from 3.5&lt;/a&gt;) There are many views like this, which update themselves when the active part changes. Outline view, Templates view, GEF Palette view, etc. If you want to create such view, its not a tough job - Eclipse provides you all the basic features in the class PageBookView. All you need is to extend this class and fill the void by implementing the abstract methods. Thats what we are going to see in this tip. The use case is to create a ActivePartTrackerView, which will display the name of the current active workbench part.&lt;br /&gt;
&lt;br /&gt;
First lets create a View:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;extension
         point="org.eclipse.ui.views"&amp;gt;
      &amp;lt;view
            class="com.eclipse_tips.views.SelectionView"
            icon="icons/sample.gif"
            id="com.eclipse-tips.views.pagebookview"
            name="Selection Provider View"&amp;gt;
      &amp;lt;/view&amp;gt;
   &amp;lt;/extension&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
The contents of the PageBookView is arranged in pages (IPage). There can be multiple pages, each of them is associated with a corresponding IWorkbenchPart. When the associated part becomes active, the PageBookView automatically switches to the respective page. When a PageBookView is created, it asks for a bootstrap part by calling getBootstrapPart() method. When no bootstrap part is found, it uses a default page. That default page is also shown when there are no pages for the currently active part. Lets start by creating this default page. To do that we need to implement the createDefaultPage() method, which returns the default page. Lets use the MessagePage which simply displays a string.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt;@Override
 protected IPage createDefaultPage(PageBook book) {
  MessagePage messagePage = new MessagePage();
  initPage(messagePage);
  messagePage.setMessage("No interested in this part");
  messagePage.createControl(book);
  return messagePage;
 }&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_hsp14iFkRLs/Sgxt208UPZI/AAAAAAAADkE/SR-LI-i_N3Y/s1600-h/PageBookView-defaultPage.png" imageanchor="1" linkindex="219" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_hsp14iFkRLs/Sgxt208UPZI/AAAAAAAADkE/SR-LI-i_N3Y/s320/PageBookView-defaultPage.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Now our SelectionView is up and running, except that its showing a static content not creating any IPages for the active parts. Before we create an IPage, how to determine whether to create an IPage for a given IWorkbenchPart or ignore it? Its by the isImportant() method. Lets say, we want to respond only to the parts that are contributed by the Platform UI.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt;@Override
 protected boolean isImportant(IWorkbenchPart part) {
  return part.getSite().getPluginId().startsWith("org.eclipse.ui");
 }
&lt;/pre&gt;&lt;br /&gt;
So if a Package Explorer(contributed by JDT) or the Manifest Editor(contributed by PDE) is the active part, then our SelectionView will not create any page and use the default page. If its a TextEditor or Project Explorer, then it will create the page and show it.&lt;br /&gt;
&lt;br /&gt;
To create an IPage for a given part, we need to override the doCreatePage() method. Unlike the createDefaultPage() method this doesn't return a IPage, rather a PageRec. Why? This Page Record stores additional information - the associated workbench part and action bars:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java"&gt;@Override
 protected PageRec doCreatePage(IWorkbenchPart part) {
  MessagePage messagePage = new MessagePage();
  initPage(messagePage);
  messagePage.setMessage("Page for "+part.getTitle());
  messagePage.createControl(getPageBook());
  return new PageRec(part, messagePage);
 }
&lt;/pre&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_hsp14iFkRLs/SgxuQqhOp7I/AAAAAAAADkM/JtgxVLQy4WI/s1600-h/PageBookView+ProjectExplorer.png" imageanchor="1" linkindex="220" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_hsp14iFkRLs/SgxuQqhOp7I/AAAAAAAADkM/JtgxVLQy4WI/s320/PageBookView+ProjectExplorer.png" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&amp;nbsp;&lt;a href="http://2.bp.blogspot.com/_hsp14iFkRLs/Sgxuh324AYI/AAAAAAAADkc/j5LUqVwMlPM/s1600-h/PageBookView+TextEditor.png" imageanchor="1" linkindex="221" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_hsp14iFkRLs/Sgxuh324AYI/AAAAAAAADkc/j5LUqVwMlPM/s320/PageBookView+TextEditor.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
When you are switching between the TextEditor and the ProjectExplore view, the PageBookView will track and find the page for the active part and automatically show it. When the page is no longer needed (the associated part is closed), it would call the doDestroyPage(). This is where you would ideally remove any listeners and dispose of the resources.&lt;br /&gt;
&lt;br /&gt;
So the whole class goes here:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: java; collapse: true"&gt;package com.eclipse_tips.views;

import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.part.IPage;
import org.eclipse.ui.part.MessagePage;
import org.eclipse.ui.part.PageBook;
import org.eclipse.ui.part.PageBookView;

/**
 * @author Prakash G.R.
 *
 */
public class ActivePartTrackerView extends PageBookView {

 @Override
 protected IPage createDefaultPage(PageBook book) {
  MessagePage messagePage = new MessagePage();
  initPage(messagePage);
  messagePage.setMessage("No interested in this part");
  messagePage.createControl(book);
  return messagePage;
 }

 @Override
 protected PageRec doCreatePage(IWorkbenchPart part) {
  MessagePage messagePage = new MessagePage();
  initPage(messagePage);
  messagePage.setMessage("Page for "+part.getTitle());
  messagePage.createControl(getPageBook());
  return new PageRec(part, messagePage);
 }

 @Override
 protected void doDestroyPage(IWorkbenchPart part, PageRec pageRecord) {
  pageRecord.page.dispose();
 }

 @Override
 protected IWorkbenchPart getBootstrapPart() {
  IWorkbenchPage page = getSite().getPage();
  if(page != null) {
   // check whether the active part is important to us
   IWorkbenchPart activePart = page.getActivePart();
   return isImportant(activePart)?activePart:null;
  }
  return null;
 }

 @Override
 protected boolean isImportant(IWorkbenchPart part) {
  return part.getSite().getPluginId().startsWith("org.eclipse.ui");
 }

}
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;br/&gt;&lt;br/&gt;
&lt;p style="border: 1px solid rgb(198, 198, 198); padding: 10px; color: rgb(51, 51, 51); font-family: 'Lucida Grande',sans-serif; font-size: 1.1em; background-color: rgb(255, 255, 198); margin-bottom: 10px;"&gt; 
From &lt;a href="http://blog.eclipse-tips.com"&gt;Eclipse Tips&lt;/a&gt;
&lt;br/&gt;
Like the tip? Subscribe via &lt;a href="http://feeds.feedburner.com/cypal"&gt;RSS&lt;/a&gt; or &lt;a href="http://bit.ly/EclipseTipsViaEmail"&gt;Email&lt;/a&gt; or &lt;a href="https://twitter.com/Eclipse_Tips"&gt;Twitter&lt;/a&gt;
&lt;/p&gt;
&lt;br/&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1557780184357927241-5571902850791056235?l=blog.eclipse-tips.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cypal/~4/dXsIBkgNz3w" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.eclipse-tips.com/feeds/5571902850791056235/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.eclipse-tips.com/2009/05/how-to-create-pagebookview.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/5571902850791056235?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/5571902850791056235?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cypal/~3/dXsIBkgNz3w/how-to-create-pagebookview.html" title="How to create a PageBookView" /><author><name>Prakash G.R.</name><uri>http://www.blogger.com/profile/13046268367318873066</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="08225524632456251201" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_hsp14iFkRLs/Sgxt208UPZI/AAAAAAAADkE/SR-LI-i_N3Y/s72-c/PageBookView-defaultPage.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://blog.eclipse-tips.com/2009/05/how-to-create-pagebookview.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEEHQH4-fyp7ImA9WxJREU8.&quot;"><id>tag:blogger.com,1999:blog-1557780184357927241.post-3867721587101245330</id><published>2009-05-12T16:29:00.002+05:30</published><updated>2009-05-12T16:40:31.057+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-12T16:40:31.057+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="wizards" /><category scheme="http://www.blogger.com/atom/ns#" term="dialogs" /><category scheme="http://www.blogger.com/atom/ns#" term="Mac" /><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="guidelines" /><category scheme="http://www.blogger.com/atom/ns#" term="3.5" /><category scheme="http://www.blogger.com/atom/ns#" term="workbench" /><category scheme="http://www.blogger.com/atom/ns#" term="swt" /><title>Sheet support in SWT</title><content type="html">For those who have downloaded 3.5 M7 would have seen Sheets support has been added to SWT and Platform UI has used the API wherever applicable. For those who are wondering what a Sheet means, its an eye-candy in Mac. Here is a sample of a MessageDialog shown with and without Sheet style:&lt;br /&gt;
&lt;br /&gt;
&lt;object height="395" width="714"&gt; &lt;param name="movie" value="http://content.screencast.com/users/grprakash/folders/Jing/media/42a0726e-f51c-44d3-9237-95624768131d/jingswfplayer.swf"&gt;&lt;/param&gt;&lt;param name="quality" value="high"&gt;&lt;/param&gt;&lt;param name="bgcolor" value="#FFFFFF"&gt;&lt;/param&gt;&lt;param name="flashVars" value="thumb=http://content.screencast.com/users/grprakash/folders/Jing/media/42a0726e-f51c-44d3-9237-95624768131d/FirstFrame.jpg&amp;containerwidth=714&amp;containerheight=395&amp;loaderstyle=jing&amp;content=http://content.screencast.com/users/grprakash/folders/Jing/media/42a0726e-f51c-44d3-9237-95624768131d/00000003.swf"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="scale" value="showall"&gt;&lt;/param&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;/param&gt;&lt;param name="base" value="http://content.screencast.com/users/grprakash/folders/Jing/media/42a0726e-f51c-44d3-9237-95624768131d/"&gt;&lt;/param&gt;&lt;embed src="http://content.screencast.com/users/grprakash/folders/Jing/media/42a0726e-f51c-44d3-9237-95624768131d/jingswfplayer.swf" quality="high" bgcolor="#FFFFFF" width="714" height="395" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="thumb=http://content.screencast.com/users/grprakash/folders/Jing/media/42a0726e-f51c-44d3-9237-95624768131d/FirstFrame.jpg&amp;containerwidth=714&amp;containerheight=395&amp;loaderstyle=jing&amp;content=http://content.screencast.com/users/grprakash/folders/Jing/media/42a0726e-f51c-44d3-9237-95624768131d/00000003.swf" allowFullScreen="true" base="http://content.screencast.com/users/grprakash/folders/Jing/media/42a0726e-f51c-44d3-9237-95624768131d/" scale="showall"&gt;&lt;/embed&gt; &lt;/object&gt;&lt;br /&gt;
&lt;br /&gt;
(in case you didn't notice the obvious, I'm back on a Mac :-P)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;So what is a Sheet?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
A Sheet is essentially a Dialog, which is tied to a parent window. It acts as a Modal Dialog, so the user cannot perform any operations on a window until the Dialog is dismissed. (He is free to work on other windows) The dialog is&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;always attached with the window until dismissed&lt;/li&gt;
&lt;li&gt;placed in the center of the window&lt;/li&gt;
&lt;li&gt;moves along when the window is moved&lt;/li&gt;
&lt;/ul&gt;&lt;b&gt; To Sheet or not to Sheet?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Use Sheets when the interaction is very short like the question "Is Eclipse a cool product?&amp;nbsp; &lt;yes&gt; &lt;no&gt;". Opening a 15 step Wizard to choose your life partner is not right place to use Sheet.&lt;/no&gt;&lt;/yes&gt;&lt;/li&gt;
&lt;li&gt;&lt;yes&gt;&lt;no&gt;Do not use Sheets where the user might still need to interact with the Window (like copy something from window and paste it in the Sheet). Since Sheets are Window Modal, it doesn't allow the user to interact with the associated Window &lt;br /&gt;
&lt;/no&gt;&lt;/yes&gt;&lt;/li&gt;
&lt;li&gt;Sheets are not Application Modal. So if you want a dialog to be Application Modal, don' use Sheets&lt;/li&gt;
&lt;li&gt;Unlike normal Dialogs, Sheets do not have title. Avoid Sheets where title provides valuable information.&lt;/li&gt;
&lt;li&gt; Do not use nested Sheets (says Apple's UI guidelines)&lt;/li&gt;
&lt;/ul&gt;&lt;b&gt;How do I use Sheet?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Simple. Set the SWT.Sheet style to the Shell of the dialog. In case you are using the MessageDialog, pass on the style bit as the last argument to the MessageDialog.open() method&lt;div class="blogger-post-footer"&gt;&lt;br/&gt;&lt;br/&gt;
&lt;p style="border: 1px solid rgb(198, 198, 198); padding: 10px; color: rgb(51, 51, 51); font-family: 'Lucida Grande',sans-serif; font-size: 1.1em; background-color: rgb(255, 255, 198); margin-bottom: 10px;"&gt; 
From &lt;a href="http://blog.eclipse-tips.com"&gt;Eclipse Tips&lt;/a&gt;
&lt;br/&gt;
Like the tip? Subscribe via &lt;a href="http://feeds.feedburner.com/cypal"&gt;RSS&lt;/a&gt; or &lt;a href="http://bit.ly/EclipseTipsViaEmail"&gt;Email&lt;/a&gt; or &lt;a href="https://twitter.com/Eclipse_Tips"&gt;Twitter&lt;/a&gt;
&lt;/p&gt;
&lt;br/&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1557780184357927241-3867721587101245330?l=blog.eclipse-tips.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cypal/~4/HcKntuxxQKg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.eclipse-tips.com/feeds/3867721587101245330/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.eclipse-tips.com/2009/05/sheet-support-in-swt.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/3867721587101245330?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/3867721587101245330?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cypal/~3/HcKntuxxQKg/sheet-support-in-swt.html" title="Sheet support in SWT" /><author><name>Prakash G.R.</name><uri>http://www.blogger.com/profile/13046268367318873066</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="08225524632456251201" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://blog.eclipse-tips.com/2009/05/sheet-support-in-swt.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEIASHY7fip7ImA9WxBQFks.&quot;"><id>tag:blogger.com,1999:blog-1557780184357927241.post-3809991569368288397</id><published>2009-05-12T14:57:00.003+05:30</published><updated>2010-01-16T23:59:09.806+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-16T23:59:09.806+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="eclipse" /><category scheme="http://www.blogger.com/atom/ns#" term="3.5" /><category scheme="http://www.blogger.com/atom/ns#" term="Commands" /><category scheme="http://www.blogger.com/atom/ns#" term="workbench" /><title>Commands Part 7: Adding standard commands</title><content type="html">In the earlier installments, we have seen adding our commands to menus and toolbars. But what about the standard menu items like Cut, Copy, Paste etc? We'll see how to add these to a context menu of the Sample View.&lt;br /&gt;
&lt;br /&gt;
Create the Sample View through the PDE's Extension Point Wizard. In the SampleView class, notice these lines:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #3333ff; font-family: monospace;"&gt;private void hookContextMenu() {&lt;br /&gt;
&lt;br /&gt;
// rest of the code...&lt;br /&gt;
getSite().registerContextMenu(menuMgr, viewer);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
private void fillContextMenu(IMenuManager manager) {&lt;br /&gt;
&lt;br /&gt;
//rest of the code&lt;br /&gt;
manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));&lt;br /&gt;
}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The first one registers this context menu, so that other plugins can contribute their commands to it. The second one adds a separator, which serves as a place holder/location where the contribution goes. So the SampleView is ready to accept the contributions, lets now contribute:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #3333ff; font-family: monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;extension&lt;br /&gt;
point="org.eclipse.ui.menus"&amp;gt;&lt;br /&gt;
&amp;lt;menuContribution&lt;br /&gt;
locationURI="popup:com.eclipse_tips.commands.part7.views.SampleView?after=additions"&amp;gt;&lt;br /&gt;
&amp;lt;command commandId="org.eclipse.ui.edit.cut"/&amp;gt;&lt;br /&gt;
&amp;lt;command commandId="org.eclipse.ui.edit.copy"/&amp;gt;&lt;br /&gt;
&amp;lt;command commandId="org.eclipse.ui.edit.paste"/&amp;gt;&lt;br /&gt;
&amp;lt;/menuContribution&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The id for the context menu, is by default the View's id, and we add our contribution after the separator. We can add any command, either the Platform defined or our own. Result:&lt;br /&gt;
&lt;br /&gt;
&lt;div align="center"&gt;&lt;img alt="" src="http://lh6.ggpht.com/_hsp14iFkRLs/SglA2CzYkuI/AAAAAAAADj8/lf20NWfFSvY/%5BUNSET%5D.png?imgmax=800" /&gt;&lt;/div&gt;&lt;br /&gt;
Now we have the menu items, images, shortcut keys everything in place (you ought to love the command framework :-)), except that the items are not enabled. Its because there is no handler for these commands for the given context. There are multiple ways to contribute the handler, since we are adding this to our view, lets use the activePartId variable:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #3333ff; font-family: monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;extension&lt;br /&gt;
point="org.eclipse.ui.handlers"&amp;gt;&lt;br /&gt;
&amp;lt;handler&lt;br /&gt;
class="com.eclipse_tips.commands.part7.handlers.CutHandler"&lt;br /&gt;
commandId="org.eclipse.ui.edit.cut"&amp;gt;&lt;br /&gt;
&amp;lt;activeWhen&amp;gt;&lt;br /&gt;
&amp;lt;with&lt;br /&gt;
variable="activePartId"&amp;gt;&lt;br /&gt;
&amp;lt;equals&lt;br /&gt;
value="com.eclipse_tips.commands.part7.views.SampleView"&amp;gt;&lt;br /&gt;
&amp;lt;/equals&amp;gt;&lt;br /&gt;
&amp;lt;/with&amp;gt;&lt;br /&gt;
&amp;lt;/activeWhen&amp;gt;&lt;br /&gt;
&amp;lt;/handler&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Other commands also have similar handlers. Now:&lt;br /&gt;
&lt;br /&gt;
&lt;div align="center"&gt;&lt;img alt="" src="http://lh4.ggpht.com/_hsp14iFkRLs/SglA3iQguMI/AAAAAAAADkA/qFQNOd4ytOI/%5BUNSET%5D.png?imgmax=800" /&gt;&lt;/div&gt;&lt;br /&gt;
There you go. In the similar way you can add all the standard commands to any menu/context menu you prefer. Just make sure that you have the handler for the commands with the right activeWhen &amp;amp; enabledWhen expression.&lt;br /&gt;
&lt;br /&gt;
The standard command Ids can be found in the IWorkbenchCommandConstants class (available in 3.5)&lt;div class="blogger-post-footer"&gt;&lt;br/&gt;&lt;br/&gt;
&lt;p style="border: 1px solid rgb(198, 198, 198); padding: 10px; color: rgb(51, 51, 51); font-family: 'Lucida Grande',sans-serif; font-size: 1.1em; background-color: rgb(255, 255, 198); margin-bottom: 10px;"&gt; 
From &lt;a href="http://blog.eclipse-tips.com"&gt;Eclipse Tips&lt;/a&gt;
&lt;br/&gt;
Like the tip? Subscribe via &lt;a href="http://feeds.feedburner.com/cypal"&gt;RSS&lt;/a&gt; or &lt;a href="http://bit.ly/EclipseTipsViaEmail"&gt;Email&lt;/a&gt; or &lt;a href="https://twitter.com/Eclipse_Tips"&gt;Twitter&lt;/a&gt;
&lt;/p&gt;
&lt;br/&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1557780184357927241-3809991569368288397?l=blog.eclipse-tips.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cypal/~4/9e9sY9JShLY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.eclipse-tips.com/feeds/3809991569368288397/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.eclipse-tips.com/2009/05/commands-part-7-adding-standard.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/3809991569368288397?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/3809991569368288397?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cypal/~3/9e9sY9JShLY/commands-part-7-adding-standard.html" title="Commands Part 7: Adding standard commands" /><author><name>Prakash G.R.</name><uri>http://www.blogger.com/profile/13046268367318873066</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="08225524632456251201" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://blog.eclipse-tips.com/2009/05/commands-part-7-adding-standard.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU4DSHkzeSp7ImA9WxVaEEU.&quot;"><id>tag:blogger.com,1999:blog-1557780184357927241.post-648909486460899790</id><published>2009-04-07T11:20:00.001+05:30</published><updated>2009-04-07T11:29:39.781+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-07T11:29:39.781+05:30</app:edited><title>[Off Topic] Thank you!</title><content type="html">&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;When Google Web Tookit was released to the public, I played with it and realized that an Eclipse plug-in could simply few things. Since I didn't find any, I started learning Eclipse plug-in development to create &lt;a href="http://code.google.com/p/cypal-studio" target="_blank"&gt;one&lt;/a&gt;. I've fallen in love with Eclipse and its been a wonderful journey since then. I created this blog to publish the tips I've learnt. Shifted myself from server-side-runtime to IDE. I was the first guy to offer Eclipse Plug-in development training in India. With few like-minded-friends, we even started &lt;a href="http://www.cypal.in" target="_blank"&gt;a company&lt;/a&gt; to do this training. The clientele includes several small companies and big companies as well. When IBM extended the Eclipse team in Asia, I was the first hire and moved to Eclipse Platform UI team. Last week my &lt;a href="http://dev.eclipse.org/mhonarc/lists/platform-ui-dev/msg04150.html" target="_blank"&gt;committer election&lt;/a&gt; successfully concluded and I've become a &lt;a href="http://dev.eclipse.org/mhonarc/lists/platform-ui-dev/msg04168.html" target="_blank"&gt;committer now&lt;/a&gt;! Its one of my happiest moments and this blog has been partially responsible for all of this. I've learnt so many &lt;a href="http://blog.eclipse-tips.com/2008/08/adding-color-and-font-preferences.html" target="_blank"&gt;things&lt;/a&gt; &lt;a href="http://blog.eclipse-tips.com/2008/07/selection-dialogs-in-eclipse.html" target="_blank"&gt;just&lt;/a&gt; &lt;a href="http://blog.eclipse-tips.com/2008/05/single-column-tableviewer-and.html" target="_blank"&gt;for&lt;/a&gt; &lt;a href="http://blog.eclipse-tips.com/2008/01/how-to-add-trayitem-in-eclipse-rcp.html" target="_blank"&gt;the&lt;/a&gt; &lt;a href="http://blog.eclipse-tips.com/2008/10/extending-filtereditemsselectiondialog.html" target="_blank"&gt;sake&lt;/a&gt;&amp;#160;&lt;a href="http://blog.eclipse-tips.com/2008/05/how-to-add-new-resource-to-working-sets.html" target="_blank"&gt;of&lt;/a&gt; &lt;a href="http://blog.eclipse-tips.com/2008/10/multi-instance-property-view-first-look.html" target="_blank"&gt;publishing&lt;/a&gt; &lt;a href="http://blog.eclipse-tips.com/2008/11/creating-custom-marker-view.html" target="_blank"&gt;tips&lt;/a&gt;.&lt;/p&gt;    &lt;p&gt;I really thank all of the readers of this blog. Your comments, emails, queries kept me going. Thanks!&lt;/p&gt;&lt;/blockquote&gt;  &lt;div class="blogger-post-footer"&gt;&lt;br/&gt;&lt;br/&gt;
&lt;p style="border: 1px solid rgb(198, 198, 198); padding: 10px; color: rgb(51, 51, 51); font-family: 'Lucida Grande',sans-serif; font-size: 1.1em; background-color: rgb(255, 255, 198); margin-bottom: 10px;"&gt; 
From &lt;a href="http://blog.eclipse-tips.com"&gt;Eclipse Tips&lt;/a&gt;
&lt;br/&gt;
Like the tip? Subscribe via &lt;a href="http://feeds.feedburner.com/cypal"&gt;RSS&lt;/a&gt; or &lt;a href="http://bit.ly/EclipseTipsViaEmail"&gt;Email&lt;/a&gt; or &lt;a href="https://twitter.com/Eclipse_Tips"&gt;Twitter&lt;/a&gt;
&lt;/p&gt;
&lt;br/&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1557780184357927241-648909486460899790?l=blog.eclipse-tips.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/cypal/~4/4ET4MSHqJBI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.eclipse-tips.com/feeds/648909486460899790/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.eclipse-tips.com/2009/04/off-topic-thank-you.html#comment-form" title="10 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/648909486460899790?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1557780184357927241/posts/default/648909486460899790?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cypal/~3/4ET4MSHqJBI/off-topic-thank-you.html" title="[Off Topic] Thank you!" /><author><name>Prakash G.R.</name><uri>http://www.blogger.com/profile/13046268367318873066</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="08225524632456251201" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">10</thr:total><feedburner:origLink>http://blog.eclipse-tips.com/2009/04/off-topic-thank-you.html</feedburner:origLink></entry></feed>
