Jump to: navigation, search

EDT:Code snippets

Revision as of 15:15, 6 March 2012 by Tdramsey.us.ibm.com (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

To share a code snippet:

  • On the page of interest, click Edit and, if necessary, log in to eclipse.org.
  • Add a section or update an existing one; but always include your code in the following wikitext markup:
        <source lang="java">
          // put code here 
  • The <source> tag is used instead of <code> or <pre> since it provides syntax highlighting similar to an advanced source code editor. We use the Java language highlighting, since a highlighter for EGL doesn't exist (yet). If you are interested in writing a syntax highlighter for EGL, the GeSHi (Generic Syntax Highlighter) extension is used.
  • For longer examples, consider adding line numbers using line="GESHI_NORMAL_LINE_NUMBERS" in the source tag, though for some reason then the snippet doesn't appear in a colored background.
  • To add most of your content, click Wikitext or disable the Rich Editor.
  • Before you create a new page, read these instructions.

For help with editing, see Wikitext examples.