Return-Path: Delivered-To: apmail-openejb-dev-archive@www.apache.org Received: (qmail 43203 invoked from network); 25 Mar 2008 17:17:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Mar 2008 17:17:14 -0000 Received: (qmail 68471 invoked by uid 500); 25 Mar 2008 17:17:12 -0000 Delivered-To: apmail-openejb-dev-archive@openejb.apache.org Received: (qmail 68452 invoked by uid 500); 25 Mar 2008 17:17:12 -0000 Mailing-List: contact dev-help@openejb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openejb.apache.org Delivered-To: mailing list dev@openejb.apache.org Received: (qmail 68443 invoked by uid 99); 25 Mar 2008 17:17:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Mar 2008 10:17:12 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of daniel.haischt@googlemail.com designates 66.249.92.168 as permitted sender) Received: from [66.249.92.168] (HELO ug-out-1314.google.com) (66.249.92.168) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Mar 2008 17:16:31 +0000 Received: by ug-out-1314.google.com with SMTP id h3so2193220ugf.14 for ; Tue, 25 Mar 2008 10:16:41 -0700 (PDT) Received: by 10.67.20.19 with SMTP id x19mr706773ugi.48.1206465401674; Tue, 25 Mar 2008 10:16:41 -0700 (PDT) Received: from ?127.0.0.1? ( [91.89.102.216]) by mx.google.com with ESMTPS id 30sm2447859ugf.31.2008.03.25.10.16.40 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 25 Mar 2008 10:16:41 -0700 (PDT) Message-ID: <47E9341B.8060409@gmail.com> Date: Tue, 25 Mar 2008 18:19:23 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080213 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: dev@openejb.apache.org Subject: [INFO] How to add context help to the Eclipse plugin Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit From: "Daniel S. Haischt" X-Virus-Checked: Checked by ClamAV on apache.org Hi all, I've added basic help support to the Eclipse plugin for OpenEJB. Basically the context help and the standalone help is contained within the following plugins: * org.apache.openejb.help * org.apache.openejb.help.nl1 * org.apache.openejb.help.nl2 * org.apache.openejb.help.nl2a * org.apache.openejb.help.nlBidi org.apache.openejb.help is the default and should contain English only. org.apache.openejb.help.nl1 for example contains German beside of other language dependent files. You should note that anything beside of org.apache.openejb.help is a fragment and not a plugin! How are fragments structured? Example: ************************************** * Basically any localized properties file can be stored in the root folder. * Language dependent files like HTML files or images etc. should go into the folder nl/, where lang_code could be for example 'de'. I prepared this kind of directory structure already. Tho, of course the actual documentation and translation work still needs to be done if we want a functional help plugin. Basically the main entry points to the help system are... * TOCs (table of contents -> toc*.xml) * Indexes (index.xml) * Context help (context.xml) These files are stored in the root of the help plugin. Context help (context.xml): *************************** Contains IDs and references to an actual HTML file. Example: TEST The ID is test_id and must be reflected by the Java code. How to associate a help ID with an SWT element? AFAIK help IDs can only be associated with Controls, IActions, Menus and MenuItems if using the setHelp() method. Please have a look at the following page for further reference: http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/ua_help_context_id.htm In our case I did use the displayHelp() method which simply requires you to specify the help context ID. This ID is composed of the plugin name plus the actual context ID (here: test_id). code example (ProjectSelectionPage): @Override public void performHelp() { PlatformUI.getWorkbench().getHelpSystem().displayHelp( "org.apache.openejb.help.test_id"); } So as you can see the actual work that needs to be done regarding the help system is ... a) write the help contents (HTML or XML that may be transformed to HTML) b) define context help IDs (in theory each widget may get an ID if using setHelp()) c) associate wizard pages and widgets with the actual context help IDs right within the code. If this has been accomplish you would get approprate context help if pressing F1 or clicking on the blue question mark icon. Regards Daniel S. Haischt