Tobias Duehr avatar Tobias Duehr committed c3ddc19

initial

Comments (0)

Files changed (79)

+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="gen"/>
+	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+	<classpathentry kind="lib" path="lib/WikiParser.jar"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Empty file added.

+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>bitbeaker</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.android.ide.eclipse.adt.ApkBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

AndroidManifest.xml

+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+      package="com.saibotd.bitbeaker"
+      android:versionCode="4" android:versionName="0.8">
+    <uses-sdk android:minSdkVersion="8" />
+    <uses-permission android:name="android.permission.INTERNET"></uses-permission>
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
+
+    <application android:label="@string/app_name" android:theme="@android:style/Theme.Light.NoTitleBar" android:icon="@drawable/icon" android:name="Bitbeaker">
+        <activity android:label="@string/app_name" android:name="LoginActivity" android:noHistory="true">
+        	<meta-data android:name="android.app.default_searchable" android:value=".SearchableActivity" />
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="RepositoryActivity">
+        	<meta-data android:name="android.app.default_searchable" android:value=".SearchableActivity" />
+        </activity>
+        <activity android:name="EventsActivity"></activity>
+        <activity android:name="RepositoriesActivity">
+        	<meta-data android:name="android.app.default_searchable" android:value=".SearchableActivity" />
+        </activity>
+        <activity android:name="ChangesetActivity"></activity>
+		<activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation"/>
+		<activity android:name="SourceBrowserActivity"></activity>
+		<activity android:name="WikiActivity"></activity>
+		<activity android:name="SourceActivity"></activity>
+		<activity android:name="IssuesActivity"></activity>
+		<activity android:name=".SearchableActivity">
+	        <intent-filter>
+	            <action android:name="android.intent.action.SEARCH" />
+	        </intent-filter>
+        	<meta-data android:name="android.app.searchable" android:resource="@xml/searchable"/>
+   		</activity>
+    </application>
+</manifest>

assets/lang-apollo.js

+PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\r\n]*/,null,"#"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/,
+null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[SE]?BANK\=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[!-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),["apollo","agc","aea"])

assets/lang-css.js

+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],["lang-css-str",/^url\(([^\)\"\']*)\)/i],["kwd",/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_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"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^\)\"\']+/]]),["css-str"])

assets/lang-hs.js

+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]*)?)|(?:\{-(?:[^-]|-+[^-\}])*-\}))/],["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"])

assets/lang-lisp.js

+PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(/,null,"("],["clo",/^\)/,null,")"],["com",/^;[^\r\n]*/,null,";"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|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/,
+null],["lit",/^[+\-]?(?:0x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],["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"])

assets/lang-lua.js

+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][^\w\t\n\r \xA0\"\'\-\+=]*/]]),["lua"])

assets/lang-ml.js

+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"])

assets/lang-proto.js

+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"])

assets/lang-scala.js

+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:(?:""(?:""?(?!")|[^\\"]|\\.)*"{0,3})|(?:[^"\r\n\\]|\\.)*"?))/,null,'"'],["lit",/^`(?:[^\r\n\\`]|\\.)*`?/,null,"`"],["pun",/^[!#%&()*+,\-:;<=>?@\[\\\]^{|}~]+/,null,"!#%&()*+,-:;<=>?@[\\]^{|}~"]],[["str",/^'(?:[^\r\n\\']|\\(?:'|[^\r\n']+))'/],["lit",/^'[a-zA-Z_$][\w$]*(?!['$\w])/],["kwd",/^(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|object|override|package|private|protected|requires|return|sealed|super|throw|trait|try|type|val|var|while|with|yield)\b/],
+["lit",/^(?:true|false|null|this)\b/],["lit",/^(?:(?:0(?:[0-7]+|X[0-9A-F]+))L?|(?:(?:0|[1-9][0-9]*)(?:(?:\.[0-9]+)?(?:E[+\-]?[0-9]+)?F?|L?))|\\.[0-9]+(?:E[+\-]?[0-9]+)?F?)/i],["typ",/^[$_]*[A-Z][_$A-Z0-9]*[a-z][\w$]*/],["pln",/^[$a-zA-Z_][\w$]*/],["com",/^\/(?:\/.*|\*(?:\/|\**[^*/])*(?:\*+\/?)?)/],["pun",/^(?:\.+|\/)/]]),["scala"])

assets/lang-sql.js

+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|OPENDATASOURCE|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\"\'][^\w\t\n\r \xA0+\-\"\']*/]]),["sql"])

assets/lang-vb.js

+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]c|$)|[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})*(?:[\"\u201C\u201D]|$))/i,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"])

assets/lang-vhdl.js

+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"]],[["str",/^(?:[BOX]?"(?:[^\"]|"")*"|'.')/i],["com",/^--[^\r\n]*/],["kwd",/^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\w-]|$)/i,
+null],["typ",/^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\w-]|$)/i,null],["typ",/^\'(?:ACTIVE|ASCENDING|BASE|DELAYED|DRIVING|DRIVING_VALUE|EVENT|HIGH|IMAGE|INSTANCE_NAME|LAST_ACTIVE|LAST_EVENT|LAST_VALUE|LEFT|LEFTOF|LENGTH|LOW|PATH_NAME|POS|PRED|QUIET|RANGE|REVERSE_RANGE|RIGHT|RIGHTOF|SIMPLE_NAME|STABLE|SUCC|TRANSACTION|VAL|VALUE)(?=[^\w-]|$)/i,null],["lit",/^\d+(?:_\d+)*(?:#[\w\\.]+#(?:[+\-]?\d+(?:_\d+)*)?|(?:\.\d+(?:_\d+)*)?(?:E[+\-]?\d+(?:_\d+)*)?)/i],
+["pln",/^(?:[a-z]\w*|\\[^\\]*\\)/i],["pun",/^[^\w\t\n\r \xA0\"\'][^\w\t\n\r \xA0\-\"\']*/]]),["vhdl","vhd"])

assets/lang-wiki.js

+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t \xA0a-gi-z0-9]+/,null,"\t \u00a0abcdefgijklmnopqrstuvwxyz0123456789"],["pun",/^[=*~\^\[\]]+/,null,"=*~^[]"]],[["lang-wiki.meta",/(?:^^|\r\n?|\n)(#[a-z]+)\b/],["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",/^(?:\r\n|[\s\S])[^#=*~^A-Zh\{`\[\r\n]*/]]),["wiki"]);
+PR.registerLangHandler(PR.createSimpleLexer([["kwd",/^#[a-z]+/i,null,"#"]],[]),["wiki.meta"])

assets/lang-yaml.js

+PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:|>?]+/,null,":|>?"],["dec",/^%(?:YAML|TAG)[^#\r\n]+/,null,"%"],["typ",/^[&]\S+/,null,"&"],["typ",/^!\S*/,null,"!"],["str",/^"(?:[^\\"]|\\.)*(?:"|$)/,null,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,null,"'"],["com",/^#[^\r\n]*/,null,"#"],["pln",/^\s+/,null," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\r\n]|$)/],["pun",/^-/],["kwd",/^\w+:[ \r\n]/],["pln",/^\w+/]]),
+["yaml","yml"])

assets/prettify.css

+.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}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}@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}}

assets/prettify.js

+window.PR_SHOULD_USE_CONTINUATION=true;window.PR_TAB_WIDTH=8;window.PR_normalizedHtml=window.PR=window.prettyPrintOne=window.prettyPrint=void 0;window._pr_isIE6=function(){var y=navigator&&navigator.userAgent&&navigator.userAgent.match(/\bMSIE ([678])\./);y=y?+y[1]:false;window._pr_isIE6=function(){return y};return y};
+(function(){function y(b){return b.replace(L,"&amp;").replace(M,"&lt;").replace(N,"&gt;")}function H(b,f,i){switch(b.nodeType){case 1:var o=b.tagName.toLowerCase();f.push("<",o);var l=b.attributes,n=l.length;if(n){if(i){for(var r=[],j=n;--j>=0;)r[j]=l[j];r.sort(function(q,m){return q.name<m.name?-1:q.name===m.name?0:1});l=r}for(j=0;j<n;++j){r=l[j];r.specified&&f.push(" ",r.name.toLowerCase(),'="',r.value.replace(L,"&amp;").replace(M,"&lt;").replace(N,"&gt;").replace(X,"&quot;"),'"')}}f.push(">");
+for(l=b.firstChild;l;l=l.nextSibling)H(l,f,i);if(b.firstChild||!/^(?:br|link|img)$/.test(o))f.push("</",o,">");break;case 3:case 4:f.push(y(b.nodeValue));break}}function O(b){function f(c){if(c.charAt(0)!=="\\")return c.charCodeAt(0);switch(c.charAt(1)){case "b":return 8;case "t":return 9;case "n":return 10;case "v":return 11;case "f":return 12;case "r":return 13;case "u":case "x":return parseInt(c.substring(2),16)||c.charCodeAt(1);case "0":case "1":case "2":case "3":case "4":case "5":case "6":case "7":return parseInt(c.substring(1),
+8);default:return c.charCodeAt(1)}}function i(c){if(c<32)return(c<16?"\\x0":"\\x")+c.toString(16);c=String.fromCharCode(c);if(c==="\\"||c==="-"||c==="["||c==="]")c="\\"+c;return c}function o(c){var d=c.substring(1,c.length-1).match(RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g"));c=[];for(var a=[],k=d[0]==="^",e=k?1:0,h=d.length;e<h;++e){var g=d[e];switch(g){case "\\B":case "\\b":case "\\D":case "\\d":case "\\S":case "\\s":case "\\W":case "\\w":c.push(g);
+continue}g=f(g);var s;if(e+2<h&&"-"===d[e+1]){s=f(d[e+2]);e+=2}else s=g;a.push([g,s]);if(!(s<65||g>122)){s<65||g>90||a.push([Math.max(65,g)|32,Math.min(s,90)|32]);s<97||g>122||a.push([Math.max(97,g)&-33,Math.min(s,122)&-33])}}a.sort(function(v,w){return v[0]-w[0]||w[1]-v[1]});d=[];g=[NaN,NaN];for(e=0;e<a.length;++e){h=a[e];if(h[0]<=g[1]+1)g[1]=Math.max(g[1],h[1]);else d.push(g=h)}a=["["];k&&a.push("^");a.push.apply(a,c);for(e=0;e<d.length;++e){h=d[e];a.push(i(h[0]));if(h[1]>h[0]){h[1]+1>h[0]&&a.push("-");
+a.push(i(h[1]))}}a.push("]");return a.join("")}function l(c){for(var d=c.source.match(RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),a=d.length,k=[],e=0,h=0;e<a;++e){var g=d[e];if(g==="(")++h;else if("\\"===g.charAt(0))if((g=+g.substring(1))&&g<=h)k[g]=-1}for(e=1;e<k.length;++e)if(-1===k[e])k[e]=++n;for(h=e=0;e<a;++e){g=d[e];if(g==="("){++h;if(k[h]===undefined)d[e]="(?:"}else if("\\"===
+g.charAt(0))if((g=+g.substring(1))&&g<=h)d[e]="\\"+k[h]}for(h=e=0;e<a;++e)if("^"===d[e]&&"^"!==d[e+1])d[e]="";if(c.ignoreCase&&r)for(e=0;e<a;++e){g=d[e];c=g.charAt(0);if(g.length>=2&&c==="[")d[e]=o(g);else if(c!=="\\")d[e]=g.replace(/[a-zA-Z]/g,function(s){s=s.charCodeAt(0);return"["+String.fromCharCode(s&-33,s|32)+"]"})}return d.join("")}for(var n=0,r=false,j=false,q=0,m=b.length;q<m;++q){var t=b[q];if(t.ignoreCase)j=true;else if(/[a-z]/i.test(t.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,
+""))){r=true;j=false;break}}var p=[];q=0;for(m=b.length;q<m;++q){t=b[q];if(t.global||t.multiline)throw Error(""+t);p.push("(?:"+l(t)+")")}return RegExp(p.join("|"),j?"gi":"g")}function Y(b){var f=0;return function(i){for(var o=null,l=0,n=0,r=i.length;n<r;++n)switch(i.charAt(n)){case "\t":o||(o=[]);o.push(i.substring(l,n));l=b-f%b;for(f+=l;l>=0;l-=16)o.push("                ".substring(0,l));l=n+1;break;case "\n":f=0;break;default:++f}if(!o)return i;o.push(i.substring(l));return o.join("")}}function I(b,
+f,i,o){if(f){b={source:f,c:b};i(b);o.push.apply(o,b.d)}}function B(b,f){var i={},o;(function(){for(var r=b.concat(f),j=[],q={},m=0,t=r.length;m<t;++m){var p=r[m],c=p[3];if(c)for(var d=c.length;--d>=0;)i[c.charAt(d)]=p;p=p[1];c=""+p;if(!q.hasOwnProperty(c)){j.push(p);q[c]=null}}j.push(/[\0-\uffff]/);o=O(j)})();var l=f.length;function n(r){for(var j=r.c,q=[j,z],m=0,t=r.source.match(o)||[],p={},c=0,d=t.length;c<d;++c){var a=t[c],k=p[a],e=void 0,h;if(typeof k==="string")h=false;else{var g=i[a.charAt(0)];
+if(g){e=a.match(g[1]);k=g[0]}else{for(h=0;h<l;++h){g=f[h];if(e=a.match(g[1])){k=g[0];break}}e||(k=z)}if((h=k.length>=5&&"lang-"===k.substring(0,5))&&!(e&&typeof e[1]==="string")){h=false;k=P}h||(p[a]=k)}g=m;m+=a.length;if(h){h=e[1];var s=a.indexOf(h),v=s+h.length;if(e[2]){v=a.length-e[2].length;s=v-h.length}k=k.substring(5);I(j+g,a.substring(0,s),n,q);I(j+g+s,h,Q(k,h),q);I(j+g+v,a.substring(v),n,q)}else q.push(j+g,k)}r.d=q}return n}function x(b){var f=[],i=[];if(b.tripleQuotedStrings)f.push([A,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,
+null,"'\""]);else b.multiLineStrings?f.push([A,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):f.push([A,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]);b.verbatimStrings&&i.push([A,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);if(b.hashComments)if(b.cStyleComments){f.push([C,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]);i.push([A,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,
+null])}else f.push([C,/^#[^\r\n]*/,null,"#"]);if(b.cStyleComments){i.push([C,/^\/\/[^\r\n]*/,null]);i.push([C,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}b.regexLiterals&&i.push(["lang-regex",RegExp("^"+Z+"(/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/)")]);b=b.keywords.replace(/^\s+|\s+$/g,"");b.length&&i.push([R,RegExp("^(?:"+b.replace(/\s+/g,"|")+")\\b"),null]);f.push([z,/^\s+/,null," \r\n\t\u00a0"]);i.push([J,/^@[a-z_$][a-z_$@0-9]*/i,null],[S,/^@?[A-Z]+[a-z][A-Za-z_$@0-9]*/,
+null],[z,/^[a-z_$][a-z_$@0-9]*/i,null],[J,/^(?:0x[a-f0-9]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+\-]?\d+)?)[a-z]*/i,null,"0123456789"],[E,/^.[^\s\w\.$@\'\"\`\/\#]*/,null]);return B(f,i)}function $(b){function f(D){if(D>r){if(j&&j!==q){n.push("</span>");j=null}if(!j&&q){j=q;n.push('<span class="',j,'">')}var T=y(p(i.substring(r,D))).replace(e?d:c,"$1&#160;");e=k.test(T);n.push(T.replace(a,s));r=D}}var i=b.source,o=b.g,l=b.d,n=[],r=0,j=null,q=null,m=0,t=0,p=Y(window.PR_TAB_WIDTH),c=/([\r\n ]) /g,
+d=/(^| ) /gm,a=/\r\n?|\n/g,k=/[ \r\n]$/,e=true,h=window._pr_isIE6();h=h?b.b.tagName==="PRE"?h===6?"&#160;\r\n":h===7?"&#160;<br>\r":"&#160;\r":"&#160;<br />":"<br />";var g=b.b.className.match(/\blinenums\b(?::(\d+))?/),s;if(g){for(var v=[],w=0;w<10;++w)v[w]=h+'</li><li class="L'+w+'">';var F=g[1]&&g[1].length?g[1]-1:0;n.push('<ol class="linenums"><li class="L',F%10,'"');F&&n.push(' value="',F+1,'"');n.push(">");s=function(){var D=v[++F%10];return j?"</span>"+D+'<span class="'+j+'">':D}}else s=h;
+for(;;)if(m<o.length?t<l.length?o[m]<=l[t]:true:false){f(o[m]);if(j){n.push("</span>");j=null}n.push(o[m+1]);m+=2}else if(t<l.length){f(l[t]);q=l[t+1];t+=2}else break;f(i.length);j&&n.push("</span>");g&&n.push("</li></ol>");b.a=n.join("")}function u(b,f){for(var i=f.length;--i>=0;){var o=f[i];if(G.hasOwnProperty(o))"console"in window&&console.warn("cannot override language handler %s",o);else G[o]=b}}function Q(b,f){b&&G.hasOwnProperty(b)||(b=/^\s*</.test(f)?"default-markup":"default-code");return G[b]}
+function U(b){var f=b.f,i=b.e;b.a=f;try{var o,l=f.match(aa);f=[];var n=0,r=[];if(l)for(var j=0,q=l.length;j<q;++j){var m=l[j];if(m.length>1&&m.charAt(0)==="<"){if(!ba.test(m))if(ca.test(m)){f.push(m.substring(9,m.length-3));n+=m.length-12}else if(da.test(m)){f.push("\n");++n}else if(m.indexOf(V)>=0&&m.replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g,' $1="$2$3$4"').match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/)){var t=m.match(W)[2],p=1,c;c=j+1;a:for(;c<q;++c){var d=l[c].match(W);if(d&&
+d[2]===t)if(d[1]==="/"){if(--p===0)break a}else++p}if(c<q){r.push(n,l.slice(j,c+1).join(""));j=c}else r.push(n,m)}else r.push(n,m)}else{var a;p=m;var k=p.indexOf("&");if(k<0)a=p;else{for(--k;(k=p.indexOf("&#",k+1))>=0;){var e=p.indexOf(";",k);if(e>=0){var h=p.substring(k+3,e),g=10;if(h&&h.charAt(0)==="x"){h=h.substring(1);g=16}var s=parseInt(h,g);isNaN(s)||(p=p.substring(0,k)+String.fromCharCode(s)+p.substring(e+1))}}a=p.replace(ea,"<").replace(fa,">").replace(ga,"'").replace(ha,'"').replace(ia," ").replace(ja,
+"&")}f.push(a);n+=a.length}}o={source:f.join(""),h:r};var v=o.source;b.source=v;b.c=0;b.g=o.h;Q(i,v)(b);$(b)}catch(w){if("console"in window)console.log(w&&w.stack?w.stack:w)}}var A="str",R="kwd",C="com",S="typ",J="lit",E="pun",z="pln",P="src",V="nocode",Z=function(){for(var b=["!","!=","!==","#","%","%=","&","&&","&&=","&=","(","*","*=","+=",",","-=","->","/","/=",":","::",";","<","<<","<<=","<=","=","==","===",">",">=",">>",">>=",">>>",">>>=","?","@","[","^","^=","^^","^^=","{","|","|=","||","||=",
+"~","break","case","continue","delete","do","else","finally","instanceof","return","throw","try","typeof"],f="(?:^^|[+-]",i=0;i<b.length;++i)f+="|"+b[i].replace(/([^=<>:&a-z])/g,"\\$1");f+=")\\s*";return f}(),L=/&/g,M=/</g,N=/>/g,X=/\"/g,ea=/&lt;/g,fa=/&gt;/g,ga=/&apos;/g,ha=/&quot;/g,ja=/&amp;/g,ia=/&nbsp;/g,ka=/[\r\n]/g,K=null,aa=RegExp("[^<]+|<!--[\\s\\S]*?--\>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>|</?[a-zA-Z](?:[^>\"']|'[^']*'|\"[^\"]*\")*>|<","g"),ba=/^<\!--/,ca=/^<!\[CDATA\[/,da=/^<br\b/i,W=/^<(\/?)([a-zA-Z][a-zA-Z0-9]*)/,
+la=x({keywords:"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 typeof 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 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 typeof abstract 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 partial 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 typeof 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 ",
+hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true}),G={};u(la,["default-code"]);u(B([],[[z,/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],[C,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[E,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup",
+"htm","html","mxml","xhtml","xml","xsl"]);u(B([[z,/^[\s]+/,null," \t\r\n"],["atv",/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[E,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],
+["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);u(B([],[["atv",/^[\s\S]+/]]),["uq.val"]);u(x({keywords:"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 typeof 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 using virtual wchar_t where ",
+hashComments:true,cStyleComments:true}),["c","cc","cpp","cxx","cyc","m"]);u(x({keywords:"null true false"}),["json"]);u(x({keywords:"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 typeof abstract 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 partial readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var ",
+hashComments:true,cStyleComments:true,verbatimStrings:true}),["cs"]);u(x({keywords:"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 typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient ",
+cStyleComments:true}),["java"]);u(x({keywords:"break continue do else for if return while case done elif esac eval fi function in local set then until ",hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);u(x({keywords:"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 ",hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);
+u(x({keywords:"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 ",hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);u(x({keywords:"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 ",hashComments:true,
+multiLineStrings:true,regexLiterals:true}),["rb"]);u(x({keywords:"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 typeof debugger eval export function get null set undefined var with Infinity NaN ",cStyleComments:true,regexLiterals:true}),["js"]);u(B([],[[A,/^[\s\S]+/]]),
+["regex"]);window.PR_normalizedHtml=H;window.prettyPrintOne=function(b,f){var i={f:b,e:f};U(i);return i.a};window.prettyPrint=function(b){function f(){for(var t=window.PR_SHOULD_USE_CONTINUATION?j.now()+250:Infinity;q<o.length&&j.now()<t;q++){var p=o[q];if(p.className&&p.className.indexOf("prettyprint")>=0){var c=p.className.match(/\blang-(\w+)\b/);if(c)c=c[1];for(var d=false,a=p.parentNode;a;a=a.parentNode)if((a.tagName==="pre"||a.tagName==="code"||a.tagName==="xmp")&&a.className&&a.className.indexOf("prettyprint")>=
+0){d=true;break}if(!d){a=p;if(null===K){d=document.createElement("PRE");d.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />'));K=!/</.test(d.innerHTML)}if(K){d=a.innerHTML;if("XMP"===a.tagName)d=y(d);else{a=a;if("PRE"===a.tagName)a=true;else if(ka.test(d)){var k="";if(a.currentStyle)k=a.currentStyle.whiteSpace;else if(window.getComputedStyle)k=window.getComputedStyle(a,null).whiteSpace;a=!k||k==="pre"}else a=true;a||(d=d.replace(/(<br\s*\/?>)[\r\n]+/g,"$1").replace(/(?:[\r\n]+[ \t]*)+/g,
+" "))}d=d}else{d=[];for(a=a.firstChild;a;a=a.nextSibling)H(a,d);d=d.join("")}d=d.replace(/(?:\r\n?|\n)$/,"");m={f:d,e:c,b:p};U(m);if(p=m.a){c=m.b;if("XMP"===c.tagName){d=document.createElement("PRE");for(a=0;a<c.attributes.length;++a){k=c.attributes[a];if(k.specified)if(k.name.toLowerCase()==="class")d.className=k.value;else d.setAttribute(k.name,k.value)}d.innerHTML=p;c.parentNode.replaceChild(d,c)}else c.innerHTML=p}}}}if(q<o.length)setTimeout(f,250);else b&&b()}for(var i=[document.getElementsByTagName("pre"),
+document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],o=[],l=0;l<i.length;++l)for(var n=0,r=i[l].length;n<r;++n)o.push(i[l][n]);i=null;var j=Date;j.now||(j={now:function(){return(new Date).getTime()}});var q=0,m;f()};window.PR={combinePrefixPatterns:O,createSimpleLexer:B,registerLangHandler:u,sourceDecorator:x,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:C,PR_DECLARATION:"dec",PR_KEYWORD:R,PR_LITERAL:J,PR_NOCODE:V,PR_PLAIN:z,PR_PUNCTUATION:E,PR_SOURCE:P,PR_STRING:A,
+PR_TAG:"tag",PR_TYPE:S}})()

assets/source.html

+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Sourcecode</title>
+<link href="file:///android_asset/prettify.css" type="text/css" rel="stylesheet" />
+<script type="text/javascript" src="file:///android_asset/prettify.js"></script>
+</head>
+<body>
+<pre><code id="code" class="prettyprint"></code></pre>
+<script language="javascript">
+	document.getElementById("code").innerHTML = bitbeaker.getCode();
+	prettyPrint();
+</script>
+</body>
+</html>

default.properties

+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system use,
+# "build.properties", and override values to adapt the script to your
+# project structure.
+
+# Project target.
+target=android-8
+

gen/com/saibotd/bitbeaker/R.java

+/* AUTO-GENERATED FILE.  DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * aapt tool from the resource data it found.  It
+ * should not be modified by hand.
+ */
+
+package com.saibotd.bitbeaker;
+
+public final class R {
+    public static final class attr {
+    }
+    public static final class drawable {
+        public static final int add=0x7f020000;
+        public static final int bg=0x7f020001;
+        public static final int bug=0x7f020002;
+        public static final int del=0x7f020003;
+        public static final int edit=0x7f020004;
+        public static final int enhancement=0x7f020005;
+        public static final int file=0x7f020006;
+        public static final int folder=0x7f020007;
+        public static final int header=0x7f020008;
+        public static final int ic_menu_refresh=0x7f020009;
+        public static final int ic_menu_search_holo_dark=0x7f02000a;
+        public static final int ic_menu_share=0x7f02000b;
+        public static final int ic_menu_stop=0x7f02000c;
+        public static final int icon=0x7f02000d;
+        public static final int lock=0x7f02000e;
+        public static final int logo_big=0x7f02000f;
+        public static final int proposal=0x7f020010;
+        public static final int top_bg=0x7f020011;
+        public static final int top_search=0x7f020012;
+    }
+    public static final class id {
+        public static final int ad_space=0x7f070015;
+        public static final int bt_issues=0x7f07001b;
+        public static final int bt_search=0x7f070006;
+        public static final int bt_source_browser=0x7f07001a;
+        public static final int bt_wiki=0x7f07001c;
+        public static final int changeset_files=0x7f070002;
+        public static final int changeset_loading=0x7f070019;
+        public static final int changeset_message=0x7f070000;
+        public static final int changeset_what=0x7f070009;
+        public static final int frameLayout1=0x7f070008;
+        public static final int header_title=0x7f070005;
+        public static final int icon=0x7f070017;
+        public static final int imageView1=0x7f070004;
+        public static final int is_locked=0x7f07000e;
+        public static final int issues_subtitle=0x7f07000c;
+        public static final int issues_title=0x7f07000a;
+        public static final int issues_what=0x7f07000b;
+        public static final int login_button=0x7f070013;
+        public static final int login_password=0x7f070012;
+        public static final int login_username=0x7f070011;
+        public static final int menu_logout=0x7f070020;
+        public static final int menu_refresh=0x7f07001f;
+        public static final int repositories_list=0x7f070014;
+        public static final int repository_changesets=0x7f070018;
+        public static final int repository_description=0x7f070016;
+        public static final int source_title=0x7f07000f;
+        public static final int source_webview=0x7f07001d;
+        public static final int source_what=0x7f070010;
+        public static final int subtitle=0x7f070007;
+        public static final int textView1=0x7f070001;
+        public static final int title=0x7f070003;
+        public static final int title_listitem_repositories=0x7f07000d;
+        public static final int wiki_webview=0x7f07001e;
+    }
+    public static final class layout {
+        public static final int changeset=0x7f030000;
+        public static final int header=0x7f030001;
+        public static final int listitem=0x7f030002;
+        public static final int listitem_changeset=0x7f030003;
+        public static final int listitem_issues=0x7f030004;
+        public static final int listitem_repositories=0x7f030005;
+        public static final int listitem_source=0x7f030006;
+        public static final int login=0x7f030007;
+        public static final int repositories=0x7f030008;
+        public static final int repository=0x7f030009;
+        public static final int source=0x7f03000a;
+        public static final int wiki=0x7f03000b;
+    }
+    public static final class menu {
+        public static final int mainmenu=0x7f060000;
+    }
+    public static final class string {
+        public static final int app_name=0x7f050001;
+        public static final int browse_source=0x7f05000c;
+        public static final int changes=0x7f05000b;
+        public static final int changesets=0x7f050005;
+        public static final int clear_cache=0x7f050013;
+        public static final int description=0x7f050006;
+        public static final int files=0x7f05000a;
+        public static final int hello=0x7f050000;
+        public static final int issue_tracker=0x7f050003;
+        public static final int issues=0x7f05000f;
+        public static final int log_out=0x7f050010;
+        public static final int login=0x7f050008;
+        public static final int nothing=0x7f050007;
+        public static final int pleaseenterbitbucket=0x7f050009;
+        public static final int refresh=0x7f050012;
+        public static final int search_repo=0x7f050011;
+        public static final int source=0x7f05000e;
+        public static final int source_browser=0x7f05000d;
+        public static final int website=0x7f050004;
+        public static final int wiki=0x7f050002;
+    }
+    public static final class xml {
+        public static final int searchable=0x7f040000;
+    }
+}

Binary file added.

+-optimizationpasses 5
+-dontusemixedcaseclassnames
+-dontskipnonpubliclibraryclasses
+-dontpreverify
+-verbose
+-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
+
+-keep public class * extends android.app.Activity
+-keep public class * extends android.app.Application
+-keep public class * extends android.app.Service
+-keep public class * extends android.content.BroadcastReceiver
+-keep public class * extends android.content.ContentProvider
+-keep public class * extends android.app.backup.BackupAgentHelper
+-keep public class * extends android.preference.Preference
+-keep public class com.android.vending.licensing.ILicensingService
+
+-keepclasseswithmembernames class * {
+    native <methods>;
+}
+
+-keepclasseswithmembernames class * {
+    public <init>(android.content.Context, android.util.AttributeSet);
+}
+
+-keepclasseswithmembernames class * {
+    public <init>(android.content.Context, android.util.AttributeSet, int);
+}
+
+-keepclassmembers enum * {
+    public static **[] values();
+    public static ** valueOf(java.lang.String);
+}
+
+-keep class * implements android.os.Parcelable {
+  public static final android.os.Parcelable$Creator *;
+}
Add a comment to this file

res/drawable-hdpi/ic_menu_refresh.png

Added
New image
Add a comment to this file

res/drawable-hdpi/ic_menu_share.png

Added
New image
Add a comment to this file

res/drawable-hdpi/ic_menu_stop.png

Added
New image
Add a comment to this file

res/drawable-hdpi/icon.png

Added
New image
Add a comment to this file

res/drawable-ldpi/add.png

Added
New image
Add a comment to this file

res/drawable-ldpi/bug.png

Added
New image
Add a comment to this file

res/drawable-ldpi/del.png

Added
New image
Add a comment to this file

res/drawable-ldpi/edit.png

Added
New image
Add a comment to this file

res/drawable-ldpi/enhancement.png

Added
New image
Add a comment to this file

res/drawable-ldpi/file.png

Added
New image
Add a comment to this file

res/drawable-ldpi/folder.png

Added
New image
Add a comment to this file

res/drawable-ldpi/ic_menu_refresh.png

Added
New image
Add a comment to this file

res/drawable-ldpi/ic_menu_share.png

Added
New image
Add a comment to this file

res/drawable-ldpi/ic_menu_stop.png

Added
New image
Add a comment to this file

res/drawable-ldpi/icon.png

Added
New image
Add a comment to this file

res/drawable-ldpi/lock.png

Added
New image
Add a comment to this file

res/drawable-ldpi/proposal.png

Added
New image
Add a comment to this file

res/drawable-mdpi/bg.png

Added
New image
Add a comment to this file

res/drawable-mdpi/header.png

Added
New image
Add a comment to this file

res/drawable-mdpi/ic_menu_refresh.png

Added
New image
Add a comment to this file

res/drawable-mdpi/ic_menu_search_holo_dark.png

Added
New image
Add a comment to this file

res/drawable-mdpi/ic_menu_share.png

Added
New image
Add a comment to this file

res/drawable-mdpi/ic_menu_stop.png

Added
New image
Add a comment to this file

res/drawable-mdpi/icon.png

Added
New image
Add a comment to this file

res/drawable-mdpi/logo_big.png

Added
New image
Add a comment to this file

res/drawable-mdpi/top_bg.png

Added
New image
Add a comment to this file

res/drawable-mdpi/top_search.png

Added
New image

res/layout/changeset.xml

+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+  xmlns:android="http://schemas.android.com/apk/res/android"
+  android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent">
+  <include layout="@layout/header"  android:layout_width="match_parent" android:layout_height="wrap_content"/>
+    <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="4dip">
+        <TextView android:layout_width="wrap_content" android:layout_height="match_parent" android:id="@+id/changeset_message" android:text="@string/description"></TextView>
+    </LinearLayout>
+    <LinearLayout android:layout_height="wrap_content" android:layout_weight="1" android:layout_width="wrap_content" android:orientation="vertical">
+        <TextView android:id="@+id/textView1" android:layout_height="wrap_content" android:layout_width="match_parent" android:textSize="18dip" android:text="@string/changes" android:layout_margin="4dip"></TextView>
+        <ListView android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/changeset_files"></ListView>
+    </LinearLayout>
+  
+</LinearLayout>

res/layout/header.xml

+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout
+  xmlns:android="http://schemas.android.com/apk/res/android"
+  android:background="@drawable/top_bg" android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/title">
+    <ImageView android:id="@+id/imageView1" android:src="@drawable/header" android:minHeight="0dip" android:layout_height="54dip" android:paddingLeft="10dip" android:layout_width="130dip"></ImageView>
+    <TextView android:layout_width="wrap_content" android:layout_height="54dip" android:layout_gravity="center|center_vertical|right" android:layout_marginRight="5dip" android:id="@+id/header_title" android:paddingLeft="150dip" android:gravity="center_vertical|right" android:text="@string/nothing"></TextView>
+    <ImageButton android:background="@drawable/top_search" android:layout_gravity="right" android:id="@+id/bt_search" android:src="@drawable/ic_menu_search_holo_dark" android:layout_height="54dip" android:layout_width="54dip" android:visibility="gone"></ImageButton>
+</FrameLayout>

res/layout/listitem.xml

+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+  xmlns:android="http://schemas.android.com/apk/res/android"
+  android:layout_width="match_parent"
+  android:layout_height="match_parent" android:orientation="vertical" android:padding="7px">
+    <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content">
+        <TextView android:layout_width="wrap_content" android:id="@+id/title" android:layout_height="wrap_content" android:text="TextView" android:textSize="16dip"></TextView>
+    </LinearLayout>
+    <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content">
+        <TextView android:layout_width="wrap_content" android:id="@+id/subtitle" android:layout_height="wrap_content" android:text="TextView" android:textSize="12dip"></TextView>
+    </LinearLayout>
+</LinearLayout>

res/layout/listitem_changeset.xml

+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+  xmlns:android="http://schemas.android.com/apk/res/android"
+  android:layout_width="match_parent"
+  android:layout_height="match_parent" android:orientation="vertical" android:padding="4dip">
+    <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content">
+        <FrameLayout android:layout_height="match_parent" android:id="@+id/frameLayout1" android:layout_width="match_parent">
+            <TextView android:id="@+id/title" android:layout_height="wrap_content" android:text="TextView" android:textSize="18dip" android:layout_width="match_parent" android:paddingRight="20dip"></TextView>
+            <ImageView android:layout_width="wrap_content" android:layout_gravity="center_vertical|right" android:layout_height="match_parent" android:id="@+id/changeset_what" android:src="@drawable/edit" android:layout_marginRight="5dip"></ImageView>
+        </FrameLayout>
+    </LinearLayout>
+    <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content">
+        <TextView android:id="@+id/subtitle" android:layout_height="wrap_content" android:text="TextView" android:textSize="14dip" android:layout_width="match_parent"></TextView>
+    </LinearLayout>
+</LinearLayout>

res/layout/listitem_issues.xml

+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+  xmlns:android="http://schemas.android.com/apk/res/android"
+  android:layout_width="match_parent"
+  android:layout_height="match_parent" android:orientation="vertical" android:padding="4dip">
+    <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content">
+        <FrameLayout android:layout_height="match_parent" android:id="@+id/frameLayout1" android:layout_width="match_parent">
+            <TextView android:layout_height="wrap_content" android:text="TextView" android:textSize="18dip" android:layout_width="match_parent" android:paddingRight="20dip" android:id="@+id/issues_title"></TextView>
+            <ImageView android:layout_width="wrap_content" android:layout_gravity="center_vertical|right" android:layout_height="match_parent" android:layout_marginRight="5dip" android:id="@+id/issues_what" android:src="@drawable/bug"></ImageView>
+        </FrameLayout>
+    </LinearLayout>
+    <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content">
+        <TextView android:layout_height="wrap_content" android:text="TextView" android:textSize="14dip" android:layout_width="match_parent" android:id="@+id/issues_subtitle"></TextView>
+    </LinearLayout>
+</LinearLayout>

res/layout/listitem_repositories.xml

+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+  xmlns:android="http://schemas.android.com/apk/res/android"
+  android:layout_width="match_parent"
+  android:padding="15dip" android:orientation="horizontal" android:layout_height="wrap_content">
+    <FrameLayout android:id="@+id/frameLayout1" android:layout_height="wrap_content" android:layout_width="match_parent">
+        <TextView android:layout_height="wrap_content" android:text="TextView" android:id="@+id/title_listitem_repositories" android:textSize="20dip" android:layout_width="wrap_content"></TextView>
+        <ImageView android:layout_width="wrap_content" android:src="@drawable/lock" android:id="@+id/is_locked" android:layout_height="match_parent" android:layout_gravity="right|center_vertical"></ImageView>
+    </FrameLayout>
+</LinearLayout>

res/layout/listitem_source.xml

+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+  xmlns:android="http://schemas.android.com/apk/res/android"
+  android:layout_width="match_parent"
+  android:layout_height="match_parent" android:orientation="vertical" android:padding="4dip">
+    <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content">
+        <FrameLayout android:layout_height="match_parent" android:layout_width="match_parent">
+            <TextView android:id="@+id/source_title" android:layout_height="wrap_content" android:text="TextView" android:textSize="18dip" android:layout_width="match_parent" android:paddingRight="20dip"></TextView>
+            <ImageView android:layout_width="wrap_content" android:layout_gravity="center_vertical|right" android:layout_height="match_parent" android:layout_marginRight="5dip" android:id="@+id/source_what" android:src="@drawable/folder"></ImageView>
+        </FrameLayout>
+    </LinearLayout>
+</LinearLayout>

res/layout/login.xml

+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+  xmlns:android="http://schemas.android.com/apk/res/android"
+  android:layout_width="match_parent"
+  android:orientation="vertical" android:layout_height="match_parent" android:background="@drawable/bg">
+  <include layout="@layout/header" android:layout_width="match_parent" android:layout_height="wrap_content"/>
+    <LinearLayout android:layout_height="wrap_content" android:layout_width="match_parent" android:layout_weight="1" android:orientation="vertical">
+        <ImageView android:layout_height="wrap_content" android:layout_width="match_parent" android:src="@drawable/logo_big" android:layout_margin="50px"></ImageView>
+    </LinearLayout>
+    <LinearLayout android:layout_height="wrap_content" android:layout_width="match_parent" android:orientation="vertical">
+        <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/pleaseenterbitbucket" android:layout_margin="15px"></TextView>
+        <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/nothing" android:layout_marginLeft="15px" android:layout_marginRight="15px" android:id="@+id/login_username" android:inputType="text"></EditText>
+        <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/nothing" android:layout_marginLeft="15px" android:layout_marginRight="15px" android:inputType="textPassword" android:id="@+id/login_password"></EditText>
+        <Button android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/login" android:layout_margin="15px" android:id="@+id/login_button"></Button>
+    </LinearLayout>
+</LinearLayout>

res/layout/repositories.xml

+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    >
+    <include layout="@layout/header" android:layout_width="match_parent" android:layout_height="wrap_content"/>
+    <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1">
+        <ListView android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/repositories_list"></ListView>
+    </LinearLayout>
+    <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/ad_space"></LinearLayout>
+</LinearLayout>

res/layout/repository.xml

+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+  xmlns:android="http://schemas.android.com/apk/res/android"
+  android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent">
+  <include layout="@layout/header" android:layout_width="match_parent" android:layout_height="wrap_content"/>
+    <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content">
+        <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="4dip">
+            <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/repository_description" android:text="@string/nothing" android:layout_marginRight="42dip" android:autoLink="all" android:linksClickable="true"></TextView>
+            <ImageView android:layout_height="wrap_content" android:layout_gravity="right" android:id="@+id/icon" android:layout_width="38dip"></ImageView>
+        </FrameLayout>
+    </LinearLayout>
+    <LinearLayout android:layout_weight="1" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content">
+        <TextView android:layout_height="wrap_content" android:text="@string/changesets" android:layout_width="match_parent" android:textSize="18dip" android:layout_marginTop="5dip" android:padding="4dip"></TextView>
+        <ListView android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/repository_changesets"></ListView>
+        <ProgressBar android:id="@+id/changeset_loading" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_gravity="center|center_vertical" android:layout_marginTop="30dip"></ProgressBar>
+    </LinearLayout>
+    <LinearLayout android:layout_height="wrap_content" android:layout_width="match_parent" android:orientation="horizontal" >
+        <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content">
+            <Button android:layout_width="wrap_content" android:layout_weight="1" android:layout_height="wrap_content" android:text="@string/source" android:id="@+id/bt_source_browser"></Button>
+            <Button android:layout_weight="1" android:layout_height="wrap_content" android:layout_width="wrap_content" android:enabled="false" android:text="@string/issues" android:id="@+id/bt_issues"></Button>
+            <Button android:layout_width="wrap_content" android:layout_weight="1" android:layout_height="wrap_content" android:text="@string/wiki" android:id="@+id/bt_wiki" android:enabled="false"></Button>
+        </LinearLayout>
+    </LinearLayout>
+  
+</LinearLayout>

res/layout/source.xml

+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+  xmlns:android="http://schemas.android.com/apk/res/android"
+  android:layout_width="match_parent"
+  android:layout_height="match_parent" android:orientation="vertical">
+    <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content">
+        <include layout="@layout/header" android:layout_height="wrap_content" android:layout_width="match_parent"></include>
+    </LinearLayout>
+    <WebView android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/source_webview"></WebView>
+</LinearLayout>

res/layout/wiki.xml

+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+  xmlns:android="http://schemas.android.com/apk/res/android"
+  android:layout_width="match_parent"
+  android:layout_height="match_parent" android:orientation="vertical">
+    <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content">
+        <include layout="@layout/header" android:layout_height="wrap_content" android:layout_width="match_parent"></include>
+    </LinearLayout>
+    <WebView android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/wiki_webview"></WebView>
+</LinearLayout>

res/menu/mainmenu.xml

+<?xml version="1.0" encoding="utf-8"?>
+<menu
+  xmlns:android="http://schemas.android.com/apk/res/android">
+  <item android:icon="@drawable/ic_menu_refresh" android:id="@+id/menu_refresh" android:title="@string/clear_cache"></item>
+    <item android:title="@string/log_out" android:id="@+id/menu_logout" android:icon="@drawable/ic_menu_stop"></item>
+</menu>

res/values/strings.xml

+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <string name="hello">Hello World, main!</string>
+    <string name="app_name">bitbeaker</string>
+    <string name="wiki">Wiki</string>
+    <string name="issue_tracker">Issue Tracker</string>
+    <string name="website">Website</string>
+    <string name="changesets">Changesets</string>
+    <string name="description">Description</string>
+    <string name="nothing"></string>
+    <string name="login">Login</string>
+    <string name="pleaseenterbitbucket">Please enter your Bitbucket credentials:</string>
+    <string name="files">Files</string>
+    <string name="changes">Changes</string>
+    <string name="browse_source">Browse Source</string>
+    <string name="source_browser">Source Browser</string>
+    <string name="source">Source</string>
+    <string name="issues">Issues</string>
+    <string name="log_out">Log out</string>
+    <string name="search_repo">Search for repositories</string>
+    <string name="refresh">Refresh</string>
+    <string name="clear_cache">Clear cache</string>
+</resources>

res/xml/searchable.xml

+<?xml version="1.0" encoding="utf-8"?>
+<searchable xmlns:android="http://schemas.android.com/apk/res/android"
+    android:label="@string/app_name" android:hint="@string/search_repo">
+</searchable>

src/com/saibotd/bitbeaker/AsyncImageLoader.java

+package com.saibotd.bitbeaker;
+
+import java.net.URL;
+import java.net.URLConnection;
+
+import android.content.DialogInterface;
+import android.content.DialogInterface.OnCancelListener;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.os.AsyncTask;
+import android.widget.ImageView;
+
+public class AsyncImageLoader extends AsyncTask<String, Integer, Bitmap> implements OnCancelListener {
+	private final ImageView mImageView;
+
+	public AsyncImageLoader(ImageView imageView) {
+		super();
+		mImageView = imageView;
+	}
+
+	@Override
+	protected Bitmap doInBackground(String... parameters) {
+		Bitmap b = null;
+		try {
+			BitmapFactory.Options options=new BitmapFactory.Options();
+			options.inSampleSize = 8;
+			URL url = new URL(parameters[0]);
+			URLConnection connection = url.openConnection();
+			connection.setUseCaches(true);
+			b = BitmapFactory.decodeStream(url.openStream());
+			//b = ImageThreadLoader.readBitmapFromNetwork(new URL(parameters[0]));
+		} catch (Exception e) {
+			e.printStackTrace();
+			this.cancel(true);
+		}
+		return b;
+	}
+
+	@Override
+	protected void onPostExecute(Bitmap b) {
+		if(mImageView.isShown()){
+			mImageView.setImageBitmap(b);
+		}
+	}
+
+	public void onCancel(DialogInterface arg0) {
+		this.cancel(true);
+	}
+}

src/com/saibotd/bitbeaker/Bitbeaker.java

+package com.saibotd.bitbeaker;
+
+import java.util.ArrayList;
+
+import android.app.Application;
+import android.content.SharedPreferences;
+import android.util.Log;
+
+public class Bitbeaker extends Application {
+	
+	private SharedPreferences settings;
+	private ArrayList<KeyValueCache> kv; 
+
+	public void onCreate(){
+		super.onCreate();
+		Log.d("GS", "lol");
+		settings = getSharedPreferences("bitbeaker", 0);
+		kv = new ArrayList<KeyValueCache>();
+	}
+	
+	public void setKV(String key, String value){
+		kv.add(new KeyValueCache(key, value));
+		Log.d("KV", kv.toString());
+		int i = 0;
+		while(kv.size() > 100){
+			Log.d("KV DEL", kv.get(i).toString());
+			kv.remove(i);
+			i++;
+		}
+	}
+	
+	public String getKV(String key){
+		for(int i = 0; i < kv.size(); i++){
+			if(kv.get(i).key.equals(key)){
+				return kv.get(i).value;
+			}
+		}
+		return null;
+	}
+	
+	public void clearKV() {
+		kv.clear();
+	}
+	
+	public SharedPreferences getSettings() {
+		return settings;
+	}
+	public void setSettings(SharedPreferences settings) {
+		this.settings = settings;
+	}
+	public String getUsername() {
+		return settings.getString("username", "");
+	}
+	public void setUsername(String username) {
+		SharedPreferences.Editor editor = settings.edit();
+		editor.putString("username", username);
+		editor.commit();
+	}
+	public String getPassword() {
+		return settings.getString("password", "");
+	}
+	public void setPassword(String password) {
+		SharedPreferences.Editor editor = settings.edit();
+		editor.putString("password", password);
+		editor.commit();
+	}
+	public void logOut() {
+		SharedPreferences.Editor editor = settings.edit();
+    	editor.clear();
+    	editor.commit();
+	}
+	
+	private class KeyValueCache{
+		public String key;
+		public String value;
+		public KeyValueCache(String key, String value){
+			this.key = key;
+			this.value = value;
+		}
+	}
+}

src/com/saibotd/bitbeaker/ChangesetActivity.java

+package com.saibotd.bitbeaker;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import android.app.Activity;
+import android.content.Context;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.ListView;
+import android.widget.TextView;
+
+public class ChangesetActivity extends Activity {
+    
+	private JSONObject mData;
+	
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.changeset);
+        
+        ((TextView) findViewById(R.id.header_title)).setText("Changeset");
+        
+        Bundle b = getIntent().getExtras();
+        try {
+			mData = new JSONObject(b.getString("data"));
+		} catch (JSONException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		ListView listView = (ListView) findViewById(R.id.changeset_files);
+		ChangesetAdapter adapter;
+		try {
+			Log.d("XXX", mData.getJSONArray("files").toString());
+			adapter = new ChangesetAdapter(this, mData.getJSONArray("files"));
+			listView.setAdapter(adapter);
+		} catch (JSONException e1) {
+			// TODO Auto-generated catch block
+			e1.printStackTrace();
+		}
+		TextView message = (TextView) findViewById(R.id.changeset_message);
+		try {
+			message.setText(mData.getString("message"));
+		} catch (JSONException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+    }
+    
+    protected class ChangesetAdapter extends MyAdapter {
+    	
+    	public ChangesetAdapter(Context context, JSONArray jsonArray) {
+    		super(context, jsonArray);
+    	}
+    	
+    	public View getView(int position, View convertView, ViewGroup parent) {
+    		View view;
+    		if (convertView == null) {
+    			view = mFactory.inflate(R.layout.listitem_changeset, null);
+    		} else {
+    			view = (View) convertView;
+    		}
+    		view.setId(position);
+    		TextView title = (TextView) view.findViewById(R.id.title);
+    		TextView subtitle = (TextView) view.findViewById(R.id.subtitle);
+    		ImageView icon = (ImageView) view.findViewById(R.id.changeset_what);
+    		try {
+    			String type = this.getItem(position).getString("type");
+    			title.setText(type);
+    			subtitle.setText(this.getItem(position).getString("file"));
+    			if(type.equals("added")) icon.setImageResource(R.drawable.add);
+    			if(type.equals("modified")) icon.setImageResource(R.drawable.edit);
+    			if(type.equals("removed")) icon.setImageResource(R.drawable.del);
+    		} catch (JSONException e) {
+    			// TODO Auto-generated catch block
+    			e.printStackTrace();
+    		}
+    		return view;
+    	}
+
+    }
+}

src/com/saibotd/bitbeaker/IssuesActivity.java

+package com.saibotd.bitbeaker;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import android.app.ProgressDialog;
+import android.content.Context;
+import android.os.Bundle;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.ListView;
+import android.widget.TextView;
+
+public class IssuesActivity extends MyActivity {
+	
+	private String slug;
+	private String owner;
+	
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        Bundle b = getIntent().getExtras();
+        slug = b.getString("slug");
+        owner = b.getString("owner");
+        //setListAdapter(new IssuesAdapter(this, slug, owner));
+        setContentView(R.layout.repositories);
+        ((TextView) findViewById(R.id.header_title)).setText(slug);
+        AsyncLoader asyncLoader = new AsyncLoader();
+        asyncLoader.execute("https://api.bitbucket.org/1.0/repositories/"+ owner +"/"+ slug +"/issues/");
+        progressDialog = ProgressDialog.show(this, "", "Loading ...", true);
+    }
+    
+    protected void AsyncLoaderDone(String result) {
+    	super.AsyncLoaderDone(result);
+    	ListView listView = (ListView) findViewById(R.id.repositories_list);
+		try {
+			listView.setAdapter(new IssuesAdapter(this, new JSONObject(result).getJSONArray("issues")));
+		} catch (JSONException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+    
+    protected class IssuesAdapter extends MyAdapter {
+
+
+    	
+    	public IssuesAdapter(Context context, JSONArray jsonArray) {
+    		super(context, jsonArray);
+    	}
+    	
+    	private OnClickListener clickListener = new OnClickListener() {
+    		public void onClick(View v) {
+    			try {
+    				int id = getItem(v.getId()).getInt("local_id");
+    				Bundle b = new Bundle();
+    				b.putString("slug", slug);
+    				b.putString("owner", owner);
+    				b.putInt("id", id);
+    				/*
+    				Intent intent = new Intent(v.getContext(), IssueActivity.class);
+    				intent.putExtras(b);
+    				v.getContext().startActivity(intent);
+    				*/
+    			} catch (JSONException e) {
+    				// TODO Auto-generated catch block
+    				e.printStackTrace();
+    			}
+    		}
+    	};
+    	
+    	public View getView(int position, View convertView, ViewGroup parent) {
+    		View view;
+    		if (convertView == null) {
+    			view = mFactory.inflate(R.layout.listitem_issues, null);
+    		} else {
+    			view = (View) convertView;
+    		}
+    		view.setId(position);
+    		TextView title = (TextView) view.findViewById(R.id.issues_title);
+    		TextView subtitle = (TextView) view.findViewById(R.id.issues_subtitle);
+    		ImageView icon = (ImageView) view.findViewById(R.id.issues_what);
+    		try {
+    			String type = this.getItem(position).getJSONObject("metadata").getString("kind");
+    			title.setText(this.getItem(position).getString("title"));
+    			subtitle.setText(this.getItem(position).getString("created_on") + " - " + this.getItem(position).getString("comment_count") + " comment(s)");
+    			if(type.equals("bug")) icon.setImageResource(R.drawable.bug);
+    			if(type.equals("enhancement")) icon.setImageResource(R.drawable.enhancement);
+    			if(type.equals("proposal")) icon.setImageResource(R.drawable.proposal);
+    		} catch (JSONException e) {
+    			// TODO Auto-generated catch block
+    			e.printStackTrace();
+    		}
+    		view.setOnClickListener(clickListener);
+    		return view;
+    	}
+
+    }
+
+    
+    
+}

src/com/saibotd/bitbeaker/LoginActivity.java

+package com.saibotd.bitbeaker;
+
+import java.io.BufferedInputStream;
+import java.io.InputStream;
+import java.net.URL;
+
+import javax.net.ssl.HttpsURLConnection;
+
+import android.app.AlertDialog;
+import android.app.ProgressDialog;
+import android.content.Intent;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.util.Base64;
+import android.view.Menu;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.EditText;
+import android.widget.ImageButton;
+
+public class LoginActivity extends MyActivity {
+	
+
+	
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        
+        try{
+	        Bundle b = getIntent().getExtras();
+	        if(b.containsKey("logout")){
+	        	logOut(false);
+	        }
+        } catch(Exception e) {}
+        if(bitbeaker.getSettings().contains("username")){
+        	progressDialog = ProgressDialog.show(this, bitbeaker.getUsername(), "Logging in ...", true);
+        	new CheckLogin().execute();
+        }
+        setContentView(R.layout.login);
+    	findViewById(R.id.login_button).setOnClickListener(clickListener);
+    	ImageButton search = (ImageButton) findViewById(R.id.bt_search);
+        search.setVisibility(ImageButton.VISIBLE);
+        search.setOnClickListener(searchClickListener);
+    }
+    
+    public boolean onCreateOptionsMenu(Menu menu) {
+	    return false;
+	}
+    
+    private void logOut(Boolean isError){
+    	if(progressDialog != null) progressDialog.dismiss();
+    	bitbeaker.logOut();
+    	if(isError){
+    		AlertDialog alertDialog = new AlertDialog.Builder(this).create();
+			alertDialog.setTitle("HTTP Error");
+			alertDialog.setMessage("Login failed");
+			alertDialog.show();
+    	}
+    	bitbeaker.clearKV();
+    }
+    
+    private void logInOK(){
+    	if(progressDialog != null) progressDialog.dismiss();
+    	Intent intent = new Intent(this, RepositoriesActivity.class);
+    	startActivity(intent);
+    	finish();
+    }
+    
+    private OnClickListener clickListener = new OnClickListener() {
+		public void onClick(View v) {
+			progressDialog = ProgressDialog.show(v.getContext(), "", "Logging in ...", true);
+			String username = ((EditText) findViewById(R.id.login_username)).getText().toString();
+			String password = ((EditText) findViewById(R.id.login_password)).getText().toString();
+			bitbeaker.setUsername(username);
+			bitbeaker.setPassword(password);
+			new CheckLogin().execute();
+		}
+	};
+	
+	private class CheckLogin extends AsyncTask<String, Integer, Boolean> {
+		protected Boolean doInBackground(String... params) {
+	    	Boolean all_fine = true;
+			try {
+				URL url = new URL("https://api.bitbucket.org/1.0/user/repositories/");
+				HttpsURLConnection urlConnection;
+				urlConnection = (HttpsURLConnection) url.openConnection();
+				String loginString = bitbeaker.getUsername() + ":" + bitbeaker.getPassword();
+				urlConnection.setRequestProperty("Authorization", "Basic " + Base64.encodeToString(loginString.getBytes(), Base64.DEFAULT).trim()); 			
+				@SuppressWarnings("unused")
+				InputStream in = new BufferedInputStream(urlConnection.getInputStream());
+			} catch (Exception e) {
+				all_fine = false;
+			}
+			return all_fine;
+	    }
+
+	    protected void onPostExecute(Boolean result) {
+	    	if(result) logInOK();
+	    	else logOut(true);
+	    }
+	};
+}

src/com/saibotd/bitbeaker/MyActivity.java

+package com.saibotd.bitbeaker;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+
+import javax.net.ssl.HttpsURLConnection;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.app.ProgressDialog;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.DialogInterface.OnCancelListener;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.util.Base64;
+import android.util.Log;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.View.OnClickListener;
+
+public class MyActivity extends Activity {
+	
+	protected Bitbeaker bitbeaker;
+	protected ProgressDialog progressDialog;
+	protected AlertDialog alertDialog;
+	
+	public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        bitbeaker = (Bitbeaker) getApplication();
+	}
+	
+	public void onDestroy(){
+		Log.d("Activity", "Destroy");
+		super.onDestroy();
+	}
+	
+	protected OnClickListener searchClickListener = new OnClickListener() {
+		public void onClick(View v) {
+			onSearchRequested();
+		}
+	};
+	
+	public boolean onCreateOptionsMenu(Menu menu) {
+	    MenuInflater inflater = getMenuInflater();
+	    inflater.inflate(R.menu.mainmenu, menu);
+	    return true;
+	}
+	
+	@Override
+	public boolean onOptionsItemSelected(MenuItem item) {
+	    // Handle item selection
+	    switch (item.getItemId()) {
+	    case R.id.menu_refresh:
+	        bitbeaker.clearKV();
+	        return true;
+	    case R.id.menu_logout:
+	    	Intent intent = new Intent(this, LoginActivity.class);
+			Bundle b = new Bundle();
+			b.putBoolean("logout", true);
+			intent.putExtras(b);
+			startActivity(intent);
+			finish();
+			return true;
+	    default:
+	        return super.onOptionsItemSelected(item);
+	    }
+	}
+	
+	protected void AsyncLoaderDone(String result) {
+		if(progressDialog != null) progressDialog.dismiss();
+		if(result == null || result.length() == 0){
+			alertDialog = new AlertDialog.Builder(this).create();
+		    alertDialog.setTitle("Oops.");
+		    alertDialog.setMessage("There was a problem connecting to Bitbucket.org, please check your data connectivity and try again.");
+		    alertDialog.show();
+		}
+	}
+	
+	protected class AsyncLoader extends AsyncTask<String, Integer, String> implements OnCancelListener {
+
+		@Override
+		protected String doInBackground(String... params) {
+			return getAuthHTTPS(params[0]);
+		}
+
+		@Override
+		protected void onPostExecute(String result) {
+			AsyncLoaderDone(result);
+		}
+
+		public void onCancel(DialogInterface arg0) {
+			this.cancel(true);
+		}
+
+	}
+	
+	protected String getAuthHTTPS(String webadress) {
+		Log.d("getAuthHTTPS", webadress);
+		String cache = bitbeaker.getKV(webadress);
+        if(cache != null) return cache;
+		URL url;
+		InputStream in = null;
+		try {
+			url = new URL(webadress);
+			HttpsURLConnection urlConnection = (HttpsURLConnection) url.openConnection();
+			urlConnection.setUseCaches(true);
+			if(!bitbeaker.getUsername().equals("")){
+				String loginString = bitbeaker.getUsername() + ":" + bitbeaker.getPassword();
+				urlConnection.setRequestProperty("Authorization", "Basic " + Base64.encodeToString(loginString.getBytes(), Base64.DEFAULT).trim());
+			}
+			in = new BufferedInputStream(urlConnection.getInputStream());
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		String result = convertStreamToString(in);
+		if(!result.trim().equals("") && result.length() < 100000) bitbeaker.setKV(webadress, result);
+		return result;
+	}
+	
+	private static String convertStreamToString(InputStream is) {
+
+		String line = null;
+		try {
+			BufferedReader reader = new BufferedReader(new InputStreamReader(is));
+			StringBuilder sb = new StringBuilder();
+			while ((line = reader.readLine()) != null) {
+				sb.append(line + "\n");
+			}
+			return sb.toString();
+		} catch (Exception e) {
+			e.printStackTrace();
+		} finally {
+			try {
+				is.close();
+			} catch (Exception e) {
+				e.printStackTrace();
+			}
+		}
+		return "";
+	}
+	
+}

src/com/saibotd/bitbeaker/MyAdapter.java

+package com.saibotd.bitbeaker;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+
+public class MyAdapter extends BaseAdapter {
+
+	protected Context mContext;
+	protected JSONArray mData;
+	protected LayoutInflater mFactory;
+	
+	public MyAdapter(Context context, JSONArray jsonArray){
+		mData = jsonArray;
+		mContext = context;
+		mFactory = LayoutInflater.from(context);
+	}
+	
+	public int getCount() {
+		if(mData != null) return mData.length();
+		return 0;
+	}
+
+	public JSONObject getItem(int position) {
+		try {
+			return (JSONObject) mData.get(position);
+		} catch (JSONException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		return new JSONObject();
+	}
+
+	public long getItemId(int position) {
+		// TODO Auto-generated method stub
+		return position;
+	}
+
+	public View getView(int position, View convertView, ViewGroup parent) {
+		View view;
+		if (convertView == null) {
+			view = mFactory.inflate(R.layout.listitem, null);
+		} else {
+			view = (View) convertView;
+		}
+		return view;
+	}
+	
+}

src/com/saibotd/bitbeaker/RepositoriesActivity.java

+package com.saibotd.bitbeaker;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import android.app.ProgressDialog;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.view.ViewGroup;
+import android.widget.ImageButton;
+import android.widget.ListView;
+import android.widget.TextView;
+
+public class RepositoriesActivity extends MyActivity {
+	
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        
+        setContentView(R.layout.repositories);
+        ImageButton search = (ImageButton) findViewById(R.id.bt_search);
+        search.setVisibility(ImageButton.VISIBLE);
+        search.setOnClickListener(searchClickListener);
+        
+        AsyncLoader asyncLoader = new AsyncLoader();
+        asyncLoader.execute("https://api.bitbucket.org/1.0/user/repositories/");
+        progressDialog = ProgressDialog.show(this, "", "Loading ...", true);
+    }
+    
+    protected void AsyncLoaderDone(String result){
+    	super.AsyncLoaderDone(result);
+    	ListView listView = (ListView) findViewById(R.id.repositories_list);
+		try {
+			listView.setAdapter(new RepositoriesAdapter(this, new JSONArray(result)));
+		} catch (JSONException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+    }
+    
+    protected class RepositoriesAdapter extends MyAdapter {
+    	
+    	public RepositoriesAdapter(Context context, JSONArray jsonArray) {
+    		super(context, jsonArray);
+    	}
+    	
+    	private OnClickListener clickListener = new OnClickListener() {
+    		public void onClick(View v) {
+    			try {
+    				JSONObject rec = (JSONObject) mData.get(v.getId());
+    		    	Intent intent = new Intent(v.getContext(), RepositoryActivity.class);
+    				Bundle b = new Bundle();
+    				b.putString("slug", rec.getString("slug"));
+    				b.putString("owner", rec.getString("owner"));
+    				intent.putExtras(b);
+    				v.getContext().startActivity(intent);
+    			} catch (JSONException e) {
+    				// TODO Auto-generated catch block
+    				e.printStackTrace();
+    			}
+    		}
+    	};
+    	
+    	public View getView(int position, View convertView, ViewGroup parent) {
+    		View view;
+    		if (convertView == null) {
+    			view = mFactory.inflate(R.layout.listitem_repositories, null);
+    		} else {
+    			view = (View) convertView;
+    		}
+    		view.setId(position);
+    		TextView title = (TextView) view.findViewById(R.id.title_listitem_repositories);
+    		try {
+    			title.setText(this.getItem(position).getString("name"));
+    			if(this.getItem(position).getBoolean("is_private") == true){
+    				view.findViewById(R.id.is_locked).setVisibility(View.VISIBLE);
+    			} else {
+    				view.findViewById(R.id.is_locked).setVisibility(View.INVISIBLE);
+    			}
+    		} catch (Exception e) {
+    			// TODO Auto-generated catch block
+    			e.printStackTrace();
+    		}
+    		view.setOnClickListener(clickListener);
+    		return view;
+    	}
+
+    }
+    
+}

src/com/saibotd/bitbeaker/RepositoryActivity.java

+package com.saibotd.bitbeaker;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import android.app.ProgressDialog;
+import android.content.Intent;
+import android.os.Bundle;
+import android.text.Html;
+import android.util.Log;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.ImageView;
+import android.widget.ListView;
+import android.widget.TextView;
+
+public class RepositoryActivity extends MyActivity {
+    
+	private String slug;
+	private String owner;
+	private Boolean firstCall;
+	
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.repository);
+        Bundle b = getIntent().getExtras();
+        slug = b.getString("slug");
+        owner = b.getString("owner");
+        firstCall = true;
+        Log.d("SLUG", slug);
+        Log.d("OWNER", owner);
+        AsyncLoader asyncLoader = new AsyncLoader();
+        asyncLoader.execute("https://api.bitbucket.org/1.0/repositories/"+ owner +"/"+ slug +"/");
+        progressDialog = ProgressDialog.show(this, "", "Loading ...", true);
+    }
+    
+	private OnClickListener sourceBrowserClickListener = new OnClickListener() {
+		public void onClick(View v) {
+	    	Intent intent = new Intent(v.getContext(), SourceBrowserActivity.class);
+			Bundle b = new Bundle();
+			b.putString("slug", slug);
+			b.putString("owner", owner);
+			b.putString("subdir", "/");
+			intent.putExtras(b);
+			v.getContext().startActivity(intent);
+		}
+	};
+	
+	private OnClickListener wikiBrowserClickListener = new OnClickListener() {
+		public void onClick(View v) {
+	    	Intent intent = new Intent(v.getContext(), WikiActivity.class);
+			Bundle b = new Bundle();
+			b.putString("slug", slug);
+			b.putString("owner", owner);
+			intent.putExtras(b);
+			v.getContext().startActivity(intent);
+		}
+	};
+	
+	private OnClickListener issuesBrowserClickListener = new OnClickListener() {
+		public void onClick(View v) {
+	    	Intent intent = new Intent(v.getContext(), IssuesActivity.class);
+			Bundle b = new Bundle();
+			b.putString("slug", slug);
+			b.putString("owner", owner);
+			intent.putExtras(b);
+			v.getContext().startActivity(intent);
+		}
+	};
+	
+	private JSONArray reverse(JSONArray a) throws JSONException{
+		JSONArray _a = new JSONArray();
+		for(int i = a.length()-1; i >= 0; i--){
+			_a.put(a.getJSONObject(i));
+		}
+		return _a;
+	}
+
+	public void AsyncLoaderDone(String result) {
+		super.AsyncLoaderDone(result);
+		if(firstCall){
+			firstCall = false;
+			Button sourceBrowser = (Button) findViewById(R.id.bt_source_browser);
+			sourceBrowser.setOnClickListener(sourceBrowserClickListener);
+			
+			Button wiki = (Button) findViewById(R.id.bt_wiki);
+			wiki.setOnClickListener(wikiBrowserClickListener);
+			
+			Button issues = (Button) findViewById(R.id.bt_issues);
+			issues.setOnClickListener(issuesBrowserClickListener);
+			
+			TextView name = (TextView) findViewById(R.id.header_title);
+			TextView description = (TextView) findViewById(R.id.repository_description);
+			
+			ImageView icon = (ImageView) findViewById(R.id.icon);
+			
+			try {
+				JSONObject jsonObject = new JSONObject(result);
+				if(jsonObject.has("has_wiki") && jsonObject.getBoolean("has_wiki")) wiki.setEnabled(true);
+				else wiki.setEnabled(false);
+				if(jsonObject.has("has_issues") && jsonObject.getBoolean("has_issues")) issues.setEnabled(true);
+				else issues.setEnabled(false);
+				name.setText(jsonObject.getString("name"));
+				String desc = "<b>" + jsonObject.getString("owner") + " / " + jsonObject.getString("slug") + "</b>";
+				if(!jsonObject.getString("description").trim().equals("")) desc += "<br>" + jsonObject.getString("description");
+				if(!jsonObject.getString("website").trim().equals("") && !jsonObject.getString("website").trim().equals("null")) desc += "<br><a href='"+ jsonObject.getString("website") +"'>" + jsonObject.getString("website") + "</a>";
+				description.setText(Html.fromHtml(desc));
+				if(jsonObject.getString("logo") != "null"){
+					AsyncImageLoader imgLoader = new AsyncImageLoader(icon);
+					imgLoader.execute(jsonObject.getString("logo"));
+				}
+			} catch (JSONException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+			AsyncLoader asyncLoader2 = new AsyncLoader();
+	        asyncLoader2.execute("https://api.bitbucket.org/1.0/repositories/"+ owner +"/"+ slug +"/changesets/");
+		} else {
+			findViewById(R.id.changeset_loading).setVisibility(View.GONE);
+			ListView listView = (ListView) findViewById(R.id.repository_changesets);
+			try {
+				JSONArray jsonArray = reverse(new JSONObject(result).getJSONArray("changesets"));
+				listView.setAdapter(new ChangesetsAdapter(this, jsonArray));
+			} catch (JSONException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+		}
+	}
+	
+	protected class ChangesetsAdapter extends MyAdapter {
+		
+
+		public ChangesetsAdapter(RepositoryActivity context, JSONArray jsonArray) {
+			super(context, jsonArray);
+		}
+		
+		private OnClickListener clickListener = new OnClickListener() {
+			public void onClick(View v) {
+				try {
+					JSONObject rec = (JSONObject) mData.get(v.getId());
+					//((RepositoriesActivity) mContext).launchActivity(rec.getString("name"));
+			    	Intent intent = new Intent(v.getContext(), ChangesetActivity.class);
+					Bundle b = new Bundle();
+					b.putString("data", rec.toString());
+					intent.putExtras(b);
+					v.getContext().startActivity(intent);
+				} catch (JSONException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+			}
+		};
+		
+		public View getView(int position, View convertView, ViewGroup parent) {
+			View view;
+			if (convertView == null) {
+				view = mFactory.inflate(R.layout.listitem, null);
+			} else {
+				view = (View) convertView;
+			}
+			view.setId(position);
+			TextView title = (TextView) view.findViewById(R.id.title);
+			TextView subtitle = (TextView) view.findViewById(R.id.subtitle);
+			try {
+				title.setText(this.getItem(position).getString("node"));
+				subtitle.setText(this.getItem(position).getString("timestamp") + " - " + this.getItem(position).getString("author") + ": \"" + this.getItem(position).getString("message") + "\"");
+			} catch (JSONException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+			view.setOnClickListener(clickListener);
+			return view;
+		}
+
+	}
+}

src/com/saibotd/bitbeaker/SearchableActivity.java

+package com.saibotd.bitbeaker;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import android.app.ProgressDialog;
+import android.app.SearchManager;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.view.ViewGroup;
+import android.widget.ListView;
+import android.widget.TextView;
+import android.widget.Toast;
+
+public class SearchableActivity extends MyActivity {
+	
+	private JSONArray lastResult;
+	
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        
+        setContentView(R.layout.repositories);
+        
+        Intent intent = getIntent();
+        if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
+          String query = intent.getStringExtra(SearchManager.QUERY);
+          if(query.length() >= 3){
+	          AsyncLoader asyncLoader = new AsyncLoader();
+	          asyncLoader.execute("https://api.bitbucket.org/1.0/repositories/?name=" + query);
+	          progressDialog = ProgressDialog.show(this, "", "Searching ...", true);
+	          ((TextView) findViewById(R.id.header_title)).setText("Results for \"" + query + "\"");
+          } else {
+        	  Toast.makeText(this, "Please enter at least 3 letters.", Toast.LENGTH_LONG).show();
+          }
+        }
+    }
+    
+    protected void AsyncLoaderDone(String result){
+    	super.AsyncLoaderDone(result);
+    	ListView listView = (ListView) findViewById(R.id.repositories_list);
+		try {
+			lastResult = new JSONObject(result).getJSONArray("repositories");
+			listView.setAdapter(new RepositoriesAdapter(this, lastResult));
+		} catch (JSONException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+    }
+    
+    protected class RepositoriesAdapter extends MyAdapter {
+    	
+    	public RepositoriesAdapter(Context context, JSONArray jsonArray) {
+    		super(context, jsonArray);
+    	}
+    	
+    	private OnClickListener clickListener = new OnClickListener() {
+    		public void onClick(View v) {
+    			try {
+    				JSONObject rec = (JSONObject) mData.get(v.getId());
+    		    	Intent intent = new Intent(v.getContext(), RepositoryActivity.class);
+    				Bundle b = new Bundle();
+    				b.putString("slug", rec.getString("slug"));
+    				b.putString("owner", rec.getString("owner"));
+    				intent.putExtras(b);
+    				v.getContext().startActivity(intent);
+    			} catch (JSONException e) {
+    				// TODO Auto-generated catch block
+    				e.printStackTrace();
+    			}
+    		}
+    	};
+    	
+    	public View getView(int position, View convertView, ViewGroup parent) {
+    		View view;
+    		if (convertView == null) {
+    			view = mFactory.inflate(R.layout.listitem, null);
+    		} else {
+    			view = (View) convertView;
+    		}
+    		view.setId(position);
+    		TextView title = (TextView) view.findViewById(R.id.title);
+    		TextView subtitle = (TextView) view.findViewById(R.id.subtitle);
+    		try {
+    			title.setText(this.getItem(position).getString("name"));
+    			subtitle.setText(this.getItem(position).getString("description"));
+    		} catch (Exception e) {
+    			// TODO Auto-generated catch block
+    			e.printStackTrace();
+    		}
+    		view.setOnClickListener(clickListener);
+    		return view;
+    	}
+
+    }
+    
+}

src/com/saibotd/bitbeaker/SourceActivity.java

+package com.saibotd.bitbeaker;
+
+import android.app.ProgressDialog;
+import android.os.Bundle;
+import android.text.TextUtils;
+import android.util.Log;
+import android.webkit.JsResult;
+import android.webkit.WebChromeClient;
+import android.webkit.WebView;
+import android.widget.TextView;
+
+public class SourceActivity extends MyActivity {
+    
+	private String slug;
+	private String owner;
+	private String file;
+	private String code;
+	
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.source);
+        Bundle b = getIntent().getExtras();
+        slug = b.getString("slug");
+        owner = b.getString("owner");
+        file = b.getString("file");
+        progressDialog = ProgressDialog.show(this, "", "Loading ...", true);
+        AsyncLoader asyncLoader = new AsyncLoader();
+        asyncLoader.execute("https://api.bitbucket.org/1.0/repositories/"+ owner +"/"+slug+"/raw/tip" + file);
+        ((TextView) findViewById(R.id.header_title)).setText(slug + file);
+    }
+	
+	public void AsyncLoaderDone(String result) {
+		super.AsyncLoaderDone(result);
+		code = TextUtils.htmlEncode(result.replace("\t", "  "));
+		WebView webView = (WebView) findViewById(R.id.source_webview);
+		webView.getSettings().setBuiltInZoomControls(true);
+		webView.getSettings().setUseWideViewPort(true);
+		webView.getSettings().setJavaScriptEnabled(true);
+		webView.addJavascriptInterface(new JavaScriptInterface(), "bitbeaker");
+		webView.setWebChromeClient(new WebChromeClient());
+		webView.loadUrl("file:///android_asset/source.html");
+	}
+	
+	final class MyWebChromeClient extends WebChromeClient {
+        @Override
+        public boolean onJsAlert(WebView view, String url, String message, JsResult result) {
+            Log.d("JAVASCRIPT", message);
+            result.confirm();
+            return true;
+        }
+    }
+	
+	private class JavaScriptInterface{
+		@SuppressWarnings("unused")
+		public String getCode()  
+	    {  
+	         return code;
+	    }
+	}
+	
+}

src/com/saibotd/bitbeaker/SourceBrowserActivity.java

+package com.saibotd.bitbeaker;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import android.app.ProgressDialog;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.ListView;
+import android.widget.TextView;
+
+public class SourceBrowserActivity extends MyActivity {
+	
+	private String slug;
+	private String owner;
+	private String subdir;
+	
+    @Override
+    public void onCreate(Bundle savedInstanceState) {