How to contribute to welcome/intro page

From Bioclipse
Jump to: navigation, search
Development tutorial
Responsible author:Shk3
Bioclipse version:N/A
"N/A" is not a number.
Last updated:2009-10-10
Tags:


The new intro page in Bioclispe 2.0 (from beta version) is using Eclipse universal intro.

To hook in an article/action/web page, you need the following in your plugin.xml:

     <extension
        point="org.eclipse.ui.intro.configExtension">
     <configExtension
           content="intro/introData.xml"
           configId="org.eclipse.ui.intro.universalConfig">
     </configExtension>
     </extension

Then you need to write the file introData.xml in the intro folder accordingly:

<?xml version="1.0" encoding="utf-8" ?>
<introContent>
   <extensionContent id="net.bioclipse.intro.workbench" style="css/sample.css" name="Bioclipse Workbench" path="overview/@">
      <group style-id="content-group" id="workbench-group">
          <link label="My Contributed Topic" url="http://org.eclipse.ui.intro/showPage?id=myPageID" id="myLinkID">
              <text>explanation to topic  </text>
     	    </link>

     <page id="myPageID" style="/intro/overview.css" style-id="page">
     <title style-id="intro-header">What is Bioclipse</title>
     <include path="overview/navigation-links"/>
     <group id="page-content">
           <group id="content-header" label="What is Bioclipse" filteredFrom="swt">
           </group>
           <text style-id="page-title" id="page-title" filteredFrom="html">HEADER</text>
           <text style-id="page-description" id="page-description">
                CONTENT GOES HERE
           </text>

     </group>
     </page> 
           ...

      </group>
   </extensionContent>
</introContent>

The path="overview/@" means you contribute to the Overview section in the Welcome page. The allowed sections are:

  • overview
  • firststeps
  • tutorials
  • samples
  • whatsnew
  • webresources

The real action is defined in the following line:

  url="http://org.eclipse.ui.intro/showPage?id=myPageID"

In order to include a cheat sheet on front page, you need a link like this:

         <link label="Submit to NMRShiftDB" url="http://org.eclipse.ui.intro/showStandby?partId=org.eclipse.platform.cheatsheet&input=net.bioclipse.bc_nmrshiftdb.cheatsheet.SubmitCheatsheet">
             <text>Explains how to add data to the NMRShiftDB database.</text>
    	  </link>

The & must be in as & a m p ; and not &. Note you need the org.eclipse.platform plugin for the cheat sheet to display.


The command showPage can be replaced with several other actions, see under the link section on http://help.eclipse.org/stable/topic/org.eclipse.platform.doc.isv/reference/extension-points/org_eclipse_ui_intro_config.html#e.link

For more examples, see plugin net.bioclipse.ui in the subfolder intro.


LINKS