Author: jstrachan Date: Thu Feb 26 09:45:44 2009 New Revision: 748068 URL: http://svn.apache.org/viewvc?rev=748068&view=rev Log: added pretty printing rendering of routes as XML using the apache licensed prettify library http://code.google.com/p/google-code-prettify/
Added: camel/trunk/components/camel-web/src/main/webapp/css/prettify/ camel/trunk/components/camel-web/src/main/webapp/css/prettify/prettify.css (with props) camel/trunk/components/camel-web/src/main/webapp/js/prettify/ camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-css.js (with props) camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-hs.js (with props) camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-lisp.js (with props) camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-lua.js (with props) camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-ml.js (with props) camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-proto.js (with props) camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-sql.js (with props) camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-vb.js (with props) camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-wiki.js (with props) camel/trunk/components/camel-web/src/main/webapp/js/prettify/prettify.js (with props) camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RouteResource/edit.jsp (with props) Modified: camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/Constants.java camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RouteResource.java camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/util/JAXBContextResolver.java camel/trunk/components/camel-web/src/main/webapp/WEB-INF/decorators/main.jsp camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RouteResource/index.jsp Modified: camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/Constants.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/Constants.java?rev=748068&r1=748067&r2=748068&view=diff ============================================================================== --- camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/Constants.java (original) +++ camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/Constants.java Thu Feb 26 09:45:44 2009 @@ -26,6 +26,7 @@ public static final String DATA_MIME_TYPES = "text/xml,application/xml,application/json"; public static final String DOT_MIMETYPE = "text/vnd.graphviz"; + public static final String JAXB_PACKAGES = org.apache.camel.model.Constants.JAXB_CONTEXT_PACKAGES + ":org.apache.camel.web.model"; private Constants() { } Modified: camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RouteResource.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RouteResource.java?rev=748068&r1=748067&r2=748068&view=diff ============================================================================== --- camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RouteResource.java (original) +++ camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RouteResource.java Thu Feb 26 09:45:44 2009 @@ -17,9 +17,14 @@ package org.apache.camel.web.resources; import java.io.IOException; +import java.io.StringWriter; import javax.ws.rs.GET; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Marshaller; +import javax.xml.transform.Result; import org.apache.camel.model.RouteType; import org.apache.camel.view.RouteDotGenerator; @@ -33,6 +38,7 @@ public class RouteResource extends CamelChildResourceSupport { private RouteType route; + public RouteResource(RoutesResource routesResource, RouteType route) { super(routesResource.getContextResource()); this.route = route; @@ -48,6 +54,20 @@ } /** + * Returns the XML text + */ + public String getRouteXml() throws JAXBException { + JAXBContext context = JAXBContext.newInstance(Constants.JAXB_PACKAGES); + Marshaller marshaller = context.createMarshaller(); + marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); + // TODO fix to use "" namespace prefix + // using this https://jaxb.dev.java.net/nonav/2.1.10/docs/vendorProperties.html#prefixmapper + StringWriter buffer = new StringWriter(); + marshaller.marshal(route, buffer); + return buffer.toString(); + } + + /** * Returns the Graphviz DOT <a href="http://camel.apache.org/visualisation.html">Visualisation</a> * of this route */ Modified: camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/util/JAXBContextResolver.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/util/JAXBContextResolver.java?rev=748068&r1=748067&r2=748068&view=diff ============================================================================== --- camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/util/JAXBContextResolver.java (original) +++ camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/util/JAXBContextResolver.java Thu Feb 26 09:45:44 2009 @@ -42,7 +42,7 @@ JSONConfiguration.Builder builder = JSONConfiguration.mapped(); //JSONConfiguration.Builder builder = JSONConfiguration.natural(); - this.packages = Constants.JAXB_CONTEXT_PACKAGES + ":org.apache.camel.web.model"; + this.packages = org.apache.camel.web.resources.Constants.JAXB_PACKAGES; this.context = new JSONJAXBContext(builder.build(), packages); } Modified: camel/trunk/components/camel-web/src/main/webapp/WEB-INF/decorators/main.jsp URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/WEB-INF/decorators/main.jsp?rev=748068&r1=748067&r2=748068&view=diff ============================================================================== --- camel/trunk/components/camel-web/src/main/webapp/WEB-INF/decorators/main.jsp (original) +++ camel/trunk/components/camel-web/src/main/webapp/WEB-INF/decorators/main.jsp Thu Feb 26 09:45:44 2009 @@ -32,7 +32,7 @@ <decorator:head/> </head> -<body> +<body onload='<decorator:getProperty property="body.onload"/>'> <div class="white_box"> Added: camel/trunk/components/camel-web/src/main/webapp/css/prettify/prettify.css URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/css/prettify/prettify.css?rev=748068&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/main/webapp/css/prettify/prettify.css (added) +++ camel/trunk/components/camel-web/src/main/webapp/css/prettify/prettify.css Thu Feb 26 09:45:44 2009 @@ -0,0 +1,27 @@ +/* Pretty printing styles. Used with prettify.js. */ + +.str { color: #080; } +.kwd { color: #008; } +.com { color: #800; } +.typ { color: #606; } +.lit { color: #066; } +.pun { color: #660; } +.pln { color: #000; } +.tag { color: #008; } +.atn { color: #606; } +.atv { color: #080; } +.dec { color: #606; } +pre.prettyprint { padding: 2px; border: 1px solid #888; } + +...@media print { + .str { color: #060; } + .kwd { color: #006; font-weight: bold; } + .com { color: #600; font-style: italic; } + .typ { color: #404; font-weight: bold; } + .lit { color: #044; } + .pun { color: #440; } + .pln { color: #000; } + .tag { color: #006; font-weight: bold; } + .atn { color: #404; } + .atv { color: #060; } +} Propchange: camel/trunk/components/camel-web/src/main/webapp/css/prettify/prettify.css ------------------------------------------------------------------------------ svn:executable = * Propchange: camel/trunk/components/camel-web/src/main/webapp/css/prettify/prettify.css ------------------------------------------------------------------------------ svn:mime-type = text/css Added: camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-css.js URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-css.js?rev=748068&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-css.js (added) +++ camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-css.js Thu Feb 26 09:45:44 2009 @@ -0,0 +1,2 @@ +PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[ \t\r\n\f]+/,null," \t\r\n\u000c"]],[["str",/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],["str",/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["str",/^\([^\)\"\']*\)/,/\burl/i],["kwd",/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["kwd",/^-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*(?=\s*:)/i],["com",/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],["com",/^(?:<!--|--\>)/], +["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#(?:[0-9a-f]{3}){1,2}/i],["pln",/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],["pun",/^[^\s\w\'\"]+/]]),["css"]); Propchange: camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-css.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-css.js ------------------------------------------------------------------------------ svn:executable = * Added: camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-hs.js URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-hs.js?rev=748068&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-hs.js (added) +++ camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-hs.js Thu Feb 26 09:45:44 2009 @@ -0,0 +1,2 @@ +PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\x0B\x0C\r ]+/,null,"\t\n\u000b\u000c\r "],["str",/^\"(?:[^\"\\\n\x0C\r]|\\[\s\S])*(?:\"|$)/,null,'"'],["str",/^\'(?:[^\'\\\n\x0C\r]|\\[^&])\'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+\-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:(?:--+(?:[^\r\n\x0C_:\"\'\(\),;\[\]`\{\}][^\r\n\x0C_]*)?(?=[\x0C\r\n]|$))|(?:\{-(?:[^-]|-+[^-\}])*-\}))/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^a-zA-Z0-9\']|$)/, +null],["pln",/^(?:[A-Z][\w\']*\.)*[a-zA-Z][\w\']*/],["pun",/^[^\t\n\x0B\x0C\r a-zA-Z0-9\'\"]+/]]),["hs"]); Propchange: camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-hs.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-hs.js ------------------------------------------------------------------------------ svn:executable = * Added: camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-lisp.js URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-lisp.js?rev=748068&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-lisp.js (added) +++ camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-lisp.js Thu Feb 26 09:45:44 2009 @@ -0,0 +1,3 @@ +(function(){var a=null; +PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(/,a,"("],["clo",/^\)/,a,")"],["com",/^;[^\r\n]*/,a,";"],["pln",/^[\t\n\r \xA0]+/,a,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,a,'"']],[["kwd",/^(?:block|c[ad]+r|catch|cons|defun|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,a],["lit",/^[+\-]?(?:\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[eEdD][+\-]?\d+)?)/],["lit", +/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),["cl","el","lisp","scm"])})() \ No newline at end of file Propchange: camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-lisp.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-lisp.js ------------------------------------------------------------------------------ svn:executable = * Added: camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-lua.js URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-lua.js?rev=748068&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-lua.js (added) +++ camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-lua.js Thu Feb 26 09:45:44 2009 @@ -0,0 +1,2 @@ +PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])*(?:\'|$))/,null,"\"'"]],[["com",/^--(?:\[(=*)\[[\s\S]*?(?:\]\1\]|$)|[^\r\n]*)/],["str",/^\[(=*)\[[\s\S]*?(?:\]\1\]|$)/],["kwd",/^(?:and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,null],["lit",/^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],["pln",/^[a-z_]\w*/i], +["pun",/^[^\w\t\n\r \xA0]+/]]),["lua"]); Propchange: camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-lua.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-lua.js ------------------------------------------------------------------------------ svn:executable = * Added: camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-ml.js URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-ml.js?rev=748068&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-ml.js (added) +++ camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-ml.js Thu Feb 26 09:45:44 2009 @@ -0,0 +1,2 @@ +PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["com",/^#(?:if[\t\n\r \xA0]+(?:[a-z_$][\w\']*|``[^\r\n\t`]*(?:``|$))|else|endif|light)/i,null,"#"],["str",/^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])*(?:\'|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\r\n]*|\(\*[\s\S]*?\*\))/],["kwd",/^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/], +["lit",/^[+\-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],["pln",/^(?:[a-z_]\w*[!?#]?|``[^\r\n\t`]*(?:``|$))/i],["pun",/^[^\t\n\r \xA0\"\'\w]+/]]),["fs","ml"]); Propchange: camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-ml.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-ml.js ------------------------------------------------------------------------------ svn:executable = * Added: camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-proto.js URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-proto.js?rev=748068&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-proto.js (added) +++ camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-proto.js Thu Feb 26 09:45:44 2009 @@ -0,0 +1 @@ +PR.registerLangHandler(PR.sourceDecorator({keywords:"bool bytes default double enum extend extensions false fixed32 fixed64 float group import int32 int64 max message option optional package repeated required returns rpc service sfixed32 sfixed64 sint32 sint64 string syntax to true uint32 uint64",cStyleComments:true}),["proto"]); Propchange: camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-proto.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-proto.js ------------------------------------------------------------------------------ svn:executable = * Added: camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-sql.js URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-sql.js?rev=748068&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-sql.js (added) +++ camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-sql.js Thu Feb 26 09:45:44 2009 @@ -0,0 +1,2 @@ +PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:[^\"\\]|\\.)*"|'(?:[^\'\\]|\\.)*')/,null,"\"'"]],[["com",/^(?:--[^\r\n]*|\/\*[\s\S]*?(?:\*\/|$))/],["kwd",/^(?:ADD|ALL|ALTER|AND|ANY|AS|ASC|AUTHORIZATION|BACKUP|BEGIN|BETWEEN|BREAK|BROWSE|BULK|BY|CASCADE|CASE|CHECK|CHECKPOINT|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMN|COMMIT|COMPUTE|CONSTRAINT|CONTAINS|CONTAINSTABLE|CONTINUE|CONVERT|CREATE|CROSS|CURRENT|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|CURSOR|DATABASE|DBCC|DEALLOCATE|DECLARE|DEFAULT|DELETE|DENY|DESC|DISK|DISTINCT|DISTRIBUTED|DOUBLE|DROP|DUMMY|DUMP|ELSE|END|ERRLVL|ESCAPE|EXCEPT|EXEC|EXECUTE|EXISTS|EXIT|FETCH|FILE|FILLFACTOR|FOR|FOREIGN|FREETEXT|FREETEXTTABLE|FROM|FULL|FUNCTION|GOTO|GRANT|GROUP|HAVING|HOLDLOCK|IDENTITY|IDENTITYCOL|IDENTITY_INSERT|IF|IN|INDEX|INNER|INSERT|INTERSECT|INTO|IS|JOIN|KEY|KILL|LEFT|LIKE|LINENO|LOAD|NATIONAL|NOCHECK|NONCLUSTERED|NOT|NULL|NULLIF|OF|OFF|OFFSETS|ON|OPEN|OPENDATA SOURCE|OPENQUERY|OPENROWSET|OPENXML|OPTION|OR|ORDER|OUTER|OVER|PERCENT|PLAN|PRECISION|PRIMARY|PRINT|PROC|PROCEDURE|PUBLIC|RAISERROR|READ|READTEXT|RECONFIGURE|REFERENCES|REPLICATION|RESTORE|RESTRICT|RETURN|REVOKE|RIGHT|ROLLBACK|ROWCOUNT|ROWGUIDCOL|RULE|SAVE|SCHEMA|SELECT|SESSION_USER|SET|SETUSER|SHUTDOWN|SOME|STATISTICS|SYSTEM_USER|TABLE|TEXTSIZE|THEN|TO|TOP|TRAN|TRANSACTION|TRIGGER|TRUNCATE|TSEQUAL|UNION|UNIQUE|UPDATE|UPDATETEXT|USE|USER|VALUES|VARYING|VIEW|WAITFOR|WHEN|WHERE|WHILE|WITH|WRITETEXT)(?=[^\w-]|$)/i, +null],["lit",/^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],["pln",/^[a-z_][\w-]*/i],["pun",/^[^\w\t\n\r \xA0]+/]]),["sql"]); Propchange: camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-sql.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-sql.js ------------------------------------------------------------------------------ svn:executable = * Added: camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-vb.js URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-vb.js?rev=748068&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-vb.js (added) +++ camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-vb.js Thu Feb 26 09:45:44 2009 @@ -0,0 +1,2 @@ +PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0\u2028\u2029]+/,null,"\t\n\r \u00a0\u2028\u2029"],["str",/^(?:[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})(?:[\"\u201C\u201D][cC]|$)|[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})*(?:[\"\u201C\u201D]|$))/,null,'"\u201c\u201d'],["com",/^[\'\u2018\u2019][^\r\n\u2028\u2029]*/,null,"'\u2018\u2019"]],[["kwd",/^(?:AddHandler|AddressOf|Alias|And|AndAlso|Ansi|As|Assembly|Auto|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|CBool|CByte|CChar|CDate|CDbl|CDec|Char|CInt|Class|CLng|CObj|Const|CShort|CSng|CStr|CType|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else|ElseIf|End|EndIf|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get|GetType|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|Let|Lib|Like|Long|Loop|Me|Mod|Module|MustInherit|MustOverride|MyBase|MyClass|Namespace|New|Next|Not|NotInheritable|NotOverridable|Object|On|Option|Optional|Or|OrElse| Overloads|Overridable|Overrides|ParamArray|Preserve|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|Select|Set|Shadows|Shared|Short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TypeOf|Unicode|Until|Variant|Wend|When|While|With|WithEvents|WriteOnly|Xor|EndIf|GoSub|Let|Variant|Wend)\b/i, +null],["com",/^REM[^\r\n\u2028\u2029]*/i],["lit",/^(?:True\b|False\b|Nothing\b|\d+(?:E[+\-]?\d+[FRD]?|[FRDSIL])?|(?:&H[0-9A-F]+|&O[0-7]+)[SIL]?|\d*\.\d+(?:E[+\-]?\d+)?[FRD]?|#\s+(?:\d+[\-\/]\d+[\-\/]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)?|\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)\s+#)/i],["pln",/^(?:(?:[a-z]|_\w)\w*|\[(?:[a-z]|_\w)\w*\])/i],["pun",/^[^\w\t\n\r \"\'\[\]\xA0\u2018\u2019\u201C\u201D\u2028\u2029]+/],["pun",/^(?:\[|\])/]]),["vb","vbs"]); Propchange: camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-vb.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-vb.js ------------------------------------------------------------------------------ svn:executable = * Added: camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-wiki.js URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-wiki.js?rev=748068&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-wiki.js (added) +++ camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-wiki.js Thu Feb 26 09:45:44 2009 @@ -0,0 +1 @@ +PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0a-gi-z0-9]+/,null,"\t\n\r \u00a0abcdefgijklmnopqrstuvwxyz0123456789"],["pun",/^[=*~\^\[\]]+/,null,"=*~^[]"]],[["kwd",/^#[a-z]+\b/,/(?:^|[\r\n])$/],["lit",/^(?:[A-Z][a-z][a-z0-9]+[A-Z][a-z][a-zA-Z0-9]+)\b/],["lang-",/^\{\{\{([\s\S]+?)\}\}\}/],["lang-",/^`([^\r\n`]+)`/],["str",/^https?:\/\/[^\/?#\s]*(?:\/[^?#\s]*)?(?:\?[^#\s]*)?(?:#\S*)?/i],["pln",/^[\s\S][^#=*~^A-Zh\{`\[]+/]]),["wiki"]); Propchange: camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-wiki.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: camel/trunk/components/camel-web/src/main/webapp/js/prettify/lang-wiki.js ------------------------------------------------------------------------------ svn:executable = * Added: camel/trunk/components/camel-web/src/main/webapp/js/prettify/prettify.js URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/prettify/prettify.js?rev=748068&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/main/webapp/js/prettify/prettify.js (added) +++ camel/trunk/components/camel-web/src/main/webapp/js/prettify/prettify.js Thu Feb 26 09:45:44 2009 @@ -0,0 +1,31 @@ +(function(){ +var j=null,n=true;window.PR_SHOULD_USE_CONTINUATION=n;window.PR_TAB_WIDTH=8;window.PR_normalizedHtml=window.PR=window.prettyPrintOne=window.prettyPrint=void 0;window._pr_isIE6=function(){var K=navigator&&navigator.userAgent&&/\bMSIE 6\./.test(navigator.userAgent);window._pr_isIE6=function(){return K};return K}; +var ba="a",ca="z",da="A",ea="Z",fa="!",ga="!=",ha="!==",ia="#",ja="%",ka="%=",x="&",la="&&",ma="&&=",na="&=",oa="(",pa="*",qa="*=",ra="+=",sa=",",ta="-=",ua="->",va="/",Da="/=",Ea=":",Fa="::",Ga=";",z="<",Ha="<<",Ia="<<=",Ja="<=",Ka="=",La="==",Ma="===",B=">",Na=">=",Oa=">>",Pa=">>=",Qa=">>>",Ra=">>>=",Sa="?",Ta="@",Ua="[",Va="^",Wa="^=",Xa="^^",Ya="^^=",Za="{",$a="|",ab="|=",bb="||",cb="||=",db="~",eb="break",fb="case",gb="continue",hb="delete",ib="do",jb="else",kb="finally",lb="instanceof",mb="return", +nb="throw",ob="try",pb="typeof",qb="(?:(?:(?:^|[^0-9.])\\.{1,3})|(?:(?:^|[^\\+])\\+)|(?:(?:^|[^\\-])-)",rb="|\\b",sb="\\$1",tb="|^)\\s*$",ub="&",vb="<",wb=">",xb=""",yb="&#",zb="x",Ab="'",C='"',Bb=" ",Cb="XMP",Db="</",Eb='="',D="PRE",Fb='<!DOCTYPE foo PUBLIC "foo bar">\n<foo />',H="",Gb="\t",Hb="\n",Ib="nocode",Jb=' $1="$2$3$4"',I="pln",L="lang-",M="src",N="default-markup",O="default-code",P="com",Kb="dec",S="pun",Lb="lang-js",Mb="lang-css",T="tag",U="atv",Nb="<>/=",V="atn",Ob=" \t\r\n", +W="str",Pb="'\"",Qb="'\"`",Rb="\"'",Sb=" \r\n",X="lit",Tb="123456789",Ub=".",Vb="kwd",Wb="typ",Xb="break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename typeof using virtual wchar_t where break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try debugger eval export function get null set undefined var with Infinity NaN caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END break continue do else for if return while and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None break continue do else for if return while alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END break continue do else for if return while case done elif esac eval fi function in local set then until ", +Y="</span>",Yb='<span class="',Zb='">',$b="$1 ",ac="<br />",bc="console",cc="cannot override language handler %s",dc="htm",ec="html",fc="mxml",gc="xhtml",hc="xml",ic="xsl",jc="break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename typeof using virtual wchar_t where ", +kc="c",lc="cc",mc="cpp",nc="cxx",oc="cyc",pc="m",qc="break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var ", +rc="cs",sc="break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient ",tc="java",uc="break continue do else for if return while case done elif esac eval fi function in local set then until ", +vc="bsh",wc="csh",xc="sh",yc="break continue do else for if return while and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None ",zc="cv",Ac="py",Bc="caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END ",Cc="perl",Dc="pl",Ec="pm",Fc="break continue do else for if return while alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END ", +Gc="rb",Hc="break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try debugger eval export function get null set undefined var with Infinity NaN ",Ic="js",Jc="pre",Kc="code",Lc="xmp",Mc="prettyprint",Nc="class",Oc="br",Pc="\r\n"; +(function(){function K(b){b=b.split(/ /g);var a={};for(var d=b.length;--d>=0;){var c=b[d];if(c)a[c]=j}return a}function Qc(b){return b>=ba&&b<=ca||b>=da&&b<=ea}function Q(b,a,d,c){b.unshift(d,c||0);try{a.splice.apply(a,b)}finally{b.splice(0,2)}}var Rc=(function(){var b=[fa,ga,ha,ia,ja,ka,x,la,ma,na,oa,pa,qa,ra,sa,ta,ua,va,Da,Ea,Fa,Ga,z,Ha,Ia,Ja,Ka,La,Ma,B,Na,Oa,Pa,Qa,Ra,Sa,Ta,Ua,Va,Wa,Xa,Ya,Za,$a,ab,bb,cb,db,eb,fb,gb,hb,ib,jb,kb,lb,mb,nb,ob,pb],a=qb;for(var d=0;d<b.length;++d){var c=b[d];a+=Qc(c.charAt(0))? +rb+c:$a+c.replace(/([^=<>:&])/g,sb)}a+=tb;return new RegExp(a)})(),wa=/&/g,xa=/</g,ya=/>/g,Sc=/\"/g;function Tc(b){return b.replace(wa,ub).replace(xa,vb).replace(ya,wb).replace(Sc,xb)}function Z(b){return b.replace(wa,ub).replace(xa,vb).replace(ya,wb)}var Uc=/</g,Vc=/>/g,Wc=/'/g,Xc=/"/g,Yc=/&/g,Zc=/ /g;function $c(b){var a=b.indexOf(x);if(a<0)return b;for(--a;(a=b.indexOf(yb,a+1))>=0;){var d=b.indexOf(Ga,a);if(d>=0){var c=b.substring(a+3,d),g=10;if(c&&c.charAt(0)===zb){c= +c.substring(1);g=16}var e=parseInt(c,g);isNaN(e)||(b=b.substring(0,a)+String.fromCharCode(e)+b.substring(d+1))}}return b.replace(Uc,z).replace(Vc,B).replace(Wc,Ab).replace(Xc,C).replace(Yc,x).replace(Zc,Bb)}function za(b){return Cb===b.tagName}function R(b,a){switch(b.nodeType){case 1:var d=b.tagName.toLowerCase();a.push(z,d);for(var c=0;c<b.attributes.length;++c){var g=b.attributes[c];if(!!g.specified){a.push(Bb);R(g,a)}}a.push(B);for(var e=b.firstChild;e;e=e.nextSibling)R(e,a);if(b.firstChild|| +!/^(?:br|link|img)$/.test(d))a.push(Db,d,B);break;case 2:a.push(b.name.toLowerCase(),Eb,Tc(b.value),C);break;case 3:case 4:a.push(Z(b.nodeValue));break}}var $=j;function ad(b){if(j===$){var a=document.createElement(D);a.appendChild(document.createTextNode(Fb));$=!/</.test(a.innerHTML)}if($){var d=b.innerHTML;if(za(b))d=Z(d);return d}var c=[];for(var g=b.firstChild;g;g=g.nextSibling)R(g,c);return c.join(H)}function bd(b){var a=0;return function(d){var c=j,g=0;for(var e=0,k=d.length;e<k;++e){var f= +d.charAt(e);switch(f){case Gb:c||(c=[]);c.push(d.substring(g,e));var h=b-a%b;a+=h;for(;h>=0;h-=" ".length)c.push(" ".substring(0,h));g=e+1;break;case Hb:a=0;break;default:++a}}if(!c)return d;c.push(d.substring(g));return c.join(H)}}var cd=/(?:[^<]+|<!--[\s\S]*?--\>|<!\[CDATA\[([\s\S]*?)\]\]>|<\/?[a-zA-Z][^>]*>|<)/g,dd=/^<!--/,ed=/^<\[CDATA\[/,fd=/^<br\b/i,Aa=/^<(\/?)([a-zA-Z]+)/;function gd(b){var a=b.match(cd),d=[],c=0,g=[];if(a)for(var e=0,k=a.length;e<k;++e){var f= +a[e];if(f.length>1&&f.charAt(0)===z){if(!dd.test(f))if(ed.test(f)){d.push(f.substring(9,f.length-3));c+=f.length-12}else if(fd.test(f)){d.push(Hb);++c}else if(f.indexOf(Ib)>=0&&hd(f)){var h=f.match(Aa)[2],q=1,i;a:for(i=e+1;i<k;++i){var o=a[i].match(Aa);if(o&&o[2]===h)if(o[1]===va){if(--q===0)break a}else++q}if(i<k){g.push(c,a.slice(e,i+1).join(H));e=i}else g.push(c,f)}else g.push(c,f)}else{var r=$c(f);d.push(r);c+=r.length}}return{source:d.join(H),tags:g}}function hd(b){return!!b.replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g, +Jb).match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/)}function aa(b,a,d,c){if(!!a){var g=d.call({},a);if(b)for(var e=g.length;(e-=2)>=0;)g[e]+=b;c.push.apply(c,g)}}function J(b,a){var d={};(function(){var k=b.concat(a);for(var f=k.length;--f>=0;){var h=k[f],q=h[3];if(q)for(var i=q.length;--i>=0;)d[q.charAt(i)]=h}})();var c=a.length,g=/\S/,e=function(k,f){f=f||0;var h=[f,I],q=H,i=0,o=k;while(o.length){var r,l=j,m,p=d[o.charAt(0)];if(p){m=o.match(p[1]);l=m[0];r=p[0]}else{for(var s=0;s<c;++s){p=a[s]; +var u=p[2];if(!(u&&!u.test(q))){if(m=o.match(p[1])){l=m[0];r=p[0];break}}}if(!l){r=I;l=o.substring(0,1)}}var t=L===r.substring(0,5);if(t&&!(m&&m[1])){t=false;r=M}if(t){var A=m[1],v=l.indexOf(A),E=v+A.length,F=r.substring(5);G.hasOwnProperty(F)||(F=/^\s*</.test(A)?N:O);aa(f+i,l.substring(0,v),e,h);aa(f+i+v,l.substring(v,E),G[F],h);aa(f+i+E,l.substring(E),e,h)}else h.push(f+i,r);i+=l.length;o=o.substring(l.length);if(r!==P&&g.test(l))q=l}return h};return e}var id=J([],[[I,/^[^<?]+/,j],[Kb,/^<!\w[^>]*(?:>|$)/, +j],[P,/^<!--[\s\S]*?(?:--\>|$)/,j],[L,/^<\?([\s\S]+?)(?:\?>|$)/,j],[L,/^<%([\s\S]+?)(?:%>|$)/,j],[S,/^(?:<[%?]|[%?]>)/,j],[L,/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i,j],[Lb,/^<script\b[^>]*>([\s\S]+?)<\/script\b[^>]*>/i,j],[Mb,/^<style\b[^>]*>([\s\S]+?)<\/style\b[^>]*>/i,j],[T,/^<\/?\w[^<>]*>/,j]]),jd=/^(<[^>]*>)([\s\S]*)(<\/[^>]*>)$/;function kd(b){var a=id(b);for(var d=0;d<a.length;d+=2)if(a[d+1]===M){var c,g;c=a[d];g=d+2<a.length?a[d+2]:b.length;var e=b.substring(c,g),k=e.match(jd);if(k)a.splice(d, +2,c,T,c+k[1].length,M,c+k[1].length+(k[2]||H).length,T)}return a}var ld=J([[U,/^\'[^\']*(?:\'|$)/,j,Ab],[U,/^\"[^\"]*(?:\"|$)/,j,C],[S,/^[<>\/=]+/,j,Nb]],[[T,/^[\w:\-]+/,/^</],[U,/^[\w\-]+/,/^=/],[V,/^[\w:\-]+/,j],[I,/^\s+/,j,Ob]]);function md(b,a){for(var d=0;d<a.length;d+=2){var c=a[d+1];if(c===T){var g,e;g=a[d];e=d+2<a.length?a[d+2]:b.length;var k=b.substring(g,e),f=ld(k,g);Q(f,a,d,2);d+=f.length-2}}return a}function y(b){var a=[],d=[];if(b.tripleQuotedStrings)a.push([W,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/, +j,Pb]);else b.multiLineStrings?a.push([W,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,j,Qb]):a.push([W,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,j,Rb]);d.push([I,/^(?:[^\'\"\`\/\#]+)/,j,Sb]);b.hashComments&&a.push([P,/^#[^\r\n]*/,j,ia]);if(b.cStyleComments){d.push([P,/^\/\/[^\r\n]*/,j]);d.push([P,/^\/\*[\s\S]*?(?:\*\/|$)/,j])}b.regexLiterals&&d.push([W,/^\/(?=[^\/*])(?:[^\/\x5B\x5C]|\x5C[\s\S]|\x5B(?:[^\x5C\x5D]|\x5C[\s\S])*(?:\x5D|$))+(?:\/|$)/, +Rc]);var c=K(b.keywords),g=J(a,d),e=J([],[[I,/^\s+/,j,Sb],[I,/^[a-...@][a-z_$@0-9]*/i,j],[X,/^0x[a-f0-9]+[a-z]/i,j],[X,/^(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d+)(?:e[+\-]?\d+)?[a-z]*/i,j,Tb],[S,/^[^\s\w...@]+/,j]]);function k(f,h){for(var q=0;q<h.length;q+=2){var i=h[q+1];if(i===I){var o,r,l,m;o=h[q];r=q+2<h.length?h[q+2]:f.length;l=f.substring(o,r);m=e(l,o);for(var p=0,s=m.length;p<s;p+=2){var u=m[p+1];if(u===I){var t=m[p],A=p+2<s?m[p+2]:l.length,v=f.substring(t,A);if(v===Ub)m[p+1]=S;else if(v in c)m[p+ +1]=Vb;else if(/^...@?[a-z][a-z$]*[a-z][a-za-z$]*$/.test(v))m[p+1]=v.charAt(0)===Ta?X:Wb}}Q(m,h,q,2);q+=m.length-2}}return h}return function(f){var h=g(f);return h=k(f,h)}}var Ba=y({keywords:Xb,hashComments:n,cStyleComments:n,multiLineStrings:n,regexLiterals:n});function nd(b,a){var d=false;for(var c=0;c<a.length;c+=2){var g=a[c+1],e,k;if(g===V){e=a[c];k=c+2<a.length?a[c+2]:b.length;d=/^on|^style$/i.test(b.substring(e,k))}else if(g===U){if(d){e=a[c];k=c+2<a.length?a[c+2]:b.length;var f=b.substring(e, +k),h=f.length,q=h>=2&&/^[\"\']/.test(f)&&f.charAt(0)===f.charAt(h-1),i,o,r;if(q){o=e+1;r=k-1;i=f}else{o=e+1;r=k-1;i=f.substring(1,f.length-1)}var l=Ba(i);for(var m=0,p=l.length;m<p;m+=2)l[m]+=o;if(q){l.push(r,U);Q(l,a,c+2,0)}else Q(l,a,c,2)}d=false}}return a}function od(b){var a=kd(b);a=md(b,a);return a=nd(b,a)}function pd(b,a,d){var c=[],g=0,e=j,k=j,f=0,h=0,q=bd(window.PR_TAB_WIDTH),i=/([\r\n ]) /g,o=/(^| ) /gm,r=/\r\n?|\n/g,l=/[ \r\n]$/,m=n;function p(u){if(u>g){if(e&&e!==k){c.push(Y);e=j}if(!e&& +k){e=k;c.push(Yb,e,Zb)}var t=Z(q(b.substring(g,u))).replace(m?o:i,$b);m=l.test(t);c.push(t.replace(r,ac));g=u}}while(n){var s;if(s=f<a.length?h<d.length?a[f]<=d[h]:n:false){p(a[f]);if(e){c.push(Y);e=j}c.push(a[f+1]);f+=2}else if(h<d.length){p(d[h]);k=d[h+1];h+=2}else break}p(b.length);e&&c.push(Y);return c.join(H)}var G={};function w(b,a){for(var d=a.length;--d>=0;){var c=a[d];if(G.hasOwnProperty(c))bc in window&&console.log(cc,c);else G[c]=b}}w(Ba,[O]);w(od,[N,dc,ec,fc,gc,hc,ic]);w(y({keywords:jc, +hashComments:n,cStyleComments:n}),[kc,lc,mc,nc,oc,pc]);w(y({keywords:qc,hashComments:n,cStyleComments:n}),[rc]);w(y({keywords:sc,cStyleComments:n}),[tc]);w(y({keywords:uc,hashComments:n,multiLineStrings:n}),[vc,wc,xc]);w(y({keywords:yc,hashComments:n,multiLineStrings:n,tripleQuotedStrings:n}),[zc,Ac]);w(y({keywords:Bc,hashComments:n,multiLineStrings:n,regexLiterals:n}),[Cc,Dc,Ec]);w(y({keywords:Fc,hashComments:n,multiLineStrings:n,regexLiterals:n}),[Gc]);w(y({keywords:Hc,cStyleComments:n,regexLiterals:n}), +[Ic]);function Ca(b,a){try{var d=gd(b),c=d.source,g=d.tags;G.hasOwnProperty(a)||(a=/^\s*</.test(c)?N:O);var e=G[a].call({},c);return pd(c,g,e)}catch(k){if(bc in window){console.log(k);console.a()}return b}}function qd(b){var a=window._pr_isIE6(),d=[document.getElementsByTagName(Jc),document.getElementsByTagName(Kc),document.getElementsByTagName(Lc)],c=[];for(var g=0;g<d.length;++g)for(var e=0,k=d[g].length;e<k;++e)c.push(d[g][e]);var f=0;function h(){var q=window.PR_SHOULD_USE_CONTINUATION?(new Date).getTime()+ +250:Infinity;for(;f<c.length&&(new Date).getTime()<q;f++){var i=c[f];if(i.className&&i.className.indexOf(Mc)>=0){var o=i.className.match(/\blang-(\w+)\b/);if(o)o=o[1];var r=false;for(var l=i.parentNode;l;l=l.parentNode)if((l.tagName===Jc||l.tagName===Kc||l.tagName===Lc)&&l.className&&l.className.indexOf(Mc)>=0){r=n;break}if(!r){var m=ad(i);m=m.replace(/(?:\r\n?|\n)$/,H);var p=Ca(m,o);if(za(i)){var s=document.createElement(D);for(var u=0;u<i.attributes.length;++u){var t=i.attributes[u];if(t.specified){var A= +t.name.toLowerCase();if(A===Nc)s.className=t.value;else s.setAttribute(t.name,t.value)}}s.innerHTML=p;i.parentNode.replaceChild(s,i);i=s}else i.innerHTML=p;if(a&&i.tagName===D){var v=i.getElementsByTagName(Oc);for(var E=v.length;--E>=0;){var F=v[E];F.parentNode.replaceChild(document.createTextNode(Pc),F)}}}}}if(f<c.length)setTimeout(h,250);else b&&b()}h()}window.PR_normalizedHtml=R;window.prettyPrintOne=Ca;window.prettyPrint=qd;window.PR={createSimpleLexer:J,registerLangHandler:w,sourceDecorator:y, +PR_ATTRIB_NAME:V,PR_ATTRIB_VALUE:U,PR_COMMENT:P,PR_DECLARATION:Kb,PR_KEYWORD:Vb,PR_LITERAL:X,PR_NOCODE:Ib,PR_PLAIN:I,PR_PUNCTUATION:S,PR_SOURCE:M,PR_STRING:W,PR_TAG:T,PR_TYPE:Wb}})(); +})() Propchange: camel/trunk/components/camel-web/src/main/webapp/js/prettify/prettify.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: camel/trunk/components/camel-web/src/main/webapp/js/prettify/prettify.js ------------------------------------------------------------------------------ svn:executable = * Added: camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RouteResource/edit.jsp URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RouteResource/edit.jsp?rev=748068&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RouteResource/edit.jsp (added) +++ camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RouteResource/edit.jsp Thu Feb 26 09:45:44 2009 @@ -0,0 +1,18 @@ +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> + <title>Edit Route ${it.route.id}</title> +</head> +<body> + +<h2>Edit Route ${it.route.id}</h2> + +<div class="route"> + +<textarea rows="30" cols="80" name="body"><c:out value="${it.routeXml}" escapeXml="true" /> +</textarea> + +</div> + +</body> +</html> Propchange: camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RouteResource/edit.jsp ------------------------------------------------------------------------------ svn:eol-style = native Modified: camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RouteResource/index.jsp URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RouteResource/index.jsp?rev=748068&r1=748067&r2=748068&view=diff ============================================================================== --- camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RouteResource/index.jsp (original) +++ camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RouteResource/index.jsp Thu Feb 26 09:45:44 2009 @@ -2,12 +2,23 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Route ${it.route.id}</title> + <link href='<c:url value="/css/prettify/prettify.css"/>' type="text/css" rel="stylesheet" /> + <script type="text/javascript" src='<c:url value="/js/prettify/prettify.js"/>'></script> </head> -<body> + +<body onload="prettyPrint()"> <h2>Route ${it.route.id}</h2> - ${it.route} +<div class="route"> +<pre class="prettyprint"><c:out value="${it.routeXml}" escapeXml="true" /> +</pre> +</div> + +<ul> +<li><a href='<c:url value="/routes/${it.route.id}/edit"/>'>Edit Route</a> +</ul> + </body> </html>