Difference between pages "Providing help for your plug-in (How to extend Rodin Tutorial)" and "Help:Contents"

From Event-B
(Difference between pages)
Jump to navigationJump to search
imported>Desaperh
 
imported>Mathieu
 
Line 1: Line 1:
{{Navigation|Previous= [[Extending_Rodin_Pretty_Print_Page(How_to_extend_Rodin_Tutorial)|Display added elements in the Pretty Print Page]]|Next=[['''FIXME'''|Extending the structured editor]] | Up= [[Plug-in_Tutorial|How to extend Rodin Tutorial (Index)]]}}
+
''Help copied from [http://www.mediawiki.org/wiki/Help:Contents]''
  
=== Creating the Help Plug-in ===
+
==Reading==
Each plug-in that contributes help files shall extend the <tt>org.eclipse.help.toc</tt> extension point and create the TOC files that describe the table of contents for the help and the topic interleaving.
+
* [[Help:Navigation|Navigation]]
 +
* [[Help:Searching|Searching]]
 +
* [[Help:Tracking changes|Tracking changes]]
 +
* [[Help:Watchlist|Watchlist]]
  
Let's first create such a plug-in. It will only contain documentation files, and the "Create Java Project" option (tag 1) do not need to be checked.
+
==Editing==
 +
* [[Help:Editing pages|Editing pages]]
 +
* [[Help:Starting a new page|Starting a new page]]
 +
* [[Help:Formatting|Formatting]]
 +
* [[Help:Links|Links]]
 +
* [[Help:User page|User pages]]
 +
* [[Help:Talk pages|Talk pages]]
  
[[Image:help_project.png]]
+
===Advanced editing===
 +
* [[Help:Images|Images]]
 +
* [[Help:Tables|Tables]]
 +
* [[Help:Maths|Maths]]
 +
* [[Help:Categories|Categories]]
 +
* [[Help:Subpages|Subpages]]
 +
* [[Help:Managing files|Managing files]]
 +
* [[Help:Moving a page|Moving a page]]
 +
* [[Help:Redirects|Redirects]]
 +
* [[Help:Deleting a page|Deleting a page]]
 +
* [[Help:Protected pages|Protected pages]]
  
Then, the easiest way to proceed for beginners is to start from the available template:
+
* [[Help:Templates|Templates]]
 +
* [[Help:Variables|Variables]]
 +
* [[Help:Namespaces|Namespaces]]
  
[[Image:help_project_template.png]]
+
* [[Help:Special pages|Special pages]]
 +
* [[Help:External searches|External searches]]
  
[[Image:help_project_toc.png]]
+
===Personal customization===
 +
* [[Help:Preferences|Preferences]]
 +
* [[Help:Skins|Skins]]
  
=== Examining the Help Files ===
+
==Wiki administration==
[[Image:help_files.png | right]]
 
Three .xml files have been created:
 
# plugin.xml
 
# testToc.xml
 
# toc.xml
 
  
When opening the plugin.xml file, we can see that the testToc.xml file is a primary file, i.e. it contains the master table of contents; toc.xml is not primary, but is integrated into this table of contents.
+
* [[Help:Sysops and permissions|Sysops and permissions]]
  
[[Image:help_plugin_file.png]]
+
The following features require extra permissions that are not normally granted to all wiki users.
  
[[Image:help_toc_primary_file.png]]
+
* [[Help:Protecting and unprotecting pages|Protecting and unprotecting pages]]
 +
* [[Help:Sysop deleting and undeleting|Sysop deleting and undeleting]]
 +
* [[Help:Patrolled edits|Patrolled edits]]
 +
* [[Help:Blocking users|Blocking users]]
 +
* [[Help:Range blocks|Range IP blocks]]
 +
* [[Help:Assigning permissions|Assigning permissions]]
  
[[Image:help_toc_file.png]]
+
[[Category:Help| ]]
 
+
__NOTOC__
The contents is provided as .html files and linked from the tables of contents.
 
 
 
=== Viewing the Help Contents ===
 
Launch the Rodin platform and select Help > Help Contents to view the available Eclipse Help contents. We can see that a new Test TOC item has been created.
 
 
 
[[Image:help_contents.png]]
 
 
 
=== Writing the Help Contents ===
 
*The first option is to edit the .html files (html/maintopic.html, html/subtopic.html and html/toc.html in our example).
 
*The second option is to generate the help files from a Wiki page, for example this page.
 
To build the Eclipse Help contents from a MediaWiki source, you first need to have the <tt>org.eventb.doc.user</tt> plug-in, open and up-to-date, in your current workspace. The tools/wiki2help/build_eclipse_help.xml file enclosed in this plug-in is the Ant script to be used to generate the help files. More precisely:
 
# Create our own Ant file, for example build_eclipse_help.xml, in the help plug-in.
 
:This file shall set the dest.dir property, which specifies where the help files will be generated, and the wiki.url property, which gives the URL of the Wiki page to be taken as input. Moreover, it shall target the main build_eclipse_help.xml file.
 
 
 
<?xml version="1.0" encoding="utf-8" ?>
 
<project name="sample-help" default="sample-help.generate">
 
    <target name="sample-help.generate">
 
        <ant dir="../org.eventb.doc.user/tools/wiki2help/"
 
        antfile="build_eclipse_help.xml" target="generate"
 
        inheritAll="false">
 
          <property name="dest.dir" value="${ant.file.sample-help}/../html"/>
 
          <property name="wiki.url" value="http://wiki.event-b.org/index.php/Providing_help_for_your_plug-in_(How_to_extend_Rodin_Tutorial)"/>
 
    </ant>
 
    </target>
 
</project>
 
 
 
# Right-click on this newly created Ant file and select Run as > Ant Build. The help files are generated in the html dedicated folder.
 
# Modify the plugin.xml file to reference the html/providing_help_for_your_plug_in_how_to_extend_rodin_tutorial.xml file as primary file.
 
# Display the Eclipse Help contents. The generated files are now available:
 
 
 
[[Image:wiki2help.png]]
 
 
 
{{Navigation|Previous= [['''FIXME'''|Extending the Proof Obligation Generator]]|Next= [['''FIXME'''|Extending the structured editor]] | Up= [[Plug-in_Tutorial|How to extend Rodin Tutorial (Index)]]}}
 
 
 
[[Category:Developer documentation|*Index]]
 
[[Category:Rodin Platform|*Index]]
 
[[Category:Tutorial|*Index]]
 

Revision as of 09:19, 5 September 2008