<?xml version="1.0"?>
<rss version="2.0">
<channel>
  <title>The Kitchen in the Zoo - eclipse tag</title>
  <link>http://blog.maxant.co.uk:80/pebble/tags/eclipse/</link>
  <description>&lt;small&gt;A blog where Ant writes about anything he finds interesting! &lt;a href=&#039;http://www.linkedin.com/in/maxant&#039;&gt;&lt;font color=&#039;white&#039;&gt;Who is Ant?&lt;/font&gt;&lt;/a&gt;      &lt;a href=&#039;/pebble/pages/copyright.html&#039;&gt;&lt;font color=&#039;white&#039;&gt;Copyright 2005-2012 Ant Kutschera&lt;/font&gt;&lt;/a&gt;&lt;/small&gt;</description>
  <language>en</language>
  <copyright>Ant Kutschera</copyright>
  <lastBuildDate>Thu, 10 May 2012 20:07:00 GMT</lastBuildDate>
  <generator>Pebble (http://pebble.sourceforge.net)</generator>
  <docs>http://backend.userland.com/rss</docs>
  
  
  <item>
    <title>Hacking Maven</title>
    <link>http://blog.maxant.co.uk:80/pebble/2012/05/10/1336680420000.html</link>
    
      
        <description>
          &lt;p&gt;We don&#039;t use M2Eclipse to integrate Maven and Eclipse, partly because we had some bad experiences a couple of years ago when we were still using Eclipse 3.4 and partly because some of our developers use IBMs RAD to develop, and it doesn&#039;t  (or at least wasn&#039;t) compatible.  Our process is to update our local sources from SVN and then to run  Maven&#039;s eclipse:eclipse locally with the relevant workspace setting so that our .project and .classpath files are generated, based on the dependencies and other information in the POMs.  It works well enough, but the plan is indeed to move to M2Eclipse at some stage soon. &lt;br /&gt;
&lt;br /&gt;
We have parent POMs for each sub-system (each of which is made of several Eclipse projects).   Some of us pull multiple sub-systems into our workspaces which is useful when you refactor  interfaces between sub-systems, because Eclipse can refactor the code which calls the   interfaces at the same time as you refactor the interfaces, saving lots of work.  Maven generates  .classpath files for Eclipse which reference everything in the workspace as a source projet rather than a  JAR out of the local Maven repo.  That is important because if Maven created JAR references and not project references, Eclipse&#039;s refactoring wouldn&#039;t adjust the code calling the refactored code. &lt;br /&gt;
&lt;br /&gt;
10 days ago we switched from a build process based on continuum and archiva to jenkins and nexus.  All of a sudden we lost some of the source references which were replaced with JAR references.  If a project was referred to in a parent POM then it was referenced as a project in Eclipse, but if it was a sub-system built using a second parent POM, then Eclipse was referring to the project as a JAR from the local Maven repo.  That was bad news for our refactoring!  Here is an example of what used to happen:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;code&gt;subsystem-a-project-1&lt;/code&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;code&gt;subsystem-a-project-2&lt;/code&gt; references subsystem-a-project-1 as a project&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;code&gt;subsystem-b-project-1&lt;/code&gt; references subsystem-a-project-1 as a &lt;b&gt;project&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is what was happening when we used Jenkins and Nexus:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;code&gt;subsystem-a-project-1&lt;/code&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;code&gt;subsystem-a-project-2&lt;/code&gt; references subsystem-a-project-1 as a project&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;code&gt;subsystem-b-project-1&lt;/code&gt; references subsystem-a-project-1 as a &lt;b&gt;JAR!!!&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
At the same time as moving to Jenkins and Nexus, we upgraded a few libraries and our organisational POM.  We also moved our parent POMs from the root directory of the sub-system into a project for the parent (in preparation for using M2Eclipse which prefers having the parent POM in the workspace).&lt;br /&gt;
&lt;br /&gt;
The question was, where do we start looking?  Some people suggested it was because we&#039;d moved the parent POM, others thought it was because we&#039;d updated a version of a library on which eclipse:eclipse might have a dependency and others were of the opinion we had to return to Continuum and Archiva.&lt;br /&gt;
&lt;br /&gt;
One of our sharp eyed developers noticed that we were getting the following output on the command line during the local Maven build:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;code&gt;Artifact subsystem-a-project-1 already available as a workspace project, but with different version...&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
That was the single find which led to us solving the problem quickly.  I downloaded the source of eclipse:eclipse from Maven central, under org/apache/maven/plugins/maven-eclipse-plugin.  I created a dummy Java project in Eclipse.  Next, I added the following environment variable to my command line from where I run Maven:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;code&gt;set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=28000&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
That tells the JRE to open a debug port and wait until a debugger is connected before running the app.  Running a Java program with those args makes it output &amp;quot;&lt;code&gt;Listening for transport dt_socket at address: 28000&lt;/code&gt;&amp;quot;.  In Eclipse I went to the debug run configurations and added a remote connection at localhost on port 28000.  It needs a project, so I added the dummy project I&#039;d just created.  I connected and Maven continued to run now that I was connected.  The next step was to add the Maven Plugin source code which I&#039;d downloaded from Maven Central. By right clicking on the debug view in the debug perspective (click on the tree), it is possible to add/update source attachments, and I added the sources JAR that I&#039;d downloaded.  The last bit was to find a suitable breakpoint.  I extracted the sources from the downloaded ZIP and searched the files for the text which was being output by Maven which was hinting at the problem (&amp;quot;already available as a workspace project&amp;quot;).  &lt;code&gt;EclipsePlugin&lt;/code&gt; was the suspect class!&lt;br /&gt;
&lt;br /&gt;
I added the eclipse:eclipse JAR to my dummy project so that I could open the class in Eclipse using ctrl+shift+t.  Eclipse opened the class, but hadn&#039;t worked out that the source from the source attachment belongs to that class.  There is a button in the editor to attach the source by locating the JAR downloaded from Maven Central and Eclipse then showed the source code and I was able to add a breakpoint.  By this time Maven had finished, so I restarted it and this time I hit the breakpoint, and the problem became quite clear.  For some reason, rather than the version being a simple SNAPSHOT version, it contained a timestamp.  The eclipse:eclipse plugin was of the opinion that I didn&#039;t have the correct code in the workspace, and so rather than create a project reference, it created a JAR reference based on the JAR in the local Maven repo.&lt;br /&gt;
&lt;br /&gt;
The internet is full of information about how Maven3 now uses unqiue timestamps for each build artefact deployed to the repo.  There were some references saying you could disable it for Maven2 (which we still use), but when you move to Maven3 you can&#039;t disable it.  I thought about submitting a bug report to Codehaus (who supplies the eclipe:eclipse plugin), but it occurred to me that we were still referencing version 2.8 in our organisational POM and I&#039;d spotted a 2.9 version when I was at Maven Central.  So I updated the organisational POM to use version 2.9 of eclipse:eclipse and gave that a shot.&lt;br /&gt;
&lt;br /&gt;
Hooray!  23:17 and I&#039;d fixed our problem.  Shame I had a 06:30 start the next day for a meeting :-/&lt;br /&gt;
&lt;br /&gt;
This isn&#039;t the first time that we&#039;ve made the mistake of doing too much in a migration.  We could have stuck with Continuum and Archiva when we updated our org-POM, and then step for step migrated to Nexus (still using Archiva) and then finally moved over to Nexus.  Had we done that, we might not have had the problems we did; but the effort of a slow migration might also have been larger.&lt;br /&gt;
&lt;br /&gt;
For me, the point to take away is that it easier to debug maven and go straight to the source of the problem, than it is to attempt to fix the problem by trail and error, as we were doing before I debugged Maven.  Debugging Maven might sound like it&#039;s advanced or complicated, but it&#039;s damn fun - it&#039;s real hacking and the feeling of solving a puzzle in this way makes the effort worth it.  I fully recommend it if for no other reason that you get exposed to reading other peoples (open source) code.&lt;br /&gt;
&lt;br /&gt;
Copyright &amp;copy; 2012, Ant Kutschera &lt;/p&gt;&lt;div class=&#034;tags&#034;&gt;&lt;span&gt;Social Bookmarks : &lt;/span&gt;&amp;nbsp;&lt;a href=&#034;http://slashdot.org/bookmark.pl?url=http://blog.maxant.co.uk:80/pebble/2012/05/10/1336680420000.html&amp;amp;title=Hacking+Maven&#034; target=&#034;_blank&#034; title=&#034;Add this post to Slash Dot&#034;&gt;&lt;img src=&#034;common/images/slashdot.png&#034; alt=&#034;Add this post to Slashdot&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://digg.com/submit?url=http://blog.maxant.co.uk:80/pebble/2012/05/10/1336680420000.html&amp;amp;title=Hacking+Maven&#034; target=&#034;_blank&#034; title=&#034;Digg this post&#034;&gt;&lt;img src=&#034;common/images/digg.png&#034; alt=&#034;Add this post to Digg&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://reddit.com/submit?url=http://blog.maxant.co.uk:80/pebble/2012/05/10/1336680420000.html&amp;amp;title=Hacking+Maven&#034; target=&#034;_blank&#034; title=&#034;Add this post to Reddit&#034;&gt;&lt;img src=&#034;common/images/reddit.png&#034; alt=&#034;Add this post to Reddit&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://del.icio.us/post?url=http://blog.maxant.co.uk:80/pebble/2012/05/10/1336680420000.html&amp;amp;title=Hacking+Maven&#034; target=&#034;_blank&#034; title=&#034;Save this post to Del.icio.us&#034;&gt;&lt;img src=&#034;common/images/delicious.png&#034; alt=&#034;Add this post to Delicious&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://www.stumbleupon.com/submit?url=http://blog.maxant.co.uk:80/pebble/2012/05/10/1336680420000.html&amp;amp;title=Hacking+Maven&#034; target=&#034;_blank&#034; title=&#034;Stumble this post&#034;&gt;&lt;img src=&#034;common/images/stumbleupon.png&#034; alt=&#034;Add this post to Stumble it&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://www.google.com/bookmarks/mark?op=edit&amp;amp;bkmk=http://blog.maxant.co.uk:80/pebble/2012/05/10/1336680420000.html&amp;amp;title=Hacking+Maven&#034; target=&#034;_blank&#034; title=&#034;Add this post to Google&#034;&gt;&lt;img src=&#034;common/images/google.png&#034; alt=&#034;Add this post to Google&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://technorati.com/faves?add=http://blog.maxant.co.uk:80/pebble/2012/05/10/1336680420000.html&#034; target=&#034;_blank&#034; title=&#034;Add this post to Technorati&#034;&gt;&lt;img src=&#034;common/images/technorati.png&#034; alt=&#034;Add this post to Technorati&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://www.bloglines.com/sub/http://blog.maxant.co.uk:80/pebble/2012/05/10/1336680420000.html&#034; target=&#034;_blank&#034; title=&#034;Add this post to Bloglines&#034;&gt;&lt;img src=&#034;common/images/bloglines.png&#034; alt=&#034;Add this post to Bloglines&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://www.facebook.com/share.php?u=http://blog.maxant.co.uk:80/pebble/2012/05/10/1336680420000.html&#034; target=&#034;_blank&#034; title=&#034;Add this post to Facebook&#034;&gt;&lt;img src=&#034;common/images/facebook.png&#034; alt=&#034;Add this post to Facebook&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://www.furl.net/storeIt.jsp?u=http://blog.maxant.co.uk:80/pebble/2012/05/10/1336680420000.html&amp;amp;t=Hacking+Maven&#034; target=&#034;_blank&#034; title=&#034;Add this post to Furl&#034;&gt;&lt;img src=&#034;common/images/furl.png&#034; alt=&#034;Add this post to Furl&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;https://favorites.live.com/quickadd.aspx?mkt=en-us&amp;amp;url=http://blog.maxant.co.uk:80/pebble/2012/05/10/1336680420000.html&amp;amp;title=Hacking+Maven&#034; target=&#034;_blank&#034; title=&#034;Add this post to Windows Live&#034;&gt;&lt;img src=&#034;common/images/windowslive.png&#034; alt=&#034;Add this post to Windows Live&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://bookmarks.yahoo.com/toolbar/savebm?opener=tb&amp;amp;u=http://blog.maxant.co.uk:80/pebble/2012/05/10/1336680420000.html&amp;amp;t=Hacking+Maven&#034; target=&#034;_blank&#034; title=&#034;Add this post to Yahoo!&#034;&gt;&lt;img src=&#034;common/images/yahoo.png&#034; alt=&#034;Add this post to Yahoo!&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&lt;/div&gt;
        </description>
      
      
    
    
    
    <comments>http://blog.maxant.co.uk:80/pebble/2012/05/10/1336680420000.html#comments</comments>
    <guid isPermaLink="true">http://blog.maxant.co.uk:80/pebble/2012/05/10/1336680420000.html</guid>
    <pubDate>Thu, 10 May 2012 20:07:00 GMT</pubDate>
  </item>
  
  <item>
    <title>Eclipse Help / Infocenter - External Web Application Mode</title>
    <link>http://blog.maxant.co.uk:80/pebble/2008/06/09/1213043100000.html</link>
    
      
        <description>
          &lt;p&gt;&lt;a href=&#034;2008/06/08/1212916380000.html&#034;&gt;Previously&lt;/a&gt; in this blog, the Eclipse Help / Infocenter was discussed and details on how to  set up the help for an RCP application were given. But often you want to have your help for an application  online as well as part of the product, for example if the customer does not have the latest version of the product installed. Indeed the IBM and Eclipse web sites have what they call an Infocenter - an online version of their help system.  In reality, when the Eclipse Help System is running, it runs as an embedded web server within your application. So in theory, it should be possible to deploy that as a standard web application.&lt;/p&gt;
&lt;p&gt;Quoting the Eclipse Help, &amp;quot;&lt;cite&gt;The help system can run in three modes: workbench (normal), infocenter, and standalone.&lt;/cite&gt;&amp;quot; Normal is when it is part of your application. Infocenter is when it runs as a seperate process acting as a web server.  Standalone is when it is used outside of an RCP application.&lt;/p&gt;
&lt;p&gt;In fact, from Eclipse 3.4 upwards, it can also be deployed as a standard Java EE web application. The following  blog shows how to deploy that help to a standard Java EE web server, namely Tomcat 5.5.&lt;/p&gt;
&lt;p&gt;Unfortunately, at the time of writing, there is no simple way to get this running. Neither is there any good tutorial showing how to overcome the pitfalls of the descriptions provided in the Eclipse 3.4 Help (search for WAR and you will  get the details). Those details are repeated here, as starting steps (I hope this does not breach copyright, but the aim of this tutorial is to give a complete guide to getting help to work as a web application):&lt;/p&gt;
&lt;p&gt;&lt;cite&gt; &lt;strong&gt;Deploying the infocenter as a Web Archive&lt;/strong&gt; &lt;/cite&gt;&lt;/p&gt;
&lt;p&gt;&lt;cite&gt; Using Eclipse 3.4 or later it is possible to configure the help plugins to be deployed as a web archive (war file) which  will act as a fully  functioning infocenter. The instructions below assume a Tomcat server has been installed, but with minor modifications  these steps should work for any full featured server.  &lt;/cite&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;cite&gt;In your Eclipse 3.4 installation locate the plugin org.eclipse.help.webapp.&lt;version&gt;.jar and copy it to a temporary directory,      unzip the copy into that folder.&lt;/version&gt;&lt;/cite&gt;&lt;/li&gt;
    &lt;li&gt;&lt;cite&gt;In the webapp plugin locate the web-archive directory and underneath that there will be two directories titled &amp;quot;help&amp;quot; and      &amp;quot;org.eclipse.help.infocenter-feature&amp;quot;.&lt;/cite&gt;&lt;/li&gt;
    &lt;li&gt;&lt;cite&gt;Import the org.eclipse.help.infocenter-feature using File-&amp;gt;Import-&amp;gt;Existing Project. &lt;/cite&gt;     &lt;br /&gt;
    .&lt;br /&gt;
    . (Note A - see below)&lt;br /&gt;
    .&lt;/li&gt;
    &lt;li&gt;&lt;cite&gt;Export org.eclipse.help.infocenter-feature as a deployable feature and set the destination to be      web-archive/help/WEB-INF/eclipse in the area where org.eclipse.help.webapp.&amp;lt;version&amp;gt;.jar was unzipped. &lt;/cite&gt;&lt;/li&gt;
    &lt;li&gt;&lt;cite&gt;Download org.eclipse.equinox.http.servletbridge_&amp;lt;version&amp;gt;.jar      and org.eclipse.equinox.servletbridge_&amp;lt;version&amp;gt;.jar from the equinox download site.      Select a version of Equinox that matches the version of Eclipse you are running to take you to the downloads page. &lt;/cite&gt;&lt;/li&gt;
    &lt;li&gt;&lt;cite&gt;Extract servletbridge.jar from org.eclipse.equinox.servletbridge_&amp;lt;version&amp;gt;.jar. &lt;/cite&gt;&lt;/li&gt;
    &lt;li&gt;&lt;cite&gt;Add the file servletbridge.jar to the help/WEB-INF/lib directory. You may need to create this directory. &lt;/cite&gt;&lt;/li&gt;
    &lt;li&gt;&lt;cite&gt;Add the file org.eclipse.equinox.http.servletbridge_&amp;lt;version&amp;gt;.jar to the         help/WEB-INF/eclipse/plugins directory      &lt;/cite&gt;     &lt;br /&gt;
    .&lt;br /&gt;
    . (Note B - see below)&lt;br /&gt;
    .&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note A: The documents state &amp;quot;&lt;cite&gt;Add some documentation plugins to the webapps/help/WEB-INF/eclipse/plugins directory. &lt;/cite&gt;&amp;quot; This has provided some confusion among the postings that I found on the internet. Basically there are two choices. The first is to take your plugin which contains the help folder, and put it into the folder named above. It can be put there as a deflated / flat folder (that is, unjarred), or as the standard exported plugin jar which the export wizard creates for you. The second choice is to create you help contents within a second plugin, seperate to your application, and to place that  exported plugin into the above named folder. The advantage of the second approach is that you do not have to deploy all the dependencies which your plugin has, which are not related to help. I however, went for the first option, simply because  it then only need to do one export and each time I export my plugin in order to create a new release / upgrade to the  application, I simply take that exported plugin and pop it onto my webserver.&lt;/p&gt;
&lt;p&gt;Note B: Once you have completed Note A and all the other steps in the citation above, you can continue with the last steps of the documentation:  &amp;quot;&lt;cite&gt; At this stage you can create a war file from the help directory or you can copy      the directory and its contents to the webapps folder of your Tomcat installation.  &lt;/cite&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;If your&#039;e lucky, it all works and your online help looks great! If however, you are more like me, then you just get  a blank help screen. OK, not too bad, the solution to this is that instead of the URL being  &lt;code&gt;http://yourdomain.com/help&lt;/code&gt;, it needs to have the index page appended:  &lt;code&gt;http://yourdomain.com/help/index.jsp&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In the &lt;code&gt;web.xml&lt;/code&gt; of the help webapp, there was no welcome page descriptor. I added one, but that didn&#039;t help! I think it is because the web app parses the requested URL and then works with a virtual file system. But why Tomcat doesn&#039;t step in before hand if it sees no requested page, I do not understand. Anyway...&lt;/p&gt;
&lt;p&gt;The next bit didn&#039;t fully work for me either. The infocenter loaded nicely, but the contents was empty. It only took  a few hours of fiddeling, and here is what I discovered:&lt;/p&gt;
&lt;p&gt;The web application loads the Eclipse workbench behind the scenes. This is based upon the Eclipse Equinox implementation of  OSGi, which has a neat little command line where you can find out what services are deployed in the workbench.&lt;/p&gt;
&lt;p&gt;Within the &lt;code&gt;web.xml&lt;/code&gt; of the help webapp, there is a servlet start parameter which is commented out. Some  postings that I found online even say that it MUST be commented out. Well not in this instance. Ensure the following is not commented out in your web descriptor:&lt;/p&gt;
&lt;pre&gt;
  &amp;lt;servlet id=&amp;quot;iehs&amp;quot;&amp;gt;
    &amp;lt;servlet-name&amp;gt;equinoxbridgeservlet&amp;lt;/servlet-name&amp;gt;
    &amp;lt;display-name&amp;gt;Equinox Bridge Servlet&amp;lt;/display-name&amp;gt;
    &amp;lt;description&amp;gt;Equinox Bridge Servlet&amp;lt;/description&amp;gt;
    &amp;lt;servlet-class&amp;gt;
      org.eclipse.equinox.servletbridge.BridgeServlet
    &amp;lt;/servlet-class&amp;gt;
    .
    .
    .
    &amp;lt;!-- the following parameter enables 
            the OSGi command line!!
        --&amp;gt;
    &amp;lt;init-param&amp;gt;
      &amp;lt;param-name&amp;gt;commandline&amp;lt;/param-name&amp;gt;
      &amp;lt;param-value&amp;gt;-console&amp;lt;/param-value&amp;gt;
    &amp;lt;/init-param&amp;gt;
    .
    .
    .
  &amp;lt;/servlet&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Restart Tomcat, from a command line, without starting the process in the background (that is on say linux,  do not add the &amp;amp; command after &lt;code&gt;. catalina.sh run&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Once it has started and gives you the commandline message saying &lt;code&gt;Server startup in x seconds&lt;/code&gt;, hit return. As if by magic, an OSGi prompt appears. On this prompt you can type &lt;code&gt;help&lt;/code&gt; (or any unrecognised command) to get help. The &lt;code&gt;ss&lt;/code&gt; command will list installed services with their state. Doing so gives the following output (click image for a larger picture), where &lt;code&gt;BookStore_1.0.0&lt;/code&gt; is my plugin containing the help contents. &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href=&#034;images/rcp_help_5.jpg&#034;&gt;&lt;img width=&#034;500&#034; border=&#034;0&#034; alt=&#034;Click for full size&#034; src=&#034;images/rcp_help_5.jpg&#034; /&gt;&lt;/a&gt; &lt;br /&gt;
My plugin (ID 6) is installed!! Great. But actually it needs to be active before it is of any use to me. So the next command  I type is &lt;code&gt;start 6&lt;/code&gt;, which should start my plugin, since it was listed with ID 6 (click image for a larger picture).&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href=&#034;images/rcp_help_6.jpg&#034;&gt;&lt;img width=&#034;500&#034; border=&#034;0&#034; alt=&#034;Click for full size&#034; src=&#034;images/rcp_help_6.jpg&#034; /&gt;&lt;/a&gt; &lt;br /&gt;
In the above picture, I have highlighted the problem. My plugin is dependent upon &lt;code&gt;org.eclipse.tomcat&lt;/code&gt; and  that is a missing resource. Well you might think that it is strange that the webapp is running in Tomcat and Tomcat is  missing, but it is actually the Tomcat plugin that is missing in the Eclipse workbench environment, namely under the &lt;code&gt;WEB-INF/eclipse/plugins&lt;/code&gt; directory. Add this plugin from your Eclipse plugins directory (or indeed your RCP application export plugins directory), as well as any other plugins upon which your plugin is dependent, restart Tomcat and everything should work.&lt;/p&gt;
&lt;p&gt;If it still does not work, try stopping Tomcat, deleting the &lt;code&gt;&amp;lt;tomcat-install-directory&amp;gt;/work&lt;/code&gt; directory, and restarting Tomcat. Tomcat has a working directory where it caches webapps and in this case it is not very good at cleaning up the  Eclipse workbench environment (either during hot deploys or during restarts).&lt;/p&gt;
&lt;p&gt;If that still does not work, iteratively use the OSGi command line to until your plugin has a state of &lt;code&gt;&amp;lt;&amp;lt;LAZY&amp;gt;&amp;gt;&lt;/code&gt;. This state is fine, since it will get started when you call up the URL. In fact the lazy status may never change, but it  is sufficient to indicate that your plugin is now loaded and ready to run in the help system.&lt;/p&gt;
&lt;p&gt;Before deploying this webapp to a production environment, don&#039;t forget to comment out the OSGi command line parameter in the &lt;code&gt;web.xml&lt;/code&gt; file.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&#034;tags&#034;&gt;&lt;span&gt;Social Bookmarks : &lt;/span&gt;&amp;nbsp;&lt;a href=&#034;http://slashdot.org/bookmark.pl?url=http://blog.maxant.co.uk:80/pebble/2008/06/09/1213043100000.html&amp;amp;title=Eclipse+Help+%2F+Infocenter+-+External+Web+Application+Mode&#034; target=&#034;_blank&#034; title=&#034;Add this post to Slash Dot&#034;&gt;&lt;img src=&#034;common/images/slashdot.png&#034; alt=&#034;Add this post to Slashdot&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://digg.com/submit?url=http://blog.maxant.co.uk:80/pebble/2008/06/09/1213043100000.html&amp;amp;title=Eclipse+Help+%2F+Infocenter+-+External+Web+Application+Mode&#034; target=&#034;_blank&#034; title=&#034;Digg this post&#034;&gt;&lt;img src=&#034;common/images/digg.png&#034; alt=&#034;Add this post to Digg&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://reddit.com/submit?url=http://blog.maxant.co.uk:80/pebble/2008/06/09/1213043100000.html&amp;amp;title=Eclipse+Help+%2F+Infocenter+-+External+Web+Application+Mode&#034; target=&#034;_blank&#034; title=&#034;Add this post to Reddit&#034;&gt;&lt;img src=&#034;common/images/reddit.png&#034; alt=&#034;Add this post to Reddit&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://del.icio.us/post?url=http://blog.maxant.co.uk:80/pebble/2008/06/09/1213043100000.html&amp;amp;title=Eclipse+Help+%2F+Infocenter+-+External+Web+Application+Mode&#034; target=&#034;_blank&#034; title=&#034;Save this post to Del.icio.us&#034;&gt;&lt;img src=&#034;common/images/delicious.png&#034; alt=&#034;Add this post to Delicious&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://www.stumbleupon.com/submit?url=http://blog.maxant.co.uk:80/pebble/2008/06/09/1213043100000.html&amp;amp;title=Eclipse+Help+%2F+Infocenter+-+External+Web+Application+Mode&#034; target=&#034;_blank&#034; title=&#034;Stumble this post&#034;&gt;&lt;img src=&#034;common/images/stumbleupon.png&#034; alt=&#034;Add this post to Stumble it&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://www.google.com/bookmarks/mark?op=edit&amp;amp;bkmk=http://blog.maxant.co.uk:80/pebble/2008/06/09/1213043100000.html&amp;amp;title=Eclipse+Help+%2F+Infocenter+-+External+Web+Application+Mode&#034; target=&#034;_blank&#034; title=&#034;Add this post to Google&#034;&gt;&lt;img src=&#034;common/images/google.png&#034; alt=&#034;Add this post to Google&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://technorati.com/faves?add=http://blog.maxant.co.uk:80/pebble/2008/06/09/1213043100000.html&#034; target=&#034;_blank&#034; title=&#034;Add this post to Technorati&#034;&gt;&lt;img src=&#034;common/images/technorati.png&#034; alt=&#034;Add this post to Technorati&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://www.bloglines.com/sub/http://blog.maxant.co.uk:80/pebble/2008/06/09/1213043100000.html&#034; target=&#034;_blank&#034; title=&#034;Add this post to Bloglines&#034;&gt;&lt;img src=&#034;common/images/bloglines.png&#034; alt=&#034;Add this post to Bloglines&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://www.facebook.com/share.php?u=http://blog.maxant.co.uk:80/pebble/2008/06/09/1213043100000.html&#034; target=&#034;_blank&#034; title=&#034;Add this post to Facebook&#034;&gt;&lt;img src=&#034;common/images/facebook.png&#034; alt=&#034;Add this post to Facebook&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://www.furl.net/storeIt.jsp?u=http://blog.maxant.co.uk:80/pebble/2008/06/09/1213043100000.html&amp;amp;t=Eclipse+Help+%2F+Infocenter+-+External+Web+Application+Mode&#034; target=&#034;_blank&#034; title=&#034;Add this post to Furl&#034;&gt;&lt;img src=&#034;common/images/furl.png&#034; alt=&#034;Add this post to Furl&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;https://favorites.live.com/quickadd.aspx?mkt=en-us&amp;amp;url=http://blog.maxant.co.uk:80/pebble/2008/06/09/1213043100000.html&amp;amp;title=Eclipse+Help+%2F+Infocenter+-+External+Web+Application+Mode&#034; target=&#034;_blank&#034; title=&#034;Add this post to Windows Live&#034;&gt;&lt;img src=&#034;common/images/windowslive.png&#034; alt=&#034;Add this post to Windows Live&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://bookmarks.yahoo.com/toolbar/savebm?opener=tb&amp;amp;u=http://blog.maxant.co.uk:80/pebble/2008/06/09/1213043100000.html&amp;amp;t=Eclipse+Help+%2F+Infocenter+-+External+Web+Application+Mode&#034; target=&#034;_blank&#034; title=&#034;Add this post to Yahoo!&#034;&gt;&lt;img src=&#034;common/images/yahoo.png&#034; alt=&#034;Add this post to Yahoo!&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&lt;/div&gt;
        </description>
      
      
    
    
    
    <comments>http://blog.maxant.co.uk:80/pebble/2008/06/09/1213043100000.html#comments</comments>
    <guid isPermaLink="true">http://blog.maxant.co.uk:80/pebble/2008/06/09/1213043100000.html</guid>
    <pubDate>Mon, 09 Jun 2008 20:25:00 GMT</pubDate>
  </item>
  
  <item>
    <title>Eclipse Help / Infocenter - Workbench Mode</title>
    <link>http://blog.maxant.co.uk:80/pebble/2008/06/08/1212916380000.html</link>
    
      
        <description>
          &lt;p&gt;Eclipse offers plugin authors the ability to add Eclipse Help to their plugins. Opening that help will give a nice window with searchable help, something like this (click on the image to see it in full size):&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&#034;images/rcp_help_1.jpg&#034;&gt;&lt;img width=&#034;500&#034; border=&#034;0&#034; alt=&#034;Click to view full sized image&#034; src=&#034;images/rcp_help_1.jpg&#034; /&gt;&lt;/a&gt;  &lt;br /&gt;
&lt;br /&gt;
The following blog entry shows how to integrate help into an RCP application (or indeed a plugin or feature).&lt;/p&gt;
&lt;p&gt;The first thing you need to do, is to extend your &lt;code&gt;plugin.xml&lt;/code&gt; to tell your plugin that you want to have help. In the source view of your &lt;code&gt;plugin.xml&lt;/code&gt; include the following extension points:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;img alt=&#034;&#034; src=&#034;images/rcp_help_2.jpg&#034; /&gt; &lt;br /&gt;
To go with these entries, you now need to add the &lt;code&gt;help&lt;/code&gt; folder to your plugin project:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;img alt=&#034;&#034; src=&#034;images/rcp_help_3.jpg&#034; /&gt; &lt;br /&gt;
The &lt;code&gt;html&lt;/code&gt; folder under the &lt;code&gt;help&lt;/code&gt; folder contains simple HTML documents for each page of help that you want to write. The &lt;code&gt;toc.xml&lt;/code&gt; file is the table of contents which defines what  appears in the left pane of the help system when it is opened. The &lt;code&gt;help_contexts.xml&lt;/code&gt; file contains mappings from &amp;quot;context names&amp;quot; to files which are relevant for that context. Contexts are used when opening context sensitive help, for example when pushing the F1 button.&lt;/p&gt;
&lt;p&gt;An example of the &lt;code&gt;toc.xml&lt;/code&gt; follows: &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;textarea readonly=&#034;readonly&#034; rows=&#034;15&#034; cols=&#034;60&#034;&gt;  &amp;lt;toc label=&amp;quot;BookStore&amp;quot;&amp;gt;  	&amp;lt;topic label=&amp;quot;Introduction&amp;quot; 					href=&amp;quot;help/html/general/overview.html&amp;quot;&amp;gt;&amp;lt;/topic&amp;gt;  	&amp;lt;topic label=&amp;quot;Starting Up&amp;quot; 						href=&amp;quot;help/html/general/startup.html&amp;quot;&amp;gt;&amp;lt;/topic&amp;gt;  	&amp;lt;topic label=&amp;quot;The Process&amp;quot; 						href=&amp;quot;help/html/general/process.html&amp;quot;&amp;gt;&amp;lt;/topic&amp;gt;  	&amp;lt;topic label=&amp;quot;Screens&amp;quot;&amp;gt; 		&amp;lt;topic label=&amp;quot;Customers&amp;quot;  					href=&amp;quot;help/html/views/Customers.html&amp;quot;&amp;gt;&amp;lt;/topic&amp;gt; 		&amp;lt;topic label=&amp;quot;Products&amp;quot;  					href=&amp;quot;help/html/views/Products.html&amp;quot;&amp;gt;&amp;lt;/topic&amp;gt; 	&amp;lt;/topic&amp;gt;  	&amp;lt;topic label=&amp;quot;Frequently Asked Questions&amp;quot;		href=&amp;quot;help/html/general/faq.html&amp;quot;&amp;gt;&amp;lt;/topic&amp;gt;  &amp;lt;/toc&amp;gt;   &lt;/textarea&gt;&lt;/p&gt;
&lt;p&gt;An example of the &lt;code&gt;help_contexts.xml&lt;/code&gt; follows: &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;textarea readonly=&#034;readonly&#034; rows=&#034;15&#034; cols=&#034;60&#034;&gt;  &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;  &lt;!--====================================================================
	Definition of Context-Sensitive-Help (for the F1 Button)
========================================================================--&gt;  &amp;lt;contexts&amp;gt; 	&lt;!--====================================================================
		In the code, set the context on the control as follows, passing in the ID that is in this file
		but watch out, since you do not need to set &#034;BookStore.&#034; in this file, just in the toc.xml for 
		some bizarre reason

		Example: Class uk.co.maxant.bookstore.views.customers.CustomersView

			public void createPartControl(Composite parent)
			{ 
				PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,&#034;BookStore.CustomersView&#034;);
				...
			}
	========================================================================--&gt;  	&amp;lt;context id=&amp;quot;Glossary&amp;quot;&amp;gt;     	&amp;lt;description&amp;gt;Glossary&amp;lt;/description&amp;gt;  		&amp;lt;topic label=&amp;quot;Glossary&amp;quot;  						href=&amp;quot;help/html/general/glossary.html&amp;quot;&amp;gt;&amp;lt;/topic&amp;gt; 	&amp;lt;/context&amp;gt;   	&amp;lt;context id=&amp;quot;CustomersView&amp;quot;&amp;gt;     	&amp;lt;description&amp;gt;Customer Relationship Management&amp;lt;/description&amp;gt;  		&amp;lt;topic label=&amp;quot;Customers Screen&amp;quot;  				href=&amp;quot;help/html/views/Customers.html&amp;quot;&amp;gt;&amp;lt;/topic&amp;gt;  		&amp;lt;topic label=&amp;quot;Customers Menu&amp;quot; 					href=&amp;quot;help/html/menus/CustomerMenu.html&amp;quot;&amp;gt;&amp;lt;/topic&amp;gt; 	&amp;lt;/context&amp;gt;   &amp;lt;/contexts&amp;gt;  &lt;/textarea&gt; &lt;br /&gt;
&lt;br /&gt;
Now before the help system will work, we need to do a few more things, namely:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Add dependencies&lt;/li&gt;
    &lt;li&gt;Add a help menu&lt;/li&gt;
    &lt;li&gt;Add context hooks&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To add dependencies, you can open the &lt;code&gt;.product&lt;/code&gt; file for your application (to export your plugin as an RCP application, you need to add a &lt;code&gt;.product&lt;/code&gt; file). Open its configuration tab and click on the  &amp;quot;Add Required Plug-ins&amp;quot; button. This should then add a list of all plugins upon which your plugin is dependent. &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;img alt=&#034;&#034; src=&#034;images/rcp_help_4.jpg&#034; /&gt;&lt;/p&gt;
&lt;p&gt;If this did not work, the following is a list of all the plugins which the BookStore plugin is dependent upon  (if you open the &lt;code&gt;.product&lt;/code&gt; file in the text editor, you can edit XML directly): &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;textarea readonly=&#034;readonly&#034; rows=&#034;15&#034; cols=&#034;60&#034;&gt;     &amp;lt;plugins&amp;gt;       &amp;lt;plugin id=&amp;quot;BookStore&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;com.ibm.icu&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;javax.servlet&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;javax.servlet.jsp&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.apache.commons.el&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.apache.commons.logging&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.apache.jasper&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.apache.lucene&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.apache.lucene.analysis&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.core.commands&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.core.contenttype&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.core.databinding&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.core.expressions&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.core.jobs&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.core.runtime&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.core.runtime.compatibility.registry&amp;quot; fragment=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.equinox.app&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.equinox.common&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.equinox.http.jetty&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.equinox.http.registry&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.equinox.http.servlet&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.equinox.jsp.jasper&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.equinox.jsp.jasper.registry&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.equinox.preferences&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.equinox.registry&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.help&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.help.appserver&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.help.base&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.help.ui&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.help.webapp&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.jface&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.jface.databinding&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.osgi&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.osgi.services&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.swt&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.swt.win32.win32.x86&amp;quot; fragment=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.tomcat&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.ui&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.ui.forms&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.eclipse.ui.workbench&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;       &amp;lt;plugin id=&amp;quot;org.mortbay.jetty&amp;quot;&amp;gt;&amp;lt;/plugin&amp;gt;    &amp;lt;/plugins&amp;gt; &lt;/textarea&gt;&lt;/p&gt;
&lt;p&gt;To add a help menu, edit your ApplicationActionBarAdvisor class. First add a help action as a class member variable:&lt;/p&gt;
&lt;pre&gt;
   private IWorkbenchAction helpAction;&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;Next, in the &lt;code&gt;makeActions&lt;/code&gt; method, add the following code to register the action:&lt;/p&gt;
&lt;pre&gt;
        helpAction = ActionFactory.HELP_CONTENTS.create(window);&lt;br /&gt;        register(helpAction);&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;Finally, in the &lt;code&gt;fillMenuBar&lt;/code&gt; method, add the following bits of code:&lt;/p&gt;
&lt;pre&gt;
        MenuManager helpMenu = new MenuManager(&lt;br /&gt;                &amp;quot;&amp;amp;Help&amp;quot;, &lt;br /&gt;                IWorkbenchActionConstants.M_HELP);&lt;br /&gt;        .&lt;br /&gt;        .&lt;br /&gt;        .&lt;br /&gt;        menuBar.add(helpMenu);&lt;br /&gt;        .&lt;br /&gt;        .&lt;br /&gt;        .&lt;br /&gt;        helpMenu.add(helpAction);&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;This will add a help menu to the main window of the application.&lt;/p&gt;
&lt;p&gt;The last thing we need to do before the help system will work as an extra window within our application  (Workbench Mode), is to add the context sensitive hooks. On any graphical component where the F1 key is pressed, the Eclipse workbench will look for a parent that has context sensitive help setup. If it finds such a parent,  it will activate the help.&lt;/p&gt;
&lt;p&gt;To enable context help for an item, add the following bit of code (here, for adding context specific help  to a view):&lt;/p&gt;
&lt;pre&gt;
        PlatformUI.getWorkbench().getHelpSystem().&lt;br /&gt;                          setHelp(parent,&amp;quot;BookStore.CustomersView&amp;quot;);&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;Note that the String has the prefix &amp;quot;BookStore.&amp;quot;, but in the context XML above, the context IDs do not  contain this prefix! The prefix is one of several things, I&#039;m not really sure which! It could be the Application Name, the Plugin Name, or the TOC Label in the &lt;code&gt;toc.xml&lt;/code&gt; file. It could even be the Topic which is somehow set for  the help system. It&#039;s best to refer to the documentation for more details here.&lt;/p&gt;
&lt;p&gt;Right, now that is all done, it is time to run your application and try out the F1 key and the new help menu.&lt;/p&gt;
&lt;p&gt;Notice how the first page which the help shows is a standard Eclipse help page? Wouldn&#039;t it be great if it could be customised? Well, it can!&lt;/p&gt;
&lt;p&gt;You simply need to add a line to your &lt;code&gt;plugin_customization.ini&lt;/code&gt; file (this file can be added to applications in order to customize things like their default accelerator keys) like this:&lt;/p&gt;
&lt;pre&gt;
    org.eclipse.help.base/help_home=/BookStore/help/html/home.html&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;In the above line, the new home page for the help needs to be located under &lt;code&gt;help/html/home.html&lt;/code&gt; within your project. The name &amp;quot;/BookStore&amp;quot; which appears above, before the actual path to the file is this magical application or plugin name, discussed above.&lt;/p&gt;
&lt;p&gt;All of the above work was done in Eclipse 3.3.0, although it should also work for Eclipse 3.2 as well as Eclipse 3.4 and later.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&#034;tags&#034;&gt;&lt;span&gt;Social Bookmarks : &lt;/span&gt;&amp;nbsp;&lt;a href=&#034;http://slashdot.org/bookmark.pl?url=http://blog.maxant.co.uk:80/pebble/2008/06/08/1212916380000.html&amp;amp;title=Eclipse+Help+%2F+Infocenter+-+Workbench+Mode&#034; target=&#034;_blank&#034; title=&#034;Add this post to Slash Dot&#034;&gt;&lt;img src=&#034;common/images/slashdot.png&#034; alt=&#034;Add this post to Slashdot&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://digg.com/submit?url=http://blog.maxant.co.uk:80/pebble/2008/06/08/1212916380000.html&amp;amp;title=Eclipse+Help+%2F+Infocenter+-+Workbench+Mode&#034; target=&#034;_blank&#034; title=&#034;Digg this post&#034;&gt;&lt;img src=&#034;common/images/digg.png&#034; alt=&#034;Add this post to Digg&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://reddit.com/submit?url=http://blog.maxant.co.uk:80/pebble/2008/06/08/1212916380000.html&amp;amp;title=Eclipse+Help+%2F+Infocenter+-+Workbench+Mode&#034; target=&#034;_blank&#034; title=&#034;Add this post to Reddit&#034;&gt;&lt;img src=&#034;common/images/reddit.png&#034; alt=&#034;Add this post to Reddit&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://del.icio.us/post?url=http://blog.maxant.co.uk:80/pebble/2008/06/08/1212916380000.html&amp;amp;title=Eclipse+Help+%2F+Infocenter+-+Workbench+Mode&#034; target=&#034;_blank&#034; title=&#034;Save this post to Del.icio.us&#034;&gt;&lt;img src=&#034;common/images/delicious.png&#034; alt=&#034;Add this post to Delicious&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://www.stumbleupon.com/submit?url=http://blog.maxant.co.uk:80/pebble/2008/06/08/1212916380000.html&amp;amp;title=Eclipse+Help+%2F+Infocenter+-+Workbench+Mode&#034; target=&#034;_blank&#034; title=&#034;Stumble this post&#034;&gt;&lt;img src=&#034;common/images/stumbleupon.png&#034; alt=&#034;Add this post to Stumble it&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://www.google.com/bookmarks/mark?op=edit&amp;amp;bkmk=http://blog.maxant.co.uk:80/pebble/2008/06/08/1212916380000.html&amp;amp;title=Eclipse+Help+%2F+Infocenter+-+Workbench+Mode&#034; target=&#034;_blank&#034; title=&#034;Add this post to Google&#034;&gt;&lt;img src=&#034;common/images/google.png&#034; alt=&#034;Add this post to Google&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://technorati.com/faves?add=http://blog.maxant.co.uk:80/pebble/2008/06/08/1212916380000.html&#034; target=&#034;_blank&#034; title=&#034;Add this post to Technorati&#034;&gt;&lt;img src=&#034;common/images/technorati.png&#034; alt=&#034;Add this post to Technorati&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://www.bloglines.com/sub/http://blog.maxant.co.uk:80/pebble/2008/06/08/1212916380000.html&#034; target=&#034;_blank&#034; title=&#034;Add this post to Bloglines&#034;&gt;&lt;img src=&#034;common/images/bloglines.png&#034; alt=&#034;Add this post to Bloglines&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://www.facebook.com/share.php?u=http://blog.maxant.co.uk:80/pebble/2008/06/08/1212916380000.html&#034; target=&#034;_blank&#034; title=&#034;Add this post to Facebook&#034;&gt;&lt;img src=&#034;common/images/facebook.png&#034; alt=&#034;Add this post to Facebook&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://www.furl.net/storeIt.jsp?u=http://blog.maxant.co.uk:80/pebble/2008/06/08/1212916380000.html&amp;amp;t=Eclipse+Help+%2F+Infocenter+-+Workbench+Mode&#034; target=&#034;_blank&#034; title=&#034;Add this post to Furl&#034;&gt;&lt;img src=&#034;common/images/furl.png&#034; alt=&#034;Add this post to Furl&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;https://favorites.live.com/quickadd.aspx?mkt=en-us&amp;amp;url=http://blog.maxant.co.uk:80/pebble/2008/06/08/1212916380000.html&amp;amp;title=Eclipse+Help+%2F+Infocenter+-+Workbench+Mode&#034; target=&#034;_blank&#034; title=&#034;Add this post to Windows Live&#034;&gt;&lt;img src=&#034;common/images/windowslive.png&#034; alt=&#034;Add this post to Windows Live&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&#034;http://bookmarks.yahoo.com/toolbar/savebm?opener=tb&amp;amp;u=http://blog.maxant.co.uk:80/pebble/2008/06/08/1212916380000.html&amp;amp;t=Eclipse+Help+%2F+Infocenter+-+Workbench+Mode&#034; target=&#034;_blank&#034; title=&#034;Add this post to Yahoo!&#034;&gt;&lt;img src=&#034;common/images/yahoo.png&#034; alt=&#034;Add this post to Yahoo!&#034; border=&#034;0&#034; /&gt;&lt;/a&gt;&lt;/div&gt;
        </description>
      
      
    
    
    
    <comments>http://blog.maxant.co.uk:80/pebble/2008/06/08/1212916380000.html#comments</comments>
    <guid isPermaLink="true">http://blog.maxant.co.uk:80/pebble/2008/06/08/1212916380000.html</guid>
    <pubDate>Sun, 08 Jun 2008 09:13:00 GMT</pubDate>
  </item>
  
  </channel>
</rss>

