eclipse-archived / ceylon-ide-eclipse

Eclipse Plugin for Ceylon
http://ceylon-lang.org/documentation/ide
Eclipse Public License 1.0
59 stars 28 forks source link

Clean imports looooong line #441

Closed tombentley closed 11 years ago

tombentley commented 11 years ago

If I have a lot of imports, such as

import java.lang { Math { jsin=sin, jcos=cos, jtan=tan, 
    jsinh=sinh, jcosh=cosh, jtanh=tanh, 
    jasin=asin, jacos=acos, jatan=atan, jatan2=atan2, jhypot=hypot, 
    jexp=exp, jlog=log, jlog10=log10, 
    jsqrt=sqrt, jcbrt=cbrt, 
    jrandom=random, jfloor=floor, jceiling=ceil, jrint=rint, jmin=min, jmax=max, jscalb=scalb } }

I end up with one really long line. It would be nice if the unused imports could be removed without messing with the formatting. If that's not feasible, it would be nice if the imports were reformatted better (one import per line would be better than one long line, imho).

gavinking commented 11 years ago

@tombentley I think your solution is too heavy-handed. I get stuff like this:

import x.y {
    ...
}

Where clearly:

import x.y { ... }

is preferable. I guess I would prefer to special-case imports with one element.