Changeset 3371


Ignore:
Timestamp:
May 24, 2007, 9:33:13 AM (14 years ago)
Author:
Martin Svensson
Message:

Removed empty lines in programlistings

Location:
trunk/doc/src/docbook/developerdoc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/src/docbook/developerdoc/plugin_developer.xml

    r3366 r3371  
    8181        <example id="plugin_developer.organize.build.file">
    8282          <title>A simple build file</title>
    83           <programlisting>
    84 &lt;?xml version="1.0" encoding="UTF-8"?&gt;
     83<programlisting>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    8584&lt;project
    8685   name="MyPlugin"
     
    121120
    122121    &lt;/target&gt;
    123 &lt;/project&gt;
    124 </programlisting>
     122&lt;/project&gt; </programlisting>
    125123        </example>
    126124        <para>
     
    132130          <sgmltag class="attribute">manifest</sgmltag>
    133131          attribute of the <sgmltag class="starttag">jar</sgmltag> tag.
    134           <programlisting>
    135 Manifest-Version: 1.0
    136 Class-Path: OtherJar.jar ASecondJar.jar
    137 </programlisting>
     132<programlisting>Manifest-Version: 1.0
     133Class-Path: OtherJar.jar ASecondJar.jar</programlisting>
    138134        </para>
    139135      </sect3>
     
    240236              <example id="net.sf.basedb.core.plugin.Plugin.getAbout">
    241237                <title>A typical implementation stores this information in a static field</title>
    242                 <programlisting>
    243 private static final About about = new AboutImpl
     238<programlisting>private static final About about = new AboutImpl
    244239(
    245240   "Spot images creator",
     
    256251{
    257252   return about;
    258 }
    259 </programlisting>
     253}</programlisting>
    260254              </example>
    261255            </listitem>
     
    316310              <example id="net.sf.basedb.core.plugin.Plugin.getMainType">
    317311                <title>A typical implementation just return one of the values</title>
    318                 <programlisting>
    319 public Plugin.MainType getMainType()
     312<programlisting>public Plugin.MainType getMainType()
    320313{
    321314   return Plugin.MainType.OTHER;
    322 }
    323 </programlisting>
     315}</programlisting>
    324316              </example>
    325317            </listitem>
     
    435427              <example id="net.sf.basedb.core.plugin.Plugin.init">
    436428                <title>The <classname>AbstractPlugin</classname> implementation of this Plugin.init()</title>
    437                 <programlisting>
    438 protected SessionControl sc = null;
     429<programlisting>protected SessionControl sc = null;
    439430protected ParameterValues configuration = null;
    440431protected ParameterValues job = null;
     
    452443   this.configuration = configuration;
    453444   this.job = job;
    454 }
    455 </programlisting>
     445}</programlisting>
    456446              </example>
    457447            </listitem>
     
    522512                  method
    523513                </title>
    524                 <programlisting>
    525 public void run(Request request, Response response, ProgressReporter progress)
     514<programlisting>public void run(Request request, Response response, ProgressReporter progress)
    526515{
    527516   // Open a connection to the database
     
    547536      if (dc != null) dc.close();
    548537   }
    549 }
    550 </programlisting>
     538}</programlisting>
    551539              </example>
    552540            </listitem>
     
    576564                  method to null
    577565                </title>
    578                 <programlisting>
    579 /**
     566<programlisting>/**
    580567   Clears the variables set by the init method. If a subclass
    581568   overrides this method it is recommended that it also calls super.done().
     
    586573   job = null;
    587574   sc = null;
    588 }
    589                 </programlisting>
     575}</programlisting>
    590576              </example>
    591577            </listitem>
     
    695681                  <methodname>getGuiContexts</methodname>
    696682                </title>
    697                 <programlisting>
    698 // From the net.sf.basedb.plugins.RawDataFlatFileImporter plug-in
     683<programlisting>// From the net.sf.basedb.plugins.RawDataFlatFileImporter plug-in
    699684private static final Set&lt;GuiContext&gt; guiContexts =
    700685   Collections.singleton(new GuiContext(Item.RAWBIOASSAY, GuiContext.Type.ITEM));
     
    703688{
    704689   return <returnvalue>guiContexts</returnvalue>;
    705 }
    706 </programlisting>
     690}</programlisting>
    707691              </example>
    708692            </listitem>
     
    772756                  <methodname>isInContext</methodname>
    773757                </title>
    774                 <programlisting>
    775 /**
     758<programlisting>/**
    776759   Returns null if the item is a {@link RawBioAssay} of the correct
    777760   {@link RawDataType} and doesn't already have spots.
     
    802785   }
    803786   return message;   
    804 }
    805 </programlisting>
     787}</programlisting>
    806788              </example>
    807789            </listitem>
     
    873855                  from and if existing items should be updated or not
    874856                </title>
    875                 <programlisting >
    876 // The complete request information
     857<programlisting >// The complete request information
    877858private RequestInformation configure Job;
    878859
     
    935916   }
    936917   return configureJob;
    937 }
    938 </programlisting>
     918}</programlisting>
    939919              </example>
    940920              <para>
     
    951931              </para>
    952932             
    953               <programlisting>
    954 StringParameterType stringPT = new StringParameterType(255, null, true);
     933<programlisting>StringParameterType stringPT = new StringParameterType(255, null, true);
    955934PluginParameter one = new PluginParameter("one", "One", "First string", stringPT);
    956935PluginParameter two = new PluginParameter("two", "Two", "Second string", stringPT);
    957 // ... and so on
    958 </programlisting>
     936// ... and so on</programlisting>
    959937              <para>
    960938                The
     
    10631041                parameters page.
    10641042              </para>
    1065               <programlisting>
    1066 PluginParameter firstSection = new PluginParameter(null, "First section", null, null);
     1043<programlisting>PluginParameter firstSection = new PluginParameter(null, "First section", null, null);
    10671044PluginParameter secondSection = new PluginParameter(null, "Second section", null, null);
    10681045// ...
     
    10741051parameters.add(secondSection);
    10751052parameters.add(firstParameterInSecondSection);
    1076 parameters.add(secondParameteInSecondSection);
    1077 </programlisting>
     1053parameters.add(secondParameteInSecondSection);</programlisting>
    10781054            </listitem>
    10791055          </varlistentry>
     
    11441120                  Configuration implementation building on the examples above
    11451121                </title>
    1146                 <programlisting>
    1147 public void configure(GuiContext context, Request request, Response response)
     1122<programlisting>public void configure(GuiContext context, Request request, Response response)
    11481123{
    11491124   String command = request.getCommand();
     
    11791154      response.setError(ex.getMessage(), Arrays.asList(ex));
    11801155   }
    1181 }
    1182 </programlisting>
     1156}</programlisting>
    11831157              </example>
    11841158             
     
    16121586              </parameter>
    16131587            </simpara>
    1614             <programlisting>
    1615 // Plugin generate PluginParameter
     1588<programlisting>// Plugin generate PluginParameter
    16161589StringParameterType stringPT = new StringParameterType(255, null, true);
    16171590PluginParameter one = new PluginParameter("one", "One", "First string", stringPT);
     
    16201593// JSP should name fields as:
    16211594First string: &lt;input type="text" name="parameter:one"&gt;&lt;br&gt;
    1622 Second string: &lt;input type="text" name="parameter:two"&gt;
    1623 </programlisting>
     1595Second string: &lt;input type="text" name="parameter:two"&gt;</programlisting>
    16241596          </listitem>
    16251597          <listitem>
     
    16301602            as shown below.
    16311603          </simpara>
    1632           <programlisting>
    1633 &lt;form action="index.jsp" method="post"&gt;
     1604<programlisting>&lt;form action="index.jsp" method="post"&gt;
    16341605&lt;input type="hidden" name="ID" value="&lt;%=ID%&gt;"&gt;
    16351606&lt;input type="hidden" name="cmd" value="SetParameters"&gt;
    16361607...
    1637 &lt;/form&gt;
    1638 </programlisting>
     1608&lt;/form&gt;</programlisting>
    16391609
    16401610          </listitem>
     
    16461616              object created by your plug-in.
    16471617            </para>
    1648             <programlisting>
    1649 // Get session control and it's ID (required to post to index.jsp)
     1618<programlisting>// Get session control and it's ID (required to post to index.jsp)
    16501619final SessionControl sc = Base.getExistingSessionControl(pageContext, true);
    16511620final String ID = sc.getId();
     
    16601629PluginDefinition job =
    16611630   (PluginDefinition)sc.getSessionSetting("plugin.configure.job");
    1662 RequestInformation ri = pcRequest.getRequestInformation();
    1663 </programlisting>
     1631RequestInformation ri = pcRequest.getRequestInformation();</programlisting>
    16641632
    16651633    </sect2>
     
    17071675    </para>
    17081676   
    1709     <programlisting>
    1710 private static final Set&lt;GuiContext&gt; guiContexts =
     1677<programlisting>private static final Set&lt;GuiContext&gt; guiContexts =
    17111678   Collections.singleton(new GuiContext(Item.BIOASSAYSET, GuiContext.Type.ITEM));
    17121679
     
    17141681{
    17151682   return guiContexts;
    1716 }
    1717 </programlisting>
     1683}</programlisting>
    17181684
    17191685      <para>
  • trunk/doc/src/docbook/developerdoc/write_docbook_doc.xml

    r3360 r3371  
    146146                <example id="write_docbook_doc.examples.chapterbody">
    147147                  <title>Example of a chapter</title>
    148                   <programlisting>
    149 &lt;?xml version="1.0" encoding="UTF-8"?&gt;
     148<programlisting>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
    150149&lt;!DOCTYPE chapter PUBLIC
    151150  "-//Dawid Weiss//DTD DocBook V3.1-Based Extension for XML and graphics inclusion//EN"
     
    176175      &lt;/sect2&gt;     
    177176   &lt;/sect1&gt;
    178 &lt;/chapter&gt;
    179 </programlisting>
     177&lt;/chapter&gt;</programlisting>
    180178                </example>
    181179              </para>
     
    203201              <example id="write_docbook_doc.examples.include_chapter">
    204202                <title>Include a chapter</title>
    205                   <programlisting>
    206 &lt;part id="userdoc"&gt;
     203<programlisting>&lt;part id="userdoc"&gt;
    207204   &lt;title&gt;User documentation&lt;/title&gt;
    208205   &lt;include file= "about.xml"/&gt;
     
    222219   &lt;include file="experiments_analysis.xml"/&gt;
    223220   &lt;include file="import_export_data.xml"/&gt;
    224 &lt;/part&gt;
    225                   </programlisting>
     221&lt;/part&gt;</programlisting>
    226222                </example>
    227223              <note>
     
    252248        as an attribute to the <sgmltag class="starttag">chapter</sgmltag> tag, for example:
    253249      </para>
    254       <programlisting>
    255 &lt;chapter id="resources" chunked="0"&gt;
    256 </programlisting>
     250      <programlisting>&lt;chapter id="resources" chunked="0"&gt;</programlisting>
    257251      <para>
    258252        This will stop the chunking of <sgmltag class="starttag">sect1</sgmltag>
     
    267261        section in a separate chunk:
    268262      </para>
    269       <programlisting>
    270 &lt;sect1 id="sect.with.large.sect2" chunked="1"&gt;
    271 </programlisting>
     263      <programlisting>&lt;sect1 id="sect.with.large.sect2" chunked="1"&gt;</programlisting>
    272264   
    273265    </sect2>
     
    420412      <example id="write_docbook_doc.examples.helptexttag">
    421413        <title>How to use the help text tag</title>
    422         <programlisting>
    423 &lt;sect1&gt;
     414<programlisting>&lt;sect1&gt;
    424415   &lt;helptext external_id="<replaceable>helptexts.external.id</replaceable>" title="<replaceable>The title</replaceable>"&gt;
    425416      <replaceable>The text that also should be used as a helptext in the program.</replaceable>
     
    429420      &lt;/seeother&gt;
    430421   &lt;/helptext&gt;
    431 &lt;/sect1&gt;
    432 </programlisting>
     422&lt;/sect1&gt;</programlisting>
    433423      </example>
    434424     
     
    444434          outputted to the help texts.
    445435        </para>     
    446         <programlisting>
    447 &lt;nohelp&gt;see &lt;xref linkend="chapter11" /&gt;&lt;/nohelp&gt;</programlisting>
     436        <programlisting>&lt;nohelp&gt;see &lt;xref linkend="chapter11" /&gt;&lt;/nohelp&gt;</programlisting>
    448437      </sect3>
    449438     
     
    472461        </variablelist>
    473462       
    474 <programlisting>
    475 &lt;seeother&gt;
     463<programlisting>&lt;seeother&gt;
    476464  &lt;other external_id="userpreferences.password"&gt;Change password&lt;/other&gt;
    477465  &lt;other external_id="userpreferences.other"&gt;Other information&lt;/other&gt;
    478 &lt;/seeother&gt;
    479 </programlisting>
     466&lt;/seeother&gt;</programlisting>
    480467       
    481468        <para>
     
    501488      </para>
    502489     
    503       <programlisting>
    504 ant docbook
     490<programlisting>ant docbook
    505491ant test
    506492cd build/test
    507 ./run.sh TestHelp
    508 </programlisting>
     493./run.sh TestHelp</programlisting>
    509494      </sect3>
    510495     
     
    793778            Method with no arguments and a return value
    794779          </title>
    795           <programlisting>
    796 &hellip;
     780<programlisting>&hellip;
    797781&lt;methodsynopsis language="java"&gt;
    798782   &lt;modifier&gt;public&lt;/modifier&gt;
     
    801785   &lt;void /&gt;
    802786&lt;/methodsynopsis&gt;
    803 &hellip;
    804 </programlisting>
     787&hellip;</programlisting>
    805788        </example>
    806789        <example id="write_docbook_doc.examples.methodimpl1">
     
    808791            Method with arguments and no return value
    809792          </title>
    810           <programlisting>
    811 &hellip;
     793<programlisting>&hellip;
    812794&lt;methodsynopsis language="java"&gt;
    813795   &lt;modifier&gt;public&lt;/modifier&gt;
     
    827809   &lt;/methodparam&gt;
    828810&lt;/methodsynopsis&gt;
    829 &hellip;
    830 </programlisting>
     811&hellip;</programlisting>
    831812        </example>
    832813       
     
    923904        <example id="write_docbook_doc.examples.guielements">
    924905          <title>Describe a menu choice</title>
    925           <programlisting>
    926 &hellip;         
     906<programlisting>&hellip;         
    927907&lt;menuchoice&gt;
    928908   &lt;guimenu&gt;Administrate&lt;/guimenu&gt;
     
    930910   &lt;guimenuitem&gt;Types&lt;/guimenuitem&gt;
    931911&lt;/menuchoice&gt;
    932 &hellip;
    933           </programlisting>
     912&hellip;</programlisting>
    934913          <para>
    935914            In the text it will look like this:
     
    958937          is implemented with the following code
    959938        </para>
    960         <programlisting>
    961 &lt;figure id="write_docbook_doc.figures.menuchoice"&gt;
     939<programlisting>&lt;figure id="write_docbook_doc.figures.menuchoice"&gt;
    962940  &lt;title&gt;The home page&lt;/title&gt;
    963941  &lt;screenshot&gt;
     
    972950    &lt;/mediaobject&gt;
    973951  &lt;/screenshot&gt;
    974 &lt;/figure&gt;
    975         </programlisting>
     952&lt;/figure&gt;</programlisting>
    976953      </example>
    977954      <warning>
     
    10471024        <title>Use spaces instead of tabs for indentation</title>
    10481025        <para>
    1049           More then 80 characters in a row of program listings or
    1050           other verbatim elements will risk to put the end of the
    1051           row outside the text area. A tab is usually displayed as 8 spaces
    1052           which will use up too much space.
     1026          Use spaces for indentation in program listing, this is because of the
     1027          tab-indentations will sooner or later cause corrupt text.
    10531028        </para>
    10541029      </warning>
     1030      <note>
     1031        <itemizedlist>
     1032          <listitem>
     1033            <simpara>
     1034              The verbatim text must begin on the same row as the start tag of a
     1035              verbatim element if you don't want an empty line at the top of the
     1036              text area.
     1037            </simpara>
     1038          </listitem>
     1039          <listitem>
     1040            <simpara>
     1041              The verbatim text is splitted into several lines if the text contains
     1042              more then 80 characters. This could give the text an unwanted look and
     1043              it's therefore recommended to manually insert new lines to have controll
     1044              over layout of the text
     1045            </simpara>
     1046          </listitem>
     1047        </itemizedlist>
     1048      </note>
    10551049      <example id="write_docbook_doc.examples.example">
    10561050        <title>Example in the documentation</title>
     
    10601054          is written in the corresponding XML-file.
    10611055        </para>
    1062         <programlisting>
    1063 &hellip;
     1056<programlisting>&hellip;
    10641057&lt;example id="net.sf.basedb.core.plugin.Plugin.getAbout"&gt;
    10651058   &lt;title&gt;A typical implementation stores this information
    10661059      in a static field&lt;/title&gt;
    1067    &lt;programlisting&gt;
    1068 private static final About about = new AboutImpl
     1060   &lt;programlisting&gt;private static final About about = new AboutImpl
    10691061(
    10701062   "Spot images creator",
     
    10811073{
    10821074   return about;
    1083 }
    1084    &lt;/programlisting&gt;
     1075} &lt;/programlisting&gt;
    10851076&lt;/example&gt;
    1086 &hellip;
    1087 </programlisting>
     1077&hellip;</programlisting>
    10881078      </example>     
    10891079    </sect2>
     
    11981188      <example id="write_docbook_doc.examples.variablelist">
    11991189        <title>Example how to write a variable list</title>
    1200         <programlisting>
    1201 &hellip;
     1190<programlisting>&hellip;
    12021191&lt;variablelist&gt;
    12031192   &lt;varlistentry&gt;
     
    12181207      &lt;/listitem&gt;
    12191208   &lt;/varlistentry&gt;
    1220 &lt;/variablelist&gt;
    1221 </programlisting>
     1209&lt;/variablelist&gt;</programlisting>
    12221210      </example>
    12231211    </sect2>
     
    12681256      <example id="write_docbook_doc.examples.links">
    12691257        <title>Links</title>
    1270         <programlisting>
    1271 &hellip;
     1258<programlisting>&hellip;
    12721259&lt;xref linkend="write_docbook_doc.usedtags.links" /&gt;
    12731260&lt;link linkend="write_docbook_doc.usedtags.links"&gt;Link to this section&lt;/link&gt;
    12741261&lt;ulink url="http://base.thep.lu.se"&gt;Base2's homepage&lt;/ulink&gt;
    1275 &hellip;
    1276 </programlisting>
     1262&hellip;</programlisting>
    12771263        <para>
    12781264          The first element will autogenerate the linked section's/chapter's title as a
Note: See TracChangeset for help on using the changeset viewer.