Well - noone answered to my request so I implemented it my self.

Here is a jde-import-collapse-imports function that will collapse multiple
imports from the same package into a single package import statement if the
number of imports are equal or higher than the value of
jde-import-collapse-imports-threshold.

Hope you can use it - I sure can :)

With regards
 Max



""Max Rydahl Andersen"" <[EMAIL PROTECTED]> wrote in message
9j43it$88r$[EMAIL PROTECTED]">news:9j43it$88r$[EMAIL PROTECTED]...
>
> The jde-import-kill-extra-imports is great, but how about a option to
> collapse multiple imports from the same package to a .* import ?
>
> It should ofcourse be optional and there might be a
> jde-import-collapse-threshold that decided how many imports from the same
> package the file should have before it should start creating .*'s
>
> Just an idea....
>
> Regards
> --
> Max Rydahl Andersen, Software Engineer
>  -----------------------------------------------------------------------
>  Medfork, Margrethepladsen 3, 8000  Aarhus C, Denmark
>  Tel: +45 8732 8787 / Fax: +45 8732 8788
>


begin 666 jde-import-extras.el
M*')E<75I<F4@)VID92D-"BAD969C=7-T;VT@:F1E+6EM<&]R="UC;VQL87!S
M92UI;7!O<G1S+71H<F5S:&]L9" P#0H@("(J(%1H<F5S:&]L9"!L979E;"!U
M<V5D(&)Y("=J9&4M:6UP;W)T+6-O;&QA<'-E+6EM<&]R=',@=&\@9&5C:61E
M('=H96X@82!P86-K86=E('-T87(@:6UP;W)T(&ES('5S960@:6YS=&5A9"!O
M9B!S:6YG;&4@:6UP;W)T<RX@4V5T=&EN9R!T:&4-"G1H<F5S:&]L9"!T;R P
M("AD969A=6QT*2!C875S97,@=&AE($I$12!T;R!N;W0@8V]L;&%P<V4@86YY
M=&AI;F<@870@86QL+B(-"B @.F=R;W5P("=J9&4M<')O:F5C= T*(" Z='EP
M92 G;G5M8F5R*0T*#0HH9&5F=6X@:F1E+6EM<&]R="UC;VQL87!S92UI;7!O
M<G1S("@F;W!T:6]N86P@8V]M;65N=',I#0HB*B!&=6YC=&EO;B!T:&%T(&-O
M;&QA<'-E(&UU;'1I<&QE(&-L87-S(&EM<&]R=',@9G)O;2!T:&4@<V%M92!P
M86-K86=E(&EN=&\@82!S:6YG;&4@+BH@<&%C:V%G92!I;7!O<G0N(%5S97,@
M)VID92UI;7!O<G0M8V]L;&%P<V4M:6UP;W)T<RUT:')E<VAO;&0@=&\@9&5C
M:61E('=H96X@82 N*B!S=&%T96UE;G0@:7,@9V5N97)A=&5D+B!);7!L96UE
M;G1E9"!B>2!A9&0@=&AE('!A8VMA9V4@<W1A=&5M96YT<R!A;F0@=&AE;B!I
M;G9O:V4@)VID92UI;7!O<G0M:VEL;"UE>'1R82UI;7!O<G1S('1O(&-L96%N
M('5P+B(-"B @*&EN=&5R86-T:79E(")0(BD-"B @*&]R("AE<2!M86IO<BUM
M;V1E("=J9&4M;6]D92D-"B @(" @("AE<G)O<B B36%J;W(@;6]D92!M=7-T
M(&)E("=J9&4M;6]D92<B*2D-"B @*&%N9" H:6YT97)A8W1I=F4M<"D-"B @
M(" @(" H8V]N<W @8W5R<F5N="UP<F5F:7@M87)G*0T*(" @(" @("AS971Q
M(&-O;6UE;G0@="DI#0H@("AL970J("@H=&]K96YS(" @("AS96UA;G1I8RUB
M;W9I;F%T92UT;W!L979E;"!T*2D-"@D@*&EM<&]R=',@(" H<V5M86YT:6,M
M9FEN9"UN;VYT97)M:6YA;"UB>2UT;VME;B G:6YC;'5D92!T;VME;G,I*2D-
M"B @(" H:68@*#P](&ID92UI;7!O<G0M8V]L;&%P<V4M:6UP;W)T<RUT:')E
M<VAO;&0@,"D-"@DH;65S<V%G92 B0V]L;&%P<V4@=&AR97-H;VQD('-E="!T
M;R!Z97)O+B!.;R!C;VQL87!S:6YG('=I;&P@;V-C=7(N(BD-"B @(" H:68@
M*&YO="!I;7!O<G1S*0T*"2AM97-S86=E(").;R!I;7!O<G0@9F]U;F0B*0T*
M(" @(" @*&QE="H@*"AP86-K86=E+6)U8VME=',@*&ID92UI;7!O<G0M8V]L
M;&%P<V4M:6UP;W)T<RUB=6-K971I>F4@:6UP;W)T<RDI#0H)(" @(" H97AT
M<F$M:6UP;W)T<R @(&YI;"D-"@D@(" @("A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B!I;7!O<G1S*2D-"@D@(" @
M("AN86UE("AS96UA;G1I8RUT;VME;BUN86UE(&EM<&]R="DI#0H)(" @(" H
M<&%C:V%G96YA;64@*&ID92UP87)S92UG970M<&%C:V%G92UF<F]M+6YA;64@
M;F%M92DI#0H)(" @(" H<&%C:V%G96)I;BD-"@D@(" @("D-"@DH<V5T<2!P
M86-K86=E8FEN("AA<W-O8R!P86-K86=E;F%M92!P86-K86=E+6)U8VME=',I
M*0T*"2AI9B!P86-K86=E8FEN#0H)(" @("AS971C9'(@<&%C:V%G96)I;B H
M8V]N<R!I;7!O<G0@*&-D<B!P86-K86=E8FEN*2DI#0H)(" H<V5T<2!P86-K
M86=E+6)U8VME=',@*&-O;G,@*&-O;G,@<&%C:V%G96YA;64@*&QI<W0@:6UP
M;W)T*2D@<&%C:V%G92UB=6-K971S*2DI#0H)*'-E='$@:6UP;W)T<R H8V1R
M(&EM<&]R=',I*0T*"2DI#0H@('!A8VMA9V4M8G5C:V5T<RD-"B @*0T*"0T*
`
end

Reply via email to