External Pretty Code Snippet
This code gets external code and displays it using a pretty printer syntax.Code
## Use a variable to bypass the code macro escaping running before velocity.
## The upper case is here to make sure it's bypassed even if another code macro
## follows our block
#set($codevar = "{CODE}")
$codevar.toLowerCase()
$xwiki.getURLContent("http://fisheye2.cenqua.com/browse/~raw,r=trunk/xwiki/xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/api/Api.java")
$codevar.toLowerCase()Result
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>FishEye: file xwiki/</title> <link rel="SHORTCUT ICON" href="/favicon.ico" /> <link rel="stylesheet" href="/static/k5f7ca/css/headerfooter.css" type="text/css" /> <link rel="stylesheet" href="/static/k5f7ca/main.css" type="text/css" /> <link rel="stylesheet" href="/static/k5f7ca/diff.css" type="text/css" /> <link rel="stylesheet" href="/uar/browser.css" type="text/css" /> <link rel="stylesheet" href="/static/k5f7ca/custom.css" type="text/css" /> <link rel="stylesheet" href="/static/k5f7ca/synhi.css" type="text/css" /> <script src="/static/k5f7ca/global.js" type="text/javascript" language="Javascript1.2" charset="utf-8"></script> <script type="text/javascript" language="Javascript1.2"> var fishEyePageContext = ''; var fishEyeSTATICDIR = 'static/k5f7ca'; </script> </head> <body> <div id="header"> <h1> <a class="fe_logo" href="/">FishEye</a> </h1> <ul> <li > <a href="/chart/xwiki/">Chart</a> </li> <li > <a href="/search/xwiki/">Search</a> </li> <li > <a href="/changelog/xwiki/">Changelog</a> </li> <li class="active" > <a href="/browse/xwiki/">Browse</a> </li> <li> <a href="/cru/" class="crucibleicon">Crucible</a> </li> <li id="headerUserDetails"> Guest | <a href="/login?origUrl=/browse/%257Eraw%2Cr%3Dtrunk/xwiki/xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/api/Api.java">Login</a> | <a target="_help" href="http://docs.atlassian.com/fisheye/docs-015/FishEye+Documentation+Home" class="head_help" title="">Help</a> </li> </ul> </div> <table id="secondHeader" cellspacing="0"> <tr> <td id="breadCrumb" colspan="2"> File: <a class="breadCrumbRepository" href="/browse/xwiki">xwiki</a>:/<a href="/browse/xwiki/xwiki-platform">xwiki-platform</a>/<a href="/browse/xwiki/xwiki-platform/core">core</a>/<a href="/browse/xwiki/xwiki-platform/core/trunk">trunk</a>/<a href="/browse/xwiki/xwiki-platform/core/trunk/xwiki-core">xwiki-core</a>/<a href="/browse/xwiki/xwiki-platform/core/trunk/xwiki-core/src">src</a>/<a href="/browse/xwiki/xwiki-platform/core/trunk/xwiki-core/src/main">main</a>/<a href="/browse/xwiki/xwiki-platform/core/trunk/xwiki-core/src/main/java">java</a>/<a href="/browse/xwiki/xwiki-platform/core/trunk/xwiki-core/src/main/java/com">com</a>/<a href="/browse/xwiki/xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn">xpn</a>/<a href="/browse/xwiki/xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki">xwiki</a>/<a href="/browse/xwiki/xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/api">api</a>/<a href="/browse/xwiki/xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/api/Api.java">Api.java</a> </td> <td id="quickSearch"> <form method="get" action="/qsearch/xwiki/"> Quick Search: <input class="qsInput" name="q" type="text" size="15"> </form> </td> </tr> </table> <body style="text-align:center"> <div class="layoutCentredPane"> <div class="box" style="text-align:left"> <h3>File Deleted</h3> <div class="welcomePane"> <p> <br/> Revision <font class="ftFileName">11508 (trunk)</font> of <font class="ftFileName">xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/api/Api.java</font> is currently deleted. <br/> <br/> This file may be re-added in the future. <br/> <br/> View file history <span class="csFilename"><a href="/browse/xwiki/"></a></span>. </p> </div> </div> </div> <div class="licensemessage"> Crucible: Open Source License registered to Atlassian. <br/><b>You have 24 days before your maintenance expires.</b> You can renew your license at <a href="http://www.atlassian.com/fisheye/renew">http://www.atlassian.com/fisheye/renew</a> </div> <div class="bottomshadow"> </div> <div id="poweredby" class="smalltext"> <a class="smalltext" href="http://www.atlassian.com/software/fisheye/">Atlassian FishEye</a>, <a class="smalltext" href="http://www.atlassian.com/software/fisheye/">Subversion, CVS & Perforce analysis</a>. (Version:1.5.5 Build:build-dev18790 2008-08-11 ) - <a class="smalltext" href="/admin/">Administration</a> <!-- TODO add link to instance administrators when available - <a href="/administrators.action">Contact Administrators</a> --> - Page generated 2008-09-08 01:27 -0500 </div> <!-- page produced in 757 ms --> </body> </html>
Version 2.1 last modified by VincentMassol on 09/12/2007 at 14:02
Document data
Attachments:
No attachments for this document
Comments: 0