Eclipse Doc Style Guide

From Eclipsepedia

Revision as of 11:00, 1 May 2006 by Johna (Talk | contribs)

Jump to: navigation, search

Version 0.82 - Last modified Jan. 25, 2005

This document gives the style conventions to be used in Eclipse help. The Eclipse help has the following topic types: Tutorial (Getting Started), Concept, Task, and Reference. These topic types are based on the <a href="http://www-106.ibm.com/developerworks/xml/library/x-dita1/">Darwin Information Typing Architecture (DITA)</a> standards.

</tr>
Topic TitlesExample
A topic's title (heading) is marked with a heading value that matches

the topic's position in the table of contents. The topic shown here is at the top level, so it is tagged as an <h1>.

<h1>A Tour of the Workbench</h1>
The text in a topic's <title> must match the text in the heading. From concepts-2.htm:
<title><strike>The </strike>Workbench</title>
...
<h1>Workbench</h1>
A topic's <title> must be unique to enable users to make a correct

choice after a search.

Use sentence capitalization for all titles.

Results of searching for workbench:
<b>88% The workbench</b> (concepts-2.htm)
<b>74% Workbench</b> (ref-10.htm)
<b>70% The workbench</b> (qs-02a.htm)

Better titles:

<b>88% What is the workbench?</b> (concepts-2.htm)
<b>74% Workbench reference</b> (ref-10.htm)
<b>70% Launching the workbench</b> (qs-02a.htm)
Begin "task" and "getting started" titles with a gerund. Creating a project
ListsExample
Use a sentence fragment followed by a colon before numbered steps. To hide files by type:
Each numbered list item should include only one step.  
If you have an ordered list within an ordered list, use:


<ol type="a"></ol>

To do X:
  1. Step 1 text.
  2. Step 2 introductory text:
    1. Sub-step 1.
    2. Sub-step 2.
If you need to start an ordered list at a number other than 1,

use
<li value="3">text</li>

  1. text
Each task topic should contain a reasonable number of steps.

"Reasonable" is a judgment call, and your freedom may be restricted by the complexity of the software. However, if you find that you are over 10 steps, see if you can break the steps into two sub-topics.

 
Inline MarkupExample
Elements names that appear in the GUI should be identified as such.

The standard convention for GUI elements is to display the name in a bold font. There are different ways this can be done:

  • Use <b> tags
  • Use the <strong> tags and expect that they will render as bold
  • Use <span> tags with different class types. For example:
    • <span class="guilabel">Preferences</span>
    • <span class="guibutton">OK</span>

The benefit of using class types is that the CSS file can then declare:

.guilabel {font-weight: bold;}

Or for a more elaborate display:

.guibutton { color: #000000; font-weight: bold;
 font-family: helvetica, sans-serif;
 background-color: #DCDCDC; padding: 1px 5px; 
 font-size: 10pt; border: outset 2px;
 text-decoration: none; line-height:175%; }
Preferences


OK

Topic ContentExample
Provide a short description of what the user will accomplish. Files that you do not need to see can be hidden by file type in

the C/C++ Projects view.

(Note: That wording could be better—see below.)

Use the active voice. You can hide file types that you do not need to see in

the C/C++ Projects view.

(Note: That wording could still be better—see below.)

Wherever possible, make statements positive. In the C/C++ Projects view, you can display only the file types that you need to see.
Include no more than one task for each topic.  
Document how to access a feature through the menu bar, as opposed to

using toolbar buttons or the context menu.

Avoid providing multiple ways to do something unless the menu-driven method is not always available. Project properties are an example of this: you can set project properties in the New Project wizard, but after the project is created you can set properties only by right-clicking on an individual project or in preferences (for all projects).

Click File > New > Project.

Note that the term "menu" is not used and that the menu path is in bold.

When you must provide multiple ways to do something use the format in the example.
  1. Do one of the following:
    • To set properties for future Standard Make projects, click Window > Preferences . Expand C/C++, click New Make Projects.
    • In the C/C++ Projects view, right-click a project, and select Properties. Select C/C++ Make Project from the list.
To instruct the user to make a choice, use the format in the example.
  1. Do one of the following:
    • To stop the build when an error is encountered, select Stop on error.
    • To continue the build even if an error is encountered, select Keep going on error.
When describing how to use the context menu (shortcut menu),

instruct the user to "right-click <something> and select <something>."

Do not say, "From the context-menu, choose <something> as the term context-menu is not obvious to new users.

In the C/C++ Projects view, right-click a project and select Properties.
Bold the name of the item being acted on (that is, the text), not the name of interface control. Type the name JanesProject in the Project name field.
For the results of a step, do not add the sentence,

"The New Project wizard opens." Instead, give the name of the dialog box or wizard that

opens as an introductory phrase at the beginning of the next step.
  1. Click File > New > Project.
  2. In the New Project wizard, click C or C++.
Begin a step, where applicable, by telling the user "To <do

this>, <do that>."

In other words, give the consequences of the action before you give the instructions to perform.

To change tab settings, type a value in the Value box.
Do not use the word "button", simply tell the reader to "click <name of button>." Click Next.
Use the verbs "select" or "clear" for check boxes; bold only the name of the check box. Select or clear the Blank check box.
Do not use the word "radio button". Use "click <name of radio button>." To change the background color, click Custom.
Do not instruct the user to "click on" something. Use "click", "right-click" or "double-click." In the C/C++ Projects view, double-click your project.
Do not instruct the user to "click on". Use "click the <name of tab> tab." Click the General tab.
Do not use the word "tree".

Use "Expand <something>,

click <something else>.
  1. Click Window > Preferences.
  2. Expand C/C++, click C/C++ Editor.
Use "type" instead of "enter."

("Enter" means "type <text> and press [Enter].)

In the Name box, type a name.
Consider having inline links to concepts that are Eclipse-specific.
<p>This tutorial provides a step-by-step walk-through 
of the features in the Eclipse 
<a href="../concepts/concepts-2.htm">Workbench</a>.
You will learn how to use these features by creating 
a <a href="../concepts/concepts-12.htm">project</a>,
then creating, running, and debugging a simple 
program.</p>

This tutorial provides a step-by-step walk-through of the features in the Eclipse Workbench. You will learn how to use these features by creating a project, then creating, running, and debugging a simple program.

TablesExample
Declare tables consistently.

<table border="1" cellpadding="3" cellspacing="0">

Set the vertical alignment for rows to "top" in the CSS file.

tr { vertical-align: top; }

CSS Class Summary

To call the book.css file, change the current markup from
<link rel="stylesheet" href="../book.css" type="text/css">
to
<link rel="stylesheet" href="../PRODUCT_PLUGIN/book.css" type="text/css">
(The help system will make the appropriate changes to the path at run time.)

GraphicsExample
There are two types of graphics in the online help at present:

icons (which can be taken from the icon sets for the user interface) and screen captures.

Icons are system-independent, so there are no reasons to give them class names or to be concerned about their file type.

On the other hand, screen captures are system-dependent, so it is important that different systems can display the appropriate screen captures. To do this, vendors need to be able to create a zip file of screen captures that the help system can display properly and automatically:

  • Screen captures must be ".png" files.
  • Image declarations must not specify image sizes.
  • Image declarations should have "alt" attributes (this is an accessibility feature).
  • Image declarations may have a <title> attribute.

The default platform for screen captures is Windows XP.

<img border="0" src="../images/Image201_fillet" alt="Define a New File Type dialog">
IndexingExample
Eclipse indexes its help files by looking at the text

in the page and weighting titles over paragraphs. However, there can be times when you want the index to show text that does not display on the page. For example, if Eclipse uses its own terminology for a function, you might want users to be able to look up synonyms.

To have the Eclipse index generate a hit for "autosave" (a function that Eclipse has under another name) add a meta "keywords" tag before the </head> tag.

<meta name="keywords" content="autosave">