;ò 8?c@s…dkZdfd„ƒYZd„Zdd„Zd„Zd„Zd„Zd fd „ƒYZd kl Z e i i ef7_ dS( NsFormatParagraphcBs#tZd„Zd„Zd„ZRS(NcCs ||_dS(N(sstcsself(sselfsstc((sf/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Plug-ins/FormatParagraph.plug-in.pys__init__scCs t|_dS(N(sNonesselfsstc(sself((sf/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Plug-ins/FormatParagraph.plug-in.pysclosescCsÑ|i}|iƒ\} }| o|o |iiƒ| |!} d} nI|i ƒ} |i | ƒ} |i | ƒ}t||| ƒ\} }} } | o×| i|iƒ}tt| ƒd„|ƒ}|ii|ƒ} tdt| ƒdƒ}t| |i|ƒ}|i|iƒ}d}|d o|i}|d }n| d„}|iit||ƒƒ|}nt| |iƒ}|| jo2|iƒ|i|ƒ|iƒ|i| ƒn|i|ƒdS(NscCs||S(N(sstsl(sstsl((sf/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Plug-ins/FormatParagraph.plug-in.pys+siFiiÿÿÿÿcCs||S(N(sprefixsitem(sitemsprefix((sf/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Plug-ins/FormatParagraph.plug-in.pys;s( sselfsstcstexts GetSelectionsfirstslastsGetTextsdatascomment_headers GetCurrentPossps GetColumnscolsLineFromPositionslnsfind_paragraphssplitseolslinessmapslensjoinsmaxs format_widthsreformat_paragraphsnewdatas block_suffixsbuildersBeginUndoActionsReplaceSelections EndUndoActions SetCurrentPos(sselfslasts format_widthsbuilderslnstexts block_suffixslinessnewdataspscomment_headersdatascolsfirst((sf/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Plug-ins/FormatParagraph.plug-in.pysformat_paragraphs:      #    (s__name__s __module__s__init__sclosesformat_paragraph(((sf/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Plug-ins/FormatParagraph.plug-in.pysFormatParagraphs  c CsQ|i|ƒ}x>||iƒjo t|ƒo|d}|i|ƒ}qW|}t|ƒ}t |ƒ}xCt|ƒ|jot||ƒ o|d}|i|ƒ}qqW|}|d}|i|ƒ}xP|djo"t|ƒ|jot||ƒ o|d}|i|ƒ}qÖW|d}||||i ƒ||!fSdS(Nii(stextsGetLineslinenoslines GetLineCounts is_all_whites first_linenosget_comment_headerscomment_headerslenscomment_header_lenslastsfirstsGetText( stextslinenoscolslasts first_linenosfirstslinescomment_headerscomment_header_len((sf/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Plug-ins/FormatParagraph.plug-in.pysfind_paragraphJs*    %  2  iFc Cs|i|ƒ}d}t|ƒ}x-||jot||ƒo|d}q$W||jo|Snt||ƒ} |d|jot||dƒ ot||dƒ} n| } || } | }x||jot||ƒ oït id||ƒ} xÈtdt| ƒdƒD]®}| |}| oqnt||iƒƒ|jo || jo| i|iƒƒ| }n||d}|dt| ƒjo| |ddjo|d}qqW|d}qÎW| i|iƒƒ| i||ƒ|i| ƒSdS(Niis(\s+)is (sdatassplitseolslinessislensns is_all_whites get_indentsindent1sindent2snewspartialsreswordssrangesjswords expandtabsslimitsappendsrstripsextendsjoin( sdataseolslimitspartialsiswordsjslinessnsindent1sindent2swordssnew((sf/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Plug-ins/FormatParagraph.plug-in.pysreformat_paragraphbs@  '  * ,cCstid|ƒtj SdS(Ns^\s*$(sresmatchslinesNone(sline((sf/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Plug-ins/FormatParagraph.plug-in.pys is_all_white…scCstid|ƒiƒSdS(Ns^(\s*)(sresmatchslinesgroup(sline((sf/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Plug-ins/FormatParagraph.plug-in.pys get_indentˆscCs8tid|ƒ}|tjodSn|idƒSdS(Ns^(\s*#*)si(sresmatchslinesmsNonesgroup(slinesm((sf/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Plug-ins/FormatParagraph.plug-in.pysget_comment_header‹s sFormatParagraphViewPlugincBstZd„Zd„ZRS(NcCsS||_||_t|ƒ|_|idtddfd|iddffƒdS(Ns-ssFormat paragraph( smodelsselfsviewsFormatParagraphs formattersactionssextendsNonesOnFormatParagraph(sselfsmodelsviewsactions((sf/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Plug-ins/FormatParagraph.plug-in.pys__init__“s  cCs|iiƒdS(N(sselfs formattersformat_paragraph(sselfsevent((sf/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Plug-ins/FormatParagraph.plug-in.pysOnFormatParagraph›s(s__name__s __module__s__init__sOnFormatParagraph(((sf/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Plug-ins/FormatParagraph.plug-in.pysFormatParagraphViewPlugin’s (s PySourceView( sresFormatParagraphsfind_paragraphsreformat_paragraphs is_all_whites get_indentsget_comment_headersFormatParagraphViewPluginsViewss PySourceViewsPythonSourceViewsplugins( sget_comment_headers get_indentsFormatParagraphViewPluginsreformat_paragraphsfind_paragraphsres PySourceViewsFormatParagraphs is_all_white((sf/mnt/gmirror/ports/devel/boaconstructor/work/boa-constructor-0.4.4/Plug-ins/FormatParagraph.plug-in.pys?s 5  #