From c0aabeafe06f64be7e1ec350ba78cb8037b753b1 Mon Sep 17 00:00:00 2001 From: Alexandre Terrasa Date: Tue, 5 Nov 2013 19:55:27 -0500 Subject: [PATCH] nitdoc: Replace old nitdoc by nitdoc_ni Signed-off-by: Alexandre Terrasa --- Makefile | 8 +- share/ni_nitdoc/resources/icons/const_private.png | Bin 2996 -> 0 bytes .../ni_nitdoc/resources/icons/const_protected.png | Bin 2986 -> 0 bytes share/ni_nitdoc/resources/icons/const_public.png | Bin 2992 -> 0 bytes share/ni_nitdoc/resources/icons/github-icon.png | Bin 1714 -> 0 bytes share/ni_nitdoc/resources/icons/meth_private.png | Bin 3101 -> 0 bytes share/ni_nitdoc/resources/icons/meth_protected.png | Bin 3078 -> 0 bytes share/ni_nitdoc/resources/icons/meth_public.png | Bin 3099 -> 0 bytes share/ni_nitdoc/resources/icons/vtype_private.png | Bin 3100 -> 0 bytes .../ni_nitdoc/resources/icons/vtype_protected.png | Bin 3112 -> 0 bytes share/ni_nitdoc/resources/icons/vtype_public.png | Bin 3106 -> 0 bytes share/ni_nitdoc/scripts/jquery-1.7.1.min.js | 5 - share/ni_nitdoc/styles/main.css | 467 --- share/{ni_nitdoc => nitdoc}/ZeroClipboard.swf | Bin 1961 -> 1961 bytes share/nitdoc/help.html | 75 - share/nitdoc/resources/icons/close.png | Bin 1066 -> 0 bytes share/nitdoc/resources/icons/const_private.png | Bin 3050 -> 2996 bytes share/nitdoc/resources/icons/const_protected.png | Bin 3069 -> 2986 bytes share/nitdoc/resources/icons/const_public.png | Bin 3069 -> 2992 bytes .../{ni_nitdoc => nitdoc}/resources/icons/copy.png | Bin 1287 -> 1287 bytes .../resources/icons/github-icon-green.png | Bin 1379 -> 1379 bytes share/nitdoc/resources/icons/github-icon-w.png | Bin 1934 -> 0 bytes .../resources/icons/github-icon-white.png | Bin 1239 -> 1239 bytes share/nitdoc/resources/icons/meth_private.png | Bin 3202 -> 3101 bytes share/nitdoc/resources/icons/meth_protected.png | Bin 3200 -> 3078 bytes share/nitdoc/resources/icons/meth_public.png | Bin 3207 -> 3099 bytes share/nitdoc/resources/icons/vtype_private.png | Bin 3235 -> 3100 bytes share/nitdoc/resources/icons/vtype_protected.png | Bin 3249 -> 3112 bytes share/nitdoc/resources/icons/vtype_public.png | Bin 3249 -> 3106 bytes share/nitdoc/resources/top_back.gif | Bin 806 -> 0 bytes .../scripts/Markdown.Converter.js | 0 .../{ni_nitdoc => nitdoc}/scripts/Nitdoc.GitHub.js | 87 +- .../scripts/Nitdoc.QuickSearch.js | 0 share/{ni_nitdoc => nitdoc}/scripts/Nitdoc.UI.js | 53 +- .../scripts/ZeroClipboard.min.js | 0 share/{ni_nitdoc => nitdoc}/scripts/base64.js | 0 share/nitdoc/scripts/js-facilities.js | 1513 ---------- .../{ni_nitdoc => nitdoc}/styles/Nitdoc.GitHub.css | 0 .../styles/Nitdoc.QuickSearch.css | 0 share/{ni_nitdoc => nitdoc}/styles/Nitdoc.UI.css | 6 + share/nitdoc/styles/main.css | 670 +---- src/Makefile | 9 +- src/ni_nitdoc.nit | 1812 ----------- src/nitdoc.nit | 3172 ++++++++++---------- tests/ni_nitdoc.args | 1 - tests/nitdoc.args | 2 +- tests/sav/nitdoc.res | 11 +- tests/sav/nitdoc.sav | 13 +- tests/sav/nitdoc_args1.sav | 79 +- tests/testfull.sh | 2 +- 50 files changed, 1934 insertions(+), 6051 deletions(-) delete mode 100644 share/ni_nitdoc/resources/icons/const_private.png delete mode 100644 share/ni_nitdoc/resources/icons/const_protected.png delete mode 100644 share/ni_nitdoc/resources/icons/const_public.png delete mode 100644 share/ni_nitdoc/resources/icons/github-icon.png delete mode 100644 share/ni_nitdoc/resources/icons/meth_private.png delete mode 100644 share/ni_nitdoc/resources/icons/meth_protected.png delete mode 100644 share/ni_nitdoc/resources/icons/meth_public.png delete mode 100644 share/ni_nitdoc/resources/icons/vtype_private.png delete mode 100644 share/ni_nitdoc/resources/icons/vtype_protected.png delete mode 100644 share/ni_nitdoc/resources/icons/vtype_public.png delete mode 100644 share/ni_nitdoc/scripts/jquery-1.7.1.min.js delete mode 100644 share/ni_nitdoc/styles/main.css rename share/{ni_nitdoc => nitdoc}/ZeroClipboard.swf (100%) delete mode 100644 share/nitdoc/help.html delete mode 100755 share/nitdoc/resources/icons/close.png rename share/{ni_nitdoc => nitdoc}/resources/icons/copy.png (100%) rename share/{ni_nitdoc => nitdoc}/resources/icons/github-icon-green.png (100%) delete mode 100644 share/nitdoc/resources/icons/github-icon-w.png rename share/{ni_nitdoc => nitdoc}/resources/icons/github-icon-white.png (100%) delete mode 100644 share/nitdoc/resources/top_back.gif rename share/{ni_nitdoc => nitdoc}/scripts/Markdown.Converter.js (100%) rename share/{ni_nitdoc => nitdoc}/scripts/Nitdoc.GitHub.js (90%) rename share/{ni_nitdoc => nitdoc}/scripts/Nitdoc.QuickSearch.js (100%) rename share/{ni_nitdoc => nitdoc}/scripts/Nitdoc.UI.js (75%) rename share/{ni_nitdoc => nitdoc}/scripts/ZeroClipboard.min.js (100%) rename share/{ni_nitdoc => nitdoc}/scripts/base64.js (100%) delete mode 100644 share/nitdoc/scripts/js-facilities.js rename share/{ni_nitdoc => nitdoc}/styles/Nitdoc.GitHub.css (100%) rename share/{ni_nitdoc => nitdoc}/styles/Nitdoc.QuickSearch.css (100%) rename share/{ni_nitdoc => nitdoc}/styles/Nitdoc.UI.css (91%) delete mode 100644 src/ni_nitdoc.nit delete mode 100644 tests/ni_nitdoc.args diff --git a/Makefile b/Makefile index ac55776..068fa2f 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,6 @@ doc/stdlib/index.html: bin/nitdoc --custom-menu-items "
  • Nitlanguage.org
  • " \ --custom-overview-text "

    Documentation for the standard library of Nit
    Version $$(git describe)
    Date: $$(git show --format="%cd" | head -1)

    " \ --custom-footer-text "Nit standard library. Version $$(git describe)." \ - --github nit \ --source "https://github.com/privat/nit/blob/$$(git show --format="%H" | head -1)/%f#L%l-%L" doc/nitc/index.html: bin/nitdoc @@ -45,16 +44,17 @@ doc/nitc/index.html: bin/nitdoc --custom-menu-items "
  • Nitlanguage.org
  • " \ --custom-overview-text "

    Documentation for the Nit compiler and tools
    Version $$(git describe)
    Date: $$(git show --format="%cd" | head -1)

    " \ --custom-footer-text "Nit compiler. Version $$(git describe)." \ - --github nit \ --source "https://github.com/privat/nit/blob/$$(git show --format="%H" | head -1)/%f#L%l-%L" doc/newmodel/index.html: bin/nitdoc - bin/nitdox src/nit.nit src/nitmetrics.nit src/nitg.nit src/nitx.nit src/nitunit.nit src/nitlight.nit src/ni_nitdoc.nit src/dbgcli.nit src/netdbg.nit -d doc/newmodel \ + bin/nitdoc src/nit.nit src/nitmetrics.nit src/nitg.nit src/nitx.nit src/nitunit.nit src/nitlight.nit src/dbgcli.nit src/netdbg.nit -d doc/newmodel \ --custom-title "Nit New Model" \ --custom-menu-items "
  • Nitlanguage.org
  • " \ --custom-overview-text "

    Documentation for the Nit tools based on the new metamodel
    Version $$(git describe)
    Date: $$(git show --format="%cd" | head -1)

    " \ --custom-footer-text "Nit new metamodel. Version $$(git describe)." \ - --github-origin "privat:nit:master" \ + --github-upstream "privat:nit:master" \ + --github-base-sha1 "$$(git show | head -1 | cut -c8-)" \ + --github-gitdir "." \ --source "https://github.com/privat/nit/blob/$$(git show --format="%H" | head -1)/%f#L%l-%L" clean: diff --git a/share/ni_nitdoc/resources/icons/const_private.png b/share/ni_nitdoc/resources/icons/const_private.png deleted file mode 100644 index 53def844dc248a50a8a93ff8b0d2b547e8ef3cbb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2996 zcmV;l3rqBgP)Oz@Z0f2-7z;ux~O9+4z06=<WDR*FRcSTFz- zW=q650N5=6FiBTtNC2?60Km==3$g$R3;-}uh=nNt1bYBr$Ri_o0EC$U6h`t_Jn<{8 z5a%iY0C<_QJh>z}MS)ugEpZ1|S1ukX&Pf+56gFW3VVXcL!g-k)GJ!M?;PcD?0HBc- z5#WRK{dmp}uFlRjj{U%*%WZ25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24cOCDe-w#jZd?0@)|7iKK^;6KN`;!@ylm7$*nDhK&GcDTy000JJOGiWi$^dBq z3jH-wv;Y7A32;bRa{vGf6951U69E94oEQKA00(qQO+^RY3JVYt752&vxc~qF+(|@1 zR5;7klRHktKoCS80Fbxb^6_E4S+l*~@*O{s)LwQDMd0J>oyUhKUhbcN2OM4G+-~lYpI?#CLN+11`BPg1_U#R zsREl=YV>%Tr~U%CZY_8u+JJ1_>2Z?)lto3X4ySmuZ^Cr~aGIZS^Lnmq70|(sx&c?_ gq&}Y7`v0Hl2awWEXo6Pi%m4rY07*qoM6N<$f>c+FIRF3v diff --git a/share/ni_nitdoc/resources/icons/const_public.png b/share/ni_nitdoc/resources/icons/const_public.png deleted file mode 100644 index 393f1307ad0c285351c4129886a2c583b2209f05..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2992 zcmV;h3s3ZkP)Oz@Z0f2-7z;ux~O9+4z06=<WDR*FRcSTFz- zW=q650N5=6FiBTtNC2?60Km==3$g$R3;-}uh=nNt1bYBr$Ri_o0EC$U6h`t_Jn<{8 z5a%iY0C<_QJh>z}MS)ugEpZ1|S1ukX&Pf+56gFW3VVXcL!g-k)GJ!M?;PcD?0HBc- z5#WRK{dmp}uFlRjj{U%*%WZ25jX z{P*?XzTzZ-GF^d31o+^>%=Ap99M6&ogks$0k4OBs3;+Bb(;~!4V!2o<6ys46agIcq zjPo+3B8fthDa9qy|77CdEc*jK-!%ZRYCZvbku9iQV*~a}ClFY4z~c7+0P?$U!PF=S z1Au6Q;m>#f??3%Vpd|o+W=WE9003S@Bra6Svp>fO002awfhw>;8}z{#EWidF!3EsG z3;bXU&9EIRU@z1_9W=mEXoiz;4lcq~xDGvV5BgyU zp1~-*fe8db$Osc*A=-!mVv1NJjtCc-h4>-CNCXm#Bp}I%6j35eku^v$Qi@a{RY)E3 zJ#qp$hg?Rwkvqr$GJ^buyhkyVfwECO)C{#lxu`c9ghrwZ&}4KmnvWKso6vH!8a<3Q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R1I^byW*g@__U z4QsF&uJSEcFeleM3~ChjEQGbHOjsGDMbyAl(p=Ttv9RaVo8~I#js@@Y9C^_2U})yn zzSHU%6FxuY?d;&65MyR({^lU*3$z$ZllDb(o&<7d;A_`h2U+3~BJ2Hv`{W}KEU801#cv_B|9Cm!ynR{S`AMsSn z;7E=B;mb!wx$L;S>yGXG^6=&WlQn9$s?&L%Y1D8TI^MlKB1DqsEng$>f4=xYWBoPI z_S1p!sJ#d2?YI4kPA{k}Eby?F=f-J9zIc`YDl^pzjVm~9ebE?Hn?t0Nx+la|D0MB; z9)2xv1G>a1|A9kQ>~DV<=X3-4yC&n!m8-3K#P z{X@0zRuQsy$+N ziSCoLJU{Z$nQy4A4Y5UJ07$5FA~qL2%Q+cLaqDU?Lz3?=BC5;Nk6BbTmmceEaM>-Z zi>O&-dSE=%ex;vcvCOk{*JQ5^_4M z4lW7%l9IqY(z7pV(?I@@8=KPFO82)O{VDI18-*d-k$YmI^XiuPs_LuFw<^ZcD}yP5 c*NrbeloN*74g`U%%F6r~k%+>C^#XapzmV0H-2eap diff --git a/share/ni_nitdoc/resources/icons/meth_private.png b/share/ni_nitdoc/resources/icons/meth_private.png deleted file mode 100644 index 0217515c486c68805408bfd02d537932c62c2fab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3101 zcmV+&4C3>NP)Oz@Z0f2-7z;ux~O9+4z06=<WDR*FRcSTFz- zW=q650N5=6FiBTtNC2?60Km==3$g$R3;-}uh=nNt1bYBr$Ri_o0EC$U6h`t_Jn<{8 z5a%iY0C<_QJh>z}MS)ugEpZ1|S1ukX&Pf+56gFW3VVXcL!g-k)GJ!M?;PcD?0HBc- z5#WRK{dmp}uFlRjj{U%*%WZ25jX z{P*?XzTzZ-GF^d31o+^>%=Ap99M6&ogks$0k4OBs3;+Bb(;~!4V!2o<6ys46agIcq zjPo+3B8fthDa9qy|77CdEc*jK-!%ZRYCZvbku9iQV*~a}ClFY4z~c7+0P?$U!PF=S z1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ni_nitdoc/resources/icons/meth_protected.png deleted file mode 100644 index eb20e7cb1c7478f6ee846ac779efa777072c0c3f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3078 zcmV+h4EghkP)Oz@Z0f2-7z;ux~O9+4z06=<WDR*FRcSTFz- zW=q650N5=6FiBTtNC2?60Km==3$g$R3;-}uh=nNt1bYBr$Ri_o0EC$U6h`t_Jn<{8 z5a%iY0C<_QJh>z}MS)ugEpZ1|S1ukX&Pf+56gFW3VVXcL!g-k)GJ!M?;PcD?0HBc- z5#WRK{dmp}uFlRjj{U%*%WZ25jX z{P*?XzTzZ-GF^d31o+^>%=Ap99M6&ogks$0k4OBs3;+Bb(;~!4V!2o<6ys46agIcq zjPo+3B8fthDa9qy|77CdEc*jK-!%ZRYCZvbku9iQV*~a}ClFY4z~c7+0P?$U!PF=S z1Au6Q;m>#f??3%Vpd|o+W=WE9003S@Bra6Svp>fO002awfhw>;8}z{#EWidF!3EsG z3;bXU&9EIRU@z1_9W=mEXoiz;4lcq~xDGvV5BgyU zp1~-*fe8db$Osc*A=-!mVv1NJjtCc-h4>-CNCXm#Bp}I%6j35eku^v$Qi@a{RY)E3 zJ#qp$hg?Rwkvqr$GJ^buyhkyVfwECO)C{#lxu`c9ghrwZ&}4KmnvWKso6vH!8a<3Q zq36)6Xb;+tK10Vaz~~qUGsJ8#F2=(`u{bOVlVi)VBCHIn#u~6ztOL7=^<&SmcLWlF zMZgI*1b0FpVIDz9SWH+>*hr`#93(Um+6gxa1B6k+CnA%mOSC4s5&6UzVlpv@SV$}* z))J2sFA#f(L&P^E5{W}HC%KRUNwK6<(h|}}(r!{C=`5+6G)NjFlgZj-YqAG9lq?`C z$c5yc>d>VnA`E_*3F2Qp##d8RZb=H01_mm@+|Cqnc9PsG(F5HIG_C zt)aG3uTh7n6Et<2In9F>NlT@zqLtGcXcuVrX|L#Xx)I%#9!{6gSJKPrN9dR61N3(c z4Tcqi$B1Vr8Jidf7-t!G7_XR2rWw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ZJ24cOCDe-w#jZd?0@)|7iKK^;6KN`;!@ylm7$*nDhK&GcDTy000JJOGiWi$^dBq z3jH-wv;Y7A32;bRa{vGf6951U69E94oEQKA00(qQO+^RY3JVYw15IBpF8}}mI7vi7 zR5;7klRZlVK@f(Yx$K!-2q7pK5UnH$F(D!`MDaJ+Tlv34EYet5SlKEH+QibzLd8Z9 zB%LvL+1yw}E_cdRsT_EBV3&F3V|PVWna3RFw7CJOYNSG;K+ek{IJ8?GxM!+9td!TN zZ!~Cbwh}QW4hzE&R~GPZ$Mo;+m8;pAIe(MPM?IY9*OM9Q>H~t_%K!gN-wEE4 UFZS<7hyVZp07*qoM6N<$g6OEcng9R* diff --git a/share/ni_nitdoc/resources/icons/meth_public.png b/share/ni_nitdoc/resources/icons/meth_public.png deleted file mode 100644 index e5906ee3907222cc90bddc7f5a51b7de9e53182a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3099 zcmV+$4CM2PP)Oz@Z0f2-7z;ux~O9+4z06=<WDR*FRcSTFz- zW=q650N5=6FiBTtNC2?60Km==3$g$R3;-}uh=nNt1bYBr$Ri_o0EC$U6h`t_Jn<{8 z5a%iY0C<_QJh>z}MS)ugEpZ1|S1ukX&Pf+56gFW3VVXcL!g-k)GJ!M?;PcD?0HBc- z5#WRK{dmp}uFlRjj{U%*%WZ25jX z{P*?XzTzZ-GF^d31o+^>%=Ap99M6&ogks$0k4OBs3;+Bb(;~!4V!2o<6ys46agIcq zjPo+3B8fthDa9qy|77CdEc*jK-!%ZRYCZvbku9iQV*~a}ClFY4z~c7+0P?$U!PF=S z1Au6Q;m>#f??3%Vpd|o+W=WE9003S@Bra6Svp>fO002awfhw>;8}z{#EWidF!3EsG z3;bXU&9EIRU@z1_9W=mEXoiz;4lcq~xDGvV5BgyU zp1~-*fe8db$Osc*A=-!mVv1NJjtCc-h4>-CNCXm#Bp}I%6j35eku^v$Qi@a{RY)E3 zJ#qp$hg?Rwkvqr$GJ^buyhkyVfwECO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K&GcDTy000JJOGiWi4FHJ% zA){VTp8x;=32;bRa{vGf6951U69E94oEQKA00(qQO+^RY3JVYr9K9gdp8x;>R7pfZ zR5;7UlRHbpF%-qmNm6K~gSuF|>mZ76MDauFARQD31qU5O99N%%_`{4rd2Gf}Id_0j@K06U2R zdwn%rK~WS?1maCwPp1$1X!#!a*A{ZI(7p^}uwbybKWeJ|T7clsfbPx3g~Z@M?;^c} z2^P)$JH@v_NDq)wf|Wx$H==i-w=mv16D;!Cq1kv)d@sHS1m8wHF+JJzIh#%~JD|ty zXHjPG73#G*n*JFgBP5qSBLL+rfD|O4TqzGKC{;>W-CAJ3Y?E6F77PXq4x5cN!e|g6 z39e$XvNOl72U&W@kKnMeyF|HS_$vs49U+$YW@v)zc#zln!8}z;zyAX%LlzIGGQ>Nq w9nXGS+-Krfh$$Pao=uZ9kV`{nf&V^@pA<^3IyzE3I{*Lx07*qoM6N<$g5|clnE(I) diff --git a/share/ni_nitdoc/scripts/jquery-1.7.1.min.js b/share/ni_nitdoc/scripts/jquery-1.7.1.min.js deleted file mode 100644 index 75eeb51..0000000 --- a/share/ni_nitdoc/scripts/jquery-1.7.1.min.js +++ /dev/null @@ -1,5 +0,0 @@ -/*! jQuery v1.7.1 jquery.com | jquery.org/license */ -(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
    a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
    "+""+"
    ",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
    t
    ",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
    ",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; -f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

    ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
    ";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
    ","
    "]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() -{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
    ").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); -!function(t,e,i){var o=["webkit","Moz","ms","O"],r={},n;function a(t,i){var o=e.createElement(t||"div"),r;for(r in i)o[r]=i[r];return o}function s(t){for(var e=1,i=arguments.length;e>1):parseInt(i.left,10)+r)+"px",top:(i.top=="auto"?f.y-s.y+(t.offsetHeight>>1):parseInt(i.top,10)+r)+"px"})}o.setAttribute("aria-role","progressbar");e.lines(o,e.opts);if(!n){var l=0,p=i.fps,c=p/i.speed,h=(1-i.opacity)/(c*i.trail/100),m=c/i.lines;(function y(){l++;for(var t=i.lines;t;t--){var r=Math.max(1-(l+t*m)%c*h,i.opacity);e.opacity(o,i.lines-t,r,i)}e.timeout=e.el&&setTimeout(y,~~(1e3/p))})()}return e},stop:function(){var t=this.el;if(t){clearTimeout(this.timeout);if(t.parentNode)t.parentNode.removeChild(t);this.el=i}return this},lines:function(t,e){var i=0,o;function r(t,o){return u(a(),{position:"absolute",width:e.length+e.width+"px",height:e.width+"px",background:t,boxShadow:o,transformOrigin:"left",transform:"rotate("+~~(360/e.lines*i+e.rotate)+"deg) translate("+e.radius+"px"+",0)",borderRadius:(e.corners*e.width>>1)+"px"})}for(;i',e)}var e=u(a("group"),{behavior:"url(#default#VML)"});if(!p(e,"transform")&&e.adj){f.addRule(".spin-vml","behavior:url(#default#VML)");m.prototype.lines=function(e,i){var o=i.length+i.width,r=2*o;function n(){return u(t("group",{coordsize:r+" "+r,coordorigin:-o+" "+-o}),{width:r,height:r})}var a=-(i.width+i.length)*2+"px",f=u(n(),{position:"absolute",top:a,left:a}),l;function p(e,r,a){s(f,s(u(n(),{rotation:360/i.lines*e+"deg",left:~~r}),s(u(t("roundrect",{arcsize:i.corners}),{width:o,height:i.width,left:i.radius,top:-i.width>>1,filter:a}),t("fill",{color:i.color,opacity:i.opacity}),t("stroke",{opacity:0}))))}if(i.shadow)for(l=1;l<=i.lines;l++)p(l,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(l=1;l<=i.lines;l++)p(l);return s(e,f)};m.prototype.opacity=function(t,e,i,o){var r=t.firstChild;o=o.shadow&&o.lines||0;if(r&&e+o - - - - NitDoc | Help - - - - - - - - - -
    - - -
    - - -
    - -
    -

    Help

    -
    This documentation is organized as follows.
    - -
    -

    Menu Bar

    -

    The menu bar allows you to navigate different views of this documentation.

    -
      -
    • The Overview is the front page of this documentation
    • -
    • The Full Index lists all properties, classes and modules
    • -
    • The Help displays this page
    • -
    -

    If JavaScript is enabled on your browser, a search field appears and allows you to search in all properties, classes and modules.

    -
    - -
    -

    Overview

    -

    The Overview page is the front page of this documentation and provides a list of all modules with a summary for each.

    -
    - -
    -

    Modules

    -

    Each module has a page that contains a summary of the module, a graphic representation and a list of its classes (including interfaces) and properties. The left block contains a list of imported and nested modules.

    -

    If JavaScript is enabled on your browser, classes and properties can be filtered by name.

    -
    - -
    -

    Class

    -

    Each class and interface has its own separate page. Each of these pages has four sections consisting of a class/interface description, virtual and formal types list, detailed properties descriptions and inherited properties.

    -

    Blocks on the left display :

    -
      -
    • Properties (virtual types, formal types, methods)
    • -
    • Inheritance relations (super and subclasses)
    • -
    -

    Before the detail of each property an icon show the type of property (diamond = virtual type, square = constructor, circle = method). The color of the icon reflect the property visibility (red = private, orange = protected, green = public).

    -
    - -
    -

    Full Index

    -

    The Full Index contains an alphabetic list of all modules, classes/interfaces and properties.

    -

    If JavaScript is enabled on your browser, lists can be filtered by name.

    -
    -
    -
    -
    - - diff --git a/share/nitdoc/resources/icons/close.png b/share/nitdoc/resources/icons/close.png deleted file mode 100755 index c11f7af69fad034c3564a4a455be0d9d569e9878..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1066 zcmV+_1l9YAP)P0012b1^@s6UwFrL0000PbVXQnQ*UN; zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBU#%t=H+RCwB)mP<%fQ5eVP&iH858mu%+ z@(~);$`IRRsFdWQg)j?25H#9E5+YcjgqtV`TnUOGY74=Yv`}0503pyMZ4rozbYe7z z$w%s><2+9PZ}`sb+&d4g1HZX*&*S@_?|k1m_h>>0%PC7PDB-6UEP>TijU~?!h0g26K6CE8L!teL1 zLtn=e$y0l^wY4QQZl=Dz-t5usSR!v^>*VBQl#$xnTElxmL4jCYTr|`V4-cy%A7hEQ zWNUeOxxwJ->T0CEva(W-#m>%7q;7CW+W51oizD>jY>#XZ^Ja5$m{(#C6SY}DW3nc-b6NO}E# zC=@!P4IkO{$dclCF;Rmo6MzcUQCp&zxZUo1x(G;zH*VRe4xXN#HW+PbY0-_)e^mg- zjUl^AOG_OxB=mFEm0D@BE7x657g{w zXlO8G*GW6Ry1Lrn#rXI*Wro8b0bQaN3ahfBgrlv;h@9*mZTU%RSQD1Bp zNe6l04wlWOdPGMBj`WzuDF(Dess{%L2fOX+0&>Vr&h#0WN~nh<*Mt(z<2vC7~2J!3(F;`5pmu9~~Wq;u)Wsn(|;{en9_rPzUIU zzsgIMq1o}P*}Y6~nLFn5^HNn+RbE+H*@fifWE&2?5WbkdCMG6ah{q<{-QYX3 z0k(k;1nAU~A{qxMg_D4UvRN#L|7Y?f$m=lp4R-l@L_$A+2kd|Ya7-r)C5V2JU?Cd| zrE&UYa;!3WW7)Y64W@HxpN(!ad+Y%T1UUqY%^v8BWEJU_kg_V_vs zIJ&5~yMHK_e{#Jz)j z06Lfe02gnPU&TfM009+AL_t(|+SHT1P6AO7g}=KOTm@EZ5?dvjSg4I}V|+9lUc(n4 zu_H8!iH#kw3E*Dt&ase?CHz=WIo(WhzMMIeagsQs5)Q0`0kvv#)#*Gx+<)C)7qcnO zIRI7*CJD32gu&Z;fABGU+zL3a)o!2i$<66#MALf!A`m2UV3_B08;x|QgD@T!*6Y#C zb6VabAOJ{sGn^Sm7nj9OfcKs=@5$1XWA7;eCt*Otj8=>rp{)V5v>bs25G4Yzkcibh z_5lisxrCOYAgy5bCqViI09dvZ#698-Km^7Tbu&%?1ImiC?=7J9E5w+7hQPEeX;#*9 zz+B?XjOf^XM&E9~zBpIZlVl@p6GTMJvVL{${{J)m3;^bUl>L`1P{IHJ002ovPDHLk FV1jH?ni~KB diff --git a/share/nitdoc/resources/icons/const_protected.png b/share/nitdoc/resources/icons/const_protected.png index f931cedf3e456a97f81b01f75664d1327b23cc50..99530e36ba583ef89d1ddf869f4c732b9275c5fe 100644 GIT binary patch delta 293 zcmV+=0owlk7pfPKBe6JK3J(TiOGiWi$^dBq3jH-ww2>hfe*gz`Nliru-3kj35*7B! z4Y>dS0NhDLK~y-))ss6;#6S>4UyZ#10U{s*iFmbSXcI2P&5$?}f&h@X04xGD{uO~g zYp?JSIHI!|O~0-x^~g3$DzLB?1M=}z&7kCtmKKe+L|0 z z06Lfe02gnPU&TfM00AgTL_t(|+SHRdP6I&@MPK(AFT-d|OhCwDi2y{vZHT!Q9D`Gk z83H3Lgv25t+p=an(@Ql$BVi*ifg>ubU()NU`qe6gz&4@TGPVXZ=981-qkr4Wi}PMR zD^Xhg76PC&<#fWs;Hm#O7+x&}9CRCJ*N2~{-QU~HzFUefgY7doxSpmrenvGt)5|AXCZr&u{EoryF3*bRCqykwATCdpw0jvibAn{-Y zjEkBRSmyWwK#22JHtx+y%xldLOg6b70V)Tj0Z$ykdT=4u)Fyxz7?sczNPWyD#MUbd zWep;00LHl1%ZH`tK-OmA$+CvG5jat+ZPa`F_jl7!@60sGpKW`IH(}GfKd-C*|CzoA Y0M5(B9e*gz`Nliru-3kj32Nbq= z+dBXN0OCnRK~y-))srz&12GIm-g5fN-?YN>aP0nz5@7NEU|R7(OqvrK9u*a x0yt|fIDe2rG_>H=4YmLP002ovPDHLkV1fV=eR==@ delta 378 zcmV-=0fqjs7yTEIBa@H{6|o~+3V$GDNK#Dz0D2_=0Dyx40Qvs_0D$QL0Cg|`0P0`> z06Lfe02gnPU&TfM00AgTL_t(|+SHS~PQySDMbCQeIB^nEP*Knlfkc7Q@HdE0qvAX0 zk?4X#0gRpmP|XWtaJBwD(HdwN1VUaf;93V_Gn{&eF9C3inn` zik6BIMLcLdhilZj9e^tGrAP@znyTtS{p#eu3Ie!X35lQ?3)w0VD#e$I zl?{N}`80oaFblM@#R&l5OJ(*V^aJbHxE~+fB{!zBNrd@zqb-4sSK6UJUXGjp|CzoA Y0Pu;P5tjjVt^fc407*qoM6N<$g5~I`0ssI2 diff --git a/share/ni_nitdoc/resources/icons/copy.png b/share/nitdoc/resources/icons/copy.png similarity index 100% rename from share/ni_nitdoc/resources/icons/copy.png rename to share/nitdoc/resources/icons/copy.png diff --git a/share/ni_nitdoc/resources/icons/github-icon-green.png b/share/nitdoc/resources/icons/github-icon-green.png similarity index 100% rename from share/ni_nitdoc/resources/icons/github-icon-green.png rename to share/nitdoc/resources/icons/github-icon-green.png diff --git a/share/nitdoc/resources/icons/github-icon-w.png b/share/nitdoc/resources/icons/github-icon-w.png deleted file mode 100644 index ba6a6b1ef20a10dfc3f47294ddf0d0c7ca2eb786..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1934 zcmaJ?X;c$e7#+hZn^u%fDPt5Blq3TrkdV{>ArK&dA#9>ZNJbMOnJ}41h+07fG(}sh zf<+1{iVJE%w1CKBSrjX_Dr(&-vX)vDcM++bsAzwb&Y79_-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9pLuH7&R4%TgdYGxLlROY(z0PVZbyyJ7j zxjwgUM}_5h6fZV|GXL~eKNvdSKk7la-qYtWc}UkwBO@AuhV4tA09=|3)-`O zyHQyi-V;~nS~apkCEc)*Flv}r;(@x(+g8(X&p5zVBX>|Yb?ka*oc(GWwF0>ef2A`&HqolP7mMTIDpP+Yovf$eGhYivc(ognh7f_=@iuc~oG3jf+t?FzuIq-(UBee1Vy4UVk+%zyW zr)!o|X+~J$r1Pw!$XO?@wQs#TlJ_`H*yMPY&Z#iTKy7L|mbE+%v~v2gdLF$cd$rd_ yzOK%or-bfVb>zg6tfczsvzm=uGA$b8|oa26p>;C}`oBlNb diff --git a/share/ni_nitdoc/resources/icons/github-icon-white.png b/share/nitdoc/resources/icons/github-icon-white.png similarity index 100% rename from share/ni_nitdoc/resources/icons/github-icon-white.png rename to share/nitdoc/resources/icons/github-icon-white.png diff --git a/share/nitdoc/resources/icons/meth_private.png b/share/nitdoc/resources/icons/meth_private.png index d80a19d43ea424e7ac315234f12fa4567c3a58e9..0217515c486c68805408bfd02d537932c62c2fab 100644 GIT binary patch delta 408 zcmV;J0cZY#8J!rABe6JK3J(TiOGiWiq5uW}1|CYT4v`@je*gz`Nliru-3kj37C6^= zl*j-80Z&OpK~y-))ssCh1Yr=zf3x>2w{k8hNQ6ov@sblkLLyp;pc5)z!6zZ1BBIdv z0(4#~6}3Wvib_;=_Z&B)*mZ8jX|6KKrngM12QgKB3{#}15sFNXYf7~GVdK?g|rfEd!4IQ<-B9F?$~Hg;il zZVs1oc=%i|-GZ0&CeH`(UVY3Z!xyKgzXSf~XZi&1X|S z06Lfe02gnPU&TfM00FH@L_t(|+SHT3YZOrs$G>midwY9J-Uc?xWwRJK(n<(ks}Lbw z{sapHUN0gD`4_B&w5e1OAw@*63|L5tG-ob}!UpjN7nFEs65ZRoy|**AhkskA7jy^|BQpCmh0si$EOd{IiG-FkmH zfQTSm_txX}^_Q!z8}aTgQX(XAy!@imd2nRyU9HsX@fk5LQF~tWsM$PN>vqFzYYS6K zVdOZtkP=^&!gH+$$Mf@x?SH+!&-1l^3HCaw#!jMgbsaMh>6=03o2Y z7NuuA_x-m?zmH!;_|1%r8AAXAW~4+ob6pILIV=U}aAxye7^a`B#c_9Q(IdiHQJ`xr zeh}e992c4AJt_4=JR)#|gx>8Y8q76QPzSH)30mw&9)nv!V06aWAfrCxoj z*KhocqWe?XV99ZW?EC(~AFVeOQTyM1@&7;5-vI#AzOqyb!~A0a0000hfe*gz`Nliru-3kj36$4FQ zE-wH80XRuSK~y-))ssC-13?gmpSkRrTnHg37!a)_2{9oeF+}k<*jxF(L@d%+SXkLA z3fjcd%0k6P5G0*3ciG%nL@syARjC|!cVL%!=3{q7Rhh>e=Crv1sA{A_p+L^dAvm;K z9k^$zKCG12f2eOXXl}L=F(wWR!w^>%@NdWT@9veW*_k+z6jcyFnRyV()uN0J2D8fIv`J}%|0E z06Lfe02gnPU&TfM00FB>L_t(|+SHRjXw+~N$3MUPxl3%)96jvasfd<>?NF&AI0*{H z+1){*f`fyIgYIrlf~z>#$+7J&bkIRT^m3IR7Fwa!yHb;KHMu00{NmE#kbh>n$?x{y zy$`$(?}DybgqM`1*C+LN=XR6niKI}bmgY=HBYpcUEVpyVHHX2VJEVk~? z>`bKJRknI&tO@iZqWkJP)nw4;) zeqdDe>~W#QvyQr8?tj8GAQzBiFvvgxr4me985J#>F9gUqP%nFRc5i*~{(v9C?;dn~ zaFg>{fcc{E4xF*__O_h9z1%gHuJ(8BlV*$%0zWZn#^;jt^z=PVWX(bVfKgJHx0LD2 zo$$=V@i3fM6h#fhiPoVkzf?u${@XA9|7ZF;01~^bNEy3gz5oCK07*qoM6N<$f`g0t A=Kufz diff --git a/share/nitdoc/resources/icons/meth_public.png b/share/nitdoc/resources/icons/meth_public.png index a08a47088f2438bb34188b318ae6f64d09ee824d..e5906ee3907222cc90bddc7f5a51b7de9e53182a 100644 GIT binary patch delta 406 zcmV;H0crk+8Jif8Be6JK3J(TiOGiWi4FHJ%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|+QgI1YZGA*#-Dk!fz8@Brbsv0wsdI@;vs^9A3bo<+guB(Hy$qe~$1+ETy&O<=V|=bNqIrVO{y&sUFzQso;!dVT=fQ5j;qe?1k{_ zvtP_}paFm=jxRl0y#IW@{=sf-ZsL?_LK8uVU;sGHjD_ehdo~ESG^rbXTgW?(`O)(- zyL)>mnI<~jej;*|%nWCG+UjJ?(LM)eI{ngjocXQE$ySpY-$d|JYk#ywurGoD!0Tc$ z@~5V5DUm0A01-hZmGa)ZZn-is(ejf7fd~Sv@kwjEaNX!_p>W4wemd}wx)fMM-aFSV z$3XSkm(N+HQg~A=9_|(jchg!|hhE~}PAnqNpP4Clh_**9%k+nc2LgH!Qzhfe*gz`Nliru-3kj36(@0A z%KiWV0a{5!K~y-)#gj2>ltB=NpV|8k?j(h=$$7s-JW#i_(lu!VsY~JTpr*RzV05W zoCb#d8?fm7^G#6+IEzH_LV~(SFEd}{=H62yX&E4irr%-n!^m z06Lfe02gnPU&TfM00G=dL_t(|+QgH+Yg1tqhoAT6qxovC3F5t}rb2D8h%F)(EIJiB z1d7-?I4C%|ii==zv4f!g8*b_%g3$yg4Hl+<`#zz zp6M*Vhv#t45n5|@QwF=NV6U-kn^v=h5CQE+G_ zQcAjtiCZ_W6=%nig;vL%W*hv^5u}uOiiz7duNUX7we)$r5<8vV$hRHk3o-n{cb686 z7c&)WVD&yn4=ApjXq%_ZT7SOdsFQy~egl+JXd^gzXKAr`A@kPK?;o%?4aqoUOqa{Y zTIN)u_H@ft)4l-5^`@>~I`@3eT(LTD9uiN07NCJp2vRYRvm;IONT~Kq31g;j3wCBG z@~u*ezN>#=as*rnDDV_`61ozUk__2aY%35Q>@$cAgkDsQ;n~OaY=7g+25h#W?LfzY zMhEImgICVDQwYy6w4KJeu{Je00005J diff --git a/share/nitdoc/resources/icons/vtype_public.png b/share/nitdoc/resources/icons/vtype_public.png index caaa932a0803aee4565681bc5a68f57ea6a06a43..a70354d03cc7d4ba7b36a761ec2c2c142deb5228 100644 G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zb4H`lfjjJWdoUPuxm*N6AP54(u*q!3aop{4+ibQ_C=>_;=I8wmr_<~8y4`NVO_&kH zX0xLx>i7FG6m#IX)9J)8%xE%M5R1)f^>{oG1Ofk(T}u&R0FVHrtV&j!K++0WR*;dh zy>6)OuKIQ=LsNVIWbXyeubx84MODt!6lLyf(V={*_Kp;GmOjkpOcRT;VjZ!(@^Dir zt?Y4mMdgz!dUZ{0UG=*9hUbkhnwnp}YI*&pmGL_EJ+rO7qm$Lu&F<;_!0B1T*u412<=e`k8}u z3CF1CL2jG6fqbs}qMF+dHSND983lPA+7`+^d`8Xd)U7Z;THrazXZ>JiG$dad=6C5k z&oEO%;6V2nJBN4EFg(DX;9OBr<)ENvl9#9Nz61$+r-cQGBpMWcFi4AhxB(J!U}Z`8 za$~xv&!no{bS_6D>PH5jCZ1}|6mzXm^IqDdM$EJ87<;OAW=Z(@`lz$)%Ua2RW1{aG z)S4v~xF*BzI%c&}Apw7+t&h)^iM*z``n|a$GO^G8oq39pEtmMQ0`4t%ME+nQ%BZ5p zpH|40e5jtCt5e9SksbtMoK`AA%Zok-tWzqB-vK1Du_R)%=;NcvB$lx>>JVzA#iWr< zWn0rIpB~5EV42Ey6r#sW6$#~JbLH-G^7s>S2g_WQB0$ab{og8MfrI0DNDaltLTZoB hqevY{!V<%dZ_Bql%Sh_7)Mp;TEDdMUuq* diff --git a/share/ni_nitdoc/scripts/Markdown.Converter.js b/share/nitdoc/scripts/Markdown.Converter.js similarity index 100% rename from share/ni_nitdoc/scripts/Markdown.Converter.js rename to share/nitdoc/scripts/Markdown.Converter.js diff --git a/share/ni_nitdoc/scripts/Nitdoc.GitHub.js b/share/nitdoc/scripts/Nitdoc.GitHub.js similarity index 90% rename from share/ni_nitdoc/scripts/Nitdoc.GitHub.js rename to share/nitdoc/scripts/Nitdoc.GitHub.js index 542011b..37f4104 100644 --- a/share/ni_nitdoc/scripts/Nitdoc.GitHub.js +++ b/share/nitdoc/scripts/Nitdoc.GitHub.js @@ -29,9 +29,10 @@ Nitdoc.GitHub = {}; // Declare Nitdoc.GitHub submodule // Load GitHub UI $(document).ready(function() { //FIXME base should be choosen by user - var origin = $("body").attr("data-github-origin"); - if(origin) { - Nitdoc.GitHub.UI.init(origin); + var upstream = $("body").attr("data-github-upstream"); + var basesha1 = $("body").attr("data-github-base-sha1"); + if(upstream && basesha1) { + Nitdoc.GitHub.UI.init(upstream, basesha1); } }); @@ -43,22 +44,23 @@ Nitdoc.GitHub.UI = function() { var user = false; // logged user var origin; - var init = function(originStr) { - console.log("init GitHub module (origin: "+ originStr +")"); + var init = function(upstream, basesha1) { + console.log("init GitHub module (upstream: "+ upstream +", base: " + basesha1 + ")"); // parse origin - var parts = originStr.split(":"); + var parts = upstream.split(":"); origin = { user: parts[0], repo: parts[1], - branch: parts[2] + branch: parts[2], + sha: basesha1 }; // check local session if(localStorage.user) { var session = JSON.parse(localStorage.user); var user = tryLogin(session.login, Base64.decode(session.password), session.repo, session.branch); - if(!user) { + if(!user.login) { console.log("Session found but authentification failed"); localStorage.clear(); } @@ -68,7 +70,7 @@ Nitdoc.GitHub.UI = function() { // activate ui Nitdoc.GitHub.LoginBox.init("nav.main ul"); - if(user) { + if(user && user.login) { Nitdoc.GitHub.LoginBox.displayLogout(origin, user); activate(user); } else { @@ -90,12 +92,11 @@ Nitdoc.GitHub.UI = function() { saveSession(user); // check local storage synchro with branch - if(localStorage.latestCommit != user.latest.sha) { - console.log("Latest commit changed: cleaned cache"); + if(localStorage.base != origin.sha) { + console.log("Base changed: cleaned cache"); localStorage.requests = "[]"; - localStorage.latestCommit = user.latest.sha; + localStorage.base = origin.sha; } - console.log("Latest commit sha: " + localStorage.latestCommit); attachCommentEvents(); reloadComments(); @@ -118,14 +119,17 @@ Nitdoc.GitHub.UI = function() { var tryLogin = function(login, password, repo, branch) { var user = new Nitdoc.GitHub.User(login, password, repo, branch); if(!Nitdoc.GitHub.API.login(user)) { - return false; + return "error:login"; } - // get lastest commit - var latest = Nitdoc.GitHub.API.getLastCommit(user); - if(!latest || !latest.sha) { - return false; + // check github profile fields + if(!user.infos.name || !user.infos.email) { + return "error:profile"; + } + // check correct base commit + var commit = Nitdoc.GitHub.API.getCommit(user, origin.sha); + if(!commit || !commit.sha) { + return "error:sha"; } - user.latest = latest; return user; } @@ -136,7 +140,7 @@ Nitdoc.GitHub.UI = function() { //FIXME this should be done by nitdoc var baseComment = $(this).parent().prev(); var location = Nitdoc.GitHub.Utils.parseLocation(baseComment.attr("data-comment-location")); - var locString = "../" + location.path + ":" + location.lstart + "," + location.tabpos + "--" + location.lstart + ",0"; + var locString = location.path + ":" + location.lstart + "," + location.tabpos + "--" + location.lstart + ",0"; baseComment.attr("data-comment-location", locString); $(this).html("add comment for "); $(this).addClass("nitdoc-github-editComment"); @@ -291,7 +295,7 @@ Nitdoc.GitHub.UI = function() { 5. create the pull request */ var pushChanges = function(infos) { - var baseTree = Nitdoc.GitHub.API.getTree(user, localStorage.latestCommit); + var baseTree = Nitdoc.GitHub.API.getTree(user, origin.sha); if(!baseTree.sha) { Nitdoc.GitHub.ModalBox.open("Unable to locate base tree!", baseTree.status + ": " + baseTree.statusText, true); return false; @@ -309,13 +313,13 @@ Nitdoc.GitHub.UI = function() { return false; } console.log("New tree: " + newTree.url); - var newCommit = Nitdoc.GitHub.API.createCommit(user, infos.message, localStorage.latestCommit, newTree); + var newCommit = Nitdoc.GitHub.API.createCommit(user, infos.message, baseTree.sha, newTree); if(!newCommit.sha) { Nitdoc.GitHub.ModalBox.open("Unable to create new commit!", newCommit.status + ": " + newCommit.statusText, true); return false; } console.log("New commit: " + newCommit.url); - var pullRequest = Nitdoc.GitHub.API.createPullRequest(user, infos.message.split("\n\n")[0], infos.message, origin, newCommit.sha); + var pullRequest = Nitdoc.GitHub.API.createPullRequest(user, infos.message.split("\n\n")[0], "Pull request from Nitdoc", origin, newCommit.sha); if(!pullRequest.number) { Nitdoc.GitHub.ModalBox.open("Unable to create pull request!", pullRequest.status + ": " + pullRequest.statusText, true); return false; @@ -462,7 +466,7 @@ Nitdoc.GitHub.API = function() { // build signedoff user default signature var getSignedOff = function(user) { - return user.infos.name + " <" + user.infos.email + ">"; + return user.infos.name + " <" + user.infos.email + ">"; } // get the branches list from a repo @@ -489,18 +493,18 @@ Nitdoc.GitHub.API = function() { /* GitHub commits */ // get the latest commit on `branchName` - var getLastCommit = function(user) { + var getCommit = function(user, sha) { var res = false; $.ajax({ beforeSend: function (xhr) { xhr.setRequestHeader ("Authorization", user.auth); }, type: "GET", - url: "https://api.github.com/repos/" + user.login + "/" + user.repo + "/git/refs/heads/" + user.branch, + url: "https://api.github.com/repos/" + user.login + "/" + user.repo + "/git/commits/" + sha, async: false, dataType: 'json', success: function(response) { - res = response.object; + res = response; }, error: function(response) { res = response; @@ -688,7 +692,7 @@ Nitdoc.GitHub.API = function() { var api = { login: login, - getLastCommit: getLastCommit, + getCommit: getCommit, getBranches: getBranches, getTree: getTree, createBlob: createBlob, @@ -871,8 +875,12 @@ Nitdoc.GitHub.LoginBox = function() { Nitdoc.GitHub.ModalBox.open("Sign in error", "Please enter your GitHub username, password, repository and branch.", true); } else { var user = Nitdoc.GitHub.UI.tryLogin(login, password, repo, branch); - if(!user) { + if(user == "error:login") { Nitdoc.GitHub.ModalBox.open("Sign in error", "The username, password, repo or branch you entered is incorrect.", true); + } else if(user == "error:sha") { + Nitdoc.GitHub.ModalBox.open("Base commit not found", "The provided GitHub repository must contains the base commit '" + Nitdoc.GitHub.UI.getOrigin().sha + "'", true); + } else if(user == "error:profile") { + Nitdoc.GitHub.ModalBox.open("Incomplete GitHub profile", "Please set your public name and email in your GitHub profile.

    Your public profile informations are used to sign-off your commits.", true); } else { Nitdoc.GitHub.UI.activate(user); var origin = Nitdoc.GitHub.UI.getOrigin(); @@ -1043,12 +1051,14 @@ Nitdoc.GitHub.ModalBox = function() { $("#nitdoc-github-modal").addClass("nitdoc-github-error"); } - $("#nitdoc-github-modal").css({ + $("#nitdoc-github-modal") + .css({ top: "50%", marginTop: -($("#nitdoc-github-modal").outerHeight() / 2) + "px", left: "50%", marginLeft: -($("#nitdoc-github-modal").outerWidth() / 2) + "px" - }); + }) + .find("button.nitdoc-github-button").focus(); } // Close modal box instance @@ -1123,7 +1133,7 @@ Nitdoc.GitHub.CommitBox = function() { .append( $(document.createElement("label")) .attr("for", "nitdoc-github-commit-signedoff") - .append("Signed-off-by: " + infos.user.signedOff) + .text("Signed-off-by: " + infos.user.signedOff) ) ).append( $(document.createElement("div")) @@ -1151,12 +1161,14 @@ Nitdoc.GitHub.CommitBox = function() { ) ); - $("#nitdoc-github-commitBox").css({ + $("#nitdoc-github-commitBox") + .css({ top: "50%", marginTop: -($("#nitdoc-github-commitBox").outerHeight() / 2) + "px", left: "50%", marginLeft: -($("#nitdoc-github-commitBox").outerWidth() / 2) + "px" - }); + }) + .find("#nitdoc-github-commit-message").focus(); } // Close commit box instance @@ -1178,20 +1190,19 @@ Nitdoc.GitHub.CommitBox = function() { */ Nitdoc.GitHub.Utils = function() { - // Extract infos from string location "../lib/standard/collection/array.nit:457,1--458,0" - //FIXME this should be done by nitdoc + // Extract infos from string location "lib/standard/collection/array.nit:457,1--458,0" var parseLocation = function(location) { var parts = location.split(":"); var loc = new Object(); loc.origin = location; - loc.path = parts[0].substr(3, parts[0].length); + loc.path = parts[0]; loc.lstart = parseInt(parts[1].split("--")[0].split(",")[0]); loc.tabpos = parseInt(parts[1].split("--")[0].split(",")[1]); loc.lend = parseInt(parts[1].split("--")[1].split(",")[0]); return loc; } - // Meld modified comment into file content + // Meld modified comment into file conten var mergeComment = function(fileContent, comment, location) { // replace comment in file content var res = new String(); diff --git a/share/ni_nitdoc/scripts/Nitdoc.QuickSearch.js b/share/nitdoc/scripts/Nitdoc.QuickSearch.js similarity index 100% rename from share/ni_nitdoc/scripts/Nitdoc.QuickSearch.js rename to share/nitdoc/scripts/Nitdoc.QuickSearch.js diff --git a/share/ni_nitdoc/scripts/Nitdoc.UI.js b/share/nitdoc/scripts/Nitdoc.UI.js similarity index 75% rename from share/ni_nitdoc/scripts/Nitdoc.UI.js rename to share/nitdoc/scripts/Nitdoc.UI.js index 5988f06..5b8d004 100644 --- a/share/ni_nitdoc/scripts/Nitdoc.UI.js +++ b/share/nitdoc/scripts/Nitdoc.UI.js @@ -149,12 +149,60 @@ Nitdoc.UI = function() { } } + // Allow user to filter sidebar box entries by name + var enableSearchPageField = function(filterSelector) { + var div = $(document.createElement("div")) + .addClass("nitdoc-ui-searchpage-filter") + .append( + $(document.createElement("input")) + .addClass("nitdoc-ui-searchpage-field") + .addClass("nitdoc-ui-filter-field-notused") + .attr("type", "text") + .attr("value", "filter...") + .keyup(function() { + var box = $(this).parents(".content.fullpage").find("article.filterable"); + var value = $(this).val(); + box.find("ul li:not(:icontains('" + value + "'))").hide(); + box.find("ul li:icontains('" + value + "')").show(); + }) + .focusout(function() { + if($(this).val() == "") { + $(this).addClass("nitdoc-ui-filter-field-notused"); + $(this).val("filter..."); + } + }) + .focusin(function() { + if($(this).val() == "filter...") { + $(this).removeClass("nitdoc-ui-filter-field-notused"); + $(this).val(""); + } + }) + ); + $(filterSelector).after(div); + preloadSearchPageField(); + } + + // Prealod filter using search query + var preloadSearchPageField = function() { + var anchor = Nitdoc.Utils.extractAnchor(document.location.hash); + if(!anchor || anchor.indexOf("q=") == -1) return; + + var query = anchor.substring(2); + if(!query) return; + + $(".nitdoc-ui-searchpage-field") + .val(query) + .removeClass("nitdoc-ui-notused") + .trigger("keyup"); + } + // Public interface var ui = { enableFolding: enableFolding, enableCopyToClipboard: enableCopyToClipboard, enableSidebarTextFilters: enableSidebarTextFilters, - enableSidebarTypeFilters: enableSidebarTypeFilters + enableSidebarTypeFilters: enableSidebarTypeFilters, + enableSearchPageField: enableSearchPageField }; return ui; @@ -166,6 +214,7 @@ $(document).ready(function() { Nitdoc.UI.enableCopyToClipboard(".signature"); Nitdoc.UI.enableSidebarTextFilters("nav.filterable h3"); Nitdoc.UI.enableSidebarTypeFilters("nav.filterable"); + Nitdoc.UI.enableSearchPageField(".content.fullpage h1:contains('Search')"); }); /* @@ -198,5 +247,3 @@ $.expr[':'].icontains = function(obj, index, meta, stack){ return (obj.textContent.replace(/\[[0-9]+\]/g, "") || obj.innerText.replace(/\[[0-9]+\]/g, "") || jQuery(obj).text().replace(/\[[0-9]+\]/g, "") || '').toLowerCase().indexOf(meta[3].toLowerCase()) >= 0; }; -//rename file -//commit diff --git a/share/ni_nitdoc/scripts/ZeroClipboard.min.js b/share/nitdoc/scripts/ZeroClipboard.min.js similarity index 100% rename from share/ni_nitdoc/scripts/ZeroClipboard.min.js rename to share/nitdoc/scripts/ZeroClipboard.min.js diff --git a/share/ni_nitdoc/scripts/base64.js b/share/nitdoc/scripts/base64.js similarity index 100% rename from share/ni_nitdoc/scripts/base64.js rename to share/nitdoc/scripts/base64.js diff --git a/share/nitdoc/scripts/js-facilities.js b/share/nitdoc/scripts/js-facilities.js deleted file mode 100644 index a943d1b..0000000 --- a/share/nitdoc/scripts/js-facilities.js +++ /dev/null @@ -1,1513 +0,0 @@ -// User -var userB64 = null; -var userName = ""; -var password = ""; -var sessionStarted = false; -var editComment = 0; -var currentfileContent = ''; -var originalFileContent = ''; -var addNewComment = false; -var commentLineStart; -var commentLineEnd; - -// SHA GitHub -var shaLastCommit = ""; -var shaBaseTree; -var shaNewTree; -var shaNewCommit; -var shaBlob; -var shaMaster; -var repoExist = false; -var branchExist = false; -var githubRepo; -var loginProcess = false; -var signedOff = ''; -var userEmail = ''; -var commitMessage = ''; -var numComment = ''; -var showcomment = false; - -// Spinner vars -var opts = { - lines: 11, // The number of lines to draw - length: 7, // The length of each line - width: 4, // The line thickness - radius: 10, // The radius of the inner circle - corners: 1, // Corner roundness (0..1) - rotate: 0, // The rotation offset - color: '#FFF', // #rgb or #rrggbb - speed: 1, // Rounds per second - trail: 60, // Afterglow percentage - shadow: false, // Whether to render a shadow - hwaccel: false, // Whether to use hardware acceleration - className: 'spinner', // The CSS class to assign to the spinner - zIndex: 99999, // The z-index (defaults to 2000000000) - top: '300', // Top position relative to parent in px - left: 'auto' // Left position relative to parent in px - }; -var targetSpinner = document.getElementById('waitCommit'); -var spinner = new Spinner(opts).spin(targetSpinner); - -/* -* JQuery Case Insensitive :icontains selector -*/ -$.expr[':'].icontains = function(obj, index, meta, stack){ - return (obj.textContent.replace(/\[[0-9]+\]/g, "") || obj.innerText.replace(/\[[0-9]+\]/g, "") || jQuery(obj).text().replace(/\[[0-9]+\]/g, "") || '').toLowerCase().indexOf(meta[3].toLowerCase()) >= 0; -}; - -/* - * Quick Search global vars - */ - -// Current search results preview table -var currentTable = null; - -//Hightlighted index in search result preview table -var currentIndex = -1; - -// Check if a comment is editing -window.onbeforeunload = function() { - if(editComment > 0){ - return 'Are you sure you want to leave this page?'; - } -}; - -/* -* Add folding and filtering facilities to class description page. -*/ -$(document).ready(function() { - - // Hide edit tags - $('textarea').hide(); - $('a[id=commitBtn]').hide(); - $('a[id=cancelBtn]').hide(); - // Hide Authenfication form - $(".popover").hide(); - // Update display - updateDisplaying(); - /* - * Highlight the spoted element - */ - highlightBlock(currentAnchor()); - - /* - * Nav block folding - */ - - // Menu nav folding - $(".menu nav h3") - .prepend( - $(document.createElement("a")) - .html("-") - .addClass("fold") - ) - .css("cursor", "pointer") - .click( function() { - if($(this).find("a.fold").html() == "+") { - $(this).find("a.fold").html("-"); - } else { - $(this).find("a.fold").html("+"); - } - $(this).nextAll().toggle(); - }) - - // Insert search field - $("nav.main ul") - .append( - $(document.createElement("li")) - .append( - $(document.createElement("form")) - .append( - $(document.createElement("input")) - .attr({ - id: "search", - type: "text", - autocomplete: "off", - value: "quick search..." - }) - .addClass("notUsed") - - // Key management - .keyup(function(e) { - switch(e.keyCode) { - - // Select previous result on "Up" - case 38: - // If already on first result, focus search input - if(currentIndex == 0) { - $("#search").val($(currentTable.find("tr")[currentIndex]).data("searchDetails").name); - $("#search").focus(); - // Else select previous result - } else if(currentIndex > 0) { - $(currentTable.find("tr")[currentIndex]).removeClass("activeSearchResult"); - currentIndex--; - $(currentTable.find("tr")[currentIndex]).addClass("activeSearchResult"); - $("#search").val($(currentTable.find("tr")[currentIndex]).data("searchDetails").name); - $("#search").focus(); - } - break; - - // Select next result on "Down" - case 40: - if(currentIndex < currentTable.find("tr").length - 1) { - $(currentTable.find("tr")[currentIndex]).removeClass("activeSearchResult"); - currentIndex++; - $(currentTable.find("tr")[currentIndex]).addClass("activeSearchResult"); - $("#search").val($(currentTable.find("tr")[currentIndex]).data("searchDetails").name); - $("#search").focus(); - } - break; - // Go to url on "Enter" - case 13: - if(currentIndex > -1) { - window.location = $(currentTable.find("tr")[currentIndex]).data("searchDetails").url; - return false; - } - if($("#search").val().length == 0) - return false - - window.location = "full-index.html#q=" + $("#search").val(); - if(window.location.href.indexOf("full-index.html") > -1) { - location.reload(); - } - return false; - break; - - // Hide results preview on "Escape" - case 27: - $(this).blur(); - if(currentTable != null) { - currentTable.remove(); - currentTable = null; - } - break; - - default: - if($("#search").val().length == 0) { - return false; - } - - // Remove previous table - if(currentTable != null) { - currentTable.remove(); - } - - // Build results table - currentIndex = -1; - currentTable = $(document.createElement("table")); - - // Escape regexp related characters in query - var query = $("#search").val(); - query = query.replace(/\[/gi, "\\["); - query = query.replace(/\|/gi, "\\|"); - query = query.replace(/\*/gi, "\\*"); - query = query.replace(/\+/gi, "\\+"); - query = query.replace(/\\/gi, "\\\\"); - query = query.replace(/\?/gi, "\\?"); - query = query.replace(/\(/gi, "\\("); - query = query.replace(/\)/gi, "\\)"); - - var index = 0; - var regexp = new RegExp("^" + query, "i"); - for(var entry in entries) { - if(index > 10) { - break; - } - var result = entry.match(regexp); - if(result != null && result.toString().toUpperCase() == $("#search").val().toUpperCase()) { - for(var i = 0; i < entries[entry].length; i++) { - if(index > 10) { - break; - } - currentTable.append( - $(document.createElement("tr")) - .data("searchDetails", {name: entry, url: entries[entry][i]["url"]}) - .data("index", index) - .append($(document.createElement("td")).html(entry)) - .append( - $(document.createElement("td")) - .addClass("entryInfo") - .html(entries[entry][i]["txt"] + " »")) - .mouseover( function() { - $(currentTable.find("tr")[currentIndex]).removeClass("activeSearchResult"); - $(this).addClass("activeSearchResult"); - currentIndex = $(this).data("index"); - }) - .mouseout( function() { - $(this).removeClass("activeSearchResult"); - }) - .click( function() { - window.location = $(this).data("searchDetails")["url"]; - }) - ); - index++; - } - } - } - - // Initialize table properties - currentTable.attr("id", "searchTable"); - currentTable.css("position", "absolute"); - currentTable.width($("#search").outerWidth()); - $("header").append(currentTable); - currentTable.offset({left: $("#search").offset().left + ($("#search").outerWidth() - currentTable.outerWidth()), top: $("#search").offset().top + $("#search").outerHeight()}); - - // Preselect first entry - if(currentTable.find("tr").length > 0) { - currentIndex = 0; - $(currentTable.find("tr")[currentIndex]).addClass("activeSearchResult"); - $("#search").focus(); - } - break; - } - }) - .focusout(function() { - if($(this).val() == "") { - $(this).addClass("notUsed"); - $(this).val("quick search..."); - } - }) - .focusin(function() { - if($(this).val() == "quick search...") { - $(this).removeClass("notUsed"); - $(this).val(""); - } - }) - ) - .submit( function() { - return false; - }) - ) - ); - - // Close quicksearch list on click - $(document).click(function(e) { - if(e.target != $("#search")[0] && e.target != $("#searchTable")[0]) { - if(currentTable != null) { - currentTable.remove(); - currentTable = null; - } - } - }); - - // Insert filter field - $("article.filterable h2, nav.filterable h3") - .after( - $(document.createElement("div")) - .addClass("filter") - .append( - $(document.createElement("input")) - .attr({ - type: "text", - value: "filter..." - }) - .addClass("notUsed") - .keyup(function() { - $(this).parent().parent().find("ul li:not(:icontains('" + $(this).val() + "'))").addClass("hide"); - $(this).parent().parent().find("ul li:icontains('" + $(this).val() + "')").removeClass("hide"); - }) - .focusout(function() { - if($(this).val() == "") { - $(this).addClass("notUsed"); - $(this).val("filter..."); - } - }) - .focusin(function() { - if($(this).val() == "filter...") { - $(this).removeClass("notUsed"); - $(this).val(""); - } - }) - ) - ); - - // Filter toggle between H I R in nav porperties list - $("nav.properties.filterable .filter") - .append( - $(document.createElement("a")) - .html("H") - .attr({ - title: "hide inherited properties" - }) - .click( function() { - if($(this).hasClass("hidden")) { - $(this).parent().parent().find("li.inherit").show(); - } else { - $(this).parent().parent().find("li.inherit").hide(); - } - - $(this).toggleClass("hidden"); - }) - ) - .append( - $(document.createElement("a")) - .html("R") - .attr({ - title: "hide redefined properties" - }) - .click( function() { - if($(this).hasClass("hidden")) { - $(this).parent().parent().find("li.redef").show(); - } else { - $(this).parent().parent().find("li.redef").hide(); - } - - $(this).toggleClass("hidden"); - }) - ) - .append( - $(document.createElement("a")) - .html("I") - .attr({ - title: "hide introduced properties" - }) - .click( function() { - if($(this).hasClass("hidden")) { - $(this).parent().parent().find("li.intro").show(); - } else { - $(this).parent().parent().find("li.intro").hide(); - } - - $(this).toggleClass("hidden"); - }) - ); - - // Filter toggle between I R in - $("article.properties.filterable .filter, article.classes.filterable .filter") - .append( - $(document.createElement("a")) - .html("I") - .attr({ - title: "hide introduced properties" - }) - .click( function() { - if($(this).hasClass("hidden")) { - $(this).parent().parent().find("li.intro").show(); - } else { - $(this).parent().parent().find("li.intro").hide(); - } - - $(this).toggleClass("hidden"); - }) - ) - .append( - $(document.createElement("a")) - .html("R") - .attr({ - title: "hide redefined properties" - }) - .click( function() { - if($(this).hasClass("hidden")) { - $(this).parent().parent().find("li.redef").show(); - } else { - $(this).parent().parent().find("li.redef").hide(); - } - - $(this).toggleClass("hidden"); - }) - ); - - /* - * Anchors jumps - */ - $("a[href*='#']").click( function() { - highlightBlock($(this).attr("href").split(/#/)[1]); - }); - - //Preload filter fields with query string - preloadFilters(); - // Hide Authenfication form - $(".popover").hide(); - // Display Login modal - $("#logGitHub").click(function(){ displayLogginModal(); }); - // Update display - updateDisplaying(); - // If cookie existing the session is opened - if(sessionStarted){ userB64 = "Basic " + getUserPass("logginNitdoc"); } - - // Sign In an github user or Log out him - $("#signIn").click(function(){ - if(!sessionStarted){ - if($('#loginGit').val() == "" || $('#passwordGit').val() == ""){ displayMessage('Please informed login/password field!', 40, 45); } - else - { - userName = $('#loginGit').val(); - password = $('#passwordGit').val(); - githubRepo = $('#repositoryGit').val(); - branchName = $('#branchGit').val(); - userB64 = "Basic " + base64.encode(userName+':'+password); - if(checkSignIn()){ - // Check if repo exist - isRepoExisting(); - if(repoExist){ - $.when(isBranchExisting()).done(function(){ - loginProcess = true; - if(branchExist){ - setCookie("logginNitdoc", base64.encode(userName+':'+password+':'+githubRepo+':'+branchName), 1); - $('#loginGit').val(""); - $('#passwordGit').val(""); - reloadComment(); - } - }); - } - } - } - } - else - { - // Delete cookie and reset settings - del_cookie("logginNitdoc"); - closeAllCommentInEdtiting(); - } - displayLogginModal(); - }); - - // Activate edit mode - $('pre[class=text_label]').click(function(){ - // the customer is loggued ? - if(!sessionStarted || userName == ""){ - // No => nothing happen - return; - } - else{ - numComment = $(this).attr('title'); - var arrayNew = $(this).text().split('\n'); - var lNew = arrayNew.length - 1; - var adapt = ""; - - for (var i = 0; i < lNew; i++) { - adapt += arrayNew[i]; - if(i < lNew-1){ adapt += "\n"; } - } - editComment += 1; - getCommentOfFunction($(this)); - // hide comment - $(this).hide(); - // Show edit box - $(this).next().show(); - // Show cancel button - $(this).next().next().show(); - // Show commit button - $(this).next().next().next().show(); - // Add text in edit box - if($(this).next().val() == "" || $(this).next().val() != adapt){ $(this).next().val(adapt); } - // Resize edit box - $(this).next().height($(this).next().prop("scrollHeight")); - resizeTextarea($(this).next()); - // Select it - $(this).next().select(); - preElement = $(this); - } - }); - - // Disable the edit mode - $('a[id=cancelBtn]').click(function(){ - $(this).parent().prev().children('#lblDiffCommit').text(""); - showcomment = false; - closeEditing($(this)); - }); - - // Display commit form - $('a[id=commitBtn]').click(function(){ - updateComment = $(this).prev().prev().val(); - commentType = $(this).prev().prev().prev().attr('type'); - - if(updateComment == ""){ displayMessage('The comment field is empty!', 40, 45); } - else{ - if(!sessionStarted){ - displayMessage("You need to be loggued before commit something", 45, 40); - displayLogginModal(); - return; - } - - // Create the commit message - commitMessage = 'Wikidoc: modified comment in ' + $(this).parent().prev().prev().html().split(' ')[1]; - $('#commitMessage').text(commitMessage); - $('#commitMessage').css({'display': 'block'}); - pathFile = $(this).prev().prev().prev().attr('tag'); - $('#modal').show().prepend('Close'); - $('body').append('
    '); - $('#fade').css({'filter' : 'alpha(opacity=80)'}).fadeIn(); - } - }); - - // Close commit form - $('.btn_close').click(function(){ - $(this).hide(); - $(this).next().hide(); - if(editComment > 0){ editComment -= 1; } - $('#chkSignedOff').attr('checked', false); - removeSignedOff(); - }); - - //Close Popups and Fade Layer - $('body').on('click', 'a.close, #fade', function() { - if(editComment > 0){ editComment -= 1; } - $('#fade , #modal').fadeOut(function() { - $('#fade, a.close').remove(); - }); - $('#modalQuestion').hide(); - $('#chkSignedOff').attr('checked', false); - removeSignedOff(); - }); - - $('#loginAction').click(function(){ - var text; - var url; - var line; - // Look if the customer is logged - if(!sessionStarted){ - displayMessage("You need to be loggued before commit something", 100, 40); - $('.popover').show(); - return; - } - else{ userB64 = "Basic " + getUserPass("logginNitdoc"); } - // Check if repo exist - isRepoExisting(); - if(repoExist){ - isBranchExisting(); - if(branchExist){ - editComment -= 1; - commitMessage = $('#commitMessage').val().replace(/\r?\n/g, '\\n').replace(/\t/g, '\\t').replace(/\"/g,'\\"'); - if(commitMessage == ""){ commitMessage = "New commit";} - if(sessionStarted){ - if ($.trim(updateComment) == ''){ this.value = (this.defaultValue ? this.defaultValue : ''); } - else{ - displaySpinner(); - startCommitProcess(); - } - } - $('#modal, #modalQuestion').fadeOut(function() { - $('#login').val(""); - $('#password').val(""); - $('textarea').hide(); - $('textarea').prev().show(); - }); - $('a[id=cancelBtn]').hide(); - $('a[id=commitBtn]').hide(); - $('a[id=lblDiffCommit]').text(""); - showcomment = false; - // Re-load all comment - reloadComment(); - } - } - else{ editComment -= 1; } - $('#chkSignedOff').attr('checked', false); - }); - - // Cancel creating branch - $('#btnCancelBranch').click(function(){ - editComment -= 1; - $('#modalQuestion').hide(); - $('#fade , #modal').fadeOut(function() { $('#fade, a.close').remove(); }); - return; - }); - - // Create new branch and continu - $('#btnCreateBranch').click(function(){ - $('#modalQuestion').hide(); - if($('#btnCreateBranch').text() != 'Ok'){ - // Create the branch - createBranch(); - commitMessage = $('#commitMessage').val().replace(/\r?\n/g, '\\n').replace(/\t/g, '\\t').replace(/\"/g,'\\"'); - if(commitMessage == ""){ commitMessage = "New commit"; } - if(userB64 != ""){ - if(loginProcess){ - setCookie("logginNitdoc", base64.encode(userName+':'+password+':'+githubRepo+':'+branchName), 1); - $('#loginGit').val(""); - $('#passwordGit').val(""); - loginProcess = false; - displayLogginModal(); - } - else{ - if ($.trim(updateComment) == ''){ this.value = (this.defaultValue ? this.defaultValue : ''); } - else{ startCommitProcess(); } - } - } - } - else - { - $('#fade , #modalQuestion, #modal').fadeOut(function() { $('#fade, a.close').remove(); }); - } - }); - - $('a[class=newComment]').click(function(){ - addNewComment = true; - editComment += 1; - // hide comment - $(this).hide(); - // Show edit box - $(this).next().show(); - // Show cancel button - $(this).next().next().show(); - // Show commit button - $(this).next().next().next().show(); - // Resize edit box - $(this).next().height($(this).next().prop("scrollHeight")); - resizeTextarea($(this).next()); - // Select it - $(this).next().select(); - preElement = $(this); - }); - - $("#dropBranches").change(function () { - $("#dropBranches option:selected").each(function () { - if(branchName != $(this).text()){ - branchName = $(this).text(); - } - }); - $.when(updateCookie(userName, password, githubRepo, branchName)).done(function(){ - closeAllCommentInEdtiting(); - reloadComment(); - }); - }); - - $("pre").hover( - function () { - if(sessionStarted == true){ - $(this).css({'cursor' : 'hand'}); - } - else{ - $(this).css({'cursor' : ''}); - } - }, - function () { - if(sessionStarted == true){ - $(this).css({'cursor' : 'pointer'}); - } - else{ - $(this).css({'cursor' : ''}); - } - } - ); - - $('#chkSignedOff').click(function(){ - if($(this).is(':checked')){ addSignedOff(); } - else{ removeSignedOff(); } - }) - - $('a[id=lblDiffCommit]').click(function(){ - showComment($(this)); - }); -}); - -/* Parse current URL and return anchor name */ -function currentAnchor() { - var index = document.location.hash.indexOf("#"); - if (index >= 0) { - return document.location.hash.substring(index + 1); - } - return null; -} - -/* Prealod filters field using search query */ -function preloadFilters() { - // Parse URL and get query string - var search = currentAnchor(); - - if(search == null || search.indexOf("q=") == -1) - return; - - search = search.substring(2, search.length); - - if(search == "" || search == "undefined") - return; - - $(":text").val(search); - $(".filter :text") - .removeClass("notUsed") - .trigger("keyup"); - -} - -/* Hightlight the spoted block */ -function highlightBlock(a) { - if(a == undefined) { - return; - } - - $(".highlighted").removeClass("highlighted"); - - var target = $("#" + a); - - if(target.is("article")) { - target.parent().addClass("highlighted"); - } - - target.addClass("highlighted"); - target.show(); -} - -// Init process to commit the new comment -function startCommitProcess() -{ - if($('#chkSignedOff').is(':checked')){ - var numL = preElement.attr("title"); - commentLineStart = numL.split('-')[0] - 1; - if(addNewComment) { commentLineStart++; } - commentLineEnd = (commentLineStart + preElement.text().split('\n').length) - 1; - state = true; - replaceComment(updateComment, currentfileContent); - getLastCommit(); - getBaseTree(); - editComment = false; - } - else{ - displayMessage('Please sign this commit', 40, 40); - } -} - -function displayLogginModal(){ - if ($('.popover').is(':hidden')) { - if(sessionStarted){ getListBranches(); } - $('.popover').show(); - } - else { $('.popover').hide(); } - updateDisplaying(); -} - -function updateDisplaying(){ - if (checkCookie()) - { - userB64 = "Basic " + getUserPass("logginNitdoc"); - $('#loginGit').hide(); - $('#passwordGit').hide(); - $('#lbpasswordGit').hide(); - $('#lbloginGit').hide(); - $('#repositoryGit').hide(); - $('#lbrepositoryGit').hide(); - $('#lbbranchGit').hide(); - $('#branchGit').hide(); - $('#listBranches').show(); - $('#divGitHubRepoDisplay').show(); - $("#liGitHub").attr("class", "current"); - $("#imgGitHub").attr("src", "resources/icons/github-icon-w.png"); - $('#nickName').text(userName); - $('#githubAccount').attr("href", "https://github.com/"+userName); - $('#logginMessage').css({'display' : 'block'}); - $('#logginMessage').css({'text-align' : 'center'}); - $('.popover').css({'height' : '190px'}); - $('#signIn').text("Sign out"); - $('#githubRepoDisplay').text(githubRepo); - sessionStarted = true; - reloadComment(); - } - else - { - sessionStarted = false; - $('#logginMessage').css({'display' : 'none'}); - $("#liGitHub").attr("class", ""); - $("#imgGitHub").attr("src", "resources/icons/github-icon.png"); - $('#loginGit').val(""); - $('#passwordGit').val(""); - $('#nickName').text(""); - $('.popover').css({'height' : '325px'}); - $('#logginMessage').css({'display' : 'none'}); - $('#repositoryGit').val($('#repoName').attr('name')); - $('#branchGit').val('wikidoc'); - $('#signIn').text("Sign In"); - $('#loginGit').show(); - $('#passwordGit').show(); - $('#lbpasswordGit').show(); - $('#lbloginGit').show(); - $('#repositoryGit').show(); - $('#lbrepositoryGit').show(); - $('#lbbranchGit').show(); - $('#branchGit').show(); - $('#listBranches').hide(); - $('#divGitHubRepoDisplay').hide(); - } -} - -function setCookie(c_name, value, exdays) -{ - var exdate=new Date(); - exdate.setDate(exdate.getDate() + exdays); - var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString()); - document.cookie=c_name + "=" + c_value; -} - -function del_cookie(c_name) -{ - document.cookie = c_name + '=; expires=Thu, 01 Jan 1970 00:00:01 GMT;'; -} - -function updateCookie(user, pwd, repo, branch){ - if(checkCookie()){ - branchName = branch; - setCookie("logginNitdoc", base64.encode(user+':'+pwd+':'+repo+':'+branch), 1); - } -} - -function getCookie(c_name) -{ - var c_value = document.cookie; - var c_start = c_value.indexOf(" " + c_name + "="); - if (c_start == -1) { c_start = c_value.indexOf(c_name + "="); } - if (c_start == -1) { c_value = null; } - else - { - c_start = c_value.indexOf("=", c_start) + 1; - var c_end = c_value.indexOf(";", c_start); - if (c_end == -1) { c_end = c_value.length; } - c_value = unescape(c_value.substring(c_start,c_end)); - } - return c_value; -} - -function getUserPass(c_name){ - var cookie = base64.decode(getCookie(c_name)); - return base64.encode(cookie.split(':')[0] + ':' + cookie.split(':')[1]); -} - -function checkCookie() -{ - var cookie=getCookie("logginNitdoc"); - if (cookie!=null && cookie!="") - { - cookie = base64.decode(cookie); - userName = cookie.split(':')[0]; - password = cookie.split(':')[1]; - githubRepo = cookie.split(':')[2]; - branchName = cookie.split(':')[3]; - return true; - } - else { return false; } -} - - -/* -* Base64 -*/ -base64 = {}; -base64.PADCHAR = '='; -base64.ALPHA = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; -base64.getbyte64 = function(s,i) { - // This is oddly fast, except on Chrome/V8. - // Minimal or no improvement in performance by using a - // object with properties mapping chars to value (eg. 'A': 0) - var idx = base64.ALPHA.indexOf(s.charAt(i)); - if (idx == -1) { - throw "Cannot decode base64"; - } - return idx; -} - -base64.decode = function(s) { - // convert to string - s = "" + s; - var getbyte64 = base64.getbyte64; - var pads, i, b10; - var imax = s.length - if (imax == 0) { - return s; - } - - if (imax % 4 != 0) { - throw "Cannot decode base64"; - } - - pads = 0 - if (s.charAt(imax -1) == base64.PADCHAR) { - pads = 1; - if (s.charAt(imax -2) == base64.PADCHAR) { - pads = 2; - } - // either way, we want to ignore this last block - imax -= 4; - } - - var x = []; - for (i = 0; i < imax; i += 4) { - b10 = (getbyte64(s,i) << 18) | (getbyte64(s,i+1) << 12) | - (getbyte64(s,i+2) << 6) | getbyte64(s,i+3); - x.push(String.fromCharCode(b10 >> 16, (b10 >> 8) & 0xff, b10 & 0xff)); - } - - switch (pads) { - case 1: - b10 = (getbyte64(s,i) << 18) | (getbyte64(s,i+1) << 12) | (getbyte64(s,i+2) << 6) - x.push(String.fromCharCode(b10 >> 16, (b10 >> 8) & 0xff)); - break; - case 2: - b10 = (getbyte64(s,i) << 18) | (getbyte64(s,i+1) << 12); - x.push(String.fromCharCode(b10 >> 16)); - break; - } - return x.join(''); -} - -base64.getbyte = function(s,i) { - var x = s.charCodeAt(i); - if (x > 255) { - throw "INVALID_CHARACTER_ERR: DOM Exception 5"; - } - return x; -} - - -base64.encode = function(s) { - if (arguments.length != 1) { - throw "SyntaxError: Not enough arguments"; - } - var padchar = base64.PADCHAR; - var alpha = base64.ALPHA; - var getbyte = base64.getbyte; - - var i, b10; - var x = []; - - // convert to string - s = "" + s; - - var imax = s.length - s.length % 3; - - if (s.length == 0) { - return s; - } - for (i = 0; i < imax; i += 3) { - b10 = (getbyte(s,i) << 16) | (getbyte(s,i+1) << 8) | getbyte(s,i+2); - x.push(alpha.charAt(b10 >> 18)); - x.push(alpha.charAt((b10 >> 12) & 0x3F)); - x.push(alpha.charAt((b10 >> 6) & 0x3f)); - x.push(alpha.charAt(b10 & 0x3f)); - } - switch (s.length - imax) { - case 1: - b10 = getbyte(s,i) << 16; - x.push(alpha.charAt(b10 >> 18) + alpha.charAt((b10 >> 12) & 0x3F) + - padchar + padchar); - break; - case 2: - b10 = (getbyte(s,i) << 16) | (getbyte(s,i+1) << 8); - x.push(alpha.charAt(b10 >> 18) + alpha.charAt((b10 >> 12) & 0x3F) + - alpha.charAt((b10 >> 6) & 0x3f) + padchar); - break; - } - return x.join(''); -} - - - -function getLastCommit() -{ - var urlHead = ''; - if(sessionStarted){ urlHead = "https://api.github.com/repos/"+userName+"/"+githubRepo+"/git/refs/heads/"+branchName;} - else{ - // TODO: get url of the original repo. - return; - } - - $.ajax({ - beforeSend: function (xhr) { - if (userB64 != ""){ xhr.setRequestHeader ("Authorization", userB64); } - }, - type: "GET", - url: urlHead, - dataType:"json", - async: false, - success: function(success) - { - shaLastCommit = success.object.sha; - } - }); -} - -function getBaseTree() -{ - $.ajax({ - beforeSend: function (xhr) { - if (userB64 != ""){ xhr.setRequestHeader ("Authorization", userB64); } - }, - type: "GET", - url: "https://api.github.com/repos/"+userName+"/"+githubRepo+"/git/commits/" + shaLastCommit, - dataType:"json", - async: false, - success: function(success) - { - shaBaseTree = success.tree.sha; - if (state){ setBlob(); } - else{ return; } - }, - error: function(){ - return; - } - }); -} - -function setNewTree() -{ - $.ajax({ - beforeSend: function (xhr) { xhr.setRequestHeader ("Authorization", userB64); }, - type: "POST", - url: "https://api.github.com/repos/"+userName+"/"+githubRepo+"/git/trees", - async: false, - dataType:'json', - data:'{ "base_tree" : "'+shaBaseTree+'", '+ - '"tree":[{ '+ - '"path":"'+ pathFile +'",'+ - '"mode":"100644",'+ - '"type":"blob",'+ - '"sha": "'+ shaBlob +'"'+ - '}] '+ - '}', - success: function(success) - { // si l'appel a bien fonctionné - shaNewTree = success.sha; - setNewCommit(); - }, - error: function(){ - return; - } - }); -} - -function setNewCommit() -{ - addSignedOff(); - $.ajax({ - beforeSend: function (xhr) { xhr.setRequestHeader ("Authorization", userB64); }, - type: "POST", - url: "https://api.github.com/repos/"+userName+"/"+githubRepo+"/git/commits", - async: false, - dataType:'json', - data:'{ "message" : "'+ commitMessage +'", '+ - '"parents" :"'+shaLastCommit+'",'+ - '"tree": "'+shaNewTree+'"'+ - '}', - success: function(success) - { - shaNewCommit = success.sha; - commit(); - }, - error: function(){ - return; - } - }); -} - -//Create a commit -function commit() -{ - $.ajax({ - beforeSend: function (xhr) { xhr.setRequestHeader ("Authorization", userB64); }, - type: "POST", - url: "https://api.github.com/repos/"+userName+"/"+githubRepo+"/git/refs/heads/"+branchName, - dataType:'json', - data:'{ "sha" : "'+shaNewCommit+'", '+ - '"force" :"true"'+ - '}', - success: function(success) { displayMessage('Commit created successfully', 40, 40); }, - error:function(error){ displayMessage('Error ' + error.object.message, 40, 40); } - }); -} - -// Create a blob -function setBlob() -{ - $.ajax({ - beforeSend: function (xhr) { xhr.setRequestHeader ("Authorization", userB64); }, - type: "POST", - url: "https://api.github.com/repos/"+userName+"/"+githubRepo+"/git/blobs", - async: false, - dataType:'json', - data:'{ "content" : "'+text.replace(/\r?\n/g, '\\n').replace(/\t/g, '\\t').replace(/\"/g,'\\"')+'", '+ - '"encoding" :"utf-8"'+ - '}', - success: function(success) - { - shaBlob = success.sha; - setNewTree(); - }, - error:function(error){ - displayMessage('Error : Problem parsing JSON', 40, 40); - return; - } - }); -} - -// Display file content -function getFileContent(urlFile, newComment) -{ - $.ajax({ - beforeSend: function (xhr) { - xhr.setRequestHeader ("Accept", "application/vnd.github-blob.raw"); - if (userB64 != ""){ xhr.setRequestHeader ("Authorization", userB64); } - }, - type: "GET", - url: urlFile, - async:false, - success: function(success) - { - state = true; - replaceComment(newComment, success); - } - }); -} - -function replaceComment(newComment, fileContent){ - var arrayNew = newComment.split('\n'); - var lNew = arrayNew.length; - text = ""; - var lines = fileContent.split("\n"); - for (var i = 0; i < lines.length; i++) { - if(i == commentLineStart){ - if(addNewComment){ - for(var indexLine=0; indexLine < lines[i+1].length; indexxLine++){ - if(lines[i+1].substr(indexLine,1) == "\t" || lines[i+1].substr(indexLine,1) == "#"){ text += lines[i+1].substr(indexLine,1); } - else{ break;} - } - text += lines[i] + "\n"; - } - // We change the comment - for(var j = 0; j < lNew; j++){ - if(commentType == 1){ text += "\t# " + arrayNew[j] + "\n"; } - else{ - if(arrayNew[j] == ""){ text += "#"+"\n"; } - else{ text += "# " + arrayNew[j] + "\n"; } - } - } - } - else if(i < commentLineStart || i >= commentLineEnd){ - if(i == lines.length-1){ text += lines[i]; } - else{ text += lines[i] + "\n"; } - } - } - if(addNewComment){ - addNewComment = false; - } -} - -function getCommentLastCommit(path, origin){ - var urlRaw; - var bkBranch = ''; - if(origin){// We want to get the original file - bkBranch = branchName; - branchName = "master"; - } - getLastCommit(); - if(shaLastCommit != ""){ - if (checkCookie()) { - urlRaw="https://rawgithub.com/"+ userName +"/"+ githubRepo +"/" + shaLastCommit + "/" + path; - $.ajax({ - type: "GET", - url: urlRaw, - async: false, - success: function(success) - { - if(origin){ originalFileContent = success; } - else{ currentfileContent = success; } - } - }); - } - } - if(origin){ branchName = bkBranch; } -} - -function displayMessage(msg, widthDiv, margModal){ - spinner.stop(); - $('#modal').hide(); - $('#btnCancelBranch').hide(); - $('#modalQuestion').show().prepend('Close'); - $('#txtQuestion').text(msg); - $('#btnCreateBranch').text("Ok"); - var xModal = $('#modalQuestion').css('width').split('px')[0]; - var yModal = $('#modalQuestion').css('height').split('px')[0]; - var x = $(document).width/2 - xModal/2; - var y = $(document).height/2 - yModal/2; - var xBtnBranch = $('#btnCreateBranch').css('width').split('px')[0]; - $('#modalQuestion').css({'left' : x, 'top' : y}); - $('#modalQuestion').show(); - $('#btnCreateBranch').css('margin-left', xModal/2 - xBtnBranch); - $('body').append('
    '); - $('#fade').css({'filter' : 'alpha(opacity=80)'}).fadeIn(); -} - -function displaySpinner(){ - spinner.spin(targetSpinner); - $("#waitCommit").show(); -} - -// Check if the repo already exist -function isRepoExisting(){ - $.ajax({ - beforeSend: function (xhr) { - if (userB64 != "") { xhr.setRequestHeader ("Authorization", userB64); } - }, - type: "GET", - url: "https://api.github.com/repos/"+userName+"/"+githubRepo, - async:false, - dataType:'json', - success: function(){ repoExist = true; }, - error: function() - { - displayMessage('Repo not found !', 35, 45); - repoExist = false; - } - }); -} - -// Check if the branch already exist -function isBranchExisting(){ - $.ajax({ - beforeSend: function (xhr) { - if (userB64 != "") { xhr.setRequestHeader ("Authorization", userB64); } - }, - type: "GET", - url: "https://api.github.com/repos/"+userName+"/"+githubRepo+"/git/refs/heads/"+branchName, - async:false, - dataType:'json', - success: function(){ branchExist = true; }, - error: function() - { - branchExist = false; - editComment -= 1; - $('#modal').hide(); - $('#txtQuestion').text("Are you sure you want to create that branch ?"); - $('#btnCancelBranch').show(); - $('#btnCreateBranch').text("Yes"); - $('#modalQuestion').show(); - $('#modalQuestion').show().prepend('Close'); - $('body').append('
    '); - $('#fade').css({'filter' : 'alpha(opacity=80)'}).fadeIn(); - } - }); -} - -function getMasterSha() -{ - $.ajax({ - beforeSend: function (xhr) { - if (userB64 != ""){ xhr.setRequestHeader ("Authorization", userB64); } - }, - type: "GET", - url: "https://api.github.com/repos/"+userName+"/"+githubRepo+"/git/refs/heads/master", - dataType:"json", - async: false, - success: function(success) { shaMaster = success.object.sha; } - }); -} - -function createBranch(){ - - getMasterSha(); - - $.ajax({ - beforeSend: function (xhr) { xhr.setRequestHeader ("Authorization", userB64); }, - type: "POST", - url: "https://api.github.com/repos/"+userName+"/"+githubRepo+"/git/refs", - data:'{ "ref" : "refs/heads/'+branchName+'",'+ - '"sha" : "'+shaMaster+'"'+ - '}', - success: function(){ return; }, - error: function(){ - editComment -= 1; - displayMessage('Impossible to create the new branch : ' + branchName, 40, 40); - } - }); -} - -$.fn.spin = function(opts) { - this.each(function() { - var $this = $(this), - data = $this.data(); - - if (data.spinner) { - data.spinner.stop(); - delete data.spinner; - } - if (opts !== false) { - data.spinner = new Spinner($.extend({color: $this.css('color')}, opts)).spin(this); - } - }); - return this; -}; - -function reloadComment(){ - var path = $('pre[class=text_label]').attr('tag'); - $.when(getCommentLastCommit(path, false)).done(function(){ - if(sessionStarted){ getCommentLastCommit(path, true); } - $('pre[class=text_label]').each(function(){ getCommentOfFunction($(this)); }); - }); -} - -function getCommentOfFunction(element){ - var textC = ""; - var numL = element.attr("title"); - if(numL != null){ - commentLineStart = numL-1; - commentLineEnd = element.attr('name').split(numL)[1].split('-')[1]-1; - var lines = currentfileContent.split("\n"); - for (var i = 0; i < lines.length; i++) { - if(i >= commentLineStart-1 && i <= commentLineEnd+1){ - if (lines[i].substr(1,1) == "#"){ textC += lines[i].substr(3,lines[i].length) + "\n";} - else if(lines[i].substr(0,1) == '#'){ textC += lines[i].substr(2,lines[i].length) + "\n"; } - } - } - if(textC != element.text){element.text(textC);} - if (textC != "" && editComment > 0){ - var originContent = originalFileContent.split("\n"); - var origin = ''; - var lblDiff = element.parent().prev().children('#lblDiffCommit'); - var preSave = element.parent().children('#preSave'); - for (var i = 0; i < originContent.length; i++) { - if(i >= commentLineStart-1 && i <= commentLineEnd+1){ - if (originContent[i].substr(1,1) == "#"){ origin += originContent[i].substr(3,originContent[i].length) + "\n";} - else if(originContent[i].substr(0,1) == '#'){ origin += originContent[i].substr(2,originContent[i].length) + "\n"; } - } - } - if(textC != origin && numL == numComment){ - // The comment is different compare to the original - if(showcomment == false){ lblDiff.text("Show original comment"); } - preSave.text(origin); - } - else if (numL == numComment){ lblDiff.text(""); } - } - } -} - -// Get list of branches -function getListBranches() -{ - cleanListBranches(); - $.ajax({ - beforeSend: function (xhr) { - if ($("#login").val() != ""){ xhr.setRequestHeader ("Authorization", userB64); } - }, - type: "GET", - url: "https://api.github.com/repos/"+userName+"/"+githubRepo+"/branches", - async:false, - dataType:'json', - success: function(success) - { - for(var branch in success) { - var selected = ''; - if(branchName == success[branch].name){ - selected = 'selected'; - } - $('#dropBranches').append(''); - } - } - }); -} - -// Delete all option in the list -function cleanListBranches(){ - $('#dropBranches').children("option").remove(); -} - -function closeAllCommentInEdtiting(){ - $('a[id=cancelBtn]').each(function(){ - closeEditing($(this)); - }); -} - -function closeEditing(tag){ - if(editComment > 0){ editComment -= 1; } - // Hide itself - tag.hide(); - // Hide commitBtn - tag.next().hide(); - // Hide Textarea - tag.prev().hide(); - // Show comment - tag.prev().prev().show(); -} - -function checkSignIn(){ - var response = false; - $.ajax({ - beforeSend: function (xhr) { - if ($("#login").val() != ""){ xhr.setRequestHeader ("Authorization", userB64); } - }, - type: "GET", - url: "https://api.github.com/repos/"+userName+"/"+githubRepo, - async:false, - dataType:'json', - success: function(success) - { - getUserInfo(); - response = true; - displayMessage('You are now logged in'); - }, - error: function() - { - displayMessage('Error : Wrong username or password'); - response = false; - } - }); - return response; -} - -function getUserInfo(){ - $.ajax({ - beforeSend: function (xhr) { - if ($("#login").val() != ""){ xhr.setRequestHeader ("Authorization", userB64); } - }, - type: "GET", - url: "https://api.github.com/user/emails", - async:false, - dataType:'json', - success: function(success) - { - userEmail = success; - } - }); -} - -function getSignedOff(){ - $.ajax({ - beforeSend: function (xhr) { - if ($("#login").val() != ""){ xhr.setRequestHeader ("Authorization", userB64); } - }, - type: "GET", - url: "https://api.github.com/users/"+userName, - async:false, - dataType:'json', - success: function(success) - { - signedOff = success.name; - } - }); -} - -function addSignedOff(){ - $.when(getUserInfo()).done(function(){ - $.when(getSignedOff()).done(function(){ - $('#commitMessage').val($('#commitMessage').val() + "\n\nSigned-off-by: "+signedOff+" <"+userEmail+">"); - }); - }); - resizeTextarea($('#commitMessage')); -} - -function removeSignedOff(){ - $('#commitMessage').val(commitMessage); - resizeTextarea($('#commitMessage')); -} - -function resizeTextarea(element){ - var nLines = element.val().split('\n').length + 1; - element.attr('rows', nLines); -} - -function showComment(element){ - // Display the original comment - if (showcomment == true){ - showcomment = false; - element.text("Show original comment"); - } - else{ - // Show the comment updated in user's repo - showcomment = true; - element.text("Comment changed in "+githubRepo+" / "+branchName); - } - var parent = element.parent().next(".description"); - var textarea = parent.children('#fileContent'); - var text = textarea.val(); - var preSave = parent.children('#preSave'); - textarea.val(preSave.text()); - preSave.text(text); - // Resize edit box - textarea.height(textarea.prop("scrollHeight")); - resizeTextarea(textarea); -} diff --git a/share/ni_nitdoc/styles/Nitdoc.GitHub.css b/share/nitdoc/styles/Nitdoc.GitHub.css similarity index 100% rename from share/ni_nitdoc/styles/Nitdoc.GitHub.css rename to share/nitdoc/styles/Nitdoc.GitHub.css diff --git a/share/ni_nitdoc/styles/Nitdoc.QuickSearch.css b/share/nitdoc/styles/Nitdoc.QuickSearch.css similarity index 100% rename from share/ni_nitdoc/styles/Nitdoc.QuickSearch.css rename to share/nitdoc/styles/Nitdoc.QuickSearch.css diff --git a/share/ni_nitdoc/styles/Nitdoc.UI.css b/share/nitdoc/styles/Nitdoc.UI.css similarity index 91% rename from share/ni_nitdoc/styles/Nitdoc.UI.css rename to share/nitdoc/styles/Nitdoc.UI.css index 3265cc0..35c5343 100644 --- a/share/ni_nitdoc/styles/Nitdoc.UI.css +++ b/share/nitdoc/styles/Nitdoc.UI.css @@ -58,6 +58,12 @@ article:hover > .signature button.nitdoc-ui-copy, button.nitdoc-ui-copy.zeroclip visibility: visible; } +/* Search page field */ + +.nitdoc-ui-searchpage-field { + width: 750px; +} + /* Side bar boxes text filtering */ .nitdoc-ui-filter { diff --git a/share/nitdoc/styles/main.css b/share/nitdoc/styles/main.css index d45e1cc..d9174f4 100644 --- a/share/nitdoc/styles/main.css +++ b/share/nitdoc/styles/main.css @@ -1,7 +1,6 @@ /* General */ body { - margin: 0; font: 14px "Helvetica Neue", Helvetica, Tahoma, sans-serif; } @@ -24,11 +23,16 @@ pre, code { font-size: 1em; } -pre { +.description div.comment { background: #EEE; - padding: 5px; color: black; overflow: auto; + padding: 0 0 0 12px; + margin: 1em 0 0 0; +} + +.description textarea.baseComment { + display: none; } hr { @@ -60,76 +64,98 @@ h3 { /* Page display */ -body { +html { + height: 100%; overflow: hidden; +} + +body { height: 100%; + margin: 0; } header { + position: fixed; + z-index: 600; + left: 0; + right: 0; } .page { - width: 937px; margin: auto; + height: 100%; } -.menu { +.sidebar { position: fixed; + z-index: 500; top: 50px; - bottom: 2em; + bottom: 1em; width: 250px; overflow-y: scroll; } +.sidebar nav:last-child { + margin-bottom: 0; +} + .content { position: fixed; + z-index: 500; top: 50px; - bottom: 2em; + bottom: 1em; + left: 0; + right: 0; margin-left: 265px; - width: 667px; overflow-y: scroll; + margin-right: 5px; padding-right: 10px; } .content.fullpage { margin-left: 20px; - width: 910px; + width: auto; +} + +.page.footed .content, .page.footed .sidebar { + bottom: 2em; } footer { position: fixed; + z-index: 500; bottom: 0; width: 100%; } /* Webkit scroll bars */ -.menu { +.sidebar { overflow-y: hidden; } -.menu:hover { +.sidebar:hover { overflow-y: scroll; } -.menu::-webkit-scrollbar, .content::-webkit-scrollbar { +.sidebar::-webkit-scrollbar, .content::-webkit-scrollbar { width: 10px; } -.menu::-webkit-scrollbar-thumb, .content::-webkit-scrollbar-thumb { +.sidebar::-webkit-scrollbar-thumb, .content::-webkit-scrollbar-thumb { background: #CCC; -webkit-box-shadow: inset 1px 1px 0 rgba(0,0,0,0.10),inset 0 -1px 0 rgba(0,0,0,0.07); } -.menu::-webkit-scrollbar-thumb:hover, .content::-webkit-scrollbar-thumb:hover { +.sidebar::-webkit-scrollbar-thumb:hover, .content::-webkit-scrollbar-thumb:hover { background: #999; } -.menu::-webkit-scrollbar-corner, .content::-webkit-scrollbar-corner { +.sidebar::-webkit-scrollbar-corner, .content::-webkit-scrollbar-corner { background: transparent; } -.menu::-webkit-scrollbar-button, .content::-webkit-scrollbar-button { +.sidebar::-webkit-scrollbar-button, .content::-webkit-scrollbar-button { width: 0; height: 0; display: none; @@ -140,7 +166,6 @@ footer { header nav ul { padding: 0; list-style-type: none; - width: 900px; margin: auto; } @@ -151,14 +176,6 @@ header nav ul li { color: #999; } -header nav ul li a { - color: black; -} - -header nav ul li a:hover { - color: #0D8921; -} - footer { text-align: center; padding-bottom: 10px; @@ -168,62 +185,66 @@ footer { /* Main menu */ header nav.main { - background: #E0E0E0 url(../resources/top_back.gif) repeat-x top left; + background: #f1f1f1; + border-bottom: 1px solid #ddd; padding: 7px 0; } header nav.main ul li.current { background: #0D8921; - color: white; + border-radius: 2px; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + border: 1px solid #1d7900; + color: #fff; + text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2); + -moz-text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2); + -webkit-text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2); } -/* Latteral Menu */ +/* Sidebar */ -.menu nav { +.sidebar nav { margin: 20px; width: 208px; - border: 1px solid #CCC; + border: 1px solid #ddd; } -.menu nav:first-child { +.sidebar nav:first-child { margin-top: 0; } -.menu nav h3 { +.sidebar nav h3 { margin: 0; padding: 5px; - background: #CCC; + background: #f1f1f1; font-size: 1em; } -.menu nav h4 { +.sidebar nav h4 { font-weight: bold; color: #555555; margin: 10px 0 0 10px; font-size: 12px; } -.menu nav h4:last-child { +.sidebar nav h4:last-child { margin-bottom: 5px; } -.menu nav ul { +.sidebar nav ul { margin: 10px; padding: 0; list-style-type: none; } -.menu nav ul li { +.sidebar nav ul li { overflow: hidden; color: #CCC; } /* Content */ -.content section { - margin: 20px 0; -} - .content article { color: #6C6C6C; background-repeat: no-repeat; @@ -234,7 +255,7 @@ header nav.main ul li.current { .content article h3 { margin: 0; - font-weight: normal; + font-weight: bold; color: #333; } @@ -262,8 +283,7 @@ header nav.main ul li.current { padding-left: 10px; } -nav ul li span, -.content article ul li span { +nav ul li span { color: #CCC; text-align: center; font-family: monospace; @@ -285,7 +305,7 @@ nav ul li span, color: #555; } -.content article.highlighted { +.content article:target { background-color: #FFF3C2; color: black; } @@ -294,27 +314,47 @@ nav ul li span, color: #6C6C6C; } +.content a { + color: #0D8921; +} + .content a:hover { color: #333; } -.content a { +.info { + color: #6C6C6C; +} + +.info a { + color: #333; +} + +.info a:hover { color: #0D8921; } + article .info .code { float: right; } +.description .inheritance { + text-align: right; + margin: 2px; + +} + .content .concern-doc { - border-top: 3px dotted #CCC; + border-bottom: 1px dashed #CCC; padding: 5px 0; - color: #999; + color: #6C6C6C; } .content section.concerns { padding: 10px; border: 1px solid #ccc; + } .content section.concerns h2 { @@ -340,508 +380,88 @@ article .info .code { } .content section.methods h3.concern-toplevel { - border-top: 3px dotted #CCC; - padding-top: 0.83em; - color: #999; + padding: 10px; + border: 1px solid #ccc; + color: #6C6C6C; } .show-code { margin: 0; } -/* JS facilities */ +/* Icons */ + +.type.public, .interface.public, .abstract.class.public { background-image: url('../resources/icons/vtype_public.png')} +.type.protected, .interface.protected, .abstract.class.protected { background-image: url('../resources/icons/vtype_protected.png')} +.type.private, .interface.private, .abstract.class.private { background-image: url('../resources/icons/vtype_private.png')} +.init.public, .enum.public { background-image: url('../resources/icons/const_public.png')} +.init.protected, .enum.protected { background-image: url('../resources/icons/const_protected.png')} +.init.private, .enum.private { background-image: url('../resources/icons/const_private.png')} +.fun.public, .class.public, .extern.public { background-image: url('../resources/icons/meth_public.png')} +.fun.protected, .class.protected, .extern.protected { background-image: url('../resources/icons/meth_protected.png')} +.fun.private, .class.private, .extern.private { background-image: url('../resources/icons/meth_private.png')} + +/* Form elements */ input[type=text] { - width: 150px; border: 1px solid #CCC; - margin-right: 5px; padding: 1px 2px; } -input[type=text].notUsed { - color: #999; - font-style: italic; -} - -nav .filter { - text-align: center; - padding: 5px; -} - nav.main input[type=text] { margin: -2px 10px; color: black; font-style: normal; } -nav.main form { - float: right; -} - -.filter a { - color: #0D8921; - cursor: pointer; - font-family: monospace; - margin-right: 5px; - font-weight: bold; -} - -.filter a.hidden { - color: #999; - font-weight: normal; -} +/* New comments style */ -.filter a:hover { - text-decoration: underline; +.content .nitdoc { + background: #F7F7F7; + padding: 5px; + color: black; + overflow: auto; } -nav h3 a.fold { - margin: 0 5px; - color: #999; - font-family: monospace; - font-weight: bold; - font-size: 120%; - cursor: pointer; +.content .nitdoc pre { + background: #EEE; } -.hide { - overflow-y: hidden; - height: 0; +.content .nitdoc code { + background: #DDD; + padding: 0 1px; } -/* Icons */ -.vtype.public { background-image: url('../resources/icons/vtype_public.png')} -.vtype.protected { background-image: url('../resources/icons/vtype_protected.png')} -.vtype.private { background-image: url('../resources/icons/vtype_private.png')} -.init.public { background-image: url('../resources/icons/const_public.png')} -.init.protected { background-image: url('../resources/icons/const_protected.png')} -.init.private { background-image: url('../resources/icons/const_private.png')} -.fun.public { background-image: url('../resources/icons/meth_public.png')} -.fun.protected { background-image: url('../resources/icons/meth_protected.png')} -.fun.private { background-image: url('../resources/icons/meth_private.png')} - -/* Quick Search */ - -#search { - width: 300px; +.rawcode { } -#searchTable { - background-color: #FFFFFF; - border: 1px solid #E0E0E0; - border-spacing: 0px; - z-index: 10; /* the menu must be over the rest of the page. */ -} +.nitcode a { color: inherit; text-decoration: inherit; } /* hide links */ +.nitcode a:hover { text-decoration: underline; } /* underline links */ +.nitcode span[title]:hover { text-decoration: underline; } /* underline titles */ +/* lexical raw tokens. independent of usage or semantic: */ +.nitcode .nc_c { color: gray; font-style: italic; } /* comment */ +.nitcode .nc_d { color: #3D8127; font-style: italic; } /* documentation comments */ +.nitcode .nc_k { font-weight: bold; } /* keyword */ +.nitcode .nc_o {} /* operator */ +.nitcode .nc_i {} /* standard identifier */ +.nitcode .nc_t { color: #445588; font-weight: bold; } /* type/class identifier */ +.nitcode .nc_a { color: #445588; font-style: italic; } /* old style attribute identifier */ +.nitcode .nc_l { color: #009999; } /* char and number literal */ +.nitcode .nc_s { color: #8F1546; } /* string literal */ +/* syntactic token usage. added because of their position in the AST */ +.nitcode .nc_ast { color: blue; } /* assert label */ +.nitcode .nc_la { color: blue; } /* break/continue label */ +.nitcode .nc_m { color: #445588; } /* module name */ +/* syntactic groups */ +.nitcode .nc_def { font-weight: bold; color: blue; } /* name used in a definition */ +.nitcode .nc_def.nc_a { color: blue; } /* name used in a attribute definition */ +.nitcode .nc_def.nc_t { color: blue; } /* name used in a class or vt definition */ +.nitcode .nc_ss { color: #9E6BEB; } /* superstrings */ +.nitcode .nc_cdef {} /* A whole class definition */ +.nitcode .nc_pdef {} /* A whole property definition */ +/* semantic token usage */ +.nitcode .nc_v { font-style: italic; } /* local variable or parameter */ +.nitcode .nc_vt { font-style: italic; } /* virtual type or formal type */ -#searchTable .activeSearchResult { - cursor: pointer; - background: #EEE; -} +.nitcode .nc_error { border: 1px red solid;} /* not used */ -#searchTable td { - white-space: nowrap; - overflow: hidden; - line-height: 22px; - padding: 2px; - width: 25%; -} - -#searchTable td.entryInfo { - color: #0D8921; - font-size: small; - width: 75%; - text-align: right; -} - -textarea { - margin: 10px; - font-family: monospace; - font-size: 1em; - width: 100%; -} -#commitBtn, #cancelBtn{ - float: right; - margin-right: 10px; -} -#commitBtn:hover, #cancelBtn:hover, #lblDiffCommit:hover{ - cursor: hand; cursor: pointer; -} - -#waitCommit { /*--Masque opaque noir de fond--*/ - display: none; - top: 40%; left: 40%; - z-index: 99999; -} -#fade { /*--Masque opaque noir de fond--*/ - display: none; /*--masqué par défaut--*/ - background: #000; - position: fixed; left: 0; top: 0; - width: 100%; height: 100%; - opacity: .80; - z-index: 9999; -} -#modal{ - display: none; /*--masqué par défaut--*/ - background: #fff; - padding: 20px; - border: 3px solid #ddd; - float: left; - font-size: 1.2em; - position: fixed; - top: 20%; left: 40%; - z-index: 99999; - /*--Les différentes définitions de Box Shadow en CSS3--*/ - -webkit-box-shadow: 0px 0px 20px #000; - -moz-box-shadow: 0px 0px 20px #000; - box-shadow: 0px 0px 20px #000; - /*--Coins arrondis en CSS3--*/ - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - border-radius: 10px; -} - -#modal #logginName{ - display: none; /*--masqué par défaut--*/ - background: #fff; - padding: 20px; - margin-bottom: 400px; - font-size: 1.2em; -} - -#modalQuestion{ - display: none; /*--masqué par défaut--*/ - background: #fff; - padding: 20px; - border: 3px solid #ddd; - float: left; - font-size: 1.2em; - position: fixed; - top: 20%; left: 40%; - z-index: 99999; - /*--Les différentes définitions de Box Shadow en CSS3--*/ - -webkit-box-shadow: 0px 0px 20px #000; - -moz-box-shadow: 0px 0px 20px #000; - box-shadow: 0px 0px 20px #000; - /*--Coins arrondis en CSS3--*/ - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - border-radius: 10px; -} - -#btnCreateBranch, #btnCancelBranch{ - padding: 6px 7px; - -moz-border-bottom-colors: none; - -moz-border-left-colors: none; - -moz-border-right-colors: none; - -moz-border-top-colors: none; - background-color: #F5F5F5; - background-image: linear-gradient(to bottom, #FFFFFF, #E6E6E6); - background-repeat: repeat-x; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) #B3B3B3; - border-image: none; - border-radius: 4px 4px 4px 4px; - border-style: solid; - border-width: 1px; - box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05); - color: #333333; - cursor: pointer; - display: inline-block; - font-size: 14px; - line-height: 20px; - margin-bottom: 0; - padding: 4px 12px; - text-align: center; - text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); - vertical-align: middle; - margin-top: 5%; - margin-left: 10px; - -} - -#btnCreateBranch{ - margin-left: 35%; -} - -img.btn_close, img.btnCloseQuestion { - float: right; - margin: -35px -35px 0 0; -} -fieldset { - margin-bottom: 20px; -} - -#login, #password, #commitMessage, #repoCommit, #branchName{ - border: 1px solid #ccc; - padding: 6px 7px; - outline: none; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - border-radius: 2px; - font: 13px "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif; - color: #777; - margin: 0; - width: 210px; - max-width: 100%; - display: block; - margin-bottom: 20px; - background: #fff; -} - -.connect-button a{ - display: block; - cursor: pointer; - margin: 0 0 20px 0; - background-color: #92C929; - background-image: -webkit-gradient(linear, left top, left bottom, from(#92C929), to(#1d7900)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient(top, #92C929, #1d7900); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient(top, #92C929, #1d7900); /* FF3.6 */ - background-image: -ms-linear-gradient(top, #92C929, #1d7900); /* IE10 */ - background-image: -o-linear-gradient(top, #92C929, #1d7900); /* Opera 11.10+ */ - background-image: linear-gradient(top, #92C929, #1d7900); - filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#92C929', EndColorStr='#1d7900'); /* IE6–IE9 */ - border-radius: 4px; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box; - box-shadow: 0px 2px 4px rgba(0,0,0, .2); - -moz-box-shadow: 0px 2px 4px rgba(0,0,0, .2); - -webkit-box-shadow: 0px 2px 4px rgba(0,0,0, .2); - text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2); - -moz-text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2); - -webkit-text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2); - border: 1px solid #1d7900; - color: #fff; - font-weight: 300; - font-size: 14px; - padding: 5px 7px 5px 7px; - text-align: center; - margin-top: 0px; -} - -.connect-button a:hover{ - background-image: -webkit-gradient(linear, left top, left bottom, from(#9AD42C), to(#1d7900)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient(top, #9AD42C, #1d7900); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient(top, #9AD42C, #1d7900); /* FF3.6 */ - background-image: -ms-linear-gradient(top, #9AD42C, #1d7900); /* IE10 */ - background-image: -o-linear-gradient(top, #9AD42C, #1d7900); /* Opera 11.10+ */ - background-image: linear-gradient(top, #92C929, #1d7900); - filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#9AD42C', EndColorStr='#1d7900'); /* IE6–IE9 */ -} - -.connect-button a:active{ - background-image: -webkit-gradient(linear, left top, left bottom, from(#73BD39), to(#1d7900)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient(top, #73BD39, #1d7900); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient(top, #73BD39, #1d7900); /* FF3.6 */ - background-image: -ms-linear-gradient(top, #73BD39, #1d7900); /* IE10 */ - background-image: -o-linear-gradient(top, #73BD39, #1d7900); /* Opera 11.10+ */ - background-image: linear-gradient(top, #73BD39, #1d7900); - filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#73BD39', EndColorStr='#1d7900'); /* IE6–IE9 */ -} - -.connect-button a strong{ - color: #fff; - font-weight: 600; -} - -.connect-button a:hover{ - text-decoration: none; -} - -.connect-button a img{ - margin-right: 7px; - margin-bottom: -3px; - height: 16px; - width: 16px; -} - -.popover a:hover { - color: #333; - cursor: hand; cursor: pointer; -} - -.popover a { - color: #0D8921; - margin-bottom: 10px; -} - -.popover { - position: absolute; - width : 220px; - height:280px; - margin-left: -102px; - z-index: 1010; - display: block; - max-width: 276px; - padding: 1px; - text-align: left; - white-space: normal; - background-color: #ffffff; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.2); - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -webkit-background-clip: padding-box; - -moz-background-clip: padding; - background-clip: padding-box; -} - -.popover.bottom { - margin-top: 10px; -} - -.popover-title { - padding: 8px 14px; - margin: 0; - font-size: 14px; - font-weight: normal; - line-height: 18px; - background-color: #f7f7f7; - border-bottom: 1px solid #ebebeb; - -webkit-border-radius: 5px 5px 0 0; - -moz-border-radius: 5px 5px 0 0; - border-radius: 5px 5px 0 0; -} - -.popover-title:empty { - display: none; -} - -.popover-content { - padding: 9px 14px; -} - -.popover .arrow, -.popover .arrow:after { - position: absolute; - display: block; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} - -.popover .arrow { - border-width: 11px; -} - -.popover .arrow:after { - border-width: 10px; - content: ""; -} - -.popover.bottom .arrow { - top: -11px; - left: 50%; - margin-left: -11px; - border-bottom-color: #999; - border-bottom-color: rgba(0, 0, 0, 0.25); - border-top-width: 0; -} - -.popover.bottom .arrow:after { - top: 1px; - margin-left: -10px; - border-bottom-color: #ffffff; - border-top-width: 0; -} - -#logGitHub{ - cursor: hand; cursor: pointer; - height: 17px; - width: 17px; -} - -#liGitHub{ - float:right; - margin-top:-4px; - height: 20px; -} - -#liGitHub input { - margin: 4px 10px 5px 10px; - color: black; - font-style: normal; - font-size: 12px; - border: 1px solid #CCC; -} - -#lbloginGit, #lbpasswordGit, #lbrepositoryGit, #lbbranchGit, #lblSignedOff{ - color: black; - font-style: normal; - margin-left: 10px; - margin-top: 10px; -} -#logginMessage , #lbBranches{ - color: black; - font-style: normal; - text-align: center; - margin-top: 10px; -} - -#divlogIn{ - text-align: center; -} - -#signIn{ - display: block; - cursor: pointer; - margin: 10px 10px 5px 10px; - background-color: #92C929; - background-image: -webkit-gradient(linear, left top, left bottom, from(#92C929), to(#1d7900)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient(top, #92C929, #1d7900); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient(top, #92C929, #1d7900); /* FF3.6 */ - background-image: -ms-linear-gradient(top, #92C929, #1d7900); /* IE10 */ - background-image: -o-linear-gradient(top, #92C929, #1d7900); /* Opera 11.10+ */ - background-image: linear-gradient(top, #92C929, #1d7900); - filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#92C929', EndColorStr='#1d7900'); /* IE6–IE9 */ - border-radius: 4px; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box; - box-shadow: 0px 2px 4px rgba(0,0,0, .2); - -moz-box-shadow: 0px 2px 4px rgba(0,0,0, .2); - -webkit-box-shadow: 0px 2px 4px rgba(0,0,0, .2); - text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2); - -moz-text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2); - -webkit-text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2); - border: 1px solid #1d7900; - color: #fff; - font-weight: 300; - font-size: 14px; - padding: 5px 7px 5px 7px; - text-align: center; -} - -#passwordGit, #loginGit, #repositoryGit, #branchGit, #signedOff{ - height:30px; - width: 200px; -} - -#imgGitHub{ - width:20px; -} - -#dropBranches{ - font-size: 12px; - height:20px; -} - -#listBranches, #divGitHubRepoDisplay{ - color: #000000; - display:block; - text-align:center; - margin-top: 15px; - margin-bottom: 15px; -} - -.githubTitle{ - text-align:center; -} - -#preSave{ - display: none; -} diff --git a/src/Makefile b/src/Makefile index 5f151ab..70b0911 100644 --- a/src/Makefile +++ b/src/Makefile @@ -16,7 +16,7 @@ NITCOPT= -all: ../bin/nitc ../bin/nitdoc ../bin/nits ../bin/nitmetrics ../bin/nitg ../bin/nit ../bin/nitx ../bin/netdbg ../bin/dbgcli ../bin/nitdox ../bin/nitunit ../bin/nitlight +all: ../bin/nitc ../bin/nitdoc ../bin/nits ../bin/nitmetrics ../bin/nitg ../bin/nit ../bin/nitx ../bin/netdbg ../bin/dbgcli ../bin/nitunit ../bin/nitlight ../bin/nitc: ../c_src/nitc parser/parser.nit @echo '***************************************************************' @@ -67,13 +67,6 @@ all: ../bin/nitc ../bin/nitdoc ../bin/nits ../bin/nitmetrics ../bin/nitg ../bin/ ./git-gen-version.sh ../bin/nitg ${NITCOPT} -o ../bin/nitx -v nitx.nit -../bin/nitdox: ../bin/nitg - @echo '***************************************************************' - @echo '* Compile nitdcx from NIT source files *' - @echo '***************************************************************' - ./git-gen-version.sh - ../bin/nitg ${NITCOPT} -o ../bin/nitdox -v ni_nitdoc.nit - ../bin/netdbg : ../bin/nitc @echo '***************************************************************' @echo '* Compile netdbg from NIT source files *' diff --git a/src/ni_nitdoc.nit b/src/ni_nitdoc.nit deleted file mode 100644 index 7f2e529..0000000 --- a/src/ni_nitdoc.nit +++ /dev/null @@ -1,1812 +0,0 @@ -# This file is part of NIT ( http://www.nitlanguage.org ). -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Documentation generator for the nit language. -# Generate API documentation in HTML format from nit source code. -module ni_nitdoc - -import model_utils -import modelize_property -import markdown - -# The NitdocContext contains all the knowledge used for doc generation -class NitdocContext - - private var toolcontext = new ToolContext - private var model: Model - private var mbuilder: ModelBuilder - private var mainmodule: MModule - private var class_hierarchy: POSet[MClass] - private var arguments: Array[String] - private var output_dir: nullable String - private var dot_dir: nullable String - private var share_dir: nullable String - private var source: nullable String - private var min_visibility: MVisibility - - private var opt_dir = new OptionString("Directory where doc is generated", "-d", "--dir") - private var opt_source = new OptionString("What link for source (%f for filename, %l for first line, %L for last line)", "--source") - private var opt_sharedir = new OptionString("Directory containing the nitdoc files", "--sharedir") - private var opt_nodot = new OptionBool("Do not generate graphes with graphiviz", "--no-dot") - private var opt_private: OptionBool = new OptionBool("Generate the private API", "--private") - - private var opt_custom_title: OptionString = new OptionString("Title displayed in the top of the Overview page and as suffix of all page names", "--custom-title") - private var opt_custom_menu_items: OptionString = new OptionString("Items displayed in menu before the 'Overview' item (Each item must be enclosed in 'li' tags)", "--custom-menu-items") - private var opt_custom_overview_text: OptionString = new OptionString("Text displayed as introduction of Overview page before the modules list", "--custom-overview-text") - private var opt_custom_footer_text: OptionString = new OptionString("Text displayed as footer of all pages", "--custom-footer-text") - - private var opt_github_origin: OptionString = new OptionString("The branch where edited commits will be pulled into (ex: user:repo:branch)", "--github-origin") - - init do - toolcontext.option_context.add_option(opt_dir) - toolcontext.option_context.add_option(opt_source) - toolcontext.option_context.add_option(opt_sharedir) - toolcontext.option_context.add_option(opt_nodot) - toolcontext.option_context.add_option(opt_private) - toolcontext.option_context.add_option(opt_custom_title) - toolcontext.option_context.add_option(opt_custom_footer_text) - toolcontext.option_context.add_option(opt_custom_overview_text) - toolcontext.option_context.add_option(opt_custom_menu_items) - toolcontext.option_context.add_option(opt_github_origin) - toolcontext.process_options - self.arguments = toolcontext.option_context.rest - - if arguments.length < 1 then - print "usage: nitdoc [options] file..." - toolcontext.option_context.usage - exit(1) - end - - model = new Model - mbuilder = new ModelBuilder(model, toolcontext) - # Here we load an process all modules passed on the command line - var mmodules = mbuilder.parse(arguments) - if mmodules.is_empty then return - mbuilder.run_phases - - if mmodules.length == 1 then - mainmodule = mmodules.first - else - # We need a main module, so we build it by importing all modules - mainmodule = new MModule(model, null, "
    ", new Location(null, 0, 0, 0, 0)) - mainmodule.set_imported_mmodules(mmodules) - end - self.class_hierarchy = mainmodule.flatten_mclass_hierarchy - self.process_options - end - - private fun process_options do - if not opt_dir.value is null then - output_dir = opt_dir.value - else - output_dir = "doc" - end - if not opt_sharedir.value is null then - share_dir = opt_sharedir.value - else - var dir = "NIT_DIR".environ - if dir.is_empty then - dir = "{sys.program_name.dirname}/../share/ni_nitdoc" - else - dir = "{dir}/share/ni_nitdoc" - end - share_dir = dir - if share_dir is null then - print "Error: Cannot locate nitdoc share files. Uses --sharedir or envvar NIT_DIR" - abort - end - dir = "{share_dir.to_s}/scripts/js-facilities.js" - if share_dir is null then - print "Error: Invalid nitdoc share files. Check --sharedir or envvar NIT_DIR" - abort - end - - if opt_private.value then - min_visibility = none_visibility - else - min_visibility = protected_visibility - end - end - source = opt_source.value - end - - fun generate_nitdoc do - # Create destination dir if it's necessary - if not output_dir.file_exists then output_dir.mkdir - sys.system("cp -r {share_dir.to_s}/* {output_dir.to_s}/") - self.dot_dir = null - if not opt_nodot.value then self.dot_dir = output_dir.to_s - overview - search - modules - classes - quicksearch_list - end - - private fun overview do - var overviewpage = new NitdocOverview(self, dot_dir) - overviewpage.save("{output_dir.to_s}/index.html") - end - - private fun search do - var searchpage = new NitdocSearch(self) - searchpage.save("{output_dir.to_s}/search.html") - end - - private fun modules do - for mmodule in model.mmodules do - if mmodule.name == "
    " then continue - var modulepage = new NitdocModule(mmodule, self, dot_dir) - modulepage.save("{output_dir.to_s}/{mmodule.url}") - end - end - - private fun classes do - for mclass in mbuilder.model.mclasses do - var classpage = new NitdocClass(mclass, self, dot_dir, source) - classpage.save("{output_dir.to_s}/{mclass.url}") - end - end - - private fun quicksearch_list do - var file = new OFStream.open("{output_dir.to_s}/quicksearch-list.js") - file.write("var nitdocQuickSearchRawList = \{ ") - for mmodule in model.mmodules do - file.write("\"{mmodule.name}\": [") - file.write("\{txt: \"{mmodule.full_name}\", url:\"{mmodule.url}\" \},") - file.write("],") - end - for mclass in model.mclasses do - if mclass.visibility < min_visibility then continue - file.write("\"{mclass.name}\": [") - file.write("\{txt: \"{mclass.full_name}\", url:\"{mclass.url}\" \},") - file.write("],") - end - var name2mprops = new HashMap[String, Set[MPropDef]] - for mproperty in model.mproperties do - if mproperty.visibility < min_visibility then continue - if mproperty isa MAttribute then continue - if not name2mprops.has_key(mproperty.name) then name2mprops[mproperty.name] = new HashSet[MPropDef] - name2mprops[mproperty.name].add_all(mproperty.mpropdefs) - end - for mproperty, mpropdefs in name2mprops do - file.write("\"{mproperty}\": [") - for mpropdef in mpropdefs do - file.write("\{txt: \"{mpropdef.full_name}\", url:\"{mpropdef.url}\" \},") - end - file.write("],") - end - file.write(" \};") - file.close - end - -end - -# Nitdoc base page -abstract class NitdocPage - - var dot_dir: nullable String - var source: nullable String - var ctx: NitdocContext - - init(ctx: NitdocContext) do - self.ctx = ctx - end - - protected fun head do - append("") - append("") - append("") - append("") - append("") - append("") - append("") - append("") - append("") - append("") - append("") - append("") - append("") - var title = "" - if ctx.opt_custom_title.value != null then - title = " | {ctx.opt_custom_title.value.to_s}" - end - append("{self.title}{title}") - end - - protected fun menu do - if ctx.opt_custom_menu_items.value != null then - append(ctx.opt_custom_menu_items.value.to_s) - end - end - - protected fun title: String is abstract - - protected fun header do - append("
    ") - append("") - append("
    ") - end - - protected fun content is abstract - - protected fun footer do - if ctx.opt_custom_footer_text.value != null then - append("
    {ctx.opt_custom_footer_text.value.to_s}
    ") - end - end - - # Generate a clickable graphviz image using a dot content - protected fun generate_dot(dot: String, name: String, alt: String) do - var output_dir = dot_dir - if output_dir == null then return - var file = new OFStream.open("{output_dir}/{name}.dot") - file.write(dot) - file.close - sys.system("\{ test -f {output_dir}/{name}.png && test -f {output_dir}/{name}.s.dot && diff {output_dir}/{name}.dot {output_dir}/{name}.s.dot >/dev/null 2>&1 ; \} || \{ cp {output_dir}/{name}.dot {output_dir}/{name}.s.dot && dot -Tpng -o{output_dir}/{name}.png -Tcmapx -o{output_dir}/{name}.map {output_dir}/{name}.s.dot ; \}") - append("
    ") - append("{alt}") - append("
    ") - var fmap = new IFStream.open("{output_dir}/{name}.map") - append(fmap.read_all) - fmap.close - end - - # Add a (source) link for a given location - protected fun show_source(l: Location): String - do - if source == null then - return "({l.file.filename.simplify_path})" - else - # THIS IS JUST UGLY ! (but there is no replace yet) - var x = source.split_with("%f") - source = x.join(l.file.filename.simplify_path) - x = source.split_with("%l") - source = x.join(l.line_start.to_s) - x = source.split_with("%L") - source = x.join(l.line_end.to_s) - return " (source)" - end - end - - # Render the page as a html string - protected fun render do - append("") - append("") - head - append("") - append("") - header - var footed = "" - if ctx.opt_custom_footer_text.value != null then footed = "footed" - append("
    ") - content - append("
    ") - footer - append("") - end - - # Append a string to the page - fun append(s: String) do out.write(s) - - # Save html page in the specified file - fun save(file: String) do - self.out = new OFStream.open(file) - render - self.out.close - end - private var out: nullable OFStream -end - -# The overview page -class NitdocOverview - super NitdocPage - private var mbuilder: ModelBuilder - private var mmodules = new Array[MModule] - - init(ctx: NitdocContext, dot_dir: nullable String) do - super(ctx) - self.mbuilder = ctx.mbuilder - self.dot_dir = dot_dir - # get modules - var mmodules = new HashSet[MModule] - for mmodule in mbuilder.model.mmodules do - if mmodule.name == "
    " then continue - var owner = mmodule.public_owner - if owner != null then - mmodules.add(owner) - else - mmodules.add(mmodule) - end - end - # sort modules - var sorter = new MModuleNameSorter - self.mmodules.add_all(mmodules) - sorter.sort(self.mmodules) - end - - redef fun title do return "Overview" - - redef fun menu do - super - append("
  • Overview
  • ") - append("
  • Search
  • ") - end - - redef fun content do - append("
    ") - var title = "Overview" - if ctx.opt_custom_title.value != null then - title = ctx.opt_custom_title.value.to_s - end - append("

    {title}

    ") - var text = "" - if ctx.opt_custom_overview_text.value != null then - text = ctx.opt_custom_overview_text.value.to_s - end - append("
    {text}
    ") - append("
    ") - # module list - append("

    Modules

    ") - append("
      ") - for mmodule in mmodules do - if mbuilder.mmodule2nmodule.has_key(mmodule) then - var amodule = mbuilder.mmodule2nmodule[mmodule] - append("
    • ") - mmodule.html_link(self) - append(" {amodule.short_comment}
    • ") - end - end - append("
    ") - # module graph - process_generate_dot - append("
    ") - append("
    ") - end - - private fun process_generate_dot do - # build poset with public owners - var poset = new POSet[MModule] - for mmodule in mmodules do - poset.add_node(mmodule) - for omodule in mmodules do - if mmodule == omodule then continue - if mmodule.in_importation < omodule then - poset.add_node(omodule) - poset.add_edge(mmodule, omodule) - end - end - end - # build graph - var op = new Buffer - op.append("digraph dep \{ rankdir=BT; node[shape=none,margin=0,width=0,height=0,fontsize=10]; edge[dir=none,color=gray]; ranksep=0.2; nodesep=0.1;\n") - for mmodule in poset do - op.append("\"{mmodule.name}\"[URL=\"{mmodule.url}\"];\n") - for omodule in poset[mmodule].direct_greaters do - op.append("\"{mmodule.name}\"->\"{omodule.name}\";\n") - end - end - op.append("\}\n") - generate_dot(op.to_s, "dep", "Modules hierarchy") - end -end - -# The search page -class NitdocSearch - super NitdocPage - - init(ctx: NitdocContext) do - super(ctx) - self.dot_dir = null - end - - redef fun title do return "Search" - - redef fun menu do - super - append("
  • Overview
  • ") - append("
  • Search
  • ") - end - - redef fun content do - append("
    ") - append("

    {title}

    ") - module_column - classes_column - properties_column - append("
    ") - end - - # Add to content modules column - private fun module_column do - var sorted = ctx.mbuilder.model.mmodule_importation_hierarchy.to_a - var sorter = new MModuleNameSorter - sorter.sort(sorted) - append("
    ") - append("

    Modules

    ") - append("
      ") - for mmodule in sorted do - append("
    • ") - mmodule.html_link(self) - append("
    • ") - end - append("
    ") - append("
    ") - end - - # Add to content classes modules - private fun classes_column do - var sorted = ctx.mbuilder.model.mclasses - var sorter = new MClassNameSorter - sorter.sort(sorted) - append("
    ") - append("

    Classes

    ") - append("
      ") - for mclass in sorted do - if mclass.visibility < ctx.min_visibility then continue - append("
    • ") - mclass.html_link(self) - append("
    • ") - end - append("
    ") - append("
    ") - end - - # Insert the properties column of fullindex page - private fun properties_column do - var sorted = ctx.mbuilder.model.mproperties - var sorter = new MPropertyNameSorter - sorter.sort(sorted) - append("
    ") - append("

    Properties

    ") - append("
      ") - for mproperty in sorted do - if mproperty.visibility < ctx.min_visibility then continue - if mproperty isa MAttribute then continue - append("
    • ") - mproperty.intro.html_link(self) - append(" (") - mproperty.intro.mclassdef.mclass.html_link(self) - append(")
    • ") - end - append("
    ") - append("
    ") - end - -end - -# A module page -class NitdocModule - super NitdocPage - - private var mmodule: MModule - private var mbuilder: ModelBuilder - private var local_mclasses = new HashSet[MClass] - private var intro_mclasses = new HashSet[MClass] - private var redef_mclasses = new HashSet[MClass] - - init(mmodule: MModule, ctx: NitdocContext, dot_dir: nullable String) do - super(ctx) - self.mmodule = mmodule - self.mbuilder = ctx.mbuilder - self.dot_dir = dot_dir - # get local mclasses - for m in mmodule.in_nesting.greaters do - for mclassdef in m.mclassdefs do - if mclassdef.mclass.visibility < ctx.min_visibility then continue - if mclassdef.is_intro then - intro_mclasses.add(mclassdef.mclass) - else - if mclassdef.mclass.mpropdefs_in_module(self).is_empty then continue - redef_mclasses.add(mclassdef.mclass) - end - local_mclasses.add(mclassdef.mclass) - end - end - end - - redef fun title do - if mbuilder.mmodule2nmodule.has_key(mmodule) and not mbuilder.mmodule2nmodule[mmodule].short_comment.is_empty then - var nmodule = mbuilder.mmodule2nmodule[mmodule] - return "{mmodule.html_name} module | {nmodule.short_comment}" - else - return "{mmodule.html_name} module" - end - end - - redef fun menu do - super - append("
  • Overview
  • ") - append("
  • {mmodule.html_name}
  • ") - append("
  • Search
  • ") - end - - redef fun content do - append("") - append("
    ") - module_doc - append("
    ") - end - - private fun classes_column do - var sorter = new MClassNameSorter - var sorted = new Array[MClass] - sorted.add_all(intro_mclasses) - sorted.add_all(redef_mclasses) - sorter.sort(sorted) - if not sorted.is_empty then - append("") - end - end - - private fun importation_column do - append("") - end - - private fun display_module_list(list: Array[MModule]) do - append("
      ") - var sorter = new MModuleNameSorter - sorter.sort(list) - for m in list do - append("
    • ") - m.html_link(self) - append("
    • ") - end - append("
    ") - end - - private fun module_doc do - # title - append("

    {mmodule.html_name}

    ") - append("
    ") - mmodule.html_signature(self) - append("
    ") - # comment - mmodule.html_comment(self) - process_generate_dot - # classes - var class_sorter = new MClassNameSorter - # intro - if not intro_mclasses.is_empty then - var sorted = new Array[MClass] - sorted.add_all(intro_mclasses) - class_sorter.sort(sorted) - append("
    ") - append("

    Introduced classes

    ") - for mclass in sorted do mclass.html_full_desc(self) - append("
    ") - end - # redefs - var redefs = new Array[MClass] - for mclass in redef_mclasses do if not intro_mclasses.has(mclass) then redefs.add(mclass) - class_sorter.sort(redefs) - if not redefs.is_empty then - append("
    ") - append("

    Refined classes

    ") - for mclass in redefs do mclass.html_full_desc(self) - append("
    ") - end - end - - private fun process_generate_dot do - # build poset with public owners - var poset = new POSet[MModule] - for mmodule in self.mmodule.in_importation.poset do - if mmodule.name == "
    " then continue - #if mmodule.public_owner != null then continue - if not mmodule.in_importation < self.mmodule and not self.mmodule.in_importation < mmodule and mmodule != self.mmodule then continue - poset.add_node(mmodule) - for omodule in mmodule.in_importation.poset do - if mmodule == omodule then continue - if omodule.name == "
    " then continue - if not omodule.in_importation < self.mmodule and not self.mmodule.in_importation < omodule then continue - if omodule.in_importation < mmodule then - poset.add_node(omodule) - poset.add_edge(omodule, mmodule) - end - if mmodule.in_importation < omodule then - poset.add_node(omodule) - poset.add_edge(mmodule, omodule) - end - #if omodule.public_owner != null then continue - #if mmodule.in_importation < omodule then - #poset.add_node(omodule) - #poset.add_edge(mmodule, omodule) - #end - end - end - # build graph - var op = new Buffer - var name = "dep_{mmodule.name}" - op.append("digraph {name} \{ rankdir=BT; node[shape=none,margin=0,width=0,height=0,fontsize=10]; edge[dir=none,color=gray]; ranksep=0.2; nodesep=0.1;\n") - for mmodule in poset do - if mmodule == self.mmodule then - op.append("\"{mmodule.name}\"[shape=box,margin=0.03];\n") - else - op.append("\"{mmodule.name}\"[URL=\"{mmodule.url}\"];\n") - end - for omodule in poset[mmodule].direct_greaters do - op.append("\"{mmodule.name}\"->\"{omodule.name}\";\n") - end - end - op.append("\}\n") - generate_dot(op.to_s, name, "Dependency graph for module {mmodule.name}") - end -end - -# A class page -class NitdocClass - super NitdocPage - - private var mclass: MClass - private var vtypes = new HashSet[MVirtualTypeDef] - private var consts = new HashSet[MMethodDef] - private var meths = new HashSet[MMethodDef] - private var inherited = new HashSet[MPropDef] - - init(mclass: MClass, ctx: NitdocContext, dot_dir: nullable String, source: nullable String) do - super(ctx) - self.mclass = mclass - self.dot_dir = dot_dir - self.source = source - # load properties - var locals = new HashSet[MProperty] - for mclassdef in mclass.mclassdefs do - for mpropdef in mclassdef.mpropdefs do - if mpropdef.mproperty.visibility < ctx.min_visibility then continue - if mpropdef isa MVirtualTypeDef then vtypes.add(mpropdef) - if mpropdef isa MMethodDef then - if mpropdef.mproperty.is_init then - consts.add(mpropdef) - else - meths.add(mpropdef) - end - end - locals.add(mpropdef.mproperty) - end - end - # get inherited properties - for pclass in mclass.in_hierarchy(ctx.mainmodule).greaters do - if pclass == mclass then continue - for pclassdef in pclass.mclassdefs do - for mprop in pclassdef.intro_mproperties do - var mpropdef = mprop.intro - if mprop.visibility < ctx.min_visibility then continue # skip if not correct visibiility - if locals.has(mprop) then continue # skip if local - if mclass.name != "Object" and mprop.intro_mclassdef.mclass.name == "Object" and (mprop.visibility <= protected_visibility or mprop.intro_mclassdef.mmodule.public_owner == null or mprop.intro_mclassdef.mmodule.public_owner.name != "standard") then continue # skip toplevels - if mpropdef isa MVirtualTypeDef then vtypes.add(mpropdef) - if mpropdef isa MMethodDef then - if mpropdef.mproperty.is_init then - consts.add(mpropdef) - else - meths.add(mpropdef) - end - end - inherited.add(mpropdef) - end - end - end - end - - redef fun title do - var nclass = ctx.mbuilder.mclassdef2nclassdef[mclass.intro] - if nclass isa AStdClassdef then - return "{mclass.html_name} class | {nclass.short_comment}" - else - return "{mclass.html_name} class" - end - end - - redef fun menu do - super - append("
  • Overview
  • ") - var public_owner = mclass.public_owner - if public_owner is null then - append("
  • ") - mclass.intro_mmodule.html_link(self) - append("
  • ") - else - append("
  • ") - public_owner.html_link(self) - append("
  • ") - end - append("
  • {mclass.html_name}
  • ") - append("
  • Search
  • ") - end - - redef fun content do - append("") - append("
    ") - class_doc - append("
    ") - end - - private fun properties_column do - var sorter = new MPropDefNameSorter - append("") - end - - private fun inheritance_column do - var sorted = new Array[MClass] - var sorterp = new MClassNameSorter - append("") - end - - private fun class_doc do - # title - append("

    {mclass.html_name}{mclass.html_short_signature}

    ") - append("
    ") - if mclass.visibility < public_visibility then append("{mclass.visibility.to_s} ") - append("{mclass.kind.to_s} ") - mclass.html_namespace(self) - append("{mclass.html_short_signature}
    ") - # comment - mclass.html_comment(self) - process_generate_dot - # concerns - var concern2meths = new ArrayMap[MModule, Array[MMethodDef]] - var sorted_meths = new Array[MMethodDef] - var sorted = new Array[MModule] - sorted_meths.add_all(meths) - ctx.mainmodule.linearize_mpropdefs(sorted_meths) - for meth in meths do - if inherited.has(meth) then continue - var mmodule = meth.mclassdef.mmodule - if not concern2meths.has_key(mmodule) then - sorted.add(mmodule) - concern2meths[mmodule] = new Array[MMethodDef] - end - concern2meths[mmodule].add(meth) - end - var sections = new ArrayMap[MModule, Array[MModule]] - for mmodule in concern2meths.keys do - var owner = mmodule.public_owner - if owner == null then owner = mmodule - if not sections.has_key(owner) then sections[owner] = new Array[MModule] - if owner != mmodule then sections[owner].add(mmodule) - end - append("
    ") - append("

    Concerns

    ") - append("
      ") - for owner, mmodules in sections do - var nowner = ctx.mbuilder.mmodule2nmodule[owner] - append("
    • ") - if nowner.short_comment.is_empty then - append("{owner.html_name}") - else - append("{owner.html_name}: {nowner.short_comment}") - end - if not mmodules.is_empty then - append("
        ") - for mmodule in mmodules do - var nmodule = ctx.mbuilder.mmodule2nmodule[mmodule] - if nmodule.short_comment.is_empty then - append("
      • {mmodule.html_name}
      • ") - else - append("
      • {mmodule.html_name}: {nmodule.short_comment}
      • ") - end - end - append("
      ") - end - append("
    • ") - end - append("
    ") - append("
    ") - # properties - var prop_sorter = new MPropDefNameSorter - var lmmodule = new List[MModule] - var nclass = ctx.mbuilder.mclassdef2nclassdef[mclass.intro] - # virtual and formal types - var local_vtypes = new Array[MVirtualTypeDef] - for vt in vtypes do if not inherited.has(vt) then local_vtypes.add(vt) - if local_vtypes.length > 0 or mclass.arity > 0 then - append("
    ") - append("

    Formal and Virtual Types

    ") - # formal types - if mclass.arity > 0 and nclass isa AStdClassdef then - for ft, bound in mclass.parameter_types do - append("
    ") - append("

    {ft}: ") - bound.html_link(self) - append("

    ") - append("
    formal generic type
    ") - append("
    ") - end - end - # virtual types - prop_sorter.sort(local_vtypes) - for prop in local_vtypes do prop.html_full_desc(self, self.mclass) - append("
    ") - end - # constructors - var local_consts = new Array[MMethodDef] - for const in consts do if not inherited.has(const) then local_consts.add(const) - prop_sorter.sort(local_consts) - if local_consts.length > 0 then - append("
    ") - append("

    Constructors

    ") - for prop in local_consts do prop.html_full_desc(self, self.mclass) - append("
    ") - end - # methods - if not concern2meths.is_empty then - append("
    ") - append("

    Methods

    ") - for owner, mmodules in sections do - append("") - if owner != mclass.intro_mmodule and owner != mclass.public_owner then - var nowner = ctx.mbuilder.mmodule2nmodule[owner] - append("

    Methods refined in ") - owner.html_link(self) - append("

    ") - append("

    ") - owner.html_link(self) - if not nowner.short_comment.is_empty then - append(": {nowner.short_comment}") - end - append("

    ") - end - if concern2meths.has_key(owner) then - var mmethods = concern2meths[owner] - prop_sorter.sort(mmethods) - for prop in mmethods do prop.html_full_desc(self, self.mclass) - end - for mmodule in mmodules do - append("") - var nmodule = ctx.mbuilder.mmodule2nmodule[mmodule] - if mmodule != mclass.intro_mmodule and mmodule != mclass.public_owner then - append("

    ") - mmodule.html_link(self) - if not nmodule.short_comment.is_empty then - append(": {nmodule.short_comment}") - end - append("

    ") - end - var mmethods = concern2meths[mmodule] - prop_sorter.sort(mmethods) - for prop in mmethods do prop.html_full_desc(self, self.mclass) - end - end - append("
    ") - end - # inherited properties - if inherited.length > 0 then - var sorted_inherited = new Array[MPropDef] - sorted_inherited.add_all(inherited) - ctx.mainmodule.linearize_mpropdefs(sorted_inherited) - var classes = new ArrayMap[MClass, Array[MPropDef]] - for mmethod in sorted_inherited.reversed do - var mclass = mmethod.mclassdef.mclass - if not classes.has_key(mclass) then classes[mclass] = new Array[MPropDef] - classes[mclass].add(mmethod) - end - append("
    ") - append("

    Inherited Properties

    ") - for c, mmethods in classes do - prop_sorter.sort(mmethods) - append("

    Defined in ") - c.html_link(self) - append(": ") - for i in [0..mmethods.length[ do - var mmethod = mmethods[i] - mmethod.html_link(self) - if i <= mmethods.length - 1 then append(", ") - end - append("

    ") - end - append("
    ") - end - end - - private fun process_generate_dot do - var pe = ctx.class_hierarchy[mclass] - var cla = new HashSet[MClass] - var sm = new HashSet[MClass] - var sm2 = new HashSet[MClass] - sm.add(mclass) - while cla.length + sm.length < 10 and sm.length > 0 do - cla.add_all(sm) - sm2.clear - for x in sm do - sm2.add_all(pe.poset[x].direct_smallers) - end - var t = sm - sm = sm2 - sm2 = t - end - cla.add_all(pe.greaters) - - var op = new Buffer - var name = "dep_{mclass.name}" - op.append("digraph {name} \{ rankdir=BT; node[shape=none,margin=0,width=0,height=0,fontsize=10]; edge[dir=none,color=gray]; ranksep=0.2; nodesep=0.1;\n") - for c in cla do - if c == mclass then - op.append("\"{c.name}\"[shape=box,margin=0.03];\n") - else - op.append("\"{c.name}\"[URL=\"{c.url}\"];\n") - end - for c2 in pe.poset[c].direct_greaters do - if not cla.has(c2) then continue - op.append("\"{c.name}\"->\"{c2.name}\";\n") - end - if not pe.poset[c].direct_smallers.is_empty then - var others = true - for c2 in pe.poset[c].direct_smallers do - if cla.has(c2) then others = false - end - if others then - op.append("\"{c.name}...\"[label=\"\"];\n") - op.append("\"{c.name}...\"->\"{c.name}\"[style=dotted];\n") - end - end - end - op.append("\}\n") - generate_dot(op.to_s, name, "Dependency graph for class {mclass.name}") - end -end - -# -# Model redefs -# - -redef class MModule - # Return the HTML escaped name of the module - private fun html_name: String do return name.html_escape - - # URL to nitdoc page - # module_owner_name.html - private fun url: String do - if url_cache == null then - var res = new Buffer - res.append("module_") - var mowner = public_owner - if mowner != null then - res.append("{public_owner.name}_") - end - res.append("{self.name}.html") - url_cache = res.to_s - end - return url_cache.as(not null) - end - private var url_cache: nullable String - - # html anchor id for the module in a nitdoc page - # MOD_owner_name - private fun anchor: String do - if anchor_cache == null then - var res = new Buffer - res.append("MOD_") - var mowner = public_owner - if mowner != null then - res.append("{public_owner.name}_") - end - res.append(self.name) - anchor_cache = res.to_s - end - return anchor_cache.as(not null) - end - private var anchor_cache: nullable String - - # Return a link (html a tag) to the nitdoc module page - # html_name - private fun html_link(page: NitdocPage) do - if html_link_cache == null then - var res = new Buffer - if page.ctx.mbuilder.mmodule2nmodule.has_key(self) then - res.append("{html_name}") - else - res.append("{html_name}") - end - html_link_cache = res.to_s - end - page.append(html_link_cache.as(not null)) - end - private var html_link_cache: nullable String - - # Return the module signature decorated with html - # module html_full_namespace - private fun html_signature(page: NitdocPage) do - page.append("module ") - html_full_namespace(page) - page.append("") - end - - # Return the module full namespace decorated with html - # public_owner.html_namespace::html_link - private fun html_full_namespace(page: NitdocPage) do - page.append("") - var mowner = public_owner - if mowner != null then - public_owner.html_namespace(page) - page.append("::") - end - html_link(page) - page.append("") - end - - # Return the module full namespace decorated with html - # public_owner.html_namespace - private fun html_namespace(page: NitdocPage) do - page.append("") - var mowner = public_owner - if mowner != null then - public_owner.html_namespace(page) - else - html_link(page) - end - page.append("") - end - - # Return the full comment of the module decorated with html - private fun html_comment(page: NitdocPage) do - page.append("
    ") - if page.ctx.mbuilder.mmodule2nmodule.has_key(self) then - var nmodule = page.ctx.mbuilder.mmodule2nmodule[self] - page.append("") - if nmodule.full_comment == "" then - page.append("

    ") - page.append("no comment for ") - else - page.append("

    {nmodule.full_markdown}
    ") - page.append("

    ") - end - page.append("definition in ") - self.html_full_namespace(page) - page.append(" {page.show_source(nmodule.location)}

    ") - end - page.append("
    ") - end - - private fun has_mclassdef_for(mclass: MClass): Bool do - for mmodule in self.in_nesting.greaters do - for mclassdef in mmodule.mclassdefs do - if mclassdef.mclass == mclass then return true - end - end - return false - end - - private fun has_mclassdef(mclassdef: MClassDef): Bool do - for mmodule in self.in_nesting.greaters do - for oclassdef in mmodule.mclassdefs do - if mclassdef == oclassdef then return true - end - end - return false - end -end - -redef class MClass - # Return the HTML escaped name of the module - private fun html_name: String do return name.html_escape - - # URL to nitdoc page - # class_owner_name.html - private fun url: String do - return "class_{public_owner}_{name}.html" - end - - # html anchor id for the class in a nitdoc page - # MOD_owner_name - private fun anchor: String do - if anchor_cache == null then - anchor_cache = "CLASS_{public_owner.name}_{name}" - end - return anchor_cache.as(not null) - end - private var anchor_cache: nullable String - - # Return a link (with signature) to the nitdoc class page - # html_name(signature) - private fun html_link(page: NitdocPage) do - if html_link_cache == null then - var res = new Buffer - res.append("{html_name}{html_short_signature}") - html_link_cache = res.to_s - end - page.append(html_link_cache.as(not null)) - end - private var html_link_cache: nullable String - - # Return a short link (without signature) to the nitdoc class page - # html_name - private fun html_short_link(page: NitdocPage) do - if html_short_link_cache == null then - var res = new Buffer - res.append("{html_name}") - html_short_link_cache = res.to_s - end - page.append(html_short_link_cache.as(not null)) - end - private var html_short_link_cache: nullable String - - # Return a link (with signature) to the class anchor - # html_name - private fun html_link_anchor(page: NitdocPage) do - if html_link_anchor_cache == null then - var res = new Buffer - res.append("{html_name}{html_short_signature}") - html_link_anchor_cache = res.to_s - end - page.append(html_link_anchor_cache.as(not null)) - end - private var html_link_anchor_cache: nullable String - - # Return the generic signature of the class with bounds - # [E: MType, F: MType] - private fun html_signature(page: NitdocPage) do - if arity > 0 then - page.append("[") - for i in [0..intro.parameter_names.length[ do - page.append("{intro.parameter_names[i]}: ") - intro.bound_mtype.arguments[i].html_link(page) - if i < intro.parameter_names.length - 1 then page.append(", ") - end - page.append("]") - end - end - - # Return the generic signature of the class without bounds - # [E, F] - private fun html_short_signature: String do - if arity > 0 then - return "[{intro.parameter_names.join(", ")}]" - else - return "" - end - end - - # Return the class namespace decorated with html - # intro_module::html_short_link - private fun html_namespace(page: NitdocPage) do - intro_mmodule.html_namespace(page) - page.append("::") - html_short_link(page) - page.append("") - end - - # Return a list item for the mclass - #
  • html_link
  • - private fun html_sidebar_item(page: NitdocModule) do - if page.mmodule.in_nesting.greaters.has(intro.mmodule) then - page.append("
  • ") - page.append("I") - html_link_anchor(page) - else if page.mmodule.has_mclassdef_for(self) then - page.append("
  • ") - page.append("R") - html_link_anchor(page) - else - page.append("
  • ") - page.append("H") - html_link(page) - end - page.append("
  • ") - end - - private fun html_full_desc(page: NitdocModule) do - var is_redef = not page.mmodule.in_nesting.greaters.has(intro.mmodule) - var redefs = mpropdefs_in_module(page) - if not is_redef or not redefs.is_empty then - var classes = new Array[String] - classes.add(kind.to_s) - if is_redef then classes.add("redef") - classes.add(visibility.to_s) - page.append("
    ") - page.append("

    ") - page.append("") - html_short_link(page) - html_signature(page) - page.append("

    ") - html_info(page) - html_comment(page) - page.append("
    ") - end - end - - private fun html_info(page: NitdocModule) do - page.append("
    ") - if visibility < public_visibility then page.append("{visibility.to_s} ") - if not page.mmodule.in_nesting.greaters.has(intro.mmodule) then page.append("redef ") - page.append("{kind} ") - html_namespace(page) - page.append("{html_short_signature}
    ") - end - - private fun html_comment(page: NitdocPage) do - page.append("
    ") - if page isa NitdocModule then - page.mmodule.linearize_mclassdefs(mclassdefs) - # comments for each mclassdef contained in current mmodule - for mclassdef in mclassdefs do - if not mclassdef.is_intro and not page.mmodule.mclassdefs.has(mclassdef) then continue - if page.ctx.mbuilder.mclassdef2nclassdef.has_key(mclassdef) then - var nclass = page.ctx.mbuilder.mclassdef2nclassdef[mclassdef] - if nclass isa AStdClassdef then - page.append("") - if nclass.full_comment == "" then - page.append("

    ") - page.append("no comment for ") - else - page.append("

    {nclass.full_markdown}
    ") - page.append("

    ") - end - if mclassdef.is_intro then - page.append("introduction in ") - else - page.append("refinement in ") - end - mclassdef.mmodule.html_full_namespace(page) - page.append(" {page.show_source(nclass.location)}

    ") - end - end - end - else - # comments for intro - if page.ctx.mbuilder.mclassdef2nclassdef.has_key(intro) then - var nclass = page.ctx.mbuilder.mclassdef2nclassdef[intro] - if nclass isa AStdClassdef then - page.append("") - if nclass.full_comment == "" then - page.append("

    ") - page.append("no comment for ") - else - page.append("

    {nclass.full_markdown}
    ") - page.append("

    ") - end - page.append("introduction in ") - intro.mmodule.html_full_namespace(page) - page.append(" {page.show_source(nclass.location)}

    ") - end - end - end - page.append("
    ") - end - - private fun mpropdefs_in_module(page: NitdocModule): Array[MPropDef] do - var res = new Array[MPropDef] - page.mmodule.linearize_mclassdefs(mclassdefs) - for mclassdef in mclassdefs do - if not page.mmodule.mclassdefs.has(mclassdef) then continue - if mclassdef.is_intro then continue - for mpropdef in mclassdef.mpropdefs do - if mpropdef.mproperty.visibility < page.ctx.min_visibility then continue - if mpropdef isa MAttributeDef then continue - res.add(mpropdef) - end - end - return res - end -end - -redef class MProperty - # Escape name for html output - private fun html_name: String do return name.html_escape - - # Return the property namespace decorated with html - # intro_module::intro_class::html_link - private fun html_namespace(page: NitdocPage) do - intro_mclassdef.mclass.html_namespace(page) - page.append(intro_mclassdef.mclass.html_short_signature) - page.append("::") - intro.html_link(page) - page.append("") - end -end - -redef class MType - # Link to the type definition in the nitdoc page - private fun html_link(page: NitdocPage) is abstract -end - -redef class MClassType - redef fun html_link(page) do mclass.html_link(page) -end - -redef class MNullableType - redef fun html_link(page) do - page.append("nullable ") - mtype.html_link(page) - end -end - -redef class MGenericType - redef fun html_link(page) do - page.append("{mclass.html_name}[") - for i in [0..arguments.length[ do - arguments[i].html_link(page) - if i < arguments.length - 1 then page.append(", ") - end - page.append("]") - end -end - -redef class MParameterType - redef fun html_link(page) do - var name = mclass.intro.parameter_names[rank] - page.append("{name}") - end -end - -redef class MVirtualType - redef fun html_link(page) do mproperty.intro.html_link(page) -end - -redef class MClassDef - # Return the classdef namespace decorated with html - private fun html_namespace(page: NitdocPage) do - mmodule.html_full_namespace(page) - page.append("::") - mclass.html_link(page) - page.append("") - end -end - -redef class MPropDef - # Return the full qualified name of the mpropdef - # module::classdef::name - private fun full_name: String do - return "{mclassdef.mclass.public_owner.name}::{mclassdef.mclass.name}::{mproperty.name}" - end - - # URL into the nitdoc page - # class_owner_name.html#anchor - private fun url: String do - if url_cache == null then - url_cache = "{mclassdef.mclass.url}#{anchor}" - end - return url_cache.as(not null) - end - private var url_cache: nullable String - - # html anchor id for the property in a nitdoc class page - # PROP_mclass_propertyname - private fun anchor: String do - if anchor_cache == null then - anchor_cache = "PROP_{mclassdef.mclass.public_owner.name}_{mproperty.name.replace(" ", "_")}" - end - return anchor_cache.as(not null) - end - private var anchor_cache: nullable String - - # Return a link to property into the nitdoc class page - # html_name - private fun html_link(page: NitdocPage) do - if html_link_cache == null then - var res = new Buffer - if page.ctx.mbuilder.mpropdef2npropdef.has_key(self) then - var nprop = page.ctx.mbuilder.mpropdef2npropdef[self] - res.append("{mproperty.html_name}") - else - res.append("{mproperty.html_name}") - end - html_link_cache = res.to_s - end - page.append(html_link_cache.as(not null)) - end - private var html_link_cache: nullable String - - # Return a list item for the mpropdef - #
  • html_link
  • - private fun html_sidebar_item(page: NitdocClass) do - if is_intro and mclassdef.mclass == page.mclass then - page.append("
  • ") - page.append("I") - else if is_intro and mclassdef.mclass != page.mclass then - page.append("
  • ") - page.append("H") - else - page.append("
  • ") - page.append("R") - end - html_link(page) - page.append("
  • ") - end - - private fun html_full_desc(page: NitdocPage, ctx: MClass) is abstract - private fun html_info(page: NitdocPage, ctx: MClass) is abstract - - private fun html_comment(page: NitdocPage) do - page.append("
    ") - if not is_intro then - if page.ctx.mbuilder.mpropdef2npropdef.has_key(mproperty.intro) then - var intro_nprop = page.ctx.mbuilder.mpropdef2npropdef[mproperty.intro] - page.append("") - if intro_nprop.full_comment.is_empty then - page.append("

    ") - page.append("no comment for ") - else - page.append("

    {intro_nprop.full_markdown}
    ") - page.append("

    ") - end - page.append("introduction in ") - mproperty.intro.mclassdef.html_namespace(page) - page.append(" {page.show_source(intro_nprop.location)}

    ") - end - end - if page.ctx.mbuilder.mpropdef2npropdef.has_key(self) then - var nprop = page.ctx.mbuilder.mpropdef2npropdef[self] - page.append("") - if nprop.full_comment == "" then - page.append("

    ") - page.append("no comment for ") - else - page.append("

    {nprop.full_markdown}
    ") - page.append("

    ") - end - if is_intro then - page.append("introduction in ") - else - page.append("redefinition in ") - end - mclassdef.html_namespace(page) - page.append(" {page.show_source(nprop.location)}

    ") - end - page.append("
    ") - end -end - -redef class MMethodDef - redef fun html_full_desc(page, ctx) do - var classes = new Array[String] - var is_redef = mproperty.intro_mclassdef.mclass != ctx - if mproperty.is_init then - classes.add("init") - else - classes.add("fun") - end - if is_redef then classes.add("redef") - classes.add(mproperty.visibility.to_s) - page.append("
    ") - if page.ctx.mbuilder.mpropdef2npropdef.has_key(self) then - page.append("

    ") - page.append("{mproperty.html_name}") - msignature.html_signature(page) - page.append("

    ") - else - page.append("

    ") - page.append("init") - msignature.html_signature(page) - page.append("

    ") - end - html_info(page, ctx) - html_comment(page) - page.append("
    ") - end - - redef fun html_info(page, ctx) do - page.append("
    ") - if mproperty.visibility < public_visibility then page.append("{mproperty.visibility.to_s} ") - if mproperty.intro_mclassdef.mclass != ctx then page.append("redef ") - if mproperty.is_init then - page.append("init ") - else - page.append("fun ") - end - mproperty.html_namespace(page) - page.append("
    ") - end -end - -redef class MVirtualTypeDef - redef fun html_full_desc(page, ctx) do - var is_redef = mproperty.intro_mclassdef.mclass != ctx - var classes = new Array[String] - classes.add("type") - if is_redef then classes.add("redef") - classes.add(mproperty.visibility.to_s) - page.append("
    ") - page.append("

    {mproperty.html_name}: ") - bound.html_link(page) - page.append("

    ") - html_info(page, ctx) - html_comment(page) - page.append("
    ") - end - - redef fun html_info(page, ctx) do - page.append("
    ") - if mproperty.intro_mclassdef.mclass != ctx then page.append("redef ") - page.append("type ") - mproperty.html_namespace(page) - page.append("
    ") - end -end - -redef class MSignature - private fun html_signature(page: NitdocPage) do - if not mparameters.is_empty then - page.append("(") - for i in [0..mparameters.length[ do - mparameters[i].html_link(page) - if i < mparameters.length - 1 then page.append(", ") - end - page.append(")") - end - if return_mtype != null then - page.append(": ") - return_mtype.html_link(page) - end - end - - private fun untyped_signature(page: NitdocPage): String do - var res = new Buffer - if not mparameters.is_empty then - res.append("(") - for i in [0..mparameters.length[ do - res.append(mparameters[i].name) - if i < mparameters.length - 1 then res.append(", ") - end - res.append(")") - end - return res.to_s - end -end - -redef class MParameter - private fun html_link(page: NitdocPage) do - page.append("{name}: ") - mtype.html_link(page) - if is_vararg then page.append("...") - end -end - -# -# Nodes redefs -# - -redef class ADoc - private fun short_comment: String do - return n_comment.first.text.substring_from(2).replace("\n", "").html_escape - end - - private fun full_comment: String do - var res = new Buffer - for t in n_comment do - var text = t.text - text = text.substring_from(1) - if text.first == ' ' then text = text.substring_from(1) - res.append(text.html_escape) - end - var str = res.to_s - return str.substring(0, str.length - 1) - end -end - -redef class AModule - private fun short_comment: String do - if n_moduledecl != null and n_moduledecl.n_doc != null then - return n_moduledecl.n_doc.short_comment - end - return "" - end - - private fun full_comment: String do - if n_moduledecl != null and n_moduledecl.n_doc != null then - return n_moduledecl.n_doc.full_comment - end - return "" - end - - private fun full_markdown: String do - if n_moduledecl != null and n_moduledecl.n_doc != null then - return n_moduledecl.n_doc.full_markdown.html - end - return "" - end - - private fun doc_location: Location do - if n_moduledecl != null and n_moduledecl.n_doc != null then - return n_moduledecl.n_doc.location - end - return location - end -end - -redef class AStdClassdef - private fun short_comment: String do - if n_doc != null then return n_doc.short_comment - return "" - end - - private fun full_comment: String do - if n_doc != null then return n_doc.full_comment - return "" - end - - private fun full_markdown: String do - if n_doc != null then return n_doc.full_markdown.html - return "" - end - - private fun doc_location: Location do - if n_doc != null then return n_doc.location - return location - end -end - -redef class APropdef - private fun short_comment: String do - if n_doc != null then return n_doc.short_comment - return "" - end - - private fun full_comment: String do - if n_doc != null then return n_doc.full_comment - return "" - end - - private fun full_markdown: String do - if n_doc != null then return n_doc.full_markdown.html - return "" - end - - private fun doc_location: Location do - if n_doc != null then return n_doc.location - return location - end -end - - -var nitdoc = new NitdocContext -nitdoc.generate_nitdoc diff --git a/src/nitdoc.nit b/src/nitdoc.nit index f3823bf..0adf6a4 100644 --- a/src/nitdoc.nit +++ b/src/nitdoc.nit @@ -1,12 +1,10 @@ # This file is part of NIT ( http://www.nitlanguage.org ). # -# Copyright 2008 Jean Privat -# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -14,1763 +12,1849 @@ # See the License for the specific language governing permissions and # limitations under the License. -# The main module of the nitdoc program +# Documentation generator for the nit language. +# Generate API documentation in HTML format from nit source code. module nitdoc -import syntax -private import utils -import abstracttool - - -# Store knowledge and facilities to generate files -class DocContext - super AbstractCompiler - # Destination directory - readable writable var _dir: String = "doc" - # GitHub Repo name - var github_repo: nullable String = null - # Content of a generated file - var _stage_context: StageContext = new StageContext(null) - - # Add a string in the content - fun add(s: String) do - _stage_context.content.add(s) - _stage_context.validate = true - end - - # Add a string in the content iff some other string are added - fun stage(s: String) do _stage_context.content.add(s) - - # Create a new stage in the content - fun open_stage do _stage_context = new StageContext(_stage_context) - - # Close the current stage in the content - fun close_stage - do - var s = _stage_context.parent - if _stage_context.validate then - s.content.add_all(_stage_context.content) - s.validate = true - end - assert s != null - _stage_context = s - end - - # Write the content to a new file - fun write_to(filename: String) - do - var f = new OFStream.open(filename) - for s in _stage_context.content do - f.write(s) - end - f.close - end - - # Start a new file - fun clear - do - _stage_context = new StageContext(null) - end - - # Sorter of entities in alphabetical order - var _sorter: AlphaSorter[MMEntity] = new AlphaSorter[MMEntity] - - # Sort entities in the alphabetical order - fun sort(array: Array[MMEntity]) - do - _sorter.sort(array) - end - - readable var _opt_dir: OptionString = new OptionString("Directory where doc is generated", "-d", "--dir") - readable var _opt_source: OptionString = new OptionString("What link for source (%f for filename, %l for first line, %L for last line)", "--source") - readable var _opt_public: OptionBool = new OptionBool("Generate only the public API", "--public") - readable var _opt_private: OptionBool = new OptionBool("Generate the private API", "--private") - readable var _opt_nodot: OptionBool = new OptionBool("Do not generate graphes with graphviz", "--no-dot") - readable var _opt_sharedir: OptionString = new OptionString("Directory containing the nitdoc files", "--sharedir") - - readable var _opt_custom_menu_items: OptionString = new OptionString("Items displayed in menu before the 'Overview' item (Each item must be enclosed in 'li' tags)", "--custom-menu-items") - readable var _opt_custom_title: OptionString = new OptionString("Title displayed in the top of the Overview page and as suffix of all page names", "--custom-title") - readable var _opt_custom_overview_text: OptionString = new OptionString("Text displayed as introduction of Overview page before the modules list", "--custom-overview-text") - readable var _opt_custom_footer_text: OptionString = new OptionString("Text displayed as footer of all pages", "--custom-footer-text") - readable var _opt_github_repo_name: OptionString = new OptionString("GitHub repo name, example: --github MyRepoName", "--github") - var sharedir: nullable String - - fun public_only: Bool - do - if self._opt_public.value == true then return true - return false - end - - fun with_private: Bool - do - if self._opt_private.value == true then return true - return false - end - - # The current processed filename - var filename: String - - # The main virtual module - var mainmod: nullable MMVirtualModule - - redef fun perform_work(mods) - do - mainmod = new MMVirtualModule(self, mods) - - dir.mkdir - - sys.system("cp -r '{sharedir.to_s}'/* {dir}/") - - # Compute the set of direct owned nested modules - var owns = new HashMap[MMModule, Array[MMModule]] - for mod in modules do - owns[mod] = new Array[MMModule]# [mod] - end - for mod in modules do - if mod == mainmod then continue - var d = mod.directory - loop - var o = d.owner - if o != null and o != mod then - owns[o].add(mod) - end - var dp = d.parent - if dp == null or dp == d then break - d = dp - end - end - - # Builds the various module hierarchies - var mnh = new PartialOrder[MMModule] # nested module hierarchy - var tmh = new PartialOrder[MMModule] # top module import hierrchy - var ms = mainmod.mhe.linear_extension.reversed - for m in ms do - if ms == mainmod then continue - m.mnhe_ = mnh.add(m, owns[m]) - var pub = new Array[MMModule] - for m2 in m.mhe.greaters do - if m2.toplevel_owner != m2 and m2.toplevel_owner != m.toplevel_owner then continue - if m.mnhe <= m2 then continue - if m.visibility_for(m2) <= 0 then - # nothing - else if m.visibility_for(m2) == 1 then - else - pub.add(m2) - end - end - m.tmhe_ = tmh.add(m, pub) - end - - var head = "" + - "\n" + - "\n" + - "\n" + - "" - - var custom_items = "" - if self._opt_custom_menu_items.value != null then custom_items = self._opt_custom_menu_items.value.as(not null) - - var action_bar = "
    \n" - var custom_title = "Nitdoc" - if self._opt_custom_title.value != null then custom_title = self._opt_custom_title.value.as(not null) - - var overview_text = "" - if self._opt_custom_overview_text.value != null then overview_text = self._opt_custom_overview_text.value.as(not null) - - var footer_text = "" - if self._opt_custom_footer_text.value != null then footer_text = self._opt_custom_footer_text.value.as(not null) - - # generate the index - self.filename = "index.html" - clear - add("") - add("{head}Overview | {custom_title}\n") - add(action_bar) - add("
    ") - add("
    ") - add("

    {custom_title}

    \n
    {overview_text}

    Modules

      ") - var modss = mainmod.mhe.greaters_and_self.to_a - sort(modss) - for mod in modss do - if not mod.is_toplevel then continue - if not mod.require_doc(self) then continue - assert mod isa MMSrcModule - add("
    • {mod.html_link(self)} {mod.short_doc}
    • ") - - end - add("
    ") - - var op = new Buffer - op.append("digraph dep \{ rankdir=BT; node[shape=none,margin=0,width=0,height=0,fontsize=10]; edge[dir=none,color=gray]; ranksep=0.2; nodesep=0.1;\n") - for mod in modss do - if not mod.is_toplevel then continue - if not mod.require_doc(self) then continue - op.append("\"{mod.name}\"[URL=\"{mod.html_name}.html\"];\n") - for mod2 in mod.tmhe.direct_greaters do - if not modss.has(mod2) then continue - op.append("\"{mod.name}\"->\"{mod2.name}\";\n") - end - end - op.append("\}\n") - self.gen_dot(op.to_s, "dep", "Modules hierarchy") - add("
    ") - add("
    ") - add("
    {footer_text}
    ") - addGithubInformation - addCommitForm - add("\n") - write_to("{dir}/index.html") - - # Generate page for modules - for mod in modules do - if mod == mainmod then continue - assert mod isa MMSrcModule - if not mod.require_doc(self) then continue - self.filename = mod.html_name - action_bar = "
    \n" - clear - add("") - add("{head}{mod.name} module | {custom_title}\n") - add(action_bar) - add("
    ") - mod.file_page_doc(self) - add("
    ") - add("
    {footer_text}
    ") - addGithubInformation - addCommitForm - add("\n") - write_to("{dir}/{mod.html_name}.html") - end - - # Generate pages for global classes - for c in mainmod.local_classes do - if not c.require_doc(self) then continue - self.filename = c.html_name - action_bar = "
    \n" - clear - add("") - add("{head}{c.name} class | {custom_title}\n") - add(action_bar) - add("
    ") - c.file_page_doc(self) - add("
    ") - add("
    {footer_text}
    ") - addGithubInformation - addCommitForm - add("\n") - write_to("{dir}/{c.html_name}.html") - end - - self.filename = "fullindex" - action_bar = "
    \n" - clear - add("") - add("{head}Full Index | {custom_title}\n") - add(action_bar) - add("
    ") - add("
    ") - mainmod.file_index_page_doc(self) - add("
    ") - add("
    ") - add("
    {footer_text}
    ") - addGithubInformation - addCommitForm - add("\n") - write_to("{dir}/full-index.html") - - self.filename = "quicksearch-list" - clear - mainmod.file_quicksearch_list_doc(self) - write_to("{dir}/quicksearch-list.js") - end - - # Add or not a tag for the github repository - fun addGithubInformation do - if not github_repo == null then add("
    ") - end - - # Add all tags for the commit form - fun addCommitForm do - add("
    Signed-Off
    Commit
    \n\n") - end - - # Add a (source) link fo a given location - fun show_source(l: Location) - do - var s = opt_source.value - if s == null then - add("({l.file.filename.simplify_path})") +import model_utils +import modelize_property +import markdown + +# The NitdocContext contains all the knowledge used for doc generation +class NitdocContext + + private var toolcontext = new ToolContext + private var model: Model + private var mbuilder: ModelBuilder + private var mainmodule: MModule + private var class_hierarchy: POSet[MClass] + private var arguments: Array[String] + private var output_dir: nullable String + private var dot_dir: nullable String + private var share_dir: nullable String + private var source: nullable String + private var min_visibility: MVisibility + + private var github_upstream: nullable String + private var github_basesha1: nullable String + private var github_gitdir: nullable String + + private var opt_dir = new OptionString("Directory where doc is generated", "-d", "--dir") + private var opt_source = new OptionString("What link for source (%f for filename, %l for first line, %L for last line)", "--source") + private var opt_sharedir = new OptionString("Directory containing the nitdoc files", "--sharedir") + private var opt_nodot = new OptionBool("Do not generate graphes with graphviz", "--no-dot") + private var opt_private: OptionBool = new OptionBool("Generate the private API", "--private") + + private var opt_custom_title: OptionString = new OptionString("Title displayed in the top of the Overview page and as suffix of all page names", "--custom-title") + private var opt_custom_menu_items: OptionString = new OptionString("Items displayed in menu before the 'Overview' item (Each item must be enclosed in 'li' tags)", "--custom-menu-items") + private var opt_custom_overview_text: OptionString = new OptionString("Text displayed as introduction of Overview page before the modules list", "--custom-overview-text") + private var opt_custom_footer_text: OptionString = new OptionString("Text displayed as footer of all pages", "--custom-footer-text") + + private var opt_github_upstream: OptionString = new OptionString("The branch where edited commits will be pulled into (ex: user:repo:branch)", "--github-upstream") + private var opt_github_base_sha1: OptionString = new OptionString("The sha1 of the base commit used to create pull request", "--github-base-sha1") + private var opt_github_gitdir: OptionString = new OptionString("The git working directory used to resolve path name (ex: /home/me/myproject/)", "--github-gitdir") + + init do + toolcontext.option_context.add_option(opt_dir) + toolcontext.option_context.add_option(opt_source) + toolcontext.option_context.add_option(opt_sharedir) + toolcontext.option_context.add_option(opt_nodot) + toolcontext.option_context.add_option(opt_private) + toolcontext.option_context.add_option(opt_custom_title) + toolcontext.option_context.add_option(opt_custom_footer_text) + toolcontext.option_context.add_option(opt_custom_overview_text) + toolcontext.option_context.add_option(opt_custom_menu_items) + toolcontext.option_context.add_option(opt_github_upstream) + toolcontext.option_context.add_option(opt_github_base_sha1) + toolcontext.option_context.add_option(opt_github_gitdir) + toolcontext.process_options + self.arguments = toolcontext.option_context.rest + + if arguments.length < 1 then + print "usage: nitdoc [options] file..." + toolcontext.option_context.usage + exit(1) + end + self.process_options + + model = new Model + mbuilder = new ModelBuilder(model, toolcontext) + # Here we load and process all modules passed on the command line + var mmodules = mbuilder.parse(arguments) + if mmodules.is_empty then return + mbuilder.run_phases + + if mmodules.length == 1 then + mainmodule = mmodules.first else - # THIS IS JUST UGLY ! (but there is no replace yet) - var x = s.split_with("%f") - s = x.join(l.file.filename.simplify_path) - x = s.split_with("%l") - s = x.join(l.line_start.to_s) - x = s.split_with("%L") - s = x.join(l.line_end.to_s) - add(" (show code)") + # We need a main module, so we build it by importing all modules + mainmodule = new MModule(model, null, "
    ", new Location(null, 0, 0, 0, 0)) + mainmodule.set_imported_mmodules(mmodules) end + self.class_hierarchy = mainmodule.flatten_mclass_hierarchy end - # Return source link for a given location - fun get_source(l: Location): String - do - var s = opt_source.value - if s == null then - return l.file.filename.simplify_path + private fun process_options do + if not opt_dir.value is null then + output_dir = opt_dir.value else - # THIS IS JUST UGLY ! (but there is no replace yet) - var x = s.split_with("%f") - s = x.join(l.file.filename.simplify_path) - x = s.split_with("%l") - s = x.join(l.line_start.to_s) - x = s.split_with("%L") - s = x.join(l.line_end.to_s) - return s + output_dir = "doc" end - end - - # Generate a clicable graphiz image using a dot content. - # `name' refer to the filename (without extension) and the id name of the map. - # `name' must also match the name of the graph in the dot content (eg. digraph NAME {...) - fun gen_dot(dot: String, name: String, alt: String) - do - if opt_nodot.value then return - var f = new OFStream.open("{self.dir}/{name}.dot") - f.write(dot) - f.close - sys.system("\{ test -f {self.dir}/{name}.png && test -f {self.dir}/{name}.s.dot && diff {self.dir}/{name}.dot {self.dir}/{name}.s.dot >/dev/null 2>&1 ; \} || \{ cp {self.dir}/{name}.dot {self.dir}/{name}.s.dot && dot -Tpng -o{self.dir}/{name}.png -Tcmapx -o{self.dir}/{name}.map {self.dir}/{name}.s.dot ; \}") - self.add("
    \"{alt}\"/
    ") - var fmap = new IFStream.open("{self.dir}/{name}.map") - self.add(fmap.read_all) - fmap.close - end - - init - do - keep_ast = true - super("nitdoc") - filename = "-unset-" - option_context.add_option(opt_public) - option_context.add_option(opt_private) - option_context.add_option(opt_dir) - option_context.add_option(opt_source) - option_context.add_option(opt_nodot) - option_context.add_option(opt_sharedir) - option_context.add_option(opt_custom_title) - option_context.add_option(opt_custom_menu_items) - option_context.add_option(opt_custom_overview_text) - option_context.add_option(opt_custom_footer_text) - option_context.add_option(opt_github_repo_name) - end - - redef fun process_options - do - super - var d = opt_dir.value - if d != null then dir = d - - if not opt_nodot.value then - # Test if dot is runable - var res = sys.system("sh -c dot /dev/null 2>&1") - if res != 0 then - stderr.write "--no-dot implied since `dot' is not available. Try to install graphviz.\n" - opt_nodot.value = true - end - end - - sharedir = opt_sharedir.value - if sharedir == null then + if not opt_sharedir.value is null then + share_dir = opt_sharedir.value + else var dir = "NIT_DIR".environ if dir.is_empty then dir = "{sys.program_name.dirname}/../share/nitdoc" - if dir.file_exists then sharedir = dir else dir = "{dir}/share/nitdoc" - if dir.file_exists then sharedir = dir end - if sharedir == null then - fatal_error(null, "Error: Cannot locate nitdoc shared files. Uses --sharedir or envvar NIT_DIR.") + share_dir = dir + if share_dir is null then + print "Error: Cannot locate nitdoc share files. Uses --sharedir or envvar NIT_DIR" + abort end - dir = "{sharedir.to_s}/scripts/js-facilities.js" - if sharedir == null then - fatal_error(null, "Error: Invalid nitdoc shared files. Check --sharedir or envvar NIT_DIR.") + dir = "{share_dir.to_s}/scripts/js-facilities.js" + if share_dir is null then + print "Error: Invalid nitdoc share files. Check --sharedir or envvar NIT_DIR" + abort end + if opt_private.value then + min_visibility = none_visibility + else + min_visibility = protected_visibility + end end - var git = opt_github_repo_name.value - if not git == null then github_repo = git - end - - redef fun handle_property_conflict(lc, impls) - do - # THIS IS SO UGLY! See MMVirtualModule - if lc.mmmodule == self.mainmod then - return # We just accept, so one in impls is arbitrary inherited + var gh_upstream = opt_github_upstream.value + var gh_base_sha = opt_github_base_sha1.value + var gh_gitdir = opt_github_gitdir.value + if not gh_upstream == null or not gh_base_sha == null or not gh_gitdir == null then + if gh_upstream == null or gh_base_sha == null or gh_gitdir == null then + print "Error: Options {opt_github_upstream.names.first}, {opt_github_base_sha1.names.first} and {opt_github_gitdir.names.first} are required to enable the GitHub plugin" + abort + else + self.github_upstream = gh_upstream + self.github_basesha1 = gh_base_sha + self.github_gitdir = gh_gitdir + end end - super + source = opt_source.value end -end - -# A virtual module is used to work as an implicit main module that combine unrelated modules -# Since conflict may arrise in a virtual module (the main method for instance) conflicts are disabled -class MMVirtualModule - super MMModule - init(ctx: MMContext, mods: Array[MMModule]) - do - # We need to compute the whole metamodel since there is no mmbuilder to do it - super(" main".to_symbol, mods.first.directory, ctx, new Location(null,0,0,0,0)) - ctx.add_module(self, mods) - for m in mods do - self.add_super_module(m, 1) - end - self.import_global_classes - self.import_local_classes - for c in self.local_classes do - c.compute_super_classes - end - for c in self.local_classes do - c.compute_ancestors - end + fun generate_nitdoc do + # Create destination dir if it's necessary + if not output_dir.file_exists then output_dir.mkdir + sys.system("cp -r {share_dir.to_s}/* {output_dir.to_s}/") + self.dot_dir = null + if not opt_nodot.value then self.dot_dir = output_dir.to_s + overview + search + modules + classes + quicksearch_list end - redef fun require_doc(dctx) do return false -end - -# Conditionnal part of the text content of a DocContext -class StageContext - # Content of the current stage - readable var _content: Array[String] = new Array[String] - # Is a normal string already added? - readable writable var _validate: Bool = false + private fun overview do + var overviewpage = new NitdocOverview(self, dot_dir) + overviewpage.save("{output_dir.to_s}/index.html") + end - # Parent stage is any - readable var _parent: nullable StageContext = null + private fun search do + var searchpage = new NitdocSearch(self) + searchpage.save("{output_dir.to_s}/search.html") + end - init(parent: nullable StageContext) do _parent = parent -end + private fun modules do + for mmodule in model.mmodules do + if mmodule.name == "
    " then continue + var modulepage = new NitdocModule(mmodule, self, dot_dir) + modulepage.save("{output_dir.to_s}/{mmodule.url}") + end + end + private fun classes do + for mclass in mbuilder.model.mclasses do + var classpage = new NitdocClass(mclass, self, dot_dir, source) + classpage.save("{output_dir.to_s}/{mclass.url}") + end + end -# Efficiently sort object with their to_s method -class AlphaSorter[E: Object] - super AbstractSorter[E] - redef fun compare(a, b) - do - var sa: String - var sb: String - var d = _dico - if d.has_key(a) then - sa = d[a] - else - sa = a.to_s - d[a] = sa + private fun quicksearch_list do + var file = new OFStream.open("{output_dir.to_s}/quicksearch-list.js") + file.write("var nitdocQuickSearchRawList = \{ ") + for mmodule in model.mmodules do + if mmodule.name == "
    " then continue + file.write("\"{mmodule.name}\": [") + file.write("\{txt: \"{mmodule.full_name}\", url:\"{mmodule.url}\" \},") + file.write("],") end - if d.has_key(b) then - sb = d[b] - else - sb = b.to_s - d[b] = sb + for mclass in model.mclasses do + if mclass.visibility < min_visibility then continue + file.write("\"{mclass.name}\": [") + file.write("\{txt: \"{mclass.full_name}\", url:\"{mclass.url}\" \},") + file.write("],") end - return sa <=> sb + var name2mprops = new HashMap[String, Set[MPropDef]] + for mproperty in model.mproperties do + if mproperty.visibility < min_visibility then continue + if mproperty isa MAttribute then continue + if not name2mprops.has_key(mproperty.name) then name2mprops[mproperty.name] = new HashSet[MPropDef] + name2mprops[mproperty.name].add_all(mproperty.mpropdefs) + end + for mproperty, mpropdefs in name2mprops do + file.write("\"{mproperty}\": [") + for mpropdef in mpropdefs do + file.write("\{txt: \"{mpropdef.full_name}\", url:\"{mpropdef.url}\" \},") + end + file.write("],") + end + file.write(" \};") + file.close end - # Keep track of to_s values - var _dico: HashMap[Object, String] = new HashMap[Object, String] - - init do end end -# Generalization of metamodel entities -interface MMEntity - # Return a link to - fun html_link(dctx: DocContext): String is abstract +# Nitdoc base page +abstract class NitdocPage - # Return a one liner description - fun short_doc: String do return " " + var dot_dir: nullable String + var source: nullable String + var ctx: NitdocContext - # The doc node from the AST - # Return null is none - fun doc: nullable ADoc do return null - - # Return a JSON entry for quicksearch list - fun json_entry(dctx: DocContext): String is abstract - - # Return the qualified name as string - fun qualified_name: String is abstract - -end - -redef class MMModule - super MMEntity - redef fun html_link(dctx) do - if short_doc == " " then - return "{self}" - else - return "{self}" - end - end - - fun html_anchor: String do - return "" - end - - fun html_link_to_anchor: String do - return "{self}" + init(ctx: NitdocContext) do + self.ctx = ctx end - redef fun json_entry(dctx) do - return "\{txt:\"{self.qualified_name}\",url:\"{html_name}.html\"\}," + protected fun head do + append("") + append("") + append("") + append("") + append("") + append("") + append("") + append("") + append("") + append("") + append("") + append("") + append("") + var title = "" + if ctx.opt_custom_title.value != null then + title = " | {ctx.opt_custom_title.value.to_s}" + end + append("{self.title}{title}") end - redef fun qualified_name do - var buffer = new Buffer - for m in mnhe.smallers do - buffer.append("{m.html_name}::") + protected fun menu do + if ctx.opt_custom_menu_items.value != null then + append(ctx.opt_custom_menu_items.value.to_s) end - buffer.append("{self.name}") - return buffer.to_s end - fun require_doc(dctx: DocContext): Bool - do - if dctx.public_only and not is_toplevel then return false - return true - end + protected fun title: String is abstract - # Return true if the module is a top-level owner or a top-level module - fun is_toplevel: Bool - do - var pd = directory.parent - return pd == null or (pd.owner == null and directory.owner == self) + protected fun header do + append("
    ") + append("") + append("
    ") end - # Element in the module nesting tree - fun mnhe: PartialOrderElement[MMModule] do return mnhe_.as(not null) - var mnhe_: nullable PartialOrderElement[MMModule] = null - - # Element in the top level module importation hierarchy - fun tmhe: PartialOrderElement[MMModule] do return tmhe_.as(not null) - var tmhe_: nullable PartialOrderElement[MMModule] = null + protected fun content is abstract - fun toplevel_owner: MMModule - do - var m = self - loop - var ds = m.mnhe.direct_smallers - if ds.length == 0 then return m - if ds.length == 1 then m = ds.first else abort + protected fun footer do + if ctx.opt_custom_footer_text.value != null then + append("
    {ctx.opt_custom_footer_text.value.to_s}
    ") end end - fun html_name: String - do - return "{name}" + # Generate a clickable graphviz image using a dot content + protected fun generate_dot(dot: String, name: String, alt: String) do + var output_dir = dot_dir + if output_dir == null then return + var file = new OFStream.open("{output_dir}/{name}.dot") + file.write(dot) + file.close + sys.system("\{ test -f {output_dir}/{name}.png && test -f {output_dir}/{name}.s.dot && diff {output_dir}/{name}.dot {output_dir}/{name}.s.dot >/dev/null 2>&1 ; \} || \{ cp {output_dir}/{name}.dot {output_dir}/{name}.s.dot && dot -Tpng -o{output_dir}/{name}.png -Tcmapx -o{output_dir}/{name}.map {output_dir}/{name}.s.dot ; \}") + append("
    ") + append("{alt}") + append("
    ") + var fmap = new IFStream.open("{output_dir}/{name}.map") + append(fmap.read_all) + fmap.close end - fun direct_owner: nullable MMModule + # Add a (source) link for a given location + protected fun show_source(l: Location): String do - var d = directory - while d.owner == self do d = d.parent.as(not null) - return d.owner - end + if source == null then + return "({l.file.filename.simplify_path})" + else + # THIS IS JUST UGLY ! (but there is no replace yet) + var x = source.split_with("%f") + source = x.join(l.file.filename.simplify_path) + x = source.split_with("%l") + source = x.join(l.line_start.to_s) + x = source.split_with("%L") + source = x.join(l.line_end.to_s) + return " (source)" + end + end + + # Render the page as a html string + protected fun render do + append("") + append("") + head + append("") + append("") + header + var footed = "" + if ctx.opt_custom_footer_text.value != null then footed = "footed" + append("
    ") + content + append("
    ") + footer + append("") + end + + # Append a string to the page + fun append(s: String) do out.write(s) + + # Save html page in the specified file + fun save(file: String) do + self.out = new OFStream.open(file) + render + self.out.close + end + private var out: nullable OFStream +end - # Fill the body for the page associated to the module - fun file_page_doc(dctx: DocContext) - do - dctx.add("
    \n") - - var mods = new Array[MMModule] - mods = self.mhe.greaters.to_a - dctx.sort(mods) - - dctx.open_stage - dctx.stage("\n") - dctx.close_stage - - if not dctx.public_only then - mods = self.mnhe.direct_greaters.to_a - dctx.sort(mods) - dctx.open_stage - dctx.stage("\n") - dctx.close_stage end + # sort modules + var sorter = new MModuleNameSorter + self.mmodules.add_all(mmodules) + sorter.sort(self.mmodules) + end - dctx.add("
    ") # metadata + redef fun title do return "Overview" - dctx.add("
    \n") - dctx.add("

    {name}

    \n") - dctx.add("
    module ") - for m in mnhe.smallers do - dctx.add("{m.html_link(dctx)}::") + redef fun menu do + super + append("
  • Overview
  • ") + append("
  • Search
  • ") + end + + redef fun content do + append("
    ") + var title = "Overview" + if ctx.opt_custom_title.value != null then + title = ctx.opt_custom_title.value.to_s + end + append("

    {title}

    ") + var text = "" + if ctx.opt_custom_overview_text.value != null then + text = ctx.opt_custom_overview_text.value.to_s + end + append("
    {text}
    ") + append("
    ") + # module list + append("

    Modules

    ") + append("
      ") + for mmodule in mmodules do + if mbuilder.mmodule2nmodule.has_key(mmodule) then + var amodule = mbuilder.mmodule2nmodule[mmodule] + append("
    • ") + mmodule.html_link(self) + append(" {amodule.short_comment}
    • ") + end end - dctx.add("{self.name}
    \n") - dctx.add("
    ") - dctx.add("
    \n") - - var doc = doc - if doc != null then - dctx.add("
    \n") - dctx.add("
    {doc.to_html}
    \n") - dctx.add("\n") - dctx.add("CancelCommit") - dctx.add("
    ")
    -			dctx.add("
    \n") + append("") + # module graph + process_generate_dot + append("") + append("
    ") + end + + private fun process_generate_dot do + # build poset with public owners + var poset = new POSet[MModule] + for mmodule in mmodules do + poset.add_node(mmodule) + for omodule in mmodules do + if mmodule == omodule then continue + if mmodule.in_importation < omodule then + poset.add_node(omodule) + poset.add_edge(mmodule, omodule) + end + end end - + # build graph var op = new Buffer - op.append("digraph {name} \{ rankdir=BT; node[shape=none,margin=0,width=0,height=0,fontsize=10]; edge[dir=none,color=gray]; ranksep=0.2; nodesep=0.1;\n") - var ms = new Array[nullable MMModule] - do - var m0: nullable MMModule = self - while m0 != null do - m0 = m0.direct_owner - ms.add(m0) + op.append("digraph dep \{ rankdir=BT; node[shape=none,margin=0,width=0,height=0,fontsize=10]; edge[dir=none,color=gray]; ranksep=0.2; nodesep=0.1;\n") + for mmodule in poset do + op.append("\"{mmodule.name}\"[URL=\"{mmodule.url}\"];\n") + for omodule in poset[mmodule].direct_greaters do + op.append("\"{mmodule.name}\"->\"{omodule.name}\";\n") end end - var cla = new HashSet[MMModule] - cla.add(self) - for m0 in self.mhe.greaters do - if not m0.require_doc(dctx) then continue - if self.visibility_for(m0) <= 1 then continue # private or hidden - if self.mnhe <= m0 then continue # do not want nested stuff - if m0.direct_owner != null and not m0.direct_owner.mnhe <= self then continue # not in the right nesting - cla.add(m0) - end - for m0 in self.mhe.smallers do - if not m0.require_doc(dctx) then continue - if m0.visibility_for(self) <= 1 then continue # private or hidden - if m0.direct_owner != null and not m0.direct_owner.mnhe <= self then continue # not in the right nesting - cla.add(m0) - end - for m0 in self.mnhe.smallers do - cla.add(m0) - end - ms = ms.reversed - for m0 in ms do - if m0 != null then - op.append("subgraph \"cluster_{m0.name}\"\{\n") - end - for c in cla do - if c.direct_owner != m0 then continue - if c == self then - op.append("\"{c.name}\"[shape=box,margin=0.03];\n") + op.append("\}\n") + generate_dot(op.to_s, "dep", "Modules hierarchy") + end +end + +# The search page +class NitdocSearch + super NitdocPage + + init(ctx: NitdocContext) do + super(ctx) + self.dot_dir = null + end + + redef fun title do return "Search" + + redef fun menu do + super + append("
  • Overview
  • ") + append("
  • Search
  • ") + end + + redef fun content do + append("
    ") + append("

    {title}

    ") + module_column + classes_column + properties_column + append("
    ") + end + + # Add to content modules column + private fun module_column do + var sorted = ctx.mbuilder.model.mmodule_importation_hierarchy.to_a + var sorter = new MModuleNameSorter + sorter.sort(sorted) + append("
    ") + append("

    Modules

    ") + append("
      ") + for mmodule in sorted do + if mmodule.name == "
      " then continue + append("
    • ") + mmodule.html_link(self) + append("
    • ") + end + append("
    ") + append("
    ") + end + + # Add to content classes modules + private fun classes_column do + var sorted = ctx.mbuilder.model.mclasses + var sorter = new MClassNameSorter + sorter.sort(sorted) + append("
    ") + append("

    Classes

    ") + append("
      ") + for mclass in sorted do + if mclass.visibility < ctx.min_visibility then continue + append("
    • ") + mclass.html_link(self) + append("
    • ") + end + append("
    ") + append("
    ") + end + + # Insert the properties column of fullindex page + private fun properties_column do + var sorted = ctx.mbuilder.model.mproperties + var sorter = new MPropertyNameSorter + sorter.sort(sorted) + append("
    ") + append("

    Properties

    ") + append("
      ") + for mproperty in sorted do + if mproperty.visibility < ctx.min_visibility then continue + if mproperty isa MAttribute then continue + append("
    • ") + mproperty.intro.html_link(self) + append(" (") + mproperty.intro.mclassdef.mclass.html_link(self) + append(")
    • ") + end + append("
    ") + append("
    ") + end + +end + +# A module page +class NitdocModule + super NitdocPage + + private var mmodule: MModule + private var mbuilder: ModelBuilder + private var local_mclasses = new HashSet[MClass] + private var intro_mclasses = new HashSet[MClass] + private var redef_mclasses = new HashSet[MClass] + + init(mmodule: MModule, ctx: NitdocContext, dot_dir: nullable String) do + super(ctx) + self.mmodule = mmodule + self.mbuilder = ctx.mbuilder + self.dot_dir = dot_dir + # get local mclasses + for m in mmodule.in_nesting.greaters do + for mclassdef in m.mclassdefs do + if mclassdef.mclass.visibility < ctx.min_visibility then continue + if mclassdef.is_intro then + intro_mclasses.add(mclassdef.mclass) else - op.append("\"{c.name}\"[URL=\"{c.html_name}.html\"];\n") + if mclassdef.mclass.mpropdefs_in_module(self).is_empty then continue + redef_mclasses.add(mclassdef.mclass) end + local_mclasses.add(mclassdef.mclass) end - if m0 != null then - op.append("\"{m0.name}\"[URL=\"{m0.html_name}.html\"];\n") - for c in m0.mhe.direct_greaters do - if not cla.has(c) then continue - op.append("\"{m0.name}\"->\"{c.name}\";\n") + end + end + + redef fun title do + if mbuilder.mmodule2nmodule.has_key(mmodule) and not mbuilder.mmodule2nmodule[mmodule].short_comment.is_empty then + var nmodule = mbuilder.mmodule2nmodule[mmodule] + return "{mmodule.html_name} module | {nmodule.short_comment}" + else + return "{mmodule.html_name} module" + end + end + + redef fun menu do + super + append("
  • Overview
  • ") + append("
  • {mmodule.html_name}
  • ") + append("
  • Search
  • ") + end + + redef fun content do + append("") + append("
    ") + module_doc + append("
    ") + end + + private fun classes_column do + var sorter = new MClassNameSorter + var sorted = new Array[MClass] + sorted.add_all(intro_mclasses) + sorted.add_all(redef_mclasses) + sorter.sort(sorted) + if not sorted.is_empty then + append("") + end + end + + private fun importation_column do + append("") + end + + private fun display_module_list(list: Array[MModule]) do + append("
      ") + var sorter = new MModuleNameSorter + sorter.sort(list) + for m in list do + append("
    • ") + m.html_link(self) + append("
    • ") + end + append("
    ") + end + + private fun module_doc do + # title + append("

    {mmodule.html_name}

    ") + append("
    ") + mmodule.html_signature(self) + append("
    ") + # comment + mmodule.html_comment(self) + process_generate_dot + # classes + var class_sorter = new MClassNameSorter + # intro + if not intro_mclasses.is_empty then + var sorted = new Array[MClass] + sorted.add_all(intro_mclasses) + class_sorter.sort(sorted) + append("
    ") + append("

    Introduced classes

    ") + for mclass in sorted do mclass.html_full_desc(self) + append("
    ") + end + # redefs + var redefs = new Array[MClass] + for mclass in redef_mclasses do if not intro_mclasses.has(mclass) then redefs.add(mclass) + class_sorter.sort(redefs) + if not redefs.is_empty then + append("
    ") + append("

    Refined classes

    ") + for mclass in redefs do mclass.html_full_desc(self) + append("
    ") + end + end + + private fun process_generate_dot do + # build poset with public owners + var poset = new POSet[MModule] + for mmodule in self.mmodule.in_importation.poset do + if mmodule.name == "
    " then continue + #if mmodule.public_owner != null then continue + if not mmodule.in_importation < self.mmodule and not self.mmodule.in_importation < mmodule and mmodule != self.mmodule then continue + poset.add_node(mmodule) + for omodule in mmodule.in_importation.poset do + if mmodule == omodule then continue + if omodule.name == "
    " then continue + if not omodule.in_importation < self.mmodule and not self.mmodule.in_importation < omodule then continue + if omodule.in_importation < mmodule then + poset.add_node(omodule) + poset.add_edge(omodule, mmodule) + end + if mmodule.in_importation < omodule then + poset.add_node(omodule) + poset.add_edge(mmodule, omodule) end + #if omodule.public_owner != null then continue + #if mmodule.in_importation < omodule then + #poset.add_node(omodule) + #poset.add_edge(mmodule, omodule) + #end end end - for m0 in ms do - # Close the nesting subgraph - if m0 != null then - op.append("\}\n") + # build graph + var op = new Buffer + var name = "dep_{mmodule.name}" + op.append("digraph {name} \{ rankdir=BT; node[shape=none,margin=0,width=0,height=0,fontsize=10]; edge[dir=none,color=gray]; ranksep=0.2; nodesep=0.1;\n") + for mmodule in poset do + if mmodule == self.mmodule then + op.append("\"{mmodule.name}\"[shape=box,margin=0.03];\n") + else + op.append("\"{mmodule.name}\"[URL=\"{mmodule.url}\"];\n") end - end - for c in cla do - for c2 in c.tmhe.direct_greaters do - if not cla.has(c2) then continue - op.append("\"{c.name}\"->\"{c2.name}\";\n") + for omodule in poset[mmodule].direct_greaters do + op.append("\"{mmodule.name}\"->\"{omodule.name}\";\n") end end op.append("\}\n") - dctx.gen_dot(op.to_s, name.to_s, "Dependency graph for module {name}") - dctx.add("") - - var clas = new Array[MMLocalClass] - var props = new HashMap[MMGlobalProperty, Array[MMLocalProperty]] - var gprops = new Array[MMLocalProperty] - do - var m = self - for g in m.global_classes do - var lc = m[g] - if not lc.require_doc(dctx) then continue - var im = g.intro.mmmodule - if self.visibility_for(im) <= 1 then continue # private import or invisible import - var keep = false - for lc2 in lc.crhe.greaters_and_self do - if not lc2 isa MMSrcLocalClass then continue - if not self.mnhe <= lc2.mmmodule then continue # not introduced/redefined here/stolen - keep = true - end - if not keep then continue - clas.add(self[g]) - lc.compute_super_classes - for gp in lc.global_properties do - if self.visibility_for(gp.intro.local_class.mmmodule) <= 1 then continue # private import or invisible import - var lp = lc[gp] - var mp = lp.local_class.mmmodule - if not self.mnhe <= mp then continue # not introduced/redefined here/stolen - lp = self[g][gp] - if not lp.require_doc(dctx) then continue - if props.has_key(lp.global) then - if not props[lp.global].has(lp) then - props[lp.global].add(lp) - end + generate_dot(op.to_s, name, "Dependency graph for module {mmodule.name}") + end +end + +# A class page +class NitdocClass + super NitdocPage + + private var mclass: MClass + private var vtypes = new HashSet[MVirtualTypeDef] + private var consts = new HashSet[MMethodDef] + private var meths = new HashSet[MMethodDef] + private var inherited = new HashSet[MPropDef] + + init(mclass: MClass, ctx: NitdocContext, dot_dir: nullable String, source: nullable String) do + super(ctx) + self.mclass = mclass + self.dot_dir = dot_dir + self.source = source + # load properties + var locals = new HashSet[MProperty] + for mclassdef in mclass.mclassdefs do + for mpropdef in mclassdef.mpropdefs do + if mpropdef.mproperty.visibility < ctx.min_visibility then continue + if mpropdef isa MVirtualTypeDef then vtypes.add(mpropdef) + if mpropdef isa MMethodDef then + if mpropdef.mproperty.is_init then + consts.add(mpropdef) else - props[lp.global] = [lp] - gprops.add(lp.global.intro) + meths.add(mpropdef) end end + locals.add(mpropdef.mproperty) end end - dctx.add("
    \n") - dctx.open_stage - dctx.stage("
    \n") - dctx.stage("

    Classes

    \n") - dctx.sort(clas) - dctx.stage("
      \n") - for lc in clas do - if self.mnhe <= lc.global.intro.mmmodule then - dctx.add("
    • I ") - else - dctx.add("
    • R ") - end - dctx.add("{lc.html_link(dctx)}
    • \n") - end - dctx.stage("
    \n") - dctx.close_stage - - dctx.open_stage - dctx.stage("
    \n") - dctx.stage("

    Properties

    \n") - dctx.sort(gprops) - dctx.stage("
      \n") - for lgp in gprops do - var gp = lgp.global - var lps = props[gp] - - if gp.intro isa MMAttribute then continue - - var lpi = self[gp.intro.local_class.global][gp] - - if lps.has(lpi) then - dctx.add("
    • I {lpi.html_open_link(dctx)}{lpi.html_name} ({lpi.local_class})
    • \n") - lps.remove(lpi) - else - dctx.add("
    • I {lpi.html_name}") - dctx.add(" ({lpi.local_class})
    • \n") - end - if lps.length >= 1 then - dctx.sort(lps) - for lp in lps do - dctx.add("
    • R {lp.html_open_link(dctx)}{lp.html_name} ({lp.local_class})
    • ") + # get inherited properties + for pclass in mclass.in_hierarchy(ctx.mainmodule).greaters do + if pclass == mclass then continue + for pclassdef in pclass.mclassdefs do + for mprop in pclassdef.intro_mproperties do + var mpropdef = mprop.intro + if mprop.visibility < ctx.min_visibility then continue # skip if not correct visibiility + if locals.has(mprop) then continue # skip if local + if mclass.name != "Object" and mprop.intro_mclassdef.mclass.name == "Object" and (mprop.visibility <= protected_visibility or mprop.intro_mclassdef.mmodule.public_owner == null or mprop.intro_mclassdef.mmodule.public_owner.name != "standard") then continue # skip toplevels + if mpropdef isa MVirtualTypeDef then vtypes.add(mpropdef) + if mpropdef isa MMethodDef then + if mpropdef.mproperty.is_init then + consts.add(mpropdef) + else + meths.add(mpropdef) + end + end + inherited.add(mpropdef) end end end - dctx.stage("
    \n") - dctx.close_stage - dctx.add("
    \n") - dctx.add("
    \n") end - # Fill the body for the page associated to the full index - fun file_index_page_doc(dctx: DocContext) - do + redef fun title do + var nclass = ctx.mbuilder.mclassdef2nclassdef[mclass.intro] + if nclass isa AStdClassdef then + return "{mclass.html_name} class | {nclass.short_comment}" + else + return "{mclass.html_name} class" + end + end - dctx.add("

    Full Index

    \n") - - var clas = new Array[MMLocalClass] - var props = new HashMap[MMGlobalProperty, Array[MMLocalProperty]] - var gprops = new Array[MMLocalProperty] - var mods = new Array[MMModule] - for m in mhe.greaters_and_self do - if not m.require_doc(dctx) then continue - mods.add(m) - end - for g in global_classes do - var lc = self[g] - if not lc.require_doc(dctx) then continue - clas.add(lc) - for gp in lc.global_properties do - var lp = lc[gp] - if not lp.require_doc(dctx) then continue - if props.has_key(lp.global) then - if not props[lp.global].has(lp) then - props[lp.global].add(lp) + redef fun menu do + super + append("
  • Overview
  • ") + var public_owner = mclass.public_owner + if public_owner is null then + append("
  • ") + mclass.intro_mmodule.html_link(self) + append("
  • ") + else + append("
  • ") + public_owner.html_link(self) + append("
  • ") + end + append("
  • {mclass.html_name}
  • ") + append("
  • Search
  • ") + end + + redef fun content do + append("") + append("
    ") + class_doc + append("
    ") + end + + private fun properties_column do + var sorter = new MPropDefNameSorter + append("") + end + + private fun inheritance_column do + var sorted = new Array[MClass] + var sorterp = new MClassNameSorter + append("") + end + + private fun class_doc do + # title + append("

    {mclass.html_name}{mclass.html_short_signature}

    ") + append("
    ") + if mclass.visibility < public_visibility then append("{mclass.visibility.to_s} ") + append("{mclass.kind.to_s} ") + mclass.html_namespace(self) + append("{mclass.html_short_signature}
    ") + # comment + mclass.html_comment(self) + process_generate_dot + # concerns + var concern2meths = new ArrayMap[MModule, Array[MMethodDef]] + var sorted_meths = new Array[MMethodDef] + var sorted = new Array[MModule] + sorted_meths.add_all(meths) + ctx.mainmodule.linearize_mpropdefs(sorted_meths) + for meth in meths do + if inherited.has(meth) then continue + var mmodule = meth.mclassdef.mmodule + if not concern2meths.has_key(mmodule) then + sorted.add(mmodule) + concern2meths[mmodule] = new Array[MMethodDef] + end + concern2meths[mmodule].add(meth) + end + var sections = new ArrayMap[MModule, Array[MModule]] + for mmodule in concern2meths.keys do + var owner = mmodule.public_owner + if owner == null then owner = mmodule + if not sections.has_key(owner) then sections[owner] = new Array[MModule] + if owner != mmodule then sections[owner].add(mmodule) + end + append("
    ") + append("

    Concerns

    ") + append("
      ") + for owner, mmodules in sections do + var nowner = ctx.mbuilder.mmodule2nmodule[owner] + append("
    • ") + if nowner.short_comment.is_empty then + append("{owner.html_name}") + else + append("{owner.html_name}: {nowner.short_comment}") + end + if not mmodules.is_empty then + append("
        ") + for mmodule in mmodules do + var nmodule = ctx.mbuilder.mmodule2nmodule[mmodule] + if nmodule.short_comment.is_empty then + append("
      • {mmodule.html_name}
      • ") + else + append("
      • {mmodule.html_name}: {nmodule.short_comment}
      • ") end - else - props[lp.global] = [lp] - gprops.add(lp.global.intro) end + append("
      ") end - end - dctx.open_stage - dctx.stage("
      \n") - dctx.stage("

      Modules

      \n") - dctx.sort(mods) - dctx.stage("
        \n") - for m in mods do - dctx.add("
      • {m.html_link(dctx)}
      • ") - end - dctx.stage("
      \n") - dctx.close_stage - - dctx.open_stage - dctx.stage("
      \n") - dctx.stage("

      Classes

      \n") - dctx.sort(clas) - dctx.stage("
        \n") - for lc in clas do - dctx.add("
      • {lc.html_link(dctx)}
      • ") - end - dctx.stage("
      \n") - dctx.close_stage - - dctx.open_stage - dctx.stage("
      \n") - dctx.stage("

      Properties

      \n") - dctx.sort(gprops) - dctx.stage("
        \n") - for lgp in gprops do - var gp = lgp.global - var lps = props[gp] - - if gp.intro isa MMAttribute then continue - - var lpi = self[gp.intro.local_class.global][gp] - - lps.remove(lpi) - dctx.add("
      • I {lpi.html_open_link(dctx)}{lpi.html_name} ({lpi.local_class})
      • \n") - if lps.length >= 1 then - dctx.sort(lps) - for lp in lps do - dctx.add("
      • R {lp.html_open_link(dctx)}{lp.html_name} ({lp.local_class})
      • \n") + append("") + end + append("
      ") + append("
    ") + # properties + var prop_sorter = new MPropDefNameSorter + var lmmodule = new List[MModule] + var nclass = ctx.mbuilder.mclassdef2nclassdef[mclass.intro] + # virtual and formal types + var local_vtypes = new Array[MVirtualTypeDef] + for vt in vtypes do if not inherited.has(vt) then local_vtypes.add(vt) + if local_vtypes.length > 0 or mclass.arity > 0 then + append("
    ") + append("

    Formal and Virtual Types

    ") + # formal types + if mclass.arity > 0 and nclass isa AStdClassdef then + for ft, bound in mclass.parameter_types do + append("
    ") + append("

    {ft}: ") + bound.html_link(self) + append("

    ") + append("
    formal generic type
    ") + append("
    ") end end - end - dctx.stage("\n") - dctx.close_stage - end - - # Fill the quicksearch list JSON object - fun file_quicksearch_list_doc(dctx: DocContext) - do - var entities = new HashMap[String, Array[MMEntity]] - var props = new HashMap[MMGlobalProperty, Array[MMLocalProperty]] - for m in mhe.greaters_and_self do - if not m.require_doc(dctx) then continue - var a = new Array[MMEntity] - a.add(m) - entities[m.html_name] = a - end - for g in global_classes do - var lc = self[g] - if not lc.require_doc(dctx) then continue - var a = new Array[MMEntity] - a.add(lc) - entities[lc.html_name] = a - for gp in lc.global_properties do - var lp = lc[gp] - if not lp.require_doc(dctx) then continue - if lp.kind == "var" then continue - if props.has_key(lp.global) then - if not props[lp.global].has(lp) then - props[lp.global].add(lp) + # virtual types + prop_sorter.sort(local_vtypes) + for prop in local_vtypes do prop.html_full_desc(self, self.mclass) + append("
    ") + end + # constructors + var local_consts = new Array[MMethodDef] + for const in consts do if not inherited.has(const) then local_consts.add(const) + prop_sorter.sort(local_consts) + if local_consts.length > 0 then + append("
    ") + append("

    Constructors

    ") + for prop in local_consts do prop.html_full_desc(self, self.mclass) + append("
    ") + end + # methods + if not concern2meths.is_empty then + append("
    ") + append("

    Methods

    ") + for owner, mmodules in sections do + append("") + if owner != mclass.intro_mmodule and owner != mclass.public_owner then + var nowner = ctx.mbuilder.mmodule2nmodule[owner] + append("

    Methods refined in ") + owner.html_link(self) + append("

    ") + append("

    ") + owner.html_link(self) + if not nowner.short_comment.is_empty then + append(": {nowner.short_comment}") end - else - props[lp.global] = [lp] + append("

    ") end + if concern2meths.has_key(owner) then + var mmethods = concern2meths[owner] + prop_sorter.sort(mmethods) + for prop in mmethods do prop.html_full_desc(self, self.mclass) + end + for mmodule in mmodules do + append("") + var nmodule = ctx.mbuilder.mmodule2nmodule[mmodule] + if mmodule != mclass.intro_mmodule and mmodule != mclass.public_owner then + append("

    ") + mmodule.html_link(self) + if not nmodule.short_comment.is_empty then + append(": {nmodule.short_comment}") + end + append("

    ") + end + var mmethods = concern2meths[mmodule] + prop_sorter.sort(mmethods) + for prop in mmethods do prop.html_full_desc(self, self.mclass) + end + end + append("
    ") + end + # inherited properties + if inherited.length > 0 then + var sorted_inherited = new Array[MPropDef] + sorted_inherited.add_all(inherited) + ctx.mainmodule.linearize_mpropdefs(sorted_inherited) + var classes = new ArrayMap[MClass, Array[MPropDef]] + for mmethod in sorted_inherited.reversed do + var mclass = mmethod.mclassdef.mclass + if not classes.has_key(mclass) then classes[mclass] = new Array[MPropDef] + classes[mclass].add(mmethod) end + append("
    ") + append("

    Inherited Properties

    ") + for c, mmethods in classes do + prop_sorter.sort(mmethods) + append("

    Defined in ") + c.html_link(self) + append(": ") + for i in [0..mmethods.length[ do + var mmethod = mmethods[i] + mmethod.html_link(self) + if i <= mmethods.length - 1 then append(", ") + end + append("

    ") + end + append("
    ") end + end - for k, v in props do - entities[k.short_name] = v + private fun process_generate_dot do + var pe = ctx.class_hierarchy[mclass] + var cla = new HashSet[MClass] + var sm = new HashSet[MClass] + var sm2 = new HashSet[MClass] + sm.add(mclass) + while cla.length + sm.length < 10 and sm.length > 0 do + cla.add_all(sm) + sm2.clear + for x in sm do + sm2.add_all(pe.poset[x].direct_smallers) + end + var t = sm + sm = sm2 + sm2 = t end + cla.add_all(pe.greaters) - var keys = entities.keys.to_a - var sorter = new AlphaSorter[String] - sorter.sort(keys) - - dctx.open_stage - dctx.stage("var entries = \{") - for key in keys do - dctx.add("\"{key}\": [") - for entity in entities[key] do - dctx.add(entity.json_entry(dctx)) + var op = new Buffer + var name = "dep_{mclass.name}" + op.append("digraph {name} \{ rankdir=BT; node[shape=none,margin=0,width=0,height=0,fontsize=10]; edge[dir=none,color=gray]; ranksep=0.2; nodesep=0.1;\n") + for c in cla do + if c == mclass then + op.append("\"{c.name}\"[shape=box,margin=0.03];\n") + else + op.append("\"{c.name}\"[URL=\"{c.url}\"];\n") + end + for c2 in pe.poset[c].direct_greaters do + if not cla.has(c2) then continue + op.append("\"{c.name}\"->\"{c2.name}\";\n") + end + if not pe.poset[c].direct_smallers.is_empty then + var others = true + for c2 in pe.poset[c].direct_smallers do + if cla.has(c2) then others = false + end + if others then + op.append("\"{c.name}...\"[label=\"\"];\n") + op.append("\"{c.name}...\"->\"{c.name}\"[style=dotted];\n") + end end - dctx.add("],") end - dctx.stage("\};") - dctx.close_stage + op.append("\}\n") + generate_dot(op.to_s, name, "Dependency graph for class {mclass.name}") end end -redef class MMGlobalProperty - # Return the short name of the property - fun short_name: String do - return self.intro.html_name - end -end - -redef class MMLocalProperty - super MMEntity - # Anchor of the property description in the module html file - fun html_anchor: String - do - return "PROP_{self.mmmodule.toplevel_owner}_{local_class}_{cmangle(name)}" - end - - redef fun json_entry(dctx) do - return "\{txt:\"{qualified_name}\",url:\"{local_class.html_name}.html#{html_anchor}\"\}," - end - - redef fun qualified_name do - return "{intro_module.qualified_name}::{local_class.html_name}::{html_name}" - end +# +# Model redefs +# - fun html_open_link(dctx: DocContext): String - do - if not require_doc(dctx) then print "not required {self}" - var title = "{html_name}{signature.to_s}" - if short_doc != " " then - title += " #{short_doc}" +redef class MModule + # Return the HTML escaped name of the module + private fun html_name: String do return name.html_escape + + # URL to nitdoc page + # module_owner_name.html + private fun url: String do + if url_cache == null then + var res = new Buffer + res.append("module_") + var mowner = public_owner + if mowner != null then + res.append("{public_owner.name}_") + end + res.append("{self.name}.html") + url_cache = res.to_s + end + return url_cache.as(not null) + end + private var url_cache: nullable String + + # html anchor id for the module in a nitdoc page + # MOD_owner_name + private fun anchor: String do + if anchor_cache == null then + var res = new Buffer + res.append("MOD_") + var mowner = public_owner + if mowner != null then + res.append("{public_owner.name}_") + end + res.append(self.name) + anchor_cache = res.to_s end - return "" + return anchor_cache.as(not null) end + private var anchor_cache: nullable String - fun html_name: String - do - return self.name.to_s.html_escape - end - - redef fun html_link(dctx) - do - if not require_doc(dctx) then print "not required {self}" - var title = "{html_name}{signature.to_s}" - if short_doc != " " then - title += " #{short_doc}" + # Return a link (html a tag) to the nitdoc module page + # html_name + private fun html_link(page: NitdocPage) do + if html_link_cache == null then + var res = new Buffer + if page.ctx.mbuilder.mmodule2nmodule.has_key(self) then + res.append("{html_name}") + else + res.append("{html_name}") + end + html_link_cache = res.to_s end - return "{html_name}" + page.append(html_link_cache.as(not null)) end + private var html_link_cache: nullable String - fun html_link_special(dctx: DocContext, lc: MMLocalClass): String - do - if not require_doc(dctx) then print "not required {self}" - var title = "{html_name}{signature_for(lc.get_type)}" - if short_doc != " " then - title += " #{short_doc}" - end - return "{html_name}" + # Return the module signature decorated with html + # module html_full_namespace + private fun html_signature(page: NitdocPage) do + page.append("module ") + html_full_namespace(page) + page.append("") end - # Kind of property (fun, attr, etc.) - fun kind: String is abstract - - redef fun short_doc - do - var d = doc - if d != null then - return d.short - else if global.intro == self then - return " " - else - return global.intro.short_doc + # Return the module full namespace decorated with html + # public_owner.html_namespace::html_link + private fun html_full_namespace(page: NitdocPage) do + page.append("") + var mowner = public_owner + if mowner != null then + public_owner.html_namespace(page) + page.append("::") end + html_link(page) + page.append("") end - - redef fun doc - do - var n = node - if n == null or not n isa APropdef then - return null - end - var d = n.n_doc - if d == null then - return null - end - if d.n_comment.is_empty then - return null + + # Return the module full namespace decorated with html + # public_owner.html_namespace + private fun html_namespace(page: NitdocPage) do + page.append("") + var mowner = public_owner + if mowner != null then + public_owner.html_namespace(page) else - return d + html_link(page) end + page.append("") end - # The most specific module in the nesting hierarchy that exports the intro of self - fun intro_module: MMModule - do - var m = global.intro.mmmodule - var mo = m.direct_owner - while mo != null and mo.visibility_for(m) >= 2 do - m = mo - mo = m.direct_owner + # Return the full comment of the module decorated with html + private fun html_comment(page: NitdocPage) do + page.append("
    ") + if page.ctx.mbuilder.mmodule2nmodule.has_key(self) then + var nmodule = page.ctx.mbuilder.mmodule2nmodule[self] + if not page.ctx.github_gitdir is null then + var loc = nmodule.doc_location.github(page.ctx.github_gitdir.as(not null)) + page.append("") + end + if nmodule.full_comment == "" then + page.append("

    ") + page.append("no comment for ") + else + page.append("

    {nmodule.full_markdown}
    ") + page.append("

    ") + end + page.append("definition in ") + self.html_full_namespace(page) + page.append(" {page.show_source(nmodule.location)}

    ") end - return m + page.append("
    ") end - # Is the intro of self exported by the top-level module ? - fun is_toplevel: Bool - do - var m = intro_module - return m == m.toplevel_owner + private fun has_mclassdef_for(mclass: MClass): Bool do + for mmodule in self.in_nesting.greaters do + for mclassdef in mmodule.mclassdefs do + if mclassdef.mclass == mclass then return true + end + end + return false end - # Return true if the global property must be documented according to the visibility configured - fun require_doc(dctx: DocContext): Bool - do - if global.visibility_level == 3 and not dctx.with_private then return false # Private - if dctx.public_only then - var m = intro_module - if m != m.toplevel_owner then return false # Unexported + private fun has_mclassdef(mclassdef: MClassDef): Bool do + for mmodule in self.in_nesting.greaters do + for oclassdef in mmodule.mclassdefs do + if mclassdef == oclassdef then return true + end end - return true + return false end +end - # Document the global property in the global class lc - fun full_documentation(dctx: DocContext, lc: MMLocalClass) - do - var visibility: String - if global.visibility_level == 1 then - visibility = "public" - else if global.visibility_level == 2 then - visibility = "protected" - else if global.visibility_level == 3 then - visibility = "private" - else - abort - end - - var intro_class = global.intro.local_class - var is_redef = local_class.global != intro_class.global or local_class.mmmodule.toplevel_owner != intro_class.mmmodule.toplevel_owner - - dctx.add("
    \n") - dctx.add("

    {html_name}{signature.to_html(dctx, true)}

    \n") - dctx.add("
    \n") - - if is_redef then - dctx.add("redef ") - end - if not is_toplevel then - dctx.add("(unexported) ") - end - if global.visibility_level == 2 then - dctx.add("protected ") - else if global.visibility_level == 3 then - dctx.add("private ") - end - dctx.add(kind) - dctx.add(" {intro_class.mmmodule.toplevel_owner.name}") - if intro_class.global == lc.global then - dctx.add("::{lc.name}") - else - dctx.add("::{mmmodule[intro_class.global].html_link(dctx)}") - end - if is_redef then - dctx.add("::{mmmodule[intro_class.global][global].global.intro.html_link(dctx)}") - else - dctx.add("::{html_name}") - end - dctx.add("
    ") - dctx.add("
    ") - dctx.add("
    ") +redef class MClass + # Return the HTML escaped name of the module + private fun html_name: String do return name.html_escape - # Collect all refinement of the global property in the same global property - var lps = new Array[MMLocalProperty] - for l in prhe.greaters_and_self do - lps.add(l) - end + # URL to nitdoc page + # class_owner_name.html + private fun url: String do + return "class_{public_owner}_{name}.html" + end - var introdoc = false - if global.intro.doc != null then - for lp in lps do - if lp.doc == null then introdoc = true - end + # html anchor id for the class in a nitdoc page + # MOD_owner_name + private fun anchor: String do + if anchor_cache == null then + anchor_cache = "CLASS_{public_owner.name}_{name}" end - if introdoc then - dctx.add("
    {global.intro.doc.to_html}
    ") - dctx.add("") - dctx.add("CancelCommit") - dctx.add("
    ")
    -		end
    -
    -		var tlmods = new Array[MMModule]
    -		for lp in lps do
    -			var bm = lp.mmmodule.toplevel_owner
    -			var lcm = lc.global.intro.mmmodule
    -			if lcm.mhe < lp.mmmodule then bm = lcm.toplevel_owner
    -			if not tlmods.has(bm) then tlmods.add(bm)
    -		end
    -
    -		for tm in tlmods do
    -			# Document the top level property for the current top level module
    -			var tlp
    -			if tm.global_classes.has(lc.global) then
    -				tlp = tm[lc.global][self.global]
    -				#assert lps.has(tlp) # FIXME What this line is used for?
    -			else if tm.global_classes.has(self.local_class.global) then
    -				# Self is the inherited property. Process it
    -				tlp = tm[self.local_class.global][self.global]
    -				assert lps.has(tlp)
    -			else
    -				# We skip this module since the props defined by the module is  
    -				continue
    -			end
    -
    -			var tlcm = lc.global.intro.mmmodule.toplevel_owner
    -			if not tlcm.mhe <= tm then
    -				dctx.add("

    In module {tm.html_link(dctx)} :

    ") - end + return anchor_cache.as(not null) + end + private var anchor_cache: nullable String - var doc = tlp.doc - var n = tlp.node - if doc != null and (not introdoc or global.intro.doc != doc) then - if n != null then - var l = n.location - dctx.add("
    {doc.to_html}
    ") - end - else if not is_redef then - if n != null then - var l = n.location - dctx.add("New comment\n") + # Return a link (with signature) to the nitdoc class page + # html_name(signature) + private fun html_link(page: NitdocPage) do + if html_link_cache == null then + var res = new Buffer + res.append("") - dctx.add("CancelCommit") - dctx.add("
    ")
    -			dctx.add("

    ") - if tlp.local_class.global != lc.global then - dctx.add("inherited from {tlp.local_class.html_link(dctx)} ") - end - if tm != tlp.mmmodule then - dctx.add("defined by the module {tlp.mmmodule.html_link(dctx)} ") - end - if n != null then - var l = n.location - dctx.show_source(l) - end - - dctx.open_stage - dctx.stage(". previously defined by:") - for lp in lps do - var tl = lp.mmmodule.toplevel_owner - if tl != tm then continue - if lp == tlp then continue - dctx.add(" {lp.mmmodule.html_link(dctx)}") - if lp.local_class.global != lc.global then - dctx.add(" for {lp.local_class.html_link(dctx)} ") + res.append(">{html_name}{html_short_signature}") + html_link_cache = res.to_s + end + page.append(html_link_cache.as(not null)) + end + private var html_link_cache: nullable String + + # Return a short link (without signature) to the nitdoc class page + # html_name + private fun html_short_link(page: NitdocPage) do + if html_short_link_cache == null then + var res = new Buffer + res.append("{html_name}") + html_short_link_cache = res.to_s + end + page.append(html_short_link_cache.as(not null)) + end + private var html_short_link_cache: nullable String + + # Return a link (with signature) to the class anchor + # html_name + private fun html_link_anchor(page: NitdocPage) do + if html_link_anchor_cache == null then + var res = new Buffer + res.append("") + res.append(">{html_name}{html_short_signature}") + html_link_anchor_cache = res.to_s end - dctx.add("

    ") - dctx.add("
    ") + page.append(html_link_anchor_cache.as(not null)) end -end -redef class MMMethod - redef fun kind do return if global.is_init then "init" else "fun" -end -redef class MMAttribute - redef fun kind do return "var" -end -redef class MMTypeProperty - redef fun kind do return "type" -end + private var html_link_anchor_cache: nullable String -redef class MMSrcModule - redef fun short_doc - do - var d = doc - if d != null then - return d.short - else - return " " + # Return the generic signature of the class with bounds + # [E: MType, F: MType] + private fun html_signature(page: NitdocPage) do + if arity > 0 then + page.append("[") + for i in [0..intro.parameter_names.length[ do + page.append("{intro.parameter_names[i]}: ") + intro.bound_mtype.arguments[i].html_link(page) + if i < intro.parameter_names.length - 1 then page.append(", ") + end + page.append("]") end end - redef fun doc - do - var n = node - if n.n_moduledecl == null then - return null - end - var np = n.n_moduledecl - var d = np.n_doc - if d == null then - return null - end - if d.n_comment.is_empty then - return null + # Return the generic signature of the class without bounds + # [E, F] + private fun html_short_signature: String do + if arity > 0 then + return "[{intro.parameter_names.join(", ")}]" + else + return "" + end + end + + # Return the class namespace decorated with html + # intro_module::html_short_link + private fun html_namespace(page: NitdocPage) do + intro_mmodule.html_namespace(page) + page.append("::") + html_short_link(page) + page.append("") + end + + # Return a list item for the mclass + #
  • html_link
  • + private fun html_sidebar_item(page: NitdocModule) do + if page.mmodule.in_nesting.greaters.has(intro.mmodule) then + page.append("
  • ") + page.append("I") + html_link_anchor(page) + else if page.mmodule.has_mclassdef_for(self) then + page.append("
  • ") + page.append("R") + html_link_anchor(page) + else + page.append("
  • ") + page.append("H") + html_link(page) + end + page.append("
  • ") + end + + private fun html_full_desc(page: NitdocModule) do + var is_redef = not page.mmodule.in_nesting.greaters.has(intro.mmodule) + var redefs = mpropdefs_in_module(page) + if not is_redef or not redefs.is_empty then + var classes = new Array[String] + classes.add(kind.to_s) + if is_redef then classes.add("redef") + classes.add(visibility.to_s) + page.append("
    ") + page.append("

    ") + page.append("") + html_short_link(page) + html_signature(page) + page.append("

    ") + html_info(page) + html_comment(page) + page.append("
    ") + end + end + + private fun html_info(page: NitdocModule) do + page.append("
    ") + if visibility < public_visibility then page.append("{visibility.to_s} ") + if not page.mmodule.in_nesting.greaters.has(intro.mmodule) then page.append("redef ") + page.append("{kind} ") + html_namespace(page) + page.append("{html_short_signature}
    ") + end + + private fun html_comment(page: NitdocPage) do + page.append("
    ") + if page isa NitdocModule then + page.mmodule.linearize_mclassdefs(mclassdefs) + # comments for each mclassdef contained in current mmodule + for mclassdef in mclassdefs do + if not mclassdef.is_intro and not page.mmodule.mclassdefs.has(mclassdef) then continue + if page.ctx.mbuilder.mclassdef2nclassdef.has_key(mclassdef) then + var nclass = page.ctx.mbuilder.mclassdef2nclassdef[mclassdef] + if nclass isa AStdClassdef then + if not page.ctx.github_gitdir is null then + var loc = nclass.doc_location.github(page.ctx.github_gitdir.as(not null)) + page.append("") + end + if nclass.full_comment == "" then + page.append("

    ") + page.append("no comment for ") + else + page.append("

    {nclass.full_markdown}
    ") + page.append("

    ") + end + if mclassdef.is_intro then + page.append("introduction in ") + else + page.append("refinement in ") + end + mclassdef.mmodule.html_full_namespace(page) + page.append(" {page.show_source(nclass.location)}

    ") + end + end + end else - return d + # comments for intro + if page.ctx.mbuilder.mclassdef2nclassdef.has_key(intro) then + var nclass = page.ctx.mbuilder.mclassdef2nclassdef[intro] + if nclass isa AStdClassdef then + if not page.ctx.github_gitdir is null then + var loc = nclass.doc_location.github(page.ctx.github_gitdir.as(not null)) + page.append("") + end + if nclass.full_comment == "" then + page.append("

    ") + page.append("no comment for ") + else + page.append("

    {nclass.full_markdown}
    ") + page.append("

    ") + end + page.append("introduction in ") + intro.mmodule.html_full_namespace(page) + page.append(" {page.show_source(nclass.location)}

    ") + end + end end + page.append("
    ") end -end -redef class ADoc - # Html transcription of the doc - fun to_html: String - do - var res = new Buffer - for c in n_comment do - res.append(c.text.substring_from(1)) + private fun mpropdefs_in_module(page: NitdocModule): Array[MPropDef] do + var res = new Array[MPropDef] + page.mmodule.linearize_mclassdefs(mclassdefs) + for mclassdef in mclassdefs do + if not page.mmodule.mclassdefs.has(mclassdef) then continue + if mclassdef.is_intro then continue + for mpropdef in mclassdef.mpropdefs do + if mpropdef.mproperty.visibility < page.ctx.min_visibility then continue + if mpropdef isa MAttributeDef then continue + res.add(mpropdef) + end end - return res.to_s.html_escape + return res end +end - # Oneliner transcription of the doc - fun short: String - do - return n_comment.first.text.substring_from(1).html_escape +redef class MProperty + # Escape name for html output + private fun html_name: String do return name.html_escape + + # Return the property namespace decorated with html + # intro_module::intro_class::html_link + private fun html_namespace(page: NitdocPage) do + intro_mclassdef.mclass.html_namespace(page) + page.append(intro_mclassdef.mclass.html_short_signature) + page.append("::") + intro.html_link(page) + page.append("") end end -redef class MMLocalClass - super MMEntity - - # Anchor of the class description in the module html file - fun html_anchor: String do return "CLASS_{self}" +redef class MType + # Link to the type definition in the nitdoc page + private fun html_link(page: NitdocPage) is abstract +end - fun html_name: String do return "{self}" +redef class MClassType + redef fun html_link(page) do mclass.html_link(page) +end - redef fun html_link(dctx) - do - if not require_doc(dctx) then print "{dctx.filename}: not required {self}" - if short_doc == " " then - return "{self}" - else - return "{self}" - end +redef class MNullableType + redef fun html_link(page) do + page.append("nullable ") + mtype.html_link(page) end +end - redef fun json_entry(dctx) do - return "\{txt:\"{qualified_name}\",url:\"{html_name}.html\"\}," +redef class MGenericType + redef fun html_link(page) do + page.append("{mclass.html_name}[") + for i in [0..arguments.length[ do + arguments[i].html_link(page) + if i < arguments.length - 1 then page.append(", ") + end + page.append("]") end +end - redef fun qualified_name do - return "{intro_module.qualified_name}::{html_name}" +redef class MParameterType + redef fun html_link(page) do + var name = mclass.intro.parameter_names[rank] + page.append("{name}") end +end - redef fun short_doc do return global.intro.short_doc - - redef fun doc do return global.intro.doc +redef class MVirtualType + redef fun html_link(page) do mproperty.intro.html_link(page) +end - fun kind: String - do - if global.is_interface then - return "interface" - else if global.is_abstract then - return "abstract class" - else if global.is_enum then - return "enum" - else - return "class" - end +redef class MClassDef + # Return the classdef namespace decorated with html + private fun html_namespace(page: NitdocPage) do + mmodule.html_full_namespace(page) + page.append("::") + mclass.html_link(page) + page.append("") end +end - # The most specific module in the nesting hierarchy that exports the intro of self - fun intro_module: MMModule - do - var m = global.intro.mmmodule - var mo = m.direct_owner - while mo != null and mo.visibility_for(m) >= 2 do - m = mo - mo = m.direct_owner - end - return m +redef class MPropDef + # Return the full qualified name of the mpropdef + # module::classdef::name + private fun full_name: String do + return "{mclassdef.mclass.public_owner.name}::{mclassdef.mclass.name}::{mproperty.name}" end - fun menu_link(dctx: DocContext, p: MMLocalProperty) - do - if p.local_class.global != self.global then - if p.global.intro.local_class.name == "Object".to_symbol then return - if p.global.is_init or p isa MMTypeProperty then - dctx.add("
  • H {p.html_link_special(dctx, self)}
  • \n") - else - dctx.add("
  • H {p.html_link(dctx)}
  • \n") - end - else if p.global.intro.local_class.global == self.global then - dctx.add("
  • I {p.html_link_special(dctx, self)}
  • \n") - else - dctx.add("
  • R {p.html_link_special(dctx, self)}
  • \n") + # URL into the nitdoc page + # class_owner_name.html#anchor + private fun url: String do + if url_cache == null then + url_cache = "{mclassdef.mclass.url}#{anchor}" end + return url_cache.as(not null) end + private var url_cache: nullable String - # Return true if the global class must be documented according to the visibility configured - fun require_doc(dctx: DocContext): Bool - do - if global.visibility_level == 3 and not dctx.with_private then return false # Private - if dctx.public_only then - var m = intro_module - if m != m.toplevel_owner then return false # Unexported + # html anchor id for the property in a nitdoc class page + # PROP_mclass_propertyname + private fun anchor: String do + if anchor_cache == null then + anchor_cache = "PROP_{mclassdef.mclass.public_owner.name}_{mproperty.name.replace(" ", "_")}" end - return true + return anchor_cache.as(not null) end + private var anchor_cache: nullable String - # Fill the body for the page associated to the global class - fun file_page_doc(dctx: DocContext) - do - dctx.add("
    \n") - - var props = new Array[MMLocalProperty] - var inh = new HashMap[MMLocalClass, Array[MMLocalProperty]] - var inhs = new Array[MMLocalClass] - for g in global_properties do - var p = self[g] - if not p.require_doc(dctx) then continue - if p.local_class.global == global or g.is_init_for(self) or p isa MMTypeProperty then - props.add(p) + # Return a link to property into the nitdoc class page + # html_name + private fun html_link(page: NitdocPage) do + if html_link_cache == null then + var res = new Buffer + if page.ctx.mbuilder.mpropdef2npropdef.has_key(self) then + var nprop = page.ctx.mbuilder.mpropdef2npropdef[self] + res.append("{mproperty.html_name}") else - var lc = mmmodule[p.local_class.global] - if inh.has_key(lc) then - inh[lc].add(p) - else - inh[lc] = [p] - inhs.add(lc) - end - props.add(p) + res.append("{mproperty.html_name}") end + html_link_cache = res.to_s end - dctx.sort(props) + page.append(html_link_cache.as(not null)) + end + private var html_link_cache: nullable String - dctx.add("\n") - - dctx.add("\n") - - dctx.add("
    \n") - - - dctx.add("
    \n") - dctx.add("

    {name}

    \n") - dctx.add("
    ") - if global.visibility_level == 2 then - abort - else if global.visibility_level == 3 then - dctx.add("private ") - else if self.global.intro.mmmodule.toplevel_owner.visibility_for(self.global.intro.mmmodule) <= 1 then - dctx.add("(unexported) ") - end - dctx.add("{kind} {global.intro.mmmodule.toplevel_owner.html_link(dctx)}::{name}
    ") - dctx.add("
    ") - dctx.add("
    \n") - var doc = doc - if doc != null then - var l = doc.location - dctx.add("
    {doc.to_html}
    \n") - dctx.add("") - dctx.add("CancelCommit") - dctx.add("
    ")
    -		end
    -
    -		var cla = new HashSet[MMLocalClass]
    -		var sm = new HashSet[MMLocalClass]
    -		var sm2 = new HashSet[MMLocalClass]
    -		sm.add(self)
    -		while cla.length + sm.length < 10 and sm.length > 0 do
    -			cla.add_all(sm)
    -			sm2.clear
    -			for x in sm do
    -				sm2.add_all(x.cshe.direct_smallers)
    -			end
    -			var t = sm
    -			sm = sm2
    -			sm2 = t
    +			page.append("
  • ") + page.append("R") end - cla.add_all(cshe.greaters_and_self) + html_link(page) + page.append("
  • ") + end - var op = new Buffer - var name = "class_{name}" - op.append("digraph {name} \{ rankdir=BT; node[shape=none,margin=0,width=0,height=0,fontsize=10]; edge[dir=none,color=gray]; ranksep=0.2; nodesep=0.1;\n") - for c in cla do - if c == self then - op.append("\"{c.name}\"[shape=box,margin=0.03];\n") - else - op.append("\"{c.name}\"[URL=\"{c.html_name}.html\"];\n") - end - for c2 in c.cshe.direct_greaters do - if not cla.has(c2) then continue - op.append("\"{c.name}\"->\"{c2.name}\";\n") - end - if not c.cshe.direct_smallers.is_empty then - var others = true - for c2 in c.cshe.direct_smallers do - if cla.has(c2) then others = false - end - if others then - op.append("\"{c.name}...\"[label=\"\"];\n") - op.append("\"{c.name}...\"->\"{c.name}\"[style=dotted];\n") - end - end - end - op.append("\}\n") - dctx.gen_dot(op.to_s, name.to_s, "Inheritance graph for class {name}") - dctx.add("
    \n") - - # Concerns table - dctx.open_stage - dctx.stage("
    \n") - dctx.stage("

    Concerns

    \n") - - var mods = new Array[MMModule] - mods.add(global.intro.mmmodule.toplevel_owner) - for lc in crhe.greaters do - if not lc isa MMSrcLocalClass then continue - var m = lc.mmmodule.toplevel_owner - if not mods.has(m) then mods.add(m) - end - - var intro = global.intro.mmmodule - var short_doc - dctx.add("
      \n") - for m in mods do - short_doc = "" - if m.short_doc != " " then short_doc = ": {m.short_doc}" - dctx.add("
    • {m.html_link_to_anchor}{short_doc}") - dctx.add("
        \n") - for lc in crhe.linear_extension.reversed do - if lc.mmmodule.toplevel_owner != m then continue - if lc.mmmodule == m then continue - short_doc = "" - if lc.mmmodule.short_doc != " " then short_doc = ": {lc.mmmodule.short_doc}" - dctx.add("
      • {lc.mmmodule.html_link_to_anchor}{short_doc}
      • ") - end - dctx.add("
      \n") - dctx.add("
    • \n") - end - dctx.add("
    \n") - dctx.stage("
    \n") - dctx.close_stage - - dctx.open_stage - dctx.stage("
    \n") - dctx.stage("

    Formal and Virtual Types

    \n") - for i in [0..arity[ do - var f = get_formal(i) - f.full_documentation(dctx, self) - end - for p in props do - if not p isa MMTypeProperty then continue - p.full_documentation(dctx, self) - end - dctx.stage("
    \n") - dctx.close_stage - - dctx.open_stage - dctx.stage("
    \n") - dctx.stage("

    Constructors

    \n") - for p in props do - if not p.global.is_init_for(self) then continue - p.full_documentation(dctx, self) - end - dctx.stage("
    \n") - dctx.close_stage - - dctx.open_stage - dctx.stage("
    \n") - dctx.stage("

    Methods

    \n") - var redefs = new HashMap[MMModule, HashMap[MMModule, Array[MMMethod]]] - for p in props do - if p.global.is_init then continue - if p.local_class.global != self.global then continue - if not p isa MMMethod then continue - # Top level module - var toplevel_module = p.mmmodule.toplevel_owner - if not redefs.has_key(toplevel_module) then - redefs[toplevel_module] = new HashMap[MMModule, Array[MMMethod]] - end - # Nested module - var nested_module = p.mmmodule - if not redefs[toplevel_module].has_key(nested_module) then - redefs[toplevel_module][nested_module] = new Array[MMMethod] - end - # Props - redefs[toplevel_module][nested_module].add(p) - - # Redefs - if p.mmmodule.toplevel_owner != p.intro_module then - toplevel_module = p.intro_module - nested_module = p.global.intro.mmmodule - - if not redefs.has_key(toplevel_module) then - redefs[toplevel_module] = new HashMap[MMModule, Array[MMMethod]] + private fun html_full_desc(page: NitdocPage, ctx: MClass) is abstract + private fun html_info(page: NitdocPage, ctx: MClass) is abstract + + private fun html_comment(page: NitdocPage) do + page.append("
    ") + if not is_intro then + if page.ctx.mbuilder.mpropdef2npropdef.has_key(mproperty.intro) then + var intro_nprop = page.ctx.mbuilder.mpropdef2npropdef[mproperty.intro] + if page.ctx.github_gitdir != null then + var loc = intro_nprop.doc_location.github(page.ctx.github_gitdir.as(not null)) + page.append("") end - if not redefs[toplevel_module].has_key(nested_module) then - redefs[toplevel_module][nested_module] = new Array[MMMethod] + if intro_nprop.full_comment.is_empty then + page.append("

    ") + page.append("no comment for ") + else + page.append("

    {intro_nprop.full_markdown}
    ") + page.append("

    ") end - - redefs[toplevel_module][nested_module].add(p.global.intro.as(MMMethod)) + page.append("introduction in ") + mproperty.intro.mclassdef.html_namespace(page) + page.append(" {page.show_source(intro_nprop.location)}

    ") end end - - # Display toplevel blocks - for m in mods do - if not redefs.has_key(m) then continue - dctx.add(m.html_anchor) - if m != global.intro.mmmodule.toplevel_owner then - dctx.add("

    Methods refined in {m.html_link(dctx)}

    ") + if page.ctx.mbuilder.mpropdef2npropdef.has_key(self) then + var nprop = page.ctx.mbuilder.mpropdef2npropdef[self] + if page.ctx.github_gitdir != null then + var loc = nprop.doc_location.github(page.ctx.github_gitdir.as(not null)) + page.append("") end - - # Display nested module blocks - for lc in crhe.linear_extension.reversed do - if lc.mmmodule.toplevel_owner != m then continue - var nm = lc.mmmodule - if not redefs[m].has_key(nm) then continue - dctx.add(nm.html_anchor) - if nm != global.intro.mmmodule then - short_doc = "" - if nm.short_doc != " " then short_doc = ": {nm.short_doc}" - dctx.add("

    {nm.html_name}{short_doc}

    \n") - end - - var pps = redefs[m][nm] - dctx.sort(pps) - for p in pps do - p.full_documentation(dctx, self) - end + if nprop.full_comment == "" then + page.append("

    ") + page.append("no comment for ") + else + page.append("

    {nprop.full_markdown}
    ") + page.append("

    ") end - end - - if not inhs.is_empty then - dctx.open_stage - dctx.stage("

    Inherited Methods

    \n") - for lc in inhs do - dctx.open_stage - dctx.stage("

    Defined in {lc.html_link(dctx)}:") - - var ims = new Array[MMMethod] - for p in inh[lc] do - if p.global.is_init then continue - if not p isa MMMethod then continue - ims.add(p) - end - - var i = 0 - for p in ims do - dctx.add(" {p.html_link(dctx)}") - if i < ims.length - 1 then dctx.add(",") - i += 1 - end - - dctx.stage("

    ") - dctx.close_stage + if is_intro then + page.append("introduction in ") + else + page.append("redefinition in ") end - dctx.close_stage + mclassdef.html_namespace(page) + page.append(" {page.show_source(nprop.location)}

    ") end - dctx.add("
    \n") - dctx.close_stage - dctx.add("
    \n") + page.append("") end end -redef class MMSrcLocalClass - redef fun short_doc - do - var d = doc - if d != null then - return d.short - else if global.intro == self then - return " " +redef class MMethodDef + redef fun html_full_desc(page, ctx) do + var classes = new Array[String] + var is_redef = mproperty.intro_mclassdef.mclass != ctx + if mproperty.is_init then + classes.add("init") + else + classes.add("fun") + end + if is_redef then classes.add("redef") + classes.add(mproperty.visibility.to_s) + page.append("
    ") + if page.ctx.mbuilder.mpropdef2npropdef.has_key(self) then + page.append("

    ") + page.append("{mproperty.html_name}") + msignature.html_signature(page) + page.append("

    ") + else + page.append("

    ") + page.append("init") + msignature.html_signature(page) + page.append("

    ") + end + html_info(page, ctx) + html_comment(page) + page.append("
    ") + end + + redef fun html_info(page, ctx) do + page.append("
    ") + if mproperty.visibility < public_visibility then page.append("{mproperty.visibility.to_s} ") + if mproperty.intro_mclassdef.mclass != ctx then page.append("redef ") + if mproperty.is_init then + page.append("init ") else - var bc = global.intro - return bc.short_doc + page.append("fun ") end + mproperty.html_namespace(page) + page.append("
    ") end +end - redef fun doc - do - var n = node - if not n isa AStdClassdef then - return null - end - var d = n.n_doc - if d == null then - return null +redef class MVirtualTypeDef + redef fun html_full_desc(page, ctx) do + var is_redef = mproperty.intro_mclassdef.mclass != ctx + var classes = new Array[String] + classes.add("type") + if is_redef then classes.add("redef") + classes.add(mproperty.visibility.to_s) + page.append("
    ") + page.append("

    {mproperty.html_name}: ") + bound.html_link(page) + page.append("

    ") + html_info(page, ctx) + html_comment(page) + page.append("
    ") + end + + redef fun html_info(page, ctx) do + page.append("
    ") + if mproperty.intro_mclassdef.mclass != ctx then page.append("redef ") + page.append("type ") + mproperty.html_namespace(page) + page.append("
    ") + end +end + +redef class MSignature + private fun html_signature(page: NitdocPage) do + if not mparameters.is_empty then + page.append("(") + for i in [0..mparameters.length[ do + mparameters[i].html_link(page) + if i < mparameters.length - 1 then page.append(", ") + end + page.append(")") end - if d.n_comment.is_empty then - return null - else - return d + if return_mtype != null then + page.append(": ") + return_mtype.html_link(page) end end -end -redef class MMSignature - # Htlm transcription of the signature (with nested links) - fun to_html(dctx: DocContext, with_closure: Bool): String - do + private fun untyped_signature(page: NitdocPage): String do var res = new Buffer - if arity > 0 then + if not mparameters.is_empty then res.append("(") - for i in [0..arity[ do - if i > 0 then res.append(", ") - res.append(self.params[i].name.to_s) - res.append(": ") - res.append(self[i].html_link(dctx)) - if self.vararg_rank == i then - res.append("...") - end + for i in [0..mparameters.length[ do + res.append(mparameters[i].name) + if i < mparameters.length - 1 then res.append(", ") end res.append(")") end - if return_type != null then - res.append(": ") - res.append(return_type.html_link(dctx)) - end - if with_closure then - for c in closures do - res.append(" ") - if c.is_optional then res.append("[") - if c.is_break then res.append("break ") - res.append("!{c.name}") - res.append(c.signature.to_html(dctx, false)) - if c.is_optional then res.append("]") - end - end return res.to_s end end -redef class MMType - # Htlm transcription of the type (with nested links) - fun html_link(dctx: DocContext): String do return to_s +redef class MParameter + private fun html_link(page: NitdocPage) do + page.append("{name}: ") + mtype.html_link(page) + if is_vararg then page.append("...") + end end -redef class MMTypeSimpleClass - redef fun html_link(dctx) do return local_class.html_link(dctx) +# +# Nodes redefs +# + +redef class Location + fun github(gitdir: String): String do + var base_dir = getcwd.join_path(gitdir).simplify_path + var file_loc = getcwd.join_path(file.filename).simplify_path + var gith_loc = file_loc.substring(base_dir.length + 1, file_loc.length) + return "{gith_loc}:{line_start},{column_start}--{line_end},{column_end}" + end end -redef class MMTypeGeneric - redef fun html_link(dctx) - do +redef class ADoc + private fun short_comment: String do + return n_comment.first.text.substring_from(2).replace("\n", "").html_escape + end + + private fun full_comment: String do var res = new Buffer - res.append(local_class.html_link(dctx)) - res.append("[") - res.append(params[0].html_link(dctx)) - for i in [1..params.length[ do - res.append(", ") - res.append(params[i].html_link(dctx)) - end - res.append("]") - return res.to_s + for t in n_comment do + var text = t.text + text = text.substring_from(1) + if text.first == ' ' then text = text.substring_from(1) + res.append(text.html_escape) + end + var str = res.to_s + return str.substring(0, str.length - 1) end end -redef class MMTypeFormalParameter - fun html_anchor: String - do - return "FT_{local_class}_{cmangle(name)}" +redef class AModule + private fun short_comment: String do + if n_moduledecl != null and n_moduledecl.n_doc != null then + return n_moduledecl.n_doc.short_comment + end + return "" end - redef fun html_link(dctx) - do - return "{name}" + + private fun full_comment: String do + if n_moduledecl != null and n_moduledecl.n_doc != null then + return n_moduledecl.n_doc.full_comment + end + return "" end - fun full_documentation(dctx: DocContext, lc: MMLocalClass) - do - dctx.add("
    \n") - dctx.add("

    {name}: {bound.html_link(dctx)}

    \n") - dctx.add("
    ") - dctx.add("formal generic type") - dctx.add("
    ") - dctx.add("
    ") + + private fun full_markdown: String do + if n_moduledecl != null and n_moduledecl.n_doc != null then + return n_moduledecl.n_doc.full_markdown.html + end + return "" + end + + private fun doc_location: Location do + if n_moduledecl != null and n_moduledecl.n_doc != null then + return n_moduledecl.n_doc.location + end + return location end end -redef class MMNullableType - redef fun html_link(dctx) do return "nullable " + as_notnull.html_link(dctx) +redef class AStdClassdef + private fun short_comment: String do + if n_doc != null then return n_doc.short_comment + return "" + end + + private fun full_comment: String do + if n_doc != null then return n_doc.full_comment + return "" + end + + private fun full_markdown: String do + if n_doc != null then return n_doc.full_markdown.html + return "" + end + + private fun doc_location: Location do + if n_doc != null then return n_doc.location + return location + end end -redef class MMVirtualType - redef fun html_link(dctx) do return property.html_link(dctx) +redef class APropdef + private fun short_comment: String do + if n_doc != null then return n_doc.short_comment + return "" + end + + private fun full_comment: String do + if n_doc != null then return n_doc.full_comment + return "" + end + + private fun full_markdown: String do + if n_doc != null then return n_doc.full_markdown.html + return "" + end + + private fun doc_location: Location do + if n_doc != null then return n_doc.location + return location + end end -var c = new DocContext -c.exec_cmd_line + +var nitdoc = new NitdocContext +nitdoc.generate_nitdoc diff --git a/tests/ni_nitdoc.args b/tests/ni_nitdoc.args deleted file mode 100644 index 30c07b9..0000000 --- a/tests/ni_nitdoc.args +++ /dev/null @@ -1 +0,0 @@ -module_1.nit -d out/ni_nitdoc_args1.write diff --git a/tests/nitdoc.args b/tests/nitdoc.args index ecb729f..f984808 100644 --- a/tests/nitdoc.args +++ b/tests/nitdoc.args @@ -1 +1 @@ -module_1 -d out/nitdoc_args1.write +module_1.nit -d out/nitdoc_args1.write diff --git a/tests/sav/nitdoc.res b/tests/sav/nitdoc.res index d681ac1..0a917d7 100644 --- a/tests/sav/nitdoc.res +++ b/tests/sav/nitdoc.res @@ -1,4 +1,3 @@ -../src/syntax/mmbuilder.nit:998,8--28: Warning: Expression is already a AMethPropdef since it is a AInitPropdef. usage: nitdoc [options] file... -W, --warn Show warnings -q, --quiet Do not show warnings @@ -12,13 +11,13 @@ usage: nitdoc [options] file... -I, --path Set include path for loaders (may be used more than once) --only-parse Only proceed to parse step of loaders --only-metamodel Stop after meta-model processing - --public Generate only the public API - --private Generate the private API -d, --dir Directory where doc is generated --source What link for source (%f for filename, %l for first line, %L for last line) - --no-dot Do not generate graphes with graphviz --sharedir Directory containing the nitdoc files + --no-dot Do not generate graphes with graphiviz + --private Generate the private API --custom-title Title displayed in the top of the Overview page and as suffix of all page names - --custom-menu-items Items displayed in menu before the 'Overview' item (Each item must be enclosed in 'li' tags) - --custom-overview-text Text displayed as introduction of Overview page before the modules list --custom-footer-text Text displayed as footer of all pages + --custom-overview-text Text displayed as introduction of Overview page before the modules list + --custom-menu-items Items displayed in menu before the 'Overview' item (Each item must be enclosed in 'li' tags) + --github-origin The branch where edited commits will be pulled into (ex: user:repo:branch) diff --git a/tests/sav/nitdoc.sav b/tests/sav/nitdoc.sav index 394b9fa..ee72676 100644 --- a/tests/sav/nitdoc.sav +++ b/tests/sav/nitdoc.sav @@ -11,14 +11,15 @@ usage: nitdoc [options] file... -I, --path Set include path for loaders (may be used more than once) --only-parse Only proceed to parse step of loaders --only-metamodel Stop after meta-model processing - --public Generate only the public API - --private Generate the private API -d, --dir Directory where doc is generated --source What link for source (%f for filename, %l for first line, %L for last line) - --no-dot Do not generate graphes with graphviz --sharedir Directory containing the nitdoc files + --no-dot Do not generate graphes with graphviz + --private Generate the private API --custom-title Title displayed in the top of the Overview page and as suffix of all page names - --custom-menu-items Items displayed in menu before the 'Overview' item (Each item must be enclosed in 'li' tags) - --custom-overview-text Text displayed as introduction of Overview page before the modules list --custom-footer-text Text displayed as footer of all pages - --github GitHub repo name, example: --github MyRepoName + --custom-overview-text Text displayed as introduction of Overview page before the modules list + --custom-menu-items Items displayed in menu before the 'Overview' item (Each item must be enclosed in 'li' tags) + --github-upstream The branch where edited commits will be pulled into (ex: user:repo:branch) + --github-base-sha1 The sha1 of the base commit used to create pull request + --github-gitdir The git working directory used to resolve path name (ex: /home/me/myproject/) diff --git a/tests/sav/nitdoc_args1.sav b/tests/sav/nitdoc_args1.sav index 64d281c..7c2f531 100644 --- a/tests/sav/nitdoc_args1.sav +++ b/tests/sav/nitdoc_args1.sav @@ -1,51 +1,46 @@ -A.html -B.html -Bool.html -Int.html -Object.html -Sys.html -class_A.dot -class_A.map -class_A.png -class_A.s.dot -class_B.dot -class_B.map -class_B.png -class_B.s.dot -class_Bool.dot -class_Bool.map -class_Bool.png -class_Bool.s.dot -class_Int.dot -class_Int.map -class_Int.png -class_Int.s.dot -class_Object.dot -class_Object.map -class_Object.png -class_Object.s.dot -class_Sys.dot -class_Sys.map -class_Sys.png -class_Sys.s.dot +ZeroClipboard.swf +class_module_0_Int.html +class_module_0_Object.html +class_module_0_Sys.html +class_module_1_A.html +class_module_1_B.html dep.dot dep.map dep.png dep.s.dot -full-index.html -help.html +dep_A.dot +dep_A.map +dep_A.png +dep_A.s.dot +dep_B.dot +dep_B.map +dep_B.png +dep_B.s.dot +dep_Int.dot +dep_Int.map +dep_Int.png +dep_Int.s.dot +dep_Object.dot +dep_Object.map +dep_Object.png +dep_Object.s.dot +dep_Sys.dot +dep_Sys.map +dep_Sys.png +dep_Sys.s.dot +dep_module_0.dot +dep_module_0.map +dep_module_0.png +dep_module_0.s.dot +dep_module_1.dot +dep_module_1.map +dep_module_1.png +dep_module_1.s.dot index.html -module_0.dot -module_0.html -module_0.map -module_0.png -module_0.s.dot -module_1.dot -module_1.html -module_1.map -module_1.png -module_1.s.dot +module_module_0.html +module_module_1.html quicksearch-list.js resources/ scripts/ +search.html styles/ diff --git a/tests/testfull.sh b/tests/testfull.sh index daf49f4..8c93549 100755 --- a/tests/testfull.sh +++ b/tests/testfull.sh @@ -6,4 +6,4 @@ do y="$x/$bx.nit" test -f $y && list="$list $y" done -./tests.sh "$@" *.nit ../examples/*.nit ../examples/leapfrog/leapfrog.nit ../examples/shoot/src/shoot_logic.nit ../lib/*.nit $list ../src/nitdoc.nit ../src/nits.nit ../src/nitc.nit ../src/test_parser.nit ../src/nit.nit ../src/nitmetrics.nit ../src/nitg.nit ../src/nitx.nit ../src/ni_nitdoc.nit ../src/netdbg.nit ../src/nitlight.nit ../contrib/sort_downloads/src/sort_downloads.nit +./tests.sh "$@" *.nit ../examples/*.nit ../examples/leapfrog/leapfrog.nit ../examples/shoot/src/shoot_logic.nit ../lib/*.nit $list ../src/nitdoc.nit ../src/nits.nit ../src/nitc.nit ../src/test_parser.nit ../src/nit.nit ../src/nitmetrics.nit ../src/nitg.nit ../src/nitx.nit ../src/netdbg.nit ../src/nitlight.nit ../contrib/sort_downloads/src/sort_downloads.nit -- 1.7.9.5