Difference between revisions of "ArtefactSyntax"

From OOModels
Jump to navigationJump to search
m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{HelpPagesHeaderBar}}
All artefact pages share a common structure, as described here. The [[DownloadManager]] and the [[ArtefactConversion]] rely on this structure.
All artefact pages share a common structure, as described here. The [[DownloadManager]] and the [[ArtefactConversion]] rely on this structure.


Line 37: Line 39:
* Inbetween you place your code, '''each line indented by exactly one additional, single space'''. Please note that this is normal wiki syntax; it tell's the wiki that your code is preformatted, but still allows the use of wiki syntax. So, e.g. you can link from within your code section to other wiki pages, or you can use [[SyntaxColoring]] to make your code more readable.
* Inbetween you place your code, '''each line indented by exactly one additional, single space'''. Please note that this is normal wiki syntax; it tell's the wiki that your code is preformatted, but still allows the use of wiki syntax. So, e.g. you can link from within your code section to other wiki pages, or you can use [[SyntaxColoring]] to make your code more readable.
* You can use additional ''div'' and ''span'' tags inside your code, as long as they occur in pairs. These tags themselves are removed before downloading, so you can use them e.g. for [[SyntaxColoring]] or highlighting parts of your code.
* You can use additional ''div'' and ''span'' tags inside your code, as long as they occur in pairs. These tags themselves are removed before downloading, so you can use them e.g. for [[SyntaxColoring]] or highlighting parts of your code.
==Ancestors==
'''Please make sure to add all ancestor package pages, too'''. Mediawiki does not automatically create such pages. If you want to make your artefact browsable, you have to add all ancestor pages manually. You might need to refresh the ancestor pages afterwards (clearing the cache, with help of the action ''purge''), to allow the ''SubPages'' tag to create updated content.

Latest revision as of 09:28, 14 July 2008

All artefact pages share a common structure, as described here. The DownloadManager and the ArtefactConversion rely on this structure.

Metabox[edit]

First part of each artefact page is a socalled Metabox. It provides meta data of the artefact and is automatically nicely rendered. The Metabox is a self-describing wiki template (read more about the Metabox template).

The Metabox entry on your page might e.g. look like this:

{{Metabox
| Meta_Category = Type:org/oomodels/wiki/Model
| Meta_Type     = Type:org/ooem/UMLModelElement/1.0
}}

Arbitrary Text[edit]

You can add arbitrary text to an artefact page, as long as it does not look like the Metabox or like the Code section. Typically, you add a description of the artefact. Alternatively, you might want to put the desciption into your artefact, as an embedded documentation commentary or alike.

Code[edit]

The main part of the artefact page is the code section. It's format is as follows:

<div class="code">
 .................
 ... your code ...
 .................
</div>

It is important to stricktly stick to this format. Please be sure to check the following:

  • The code section starts with a line containing solely a start div tag of class "code": <div class="code">, no additional spaces in front or at end of line
  • The code section ends with a line containing solely an end div tag: </div>, no additional spaces in front or at end of line
  • Inbetween you place your code, each line indented by exactly one additional, single space. Please note that this is normal wiki syntax; it tell's the wiki that your code is preformatted, but still allows the use of wiki syntax. So, e.g. you can link from within your code section to other wiki pages, or you can use SyntaxColoring to make your code more readable.
  • You can use additional div and span tags inside your code, as long as they occur in pairs. These tags themselves are removed before downloading, so you can use them e.g. for SyntaxColoring or highlighting parts of your code.

Ancestors[edit]

Please make sure to add all ancestor package pages, too. Mediawiki does not automatically create such pages. If you want to make your artefact browsable, you have to add all ancestor pages manually. You might need to refresh the ancestor pages afterwards (clearing the cache, with help of the action purge), to allow the SubPages tag to create updated content.